Repository navigation
Conversation
A guest in a chat shared from someone else's drive saw only their own messages and the ones present when they joined, got none of the host's later messages live, and so got no notifications for them. - Server: a commit is also sent to WebSocket subscribers of the resource's parent. The guest can't subscribe to the host's drive, and a new message is a new subject, so neither the resource nor the drive subscription reached them. Read rights are checked per subscriber against the resource at send time (the subscription was admitted on the parent, and access can be taken back since), under ctx.wait so it stays in order with later commits. A connection already reached through the resource itself or its drive is skipped, so nothing arrives twice. - Store.subscribeLive holds a per-resource SUB, counted and re-sent on reconnect. MessageNotifier holds one for everything in Shared with me while the app runs. - Collection: a non-empty local answer was always trusted, but only a synced drive has its whole membership locally. For a drive this client hasn't synced the server is asked once per page per session; its members are written locally as they load and live updates keep them current. Members only the local DB knows (writes not yet acknowledged) are kept. Synced drives make no extra request. ws_parent_fanout covers delivery, a sibling the guest can't read, one frame for a connection on both child and parent, and no delivery after read is revoked; the last two fail on the version without the send-time check.
3 tasks done
"shows a fetched external class for a partial name" timed out at 5 s in CI (run 36813877203) though it takes a few milliseconds: as the first render in the file it paid styled-components building its stylesheet, jsdom parsing it and the picker's modules running for the first time. The same fix as cb085dc for the table grid.
joepio
added a commit
that referenced
this pull request
Oct 1, 2026
…turn (#1866) The Notifications page shows one row per conversation, a window coming back into focus reads what arrived on the page you are on, and the app offers system notifications once after missed messages. planning/notifications.md plans the next phases. The WebSocket parent fan-out and the Collection change for unsynced drives live in #1949.
…/shared-resource-live # Conflicts: # browser/CHANGELOG.md
Presence was one channel per drive. A guest given one chat out of a
drive they can't read was refused that channel ("presence update from
non-subscriber" on the server), so host and guest never saw each other
in the chat, nor who was typing.
- Store.presenceScope(subject): the nearest loaded resource at or
above it with its own read list, below the drive. That's what an
invite or a share writes to, and host and guest compute it from the
same data. The server already accepts presence on any subject the
agent can read.
- useResourcePresence and useTypingPresence announce in the drive
channel and in that scope's channel, and read both.
- useDrivePresenceManager leaves the drive channel out when the drive
is unauthorized; FollowContext uses it too.
- One presenceSessionId per tab across all managers, so a session in
both channels is one entry, and filtering out our own is one check.
This was referenced Oct 1, 2026
joepio
added a commit
that referenced
this pull request
Oct 5, 2026
… chat, search, CI) (#2060) Combines #1530, #1638, #1663, #1835, #1869, #1896, #1898, #1911, #1912, #1913, #1914, #1918, #1919, #1929, #1931, #1949, #1958, #1959, #1961, #1963, #1968, #1975, #1981, #1985, #1988, #2038, #2041, #2047 and #2050, tested in one full Mancave run on the exact head (run 4999, green).
Member
Author
|
Landed on develop in the combined batch #2060 (95707c0), tested together in one full run. Closing as included. Generated by Claude Code |
joepio
added a commit
that referenced
this pull request
Oct 5, 2026
Two people can message each other in a conversation only they can read. The server that hosts it stores ciphertext; it still checks every write, because the rights and signatures it needs stay readable. - atomic_lib::conversation: an agent's X25519 encryption key, derived from its vault proof so every device has the same one; a keyring with one key per epoch, wrapped to each member; sealing and opening messages, bound to the conversation; report-by-reveal of a single message key. WASM exports for the browser. - Ontology `conversations`: Conversation, SealedMessage, encryptionKey, conversationKeys, sealed, conversations. - GET /conversations lists the conversations on the server the requester is in, so the other person finds one they did not start. - A conversation is its own drive with read + append for its members and no writer, so nobody can change what someone else said. - App: Messages section in the sidebar, "Message" on every avatar, a New message dialog, and the conversation page, which opens each message before ChatView shows it. Store.subscribeLive (as in #1949) keeps the conversation live. The app publishes the agent's key at start.
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.
Requested by Joep · project thread
Split out of #1866 per review. Changes sync and server behaviour, so it needs its own review.
Before: a guest in a chat shared from someone else's drive (shared as a resource, not the whole drive) saw only their own messages and the ones present when they joined, even after a reload. The host's later messages never arrived live, so the guest got no notifications either. Found by testing #1866 with two browsers.
After: the guest sees the whole chat, gets new messages live, is notified while the app is open, and host and guest see each other's presence (who's here, who's typing) in the shared chat.
How:
commit_monitor.rs): a commit is also sent to subscribers of the resource's parent. The guest can't subscribe to the host's drive, and a new message is a new subject, so neither the resource subscription nor a drive subscription reached them. Read rights are checked per subscriber against the resource at send time, since the subscription was admitted on the parent and access can be taken back. That runs underctx.wait, so delivery stays in order with the commits that follow. A connection already reached through the resource itself or its drive is skipped, so nothing arrives twice.Store.subscribeLive(subject): holds a per-resourceSUB, counted and re-sent on reconnect (WSClient.subscribeResource/unsubscribeResource).MessageNotifierholds one for everything in Shared with me while the app runs.Collection: a non-empty local answer was always trusted, but only a synced drive has its whole membership in the local DB. For a drive this client hasn't synced, the server is asked once per page per session. Its members are written locally as they load, and live updates keep them current after that. Members only the local DB knows (writes not yet acknowledged) are kept. Synced drives make no extra request, which keeps the invariant the count probe was reverted for (fix: everything found running two sync nodes against each other #1286).Store.presenceScope(subject)finds the nearest loaded resource at or above it with its ownreadlist, which is what an invite or share writes to. Host and guest compute it from the same data, and the server already accepts presence on any readable subject.useResourcePresenceanduseTypingPresenceannounce in both the drive's channel and that one, and read both.useDrivePresenceManagerskips the drive channel when the drive is unauthorized;FollowContextuses it too. All managers share onepresenceSessionIdper tab, so a session in both channels shows once.Checklist
CHANGELOG.md,browser/CHANGELOG.md)server/tests/it/ws_parent_fanout.rscovers delivery, a sibling the guest can't read, one frame for a connection on both child and parent, and no delivery after read is revoked. The last two fail without the send-time check; all 22ws_integration tests pass.collection-partial-local.test.tschecks the server is asked for an unsynced drive, only once per query, and not at all for a synced one.collection-sort-order.test.tschecks that a pending local row survives.store.subscribe-live.test.tscovers the counting.store.presence-scope.test.tscovers the share root, a message in it, and the rest of the drive staying on the drive channel. The lib, react and data-browser suites pass.