Skip to content

feat(cli): responsive priority-based status line for narrow terminals #3421

Closed

Description

@me2seeks

Problem

The TUI status line (renderMakaPiStatusLine) joins all segments left-to-right and hard-truncates the right side with fitLine(truncateToWidth with …) when the line exceeds the terminal width. Consequences:

  • At 80 cols (tmux vertical splits, embedded editor terminals are routinely 70–90 cols), a typical session like Maka · Full access · muse-spark-1.2-contributor · opencode-go · ~/project/maka-agent (~84 cols) already loses cwd; with ctx/cost/cache segments active (~122 cols) nearly half the line is cut at 80 and connection/cwd are cut at 100.
  • Truncation is positional, not value-based: low-value static segments (connection slug, cwd) and high-value dynamic segments (ctx, cost) are treated equally, and a segment can be cut mid-token (cache 6…).
  • Long model ids (e.g. muse-spark-1.2-contributor, 26 cols) blow the budget with no shortening.

pi-mono's footer degrades gracefully instead: left stats + right-aligned model/thinking, and when space runs out it drops whole lower-value units (provider prefix first, then right side) rather than cutting mid-chain.

Proposal

Priority-aware responsive degradation, no new configuration surface:

  1. Assemble the status line from segments tagged with drop ranks. On overflow, drop whole segments lowest-value-first, re-checking width after each drop.
  2. Suggested tiers (drop order):
    1. cache %
    2. $cost
    3. connection slug
    4. thinking:<level>
    5. swarm/graph
    6. cwd → shorten to basename
    7. cwd → drop
    8. final fallback: existing fitLine truncation
  3. Never drop: title, permission mode (safety), goal (burns tokens autonomously), ctx (context budget).

Open question

Do we also want a user-facing config (segment on/off or ordering) on top of this? Deferring unless real demand shows up — responsive degradation solves the narrow-terminal pain with zero config surface.

Acceptance criteria

  • 120+ cols: rendering identical to today.
  • 80 cols: line fits with low-value segments dropped in the tier order above; no mid-token truncation except as the documented final fallback.
  • Safety/money segments (mode, goal, ctx) survive the narrowest widths.
  • Unit tests cover the drop order and the never-drop invariant.

Activity

  1. me2seeks commented on Aug 21, 2026

    @me2seeks
    ContributorAuthor

    I'm working on this issue.

  2. me2seeks commented on Aug 21, 2026

    @me2seeks
    ContributorAuthor

    Open question for maintainers: should the status line also become user-configurable (segment toggles / ordering) on top of responsive degradation? Current plan is degradation-only — it fixes the narrow-terminal pain without adding a config surface — but if there's demand for configurability, better to know before this lands. This PR implements responsive priority degradation only.

  3. added
    enhancement
    good first issue
    help wanted
    on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions