Repository navigation
fix(web-ui): emphasize folder names over remote workspace badges - #3693
Merged
Merged
Conversation
The remote chip in the workspace navigation rendered the full generated connection name (user@host) at fixed width with a filled success surface, so a long SSH host pushed the folder name out of the row. Show a compact label instead: the saved connection name or SSH alias, or the host without the login user. Non-default ports stay visible so port-scoped connections remain distinct, and when two different connections would read the same the badges expand to user@host:port. The chip may now shrink with an ellipsis and is capped at 45% of the row; a connected chip stays neutral because the status dot already reports it. The tooltip keeps the full connection and endpoint. Fixes GCWing#3517
Strip the login user only when the saved name exactly matches the default user@host[:port] shape for the connection's own user, host and port. Any other name is shown as chosen. Refs GCWing#3517
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
The remote workspace chip in the navigation panel now favors the folder name:
remoteWorkspaceBadge.ts): the saved connection name or SSH config alias when one exists, otherwise the host without the login user (root@gpu-node...becomesgpu-node...).ssh-user@host#portids (or ahost#portworkspace host) is shown ashost:port. Labels are compared across all opened workspaces, and when two different connections would read the same, both expand touser@host:port(oralias · user@host:port). Folders on the same connection keep the compact label.user@host:portendpoint.Fixes #3517
Type and Areas
Type: UI/UX bug fix
Areas: web UI (NavPanel workspace list)
Motivation / Impact
With several remote folders open, a long generated
user@hostlabel at fixed width pushed the folder name out of the row, so users could not tell the folders apart. Now the folder name is readable and the host is secondary but still distinguishable.Verification
pnpm --dir src/web-ui run test:run src/app/components/NavPanel/sections/workspaces/- 14 files, 109 tests pass (newremoteWorkspaceBadge.test.ts: user stripping, alias, port-scoped ids, cross-connection collisions, same-connection folders, equal aliases, legacy records without name/host; updated layout contract inWorkspaceListSectionLayout.test.ts).pnpm run type-check:web- pass.pnpm run i18n:audit- pass (no copy changes; existing tooltip keys reused).pnpm run theme:color-audit:all- all 28 surfaces pass; no new tokens, one success-surface use removed, no baseline changes.Remote scenarios: Remote workspace display only. No persisted shape, protocol, or connection id change; older records without
connectionName/sshHostfall back to the connection id. Peer Device Mode renders the same workspace list data.Reviewer Notes
The 45% cap and the neutral connected chip are design choices; happy to tune.
Checklist