Skip to content

fix(sidebar): keep collapsed status dot visible past workspace 9 - #2218

Open
joonhwan wants to merge 1 commit into
herdrdev:masterfrom
joonhwan:issue/2216-collapsed-sidebar-workspace-status-dot
Open

fix(sidebar): keep collapsed status dot visible past workspace 9#2218
joonhwan wants to merge 1 commit into
herdrdev:masterfrom
joonhwan:issue/2216-collapsed-sidebar-workspace-status-dot

Conversation

@joonhwan

@joonhwan joonhwan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The collapsed sidebar hides the status dot for workspaces at position 10
and above.

refs #2216

Cause

The collapsed sidebar content area is 3 columns wide (COLLAPSED_WIDTH is 4,
minus the separator column). The workspace row drew the position number at its
natural width plus a literal space span before the dot, so a two-digit position
produced 10 · — 4 columns — and the dot fell outside the row rect.

The agent list directly below already pads its position to two columns, so it
was not affected.

Change

Pad the workspace position to two columns and drop the separate space span, so
the workspace rows match the agent rows below them. Single-digit rows keep the
dot in the same column as before.

Verification

On Windows:

  • scripts/windows_check.ps1 -Mode check passes: cargo fmt --check,
    cargo clippy -D warnings, the windows_ (143) and
    server::client_transport::tests (22) filters, and cargo build.
  • cargo test --bin herdr ui:: — 145 passed.
  • cargo test --bin herdr sidebar — 123 passed.

I could not run just ci on this machine: the tests/ integration suite is
Unix-only and does not compile on Windows, and a full cargo test --bin herdr
run hangs here. Leaving those to CI.

New test collapsed_sidebar_keeps_workspace_status_visible_for_two_digit_positions
fails without the change (left: " ", right: "●").

No docs change needed — the collapsed sidebar row layout is not described in
the docs.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Collapsed sidebar workspace indices now use two character positions. A regression test verifies that the tenth workspace displays its working indicator with the expected color.

Changes

Collapsed Sidebar Alignment

Layer / File(s) Summary
Workspace index formatting and regression coverage
src/ui/sidebar.rs
Collapsed workspace numbering reserves two character positions. A regression test verifies the tenth workspace renders 10 before the working indicator in yellow.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the sidebar fix that keeps status dots visible for workspace positions beyond 9.
Description check ✅ Passed The description accurately explains the collapsed sidebar layout issue, the fix, and the verification performed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 3, 2026
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adjusts collapsed workspace numbering so two-digit positions leave room for the status dot and adds a regression test for position 10.

  • Replaces a separate separator span with a two-column, left-aligned workspace position.
  • Adds a buffer-level test confirming the tenth workspace’s working-status indicator remains visible and correctly colored.

Confidence Score: 4/5

The remaining three-digit workspace case should be addressed before merging because it leaves the status indicator hidden for a reachable workspace count.

The two-column minimum formatting fixes positions 10–99, but an unconstrained workspace list can reach position 100, where the three-digit label fills the collapsed row and clips the appended status icon.

Files Needing Attention: src/ui/sidebar.rs

Important Files Changed

Filename Overview
src/ui/sidebar.rs Corrects status rendering for positions 10–99 and adds focused coverage, but three-digit positions still consume the status column.

Reviews (1): Last reviewed commit: "fix(sidebar): keep collapsed status dot ..." | Re-trigger Greptile

Comment thread src/ui/sidebar.rs
Paragraph::new(Line::from(vec![
Span::styled(format!("{}", visible_idx + 1), num_style),
Span::styled(" ", row_style),
Span::styled(format!("{:<2}", visible_idx + 1), num_style),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Three-digit positions hide status

When the collapsed sidebar contains at least 100 workspaces, format!("{:<2}", visible_idx + 1) consumes all three available row columns with the position number, causing the appended status dot to be clipped.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed the clipping at 100+, but it is not a regression from this PR — rendering is identical before and after. Probe run on both revisions:

position before after
1 1 · 1 ·
10 10 10·
99 99 99·
100 100 100

The content area is 3 columns wide (COLLAPSED_WIDTH is 4, minus the separator column), so a 3-digit position leaves no column for the dot either way. Showing both would need a new display rule — abbreviating the number or widening COLLAPSED_WIDTH — and the agent list directly below uses the same {position:<2} convention, so both lists would have to change together.

That is a visual-language change, which CONTRIBUTING.md asks to raise in a discussion rather than fold into a focused fix: PR. Keeping this PR to the reported 10..=99 range.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bad54192-b383-4612-8b44-c941e63ffcde

📥 Commits

Reviewing files that changed from the base of the PR and between 5eab32d and 4625eae.

📒 Files selected for processing (1)
  • src/ui/sidebar.rs

Comment thread src/ui/sidebar.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants