feat(cli): responsive priority-based status line for narrow terminals (#3421) - #3423
feat(cli): responsive priority-based status line for narrow terminals (#3421)#3423me2seeks wants to merge 2 commits into
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for tightening the status-line degradation order. I reviewed the exact head and the current green test check. The implementation matches the intended priority order and keeps the existing metadata authority. I found no blocking issues; the inline P3 is only a small Windows display edge case.\n\nAI-assisted review disclosure: Codex performed an exact-head delegated review; I verified the finding and current PR state and approved this exact head.
|
Before merging, Could We also state the tool used for this PR? |
|
Tool disclosure, as requested: this PR was implemented by Maka, an AI coding agent running on my machine — design, code, and tests were agent-authored; I reviewed the diff before push. Local verification: pi-transcript.test.js 62/62, 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. Generated-by: Maka
…pache#3421) Review P3: on Windows a drive root (C:\) has an empty basename; with it as the shortened form the segment stayed present and left a dangling separator. Roots and paths whose basename is the path itself (~, /, C:\) now skip the shortened form and drop directly. Generated-by: Maka
f2e567b to
e735404
Compare
Summary
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).renderMakaPiStatusLinenow assembles segments with drop ranks and degrades responsively:cache %→$cost→ connection slug →thinking:→swarm/graph→ cwd → (final fallback: existingfitLinetruncation)~/full/path→ basename → dropped; roots and paths whose basename is empty or the path itself (C:\,/,~) drop directly instead of rendering an empty segment (review P3)Fixes #3421
Verification
cache 40%now uses a 120-col terminal — at the default 80 that segment is correctly dropped)AI use
Tool(s) and scope: Maka (AI coding agent) authored the design, implementation, and tests; the diff was human-reviewed before push.
Generated-by: Makatrailers are present on both commits and retained on this branch.Checklist
Does this PR entail a change in behavior?