fix(cli): keep long model stats header on one line#4032
Conversation
|
LGTM. No blocking issues. I reviewed the current PR diff against the latest
The implementation looks correctly scoped: it only expands the model column when there is a single flattened model/source entry and a container width is available, while preserving the existing fixed-width behavior for multi-model / multi-source layouts. Non-blocking suggestions
I attempted local checks, but this worktree does not have a complete dependency install, so test/typecheck execution was blocked by missing dependencies rather than this PR's code. |
tanzhenxin
left a comment
There was a problem hiding this comment.
Review
Correctly expands the model/source column dynamically when /stats model renders a single entry, while preserving the compact 24-column layout for multi-model and multi-source displays. The Math.max(24, …) floor keeps narrow terminals working, the truthy-width check skips the dynamic branch when width is undefined or 0, and the new regression test would have caught the original wrap at width=100 — it's an actual test of the fix, not a passive snapshot.
Verdict
APPROVE — correct fix, tight scope, regression test that exercises the bug.
* fix(cli): keep long model stats header on one line * test(cli): cover fixed model stats columns
Fixes #4031
Summary
/stats modelrenders a single model and the panel has available width.Root Cause
ModelStatsDisplayalways used a fixed 24-column model header/value column. Long model IDs such asggml-org/gemma-4-E4B-it-GGUFtherefore wrapped inside the column even when the surrounding stats panel still had unused horizontal space.Validation
npm run test --workspace=packages/cli -- src/ui/components/ModelStatsDisplay.test.tsx -t "long single model name"npm run test --workspace=packages/cli -- src/ui/components/ModelStatsDisplay.test.tsxnpm run lint --workspace=packages/clinpm run typecheck --workspace=packages/clinpx prettier --check packages/cli/src/ui/components/ModelStatsDisplay.tsx packages/cli/src/ui/components/ModelStatsDisplay.test.tsx