Repository navigation
fix(web-ui): promote re-added workspaces within their device - #3938
Merged
Merged
Conversation
This was referenced Nov 16, 2026
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
Re-adding an already opened workspace now moves it to the first position within its device's workspace list (e.g. adding B again changes A/B/C to B/A/C). Device sections keep their order, and ordinary workspace activation retains the existing stable-order behavior.
Type and Areas
Bug fix — Desktop Web UI workspace management and sidebar.
Motivation / Impact
Previously, adding an existing workspace could appear to do nothing because the sidebar preserved its old position. Local and SSH workspace opening now explicitly promote existing entries and use the existing host reorder API to persist the order. If persistence is unsupported or fails, the current window still shows the promoted order and logs the failure.
Details:
promoteIfOpened: false); only explicit adds move a row. The flag is manager-only and is not sent to the host.block: 'nearest'), so the move is visible when the list is scrolled.Verification
pnpm run check:webpnpm --dir src/web-ui run test:runonworkspaceManager.test.ts,workspaceDisplayOrder.test.ts,WorkspaceListSection.test.tsx,DeviceWorkspaceSections.test.tsx,SSHRemoteProvider.test.tsx,createProject.test.ts,MainNav.projectCreation.test.tsx— 7 files, 203 tests passed.git diff --checkRemote coverage is simulated: SSH workspace opening/restore, Peer Device surface isolation, and unsupported host persistence. No live SSH, Peer Device, Remote Control, or Detached Dispatch run was performed. No wire protocol or persisted shape changes.
Reviewer Notes
AI-assisted; testing level: lightly tested (focused automated coverage and Web UI checks, no native desktop/manual remote verification). Manual acceptance: with a scrolled sidebar, add an already listed local or SSH workspace and confirm it slides to first within its device and is scrolled into view; switch devices and confirm each device's workspace order and device-section order remain intact; restart with SSH workspaces and confirm restore does not reorder them.
Checklist