Skip to content

Sidebar: a project's branch never covers its name (#469) - #560

Open
MopigamesYT wants to merge 1 commit into
devfrom
fix/469-sidebar-branch
Open

MopigamesYT wants to merge 1 commit into
devfrom
fix/469-sidebar-branch

Conversation

@MopigamesYT

@MopigamesYT MopigamesYT commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #469

What changed

  • In a row with trailing text (a project's branch, a worktree's PR number, a shortcut), the name now has priority:
    • The trailing text gets the room the whole name leaves, cut short with "…".
    • It is hidden when even three characters don't fit.
    • Only then is the name cut.
  • Before, the branch was always drawn whole from the row's end and only the name was cut. When no room was left, fitText (which keeps everything at width 0) gave back the whole name, drawn over the branch.
  • The row's small mark (e.g. the browser mark) still goes first, before the trailing text is cut, as TestRowMarkStepsAside expects.

Screenshots

Taken on the linux-test VM: a project 1loop on feat/discord-presence, the sidebar at 230, 200 and 180 px; dev on the left, this PR on the right.

Sidebar at 230, 200 and 180 px: dev draws the branch over the project name, this PR cuts the branch short

Checked here: go test ./internal/ui (whole package), go vet, gofmt. TestRowNameBeforeBranch lays a "1loop" row with branch feat/discord-presence out at every width from 320 to 60 px, and fails before the fix ("1lo…" next to the whole branch). Run in the real app on the linux-test VM (screenshots above).

Assisted-by: Claude Opus 5.5 medium

🤖 Generated with Claude Code

A row's trailing text (a project's branch) was always drawn whole from
the row's end, and only the name was cut for it; with no room left,
fitText kept the whole name, drawn over the branch. The name now comes
first: the trailing text gets what it leaves, cut short with an
ellipsis, then hidden, and the name is cut only once it is gone. The
row's mark goes before the trailing text is cut.

Tests: TestRowNameBeforeBranch (fails before the fix); TestRowMarkStepsAside
still passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants