Skip to content

feat: keep shared channels/workspaces syncing across reloads (0298 follow-up) - #471

Merged
crs48 merged 2 commits into
mainfrom
claude/0298-boot-resync-share-rooms
Jul 11, 2026
Merged

feat: keep shared channels/workspaces syncing across reloads (0298 follow-up)#471
crs48 merged 2 commits into
mainfrom
claude/0298-boot-resync-share-rooms

Conversation

@crs48

@crs48 crs48 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

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

  • Refcounted share-room subscriptions (SyncManager.subscribeShareRoom/unsubscribeShareRoom): multiple callers (an open ChannelView and 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 (inside CommsProvider). 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, no createdBy) are all subscribed — the hub only fans grant-covered content in, and applies are idempotent by hash.

Verification

  • New sync-manager unit test asserts the refcounting (two subscribes → one provider; detaches only on the last unsubscribe).
  • Runtime 176 tests green; typecheck clean (runtime, react, web); lint/prettier clean.

Changeset: @xnetjs/runtime patch (refcounting behavior).

🤖 Generated with Claude Code

xNet Test 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>
@crs48
crs48 temporarily deployed to pr-471 July 11, 2026 21:09 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jul 11, 2026
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #471.

@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Interactions

🎬 Open a channel and post a message

Open a channel and post a message

▶ Watch MP4

Auto-captured by CI · run. Informational — not a blocking check.

github-actions Bot added a commit that referenced this pull request Jul 11, 2026
@crs48
crs48 merged commit 0a0b89c into main Jul 11, 2026
15 checks passed
@crs48
crs48 deleted the claude/0298-boot-resync-share-rooms branch July 11, 2026 21:18
github-actions Bot added a commit that referenced this pull request Jul 11, 2026
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.
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.

1 participant