Skip to content

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

Open
me2seeks wants to merge 1 commit into
apache:mainfrom
me2seeks:fix/3421-responsive-status-line
Open

feat(cli): responsive priority-based status line for narrow terminals (#3421)#3423
me2seeks wants to merge 1 commit into
apache:mainfrom
me2seeks:fix/3421-responsive-status-line

Conversation

@me2seeks

Copy link
Copy Markdown
Contributor

Closes #3421

Problem

At ≤100 cols the status line hard-truncated the right side mid-token (cache 6…), treating low-value static segments (connection, cwd) the same as safety/budget-relevant ones. A typical session already overflows 80 cols (~84 chars with no usage segments; ~122 with ctx/cost/cache and a long model id).

Change

renderMakaPiStatusLine now assembles segments with drop ranks and degrades responsively:

  • Drop order: cache %$cost → connection slug → thinking:swarm/graph → cwd → (final fallback: existing fitLine truncation)
  • cwd degrades progressively: ~/full/path → basename → dropped
  • Never dropped: title, permission mode, model, live goal, ctx
  • ≥120 cols rendering is unchanged
  • The one runner test asserting cache 40% now uses a 120-col terminal (at the default 80 the segment is correctly dropped)

No new configuration surface. Whether user-facing segment configuration is wanted on top of this is raised as an open question on the issue; it can land independently later.

Tests

  • 3 new unit tests: drop order on overflow, cwd basename degradation, never-drop invariant at narrow width
  • pi-transcript.test.js: 61/61, pi-tui-runner.test.js: 119/119
  • biome format clean

…apache#3421)

The status line joined every segment left-to-right and hard-truncated
the right side on overflow, cutting whichever segment happened to sit
at the boundary mid-token and treating low-value static segments
(connection, cwd) the same as safety- and budget-relevant ones.

Segments now carry a drop rank; on overflow whole segments drop
lowest-value-first (cache, cost, connection, thinking, orchestration),
cwd degrades full -> basename -> dropped, and title/permission
mode/goal/ctx never drop. Wide rendering is unchanged; the previous
hard truncation remains only as the final fallback.
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.

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

1 participant