Repository navigation
fix(host-runtime): reread shared Thread lists after a routed section move - #989
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Merged, thanks @ump45nose! Invalidating the bridge's list cache after a forwarded list-changing method (section move has no Thread notification) is exactly the right scope, and the regression test goes through the real route()/list() path. |
Eleven manifest lines still carried fork copies of changes that upstream has already released. Each one names a merged PR whose head commit is an ancestor of v0.28.2, so the line only re-applies the pre-review copy of code that the release tag already contains, and that duplication is what turns the manifest replay into conflicts. Removed lines and their merged PRs: - thin/cursor-fast-selection (BytePioneer-AI#782) - thin/delegation-inspect-fast-models (BytePioneer-AI#986) - thin/delegation-catalog-parent (BytePioneer-AI#970) - thin/settings-hide-desktop-envs (BytePioneer-AI#972) - thin/settle-turns-after-session-fault (BytePioneer-AI#969) - thin/external-thread-turn-recency (BytePioneer-AI#973) - thin/claude-code-todo-tools (BytePioneer-AI#976) - thin/reasoning-summary-parts (BytePioneer-AI#967) - thin/shared-archived-thread-revival (BytePioneer-AI#988) - fix/desktop-mcp-session-reap-v0.22 (BytePioneer-AI#981) - fix/macos-descriptor-mode (BytePioneer-AI#1004) For the two lines whose comments noted that the fork copy predated the PR's review changes (BytePioneer-AI#969, BytePioneer-AI#976), the reviewed upstream version replaces it. Checked with `scripts/vincent-release.sh audit` (ancestor and patch-cherry checks) and by replaying the manifest onto v0.28.2 in a scratch worktree: these eleven lines no longer merge, and the fifteen remaining lines are fork-only changes that need re-cutting from the new tag. Lines for fork-only additions are untouched: the extras documented for BytePioneer-AI#470, BytePioneer-AI#987 and BytePioneer-AI#989 stay, and the lines for the closed PRs BytePioneer-AI#576, BytePioneer-AI#783, BytePioneer-AI#784, BytePioneer-AI#785 and BytePioneer-AI#396 stay.
Purpose
When a GUI pins or unpins a shared external Thread,
SharedThreadBridge.routeforwardsthread/section/moveto the shared Host. The GUI then rereads its lists right away. For up to 5 seconds (SHARED_LIST_REUSE_MS),bridge.list()serves the shared rows it walked before the move. So the Pinned section still shows the old state, and the pin looks like it did not take until something else refreshes the sidebar.Root cause
The bridge only drops its cached list walks when a
thread/*notification arrives from the shared Host. A section move produces no notification. For other mutations, the notification can also land after the reply that triggers the reread.Change
After the bridge routes a request that changes list membership or order (archive, delete, fork, metadata update, rename, revert, rollback, section move, start, unarchive), it drops its cached walks before returning the reply. Notifications keep invalidating as before.
Not included: the fork also routed a native Thread's move to the shared Host when its
beforeThreadIdis a shared Thread. That changes which store owns a native Thread's placement, so it needs a design decision rather than a cache fix.Validation
npx tsc -bpackages/host-runtime/test/shared-thread-bridge-list.test.ts, "walks again after a routed section move, which has no Thread notification". It fails onmain, where the Pinned list stays empty after the move, and passes with this change.shared-thread-bridge-list.test.ts+shared-threads.test.ts: 22/22. eslint and prettier on the changed files.Known baseline on main (unchanged by this PR)
packages/adapters/antigravity/test/acp-transport.test.ts:457-458andapp-server-host.background-output.test.ts:146