Skip to content

feat(notifications): mentions, inbox, and table watches - #1243

Draft
joepio wants to merge 18 commits into
developfrom
cursor/notifications-design-0fcd
Draft

feat(notifications): mentions, inbox, and table watches#1243
joepio wants to merge 18 commits into
developfrom
cursor/notifications-design-0fcd

Conversation

@joepio

@joepio joepio commented Aug 1, 2026

Copy link
Copy Markdown
Member

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 at serve boot.
  • Tauri --features mobile-push: optional tauri-plugin-push-notifications init gated for mobile builds once Firebase/APNs project files exist.
  • Enablement checklist documented in planning/notifications.md Phase 5.
  • Hub watch+mention wakes, DevicePushToken lookup, cold-start local drain, invite e2e remain in place.

Still needs humans

  • Product sign-off
  • Real secrets in deploy (ATOMIC_FCM_* / ATOMIC_APNS_*) + google-services.json / iOS Push entitlement
  • Mint/refresh FCM OAuth + APNs JWT out-of-band (in-process JWT helper not included)

Env vars (hub)

Var Role
ATOMIC_FCM_PROJECT_ID + ATOMIC_FCM_BEARER_TOKEN Android/web FCM data wakes
ATOMIC_APNS_TOPIC + ATOMIC_APNS_BEARER_TOKEN (+ optional ATOMIC_APNS_HOST) iOS background wakes

Test plan

  • cargo test -p atomic-server --lib -- push_provider push_wake (10 tests)
  • Prior notifications e2e 8/8
  • Set env bearers in a staging hub and confirm FCM/APNs accept wake payloads
  • cargo tauri android build --features mobile-push with google-services.json
Open in Web Open in Cursor 

cursoragent and others added 4 commits August 1, 2026 12:46
…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>
@cursor cursor Bot changed the title docs(planning): notifications design — mentions + watch subscriptions feat(notifications): mentions, inbox, and table watches Aug 1, 2026
cursoragent and others added 14 commits August 1, 2026 14:44
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants