feat(notifications): mentions, inbox, and table watches - #1243
Draft
joepio wants to merge 18 commits into
Draft
Conversation
…ions Propose actor-side mention edges, personal NotificationItems, client-side watch matching for collections/tables, and a phased delivery path from in-app center through Tauri/OS notifications to later push-as-wake. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Lock personal-drive sync for read/dismissed, and document the local notification vs APNs/FCM split for Tauri mobile (wake-then-sync payload). Co-authored-by: Joep Meindertsma <joep@ontola.io>
Lock App menu order (User Settings → Notifications → Settings) and split inbox route from App Settings preference section. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Add the notifications ontology, write actor-side `mentions` from TipTap and chat, materialize personal NotificationItems via NotificationEngine, and ship the sidebar inbox plus a Watch toggle on tables. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Add Playwright specs for the notifications sidebar/inbox, unread badge, mark-all-read, and table Watch toggle. Fix WatchToggle busy-state handling to avoid bare try/finally for React Compiler. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Subscribe inbox rows to LocalChange via useValue, notify the store after mark/dismiss saves, and fall back to direct store writes if the engine is still starting. Parent the notifications ontology under https://atomicdata.dev/ for rights walks. All four notifications Playwright specs are green; populate unit asserts the ontology seeds. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Show Web Notification API / tauri-plugin-notification banners when the tab or window is unfocused; toast when focused. Permission is requested from Watch enable and App Settings, never on cold start. Mark-read and dismiss cancel matching OS notifications. Wire the Tauri plugin + capabilities; document remaining Phase 5 push work. Co-authored-by: Joep Meindertsma <joep@ontola.io>
- WatchToggle on Collection views; Settings watches list (mute/remove) - E2E: watch + simulated other-agent child materializes NotificationItem - DevicePushToken ontology + registerDevicePushToken helper - Hub push_wake helpers (wake-only payload) + commit_monitor hook note - Cold-start push tap queue; flushPendingWatches for tests Co-authored-by: Joep Meindertsma <joep@ontola.io>
- data-watching / mark-all-read / notifications-empty test ids - flushPendingWatches after brief wait for async ResourceUpdated - Avoid brittle lingui-scrambled accessible names in assertions Co-authored-by: Joep Meindertsma <joep@ontola.io>
… tap wire - E2E: mention ResourceUpdated (other actor) materializes inbox item - E2E: mark read on A clears badge on B (same agent, two contexts) - Wire pushWakeTap → navigate in NotificationOsPresenter - useDevicePushRegistration on launch; suppress-if-read helpers Co-authored-by: Joep Meindertsma <joep@ontola.io>
- Wait for engine; in-app nav after mention materialization - Second-device sign-in without Continue; wait for agent then open inbox Co-authored-by: Joep Meindertsma <joep@ontola.io>
- NotificationEngine re-runs mention backlog on DriveChanged - E2E: A invites B, mentions B while B's engine stopped, B reconciles - Closes reverse-query + two-agent invite gaps in planning/coverage Co-authored-by: Joep Meindertsma <joep@ontola.io>
Top-bar Share on a freshly UI-created document can leave useCanWrite stuck false so Create Invite never appears. Use the same drive context-menu share path as the authorization invite e2e instead. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Fix Share Create Invite stuck read-only on new DID docs by resetting useCanWrite optimistically on subject/newness and re-checking when resource.new flips after genesis. Phase 5: handlePushWake/processPushWake (fetch → reconcile → suppress-if-read), receive queue wired in NotificationOsPresenter, and commit_monitor mention → wake stub (provider send still TODO). Co-authored-by: Joep Meindertsma <joep@ontola.io>
Pick tauri-plugin-push-notifications for Phase 5 (documented; Cargo gated until Firebase/APNs project files exist). Add tauriPushBridge to drain local notification cold-start taps and optionally fetch a device token. Hub enqueue_push_wakes looks up DevicePushToken rows per wake agent. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Add PushSender trait with LoggingPushSender default (ready for FCM/APNs), watch subscription wake matching (target/parent, mute/enabled, owner), and route commit_monitor through wakes_for_committed_resource. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Add EnvPushSender (ATOMIC_FCM_* / ATOMIC_APNS_* bearers) installed at serve boot, falling back to log-only without secrets. Gate the Tauri push plugin behind --features mobile-push and document enablement in planning/notifications.md. Co-authored-by: Joep Meindertsma <joep@ontola.io>
Co-authored-by: Joep Meindertsma <joep@ontola.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the notifications design from
planning/notifications.md: ontology, personal-drive inbox, watches, mention engine, in-app center, local OS notifications (Phase 4), and Phase 5 push-wake path (client + hub).Latest
EnvPushSender(server/src/push_provider.rs): sends wake-only FCM HTTP v1 / APNs background pushes when env bearers are set; otherwise log-only. Installed atserveboot.--features mobile-push: optionaltauri-plugin-push-notificationsinit gated for mobile builds once Firebase/APNs project files exist.planning/notifications.mdPhase 5.Still needs humans
ATOMIC_FCM_*/ATOMIC_APNS_*) +google-services.json/ iOS Push entitlementEnv vars (hub)
ATOMIC_FCM_PROJECT_ID+ATOMIC_FCM_BEARER_TOKENATOMIC_APNS_TOPIC+ATOMIC_APNS_BEARER_TOKEN(+ optionalATOMIC_APNS_HOST)Test plan
cargo test -p atomic-server --lib -- push_provider push_wake(10 tests)cargo tauri android build --features mobile-pushwith google-services.json