Skip to content

Keep the server badge in the right column when a workspace has several tabs - #514

Merged
powerfooI merged 1 commit into
powerfooI:mainfrom
martiGIT:fix/workspace-server-badge-order
Oct 30, 2026
Merged

powerfooI merged 1 commit into
powerfooI:mainfrom
martiGIT:fix/workspace-server-badge-order

Conversation

@martiGIT

Copy link
Copy Markdown
Contributor

In the All servers view, a workspace row with more than one tab shows the server badge directly after the workspace name instead of in the right column. Rows with a single tab are not affected, so badges in the list stop lining up.

The cause is the row layout. With a tab count, .ws-label shrinks to its content (flex: 0 1 auto) and .workspace-tab-count takes the free space (flex: 1 0 auto). The badge was rendered between the two, so it followed the name. This PR moves the badge after the tab count in WorkspaceRow, so the count fills the gap and the badge stays on the right. No CSS changes.

Verification

  • New assertion in WorkspaceTree.servers.test.ts: the badge follows the tab count (.workspace-tab-count + .workspace-server-badge). It fails on main and passes with this change.
  • Typecheck, oxlint and Biome are clean.
  • Checked by hand in the sidebar with three servers and workspaces of one and several tabs.

Compatibility

Markup order only, no API or settings changes.

@powerfooI powerfooI left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the row layout and its current/all-server callers. The badge now follows the flex-growing tab count, so it stays in the right column. The isolated WorkspaceTree server DOM test and bun run build:web pass; all GitHub checks are green.

@powerfooI
powerfooI merged commit ad42db3 into powerfooI:main Oct 30, 2026
5 checks passed
@powerfooI powerfooI added the bug Something isn't working label Oct 30, 2026 — with ChatGPT Codex Connector
@powerfooI powerfooI removed the enhancement New feature or request label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants