Skip to content

Cockpit: right-align the milestone label at the row's edge, no space reserved on rows without one - #193

Merged
MJohnson459 merged 1 commit into
mainfrom
cockpit-milestone-right
Sep 29, 2026
Merged

MJohnson459 merged 1 commit into
mainfrom
cockpit-milestone-right

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Moves the cockpit's milestone label from a fixed 16-column column before the project to the right edge of the row. Before this change, rows with no milestone still lost 17 columns of title to a blank column, and most rows have no milestone.

milestones::row_line now builds both the queue row (action_row_line, which also covers the proposals under a folded-open digest) and the running-strip row. The caller passes the row's prefix, its title and its badges; draw_queue and draw_running pass the pane's inner width. On a row whose task belongs to a milestone, the label (the nearest milestone's title cut to 16 columns with an ellipsis, plus +N when the task has several) sits flush against the right edge, two spaces clear. The title is truncated with an ellipsis to fit, and the badges stay directly after it. When fewer than 20 columns of title would remain, the row drops the label. A row with no milestone reserves nothing and renders as it did before #191. Widths are counted in display columns through ratatui's Span::width, so no new dependency is needed. DESIGN.md §9 now describes this placement instead of the column.

Verification: new tests in ui/milestones.rs render the full frame through TestBackend. Each one checks both a queue row and a running-strip row for these cases:

deep_flag_renders_in_queue_browser_and_detail goes back to its pre-#191 assertions. cargo fmt, cargo clippy --workspace --all-targets -D warnings and cargo test --workspace (956 tests) pass. I also printed the rendered frames at 100 and 60 columns during development and checked them by eye.

The 16-column milestone column sat before the project and title on every
queue and running-strip row, and was blank on most of them, so most rows
lost 17 columns of title to it.

The label now sits flush against the pane's right edge, two spaces clear
of what precedes it, and only on rows whose task belongs to a milestone.
The title gives way to it with an ellipsis; the badges stay directly after
the title. When fewer than 20 columns of title would remain, the row drops
the label. A row with no milestone renders as it did before #191. Widths
count display columns. DESIGN.md §9 describes the new placement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qhc49jDKNFEumzy2DZMiuD
@MJohnson459
MJohnson459 merged commit e711776 into main Sep 29, 2026
7 checks passed
@MJohnson459
MJohnson459 deleted the cockpit-milestone-right branch September 29, 2026 21:55
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