fix(ccstatusline): use full flexMode to avoid trailing truncation#23
Merged
Conversation
The bundled double-line preset used `flexMode: "full-minus-40"`, which reserves 40 characters for Claude Code's own UI elements. In practice this is too conservative — the token/cost preset routinely triggered ccstatusline's `...` truncation indicator on common terminal widths. Switch to `full`, which is the most permissive valid value in ccstatusline 2.2.18's schema (`full | full-minus-40 | full-until-compact`). Status bar now uses the full terminal width and no longer truncates on standard wide terminals. No version bump — cosmetic fix for users running `installCcstatusline`. Existing installs only update `~/.config/ccstatusline/settings.json` on next install run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config/ccstatusline/settings.json里的flexMode从full-minus-40改成full,避免在常见终端宽度下双行预设末尾出现...截断指示。Root cause
ccstatusline 2.2.18 的
flexMode是 Zod 枚举字段,合法值只有 3 个:仓库里 bundled 的双行 token/cost 预设用的是
full-minus-40:状态栏最多用(终端宽度 - 40)字符,给 Claude Code 右下角自带 UI 元素留 40 字符的余量。实际跑下来这个余量太大 —— 双行预设里
claude-opus-4-x[1m]一项就吃 ~20 字符,加上 token / cost / git-dir / clock,会触发 ccstatusline 自己的尾部截断逻辑,在每行末尾追加...,看起来像内容被吃掉了一截。Validation
本地用 ccstatusline 2.2.18 跑了 reproduce + verify:
修复前(
full-minus-40+ 双行预设):...修复后(
full+ 双行预设):干净,无截断。
Schema 校验也过:之前如果有人误改成非法值(比如
full-minus-20),ccstatusline 会直接Failed to parse settings: ZodError并把整个 settings.json 重置成 default 模板,导致 Code Abyss 的双行预设丢失。所以这次只在 3 个合法值里选最宽松的full。Impact
installCcstatusline把 bundled preset 部署到~/.config/ccstatusline/settings.json这一路径flexMode: "full"Diff