Skip to content

fix(sidebar): align busy spinner with close button slot across sidebar rows - #1301

Merged
Hona merged 1 commit into
devfrom
upstream-g/sidebar-spinner-align
Nov 26, 2026
Merged

Hona merged 1 commit into
devfrom
upstream-g/sidebar-spinner-align

Conversation

@Hona

@Hona Hona commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Align the sidebar tab busy spinner and status indicators with the close button (x) across all sidebar tab/row views.

Problem

  • In apps/desktop/src/shell/view/sidebar/tab_groups.rs (tab_row), tail (20x20) placed both status_el (14x14 busy spinner or 7x7 status dot) and close_btn (20x20 hover-revealed x) in normal flex flow without .absolute(0.0, 0.0). Even at rest when close_btn has opacity: 0, close_btn still occupied 20 pt of layout width on the right and pushed the busy spinner 17 pt to the left of its own x (and 13.5 pt left of a hovered neighbor's x).
  • In addition, tab_groups.rs, pinned_area.rs, rows.rs, sections/row.rs, and sections/header.rs used pr(8.0) (or pr(2.0) on group headers) and 16x16 status boxes on pinned/session rows, whereas vertical TabStrip (tab-nav.css:1-8, inset-inline-end: 4px) places the 20x20 status/close slot 4 pt from the row end (center X at row_right - 14).

Changes

  • apps/desktop/src/shell/view/sidebar/tab_groups.rs:
    • Position both close_btn and mark_el (wrapping status_el) at .absolute(0.0, 0.0).size(20.0, 20.0).center() inside tail (size(20.0, 20.0)), matching sections/row.rs (in_slot) and rune-kit TabStrip (status_slot, tab-nav.css:1-8, 40-50).
    • Use .pl(8.0).pr(4.0) on tab_row and .pr(4.0) on header so every grouped tab's spinner, dot, close x, and group menu button share the exact same 20x20 end column (center X = row_right - 14).
  • apps/desktop/src/shell/view/sidebar/pinned_area.rs: update vertical_session to .pl(8.0).pr(4.0) and size(20.0, 20.0) for status (matching official PinnedSession rendering TabNavItem, pinned-area.tsx:545-565).
  • apps/desktop/src/shell/view/sidebar/rows.rs: update session_row to .pr(4.0) and size(20.0, 20.0) for status so it aligns with group_header (.pr(4.0), 20x20) and TabStrip.
  • apps/desktop/src/shell/view/sidebar/sections/row.rs & sections/header.rs: align end inset to .pl(8.0).pr(4.0) so Whisper section marks and x buttons share the same column as TabStrip and pinned rows.

Verification

  • CI: run 45779519896 on exact head d4f7aeebfc - guardrails, build-macos, build-windows (x64), build-windows (arm64), and build-linux (x64) passed (Linux arm64 skipped).
  • Headless before/after verification (Windows x64 CI build from run 45779519896, 2x scale, --tree + 1 px red alignment guide lines):
    • Grouped tabs (sidebar-tab-groups-project):
      • Before: busy spinner cx = 209.0 pt (418 px), hovered neighbor x cx = 222.5 pt (445 px, delta 13.5 pt / 27 px), busy row's own x cx = 226.0 pt (452 px, delta 17.0 pt / 34 px).
      • After: busy spinner cx = 223.0 pt (446 px), hovered neighbor x cx = 223.0 pt (446 px), busy row's own x cx = 223.0 pt (446 px), unread/attention dots cx = 223.0 pt, group header menu buttons cx = 223.0 pt - 0.0 pt / 0 px delta in both X and Y.
    • Vertical TabStrip (sidebar-grouped): busy spinner cx = 223.0 pt (446 px), hovered x cx = 223.0 pt (446 px) - exact match to grouped tabs.

Before vs After (Grouped tabs, busy row + hovered neighbor)

Before vs After grouped tabs with red alignment lines

Before vs After (Busy row hovered so close button replaces spinner)

Before vs After busy row hovered with red alignment lines

Vertical TabStrip verification

After vertical TabStrip with red alignment lines

@Hona
Hona marked this pull request as ready for review November 26, 2026 08:32
@Hona
Hona merged commit aeb6d93 into dev Nov 26, 2026
7 checks passed
@Hona
Hona deleted the upstream-g/sidebar-spinner-align branch November 26, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant