Repository navigation
fix(web): prevent stale workspace requests during peer surface hydration - #3528
Merged
Merged
Conversation
Delay peer surface notifications until the target workspace catalog is ready and contain automatic Git refresh failures during the transition. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
kev1n77
marked this pull request as ready for review
October 23, 2026 01:22
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.
Summary
peer-mode:changedand surface snapshot publication until the target workspace catalog has finished hydrating.Type and Areas
Type: Regression fix
Areas: Web UI, Peer Device Mode, Git state refresh
Motivation / Impact
During a Peer Device Mode switch, the adapter changed before workspace hydration completed. UI consumers could still issue requests with the previous local workspace ID against the peer host, producing
Workspace ID is unavailable on this hosterrors and an uncaught page error. This change keeps React consumers on the previous published surface until the new workspace catalog is authoritative and adds a defensive boundary for automatic refresh failures.Verification
pnpm --dir src/web-ui run test:run src/infrastructure/peer-device/PeerDeviceSurfaceController.test.ts src/tools/git/hooks/useGitState.test.tsx— passed (12 tests).pnpm run type-check:web— passed.git diff --checkandgit diff --cached --check— passed.pnpm run check:web— failed at the existing generated artifact check:Stale MiniApp chat style projection: chat-styles.cssintheme:color-audit:all; no MiniApp generated files are included in this PR.Reviewer Notes
src/apps/peripheral-device/directory was preserved and not staged.Checklist
Generated with OpenBitFun