Repository navigation
fix(web-ui): show re-added workspace promotion immediately and keep it scoped - #3939
Merged
Merged
Conversation
…t scoped - Decide whether a workspace was already open from the list held before the host call, so a concurrent list refresh cannot make a new workspace look re-added and move it to the top. - Promote within the workspace's sidebar section, like a drag reorder, so the pinned assistant's stored slot is untouched and no reorder is persisted when the workspace is already the first project. - Publish the promoted order before persisting it instead of waiting for an extra host round trip. - Background SSH restore opts out of promotion; only explicit adds move a row. - The sidebar slides rows into place and scrolls the promoted row into view, so the move is visible when the list is scrolled.
3 tasks done
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
Follow-up to #3938 (merged before this review landed). Re-adding an already opened workspace still moves it to the first position within its device's workspace list; this tightens when that happens and makes the move visible.
Type and Areas
Bug fix — Desktop Web UI workspace management and sidebar.
Motivation / Impact
Review of #3938 found these gaps:
setActiveWorkspace) could make a brand-new workspace look re-added, promote it, and persist that order. It is now decided from the list held before the host call.openRemoteWorkspace; it now passespromoteIfOpened: false, so only explicit adds move a row. The flag is manager-only and is not sent to the host.block: 'nearest'), driven by a newworkspace:promotedevent emitted before the reordered state is published.A device switch during persistence leaves the promotion on its own device and the open rejects with a surface-changed error; the newly rendered device is untouched.
Verification
pnpm --dir src/web-ui run type-checkpnpm --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; restart with SSH workspaces open and confirm restore does not reorder them.
Checklist