feat: keep shared channels/workspaces syncing across reloads (0298 follow-up) - #471
Merged
Conversation
added 2 commits
July 11, 2026 23:09
…oads (0298) Refcount share-room subscriptions in the sync manager so multiple callers (an open ChannelView AND the boot resync) can subscribe to the same room without one unsubscribe tearing down the other. Add useSharedRoomBootSync, mounted persistently in the root layout, which subscribes to the share rooms for every channel/workspace shared TO me (not authored by me) for the whole session — so new messages and bench edits arrive even when the view is closed and after a reload. Own channels sync via the author room and are skipped. Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
Contributor
|
Preview removed for PR #471. |
Contributor
🖼️ UI changes in this PRInteractionsAuto-captured by CI · run. Informational — not a blocking check. |
crs48
added a commit
that referenced
this pull request
Jul 12, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @xnetjs/abuse@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 ## @xnetjs/cli@0.1.4 ### Patch Changes - Updated dependencies [[`f4ee6f9`](f4ee6f9)]: - @xnetjs/runtime@0.3.1 - @xnetjs/plugins@0.11.1 - @xnetjs/data@0.11.1 - @xnetjs/sqlite@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/crypto@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/core@0.11.1 ## @xnetjs/data@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/storage@0.11.1 - @xnetjs/sqlite@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/data-bridge@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/sqlite@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/history@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/identity@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/plugins@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/abuse@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/react@0.11.1 ### Patch Changes - Updated dependencies [[`f4ee6f9`](f4ee6f9)]: - @xnetjs/runtime@0.3.1 - @xnetjs/history@0.11.1 - @xnetjs/plugins@0.11.1 - @xnetjs/data-bridge@0.11.1 - @xnetjs/data@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/runtime@0.3.1 ### Patch Changes - [#471](#471) [`f4ee6f9`](f4ee6f9) Thanks [@crs48](https://github.com/crs48)! - `SyncManager.subscribeShareRoom`/`unsubscribeShareRoom` are now refcounted, so multiple callers can subscribe to the same share room and it stays open until the last one unsubscribes (exploration 0298 follow-up — lets a channel/workspace boot-resync coexist with the per-view subscription). - Updated dependencies []: - @xnetjs/history@0.11.1 - @xnetjs/plugins@0.11.1 - @xnetjs/data-bridge@0.11.1 - @xnetjs/data@0.11.1 - @xnetjs/storage@0.11.1 - @xnetjs/sync@0.11.1 - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/storage@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/sqlite@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/sync@0.11.1 ### Patch Changes - Updated dependencies []: - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 - @xnetjs/core@0.11.1 ## @xnetjs/core@0.11.1 ## @xnetjs/sqlite@0.11.1 ## xnet-cloud@0.0.15 ### Patch Changes - Updated dependencies []: - @xnetjs/crypto@0.11.1 - @xnetjs/cloud@0.0.1 ## @xnetjs/brain@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/vectors@0.0.1 ## @xnetjs/comms@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/crypto@0.11.1 ## @xnetjs/dashboard@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/react@0.11.1 - @xnetjs/plugins@0.11.1 - @xnetjs/data@0.11.1 - @xnetjs/social@0.0.16 ## @xnetjs/labs@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/plugins@0.11.1 - @xnetjs/data@0.11.1 ## @xnetjs/licenses@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/crypto@0.11.1 ## @xnetjs/maps@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 ## @xnetjs/meetings@0.0.9 ### Patch Changes - Updated dependencies []: - @xnetjs/plugins@0.11.1 - @xnetjs/data@0.11.1 ## @xnetjs/server@0.0.15 ### Patch Changes - Updated dependencies []: - @xnetjs/data-bridge@0.11.1 - @xnetjs/data@0.11.1 - @xnetjs/identity@0.11.1 - @xnetjs/crypto@0.11.1 ## @xnetjs/social@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 - @xnetjs/crypto@0.11.1 ## @xnetjs/unreal@0.0.16 ### Patch Changes - Updated dependencies []: - @xnetjs/data@0.11.1 ## xnet-desktop@0.11.1 Desktop shell release riding the @xnetjs/core 0.11.1 train. Desktop-specific changes are not tracked here; see the core packages' changelogs for what shipped.
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.

The 0298 follow-up: a channel/workspace view subscribes to its share room only while open, so a grantee stopped receiving edits after a reload (or when the view was closed). This keeps them flowing.
Changes
SyncManager.subscribeShareRoom/unsubscribeShareRoom): multiple callers (an openChannelViewand the boot resync) can subscribe to the same room; it stays open until the last unsubscribes. Previously one unsubscribe tore down the other.useSharedRoomBootSync— mounted persistently in the root layout (insideCommsProvider). It subscribes to the share rooms for every channel/workspace shared to me (not authored by me) for the whole session, so new messages and bench edits arrive even when the view is closed and after a reload. Own channels sync via the author room and are skipped; workspaces (few, nocreatedBy) are all subscribed — the hub only fans grant-covered content in, and applies are idempotent by hash.Verification
sync-managerunit test asserts the refcounting (two subscribes → one provider; detaches only on the last unsubscribe).Changeset:
@xnetjs/runtimepatch (refcounting behavior).🤖 Generated with Claude Code