Repository navigation
Cockpit: right-align the milestone label at the row's edge, no space reserved on rows without one - #193
Merged
Conversation
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
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.
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_linenow 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_queueanddraw_runningpass 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+Nwhen 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'sSpan::width, so no new dependency is needed. DESIGN.md §9 now describes this placement instead of the column.Verification: new tests in
ui/milestones.rsrender the full frame throughTestBackend. Each one checks both a queue row and a running-strip row for these cases:…Dock +1deep_flag_renders_in_queue_browser_and_detailgoes back to its pre-#191 assertions.cargo fmt,cargo clippy --workspace --all-targets -D warningsandcargo test --workspace(956 tests) pass. I also printed the rendered frames at 100 and 60 columns during development and checked them by eye.