Skip to content

design(workstation): keep rail history ref metadata inline without wrapping #1819

Description

@gfargo

Context

Follow-up to #1810. The merged fix removed redundant date-only metadata lines for bucketed, ref-less commits, which substantially improved rail-density history rendering.

Meaningful remaining refs still render on a dedicated second line. In the current view this produces visually detached rows such as:

<graph> <hash> <subject>
        [origin/HEAD]

and tag-only metadata lines such as [tag: 0.83.1]. These lines are valid information, but they can look disconnected from their commit and interrupt scan rhythm. In several cases the primary row still has enough horizontal room to carry compact metadata inline.

Desired behavior

Keep meaningful branch/tag metadata on the commit row when it fits. When it does not fit, truncate or omit lower-priority metadata and rely on the inspector for the complete ref list rather than wrapping text onto another physical line.

Suggested priority

  1. Prioritized branch chip (HEAD, local branch, or remote branch)
  2. Commit subject
  3. Tag metadata
  4. Secondary remote refs such as origin/HEAD

The subject should retain a sensible minimum width. Secondary refs should lose width first.

Acceptance criteria

  • A commit row never wraps onto a continuation line in rail mode.
  • Compact metadata renders inline when sufficient width is available.
  • Long branch/ref names truncate by terminal cell width, including Unicode-safe behavior.
  • Lower-priority refs may be omitted at narrow widths; the inspector remains the full-detail escape hatch.
  • Selection colors and no-color/ASCII modes remain readable.
  • Existing branch-tip deduplication remains intact (do not repeat the chipped branch as a trailing ref).
  • Verify behavior at 80, 90, and 99 columns with HEAD, local branch, remote branch, tag, and multiple-ref commits.

Relevant code

  • src/workstation/surfaces/history/index.ts (renderBranchTipChip, renderCommitHistoryRow, renderStackedCommitHistoryRow)
  • src/workstation/chrome/branchTip.ts (filterChippedRefs, branch priority)

Related: #1810

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions