Spell out the live turn stats instead of 3F +2.8K/-2.7K - #772
Open
gongcavalry wants to merge 1 commit into
Open
gongcavalry wants to merge 1 commit into
gongcavalry wants to merge 1 commit into
Conversation
The status line under a running turn read `3F +2.8K/-2.7K`. Every part of it cost a decoding step: `F` for files, `+`/`-` for line direction, and the compact notation rounding both sides toward the same figure. That last one is the problem — the single comparison worth making at a glance is whether additions and deletions nearly cancel, which is how you spot a whole-file rewrite, and the formatting was the first thing to destroy it. Now reads `改了 3 个文件 · 新增 2751 行、删除 2744 行` and `0.2 token/秒`, with the same sentence as a hover hint. Line counts are formatted in full rather than compacted; the two helpers left unused by that change (`formatCompactInt`, `compactNumberFormatter`) are removed. Locale: five new keys in all ten files. English, German, French, Spanish and Portuguese use ICU plurals; CJK and Arabic stay flat. Tests: vitest 6608 passed / 453 files; eslint clean.
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.
Before / after
Why
The status line under a running turn is the only place that answers "what is this agent doing to my files right now", and every part of it currently costs a decoding step:
F— files, but nothing on screen says so;+/-— line direction, with no unit;2751becomes2.8K.That third one is the real loss. The single comparison worth making at a glance is whether additions and deletions nearly cancel, because that is the signature of a whole-file rewrite rather than a targeted edit — and rounding both sides to
2.8K/2.7Kis exactly what hides it. The old format destroyed the most actionable signal in the widget while making the reader work for the rest.Change
live-turn-stats.tsxnow renders full sentences from i18n instead of concatenating bare symbols, and the same sentence is repeated as a hover hint (title) and carried by anaria-labelon the icon, matching howComposerContextUsagealready names its gauge.Line counts use a plain
Intl.NumberFormatinstead of the compact one. Two helpers became dead once nothing compacted numbers any more —formatCompactIntandcompactNumberFormatter— so they are removed rather than left to rot.Locale: five new keys (
filesChanged,linesChanged,editStatsAria,editStatsTooltip,outputSpeedValue) in all ten files. English, German, French, Spanish and Portuguese use ICU plurals; CJK and Arabic stay flat.Tests
pnpm test(vitest, full)live-turn-stats.test.tsxpnpm lint(eslint)pnpm build+tauri build --bundles app3F +no longer appears anywhere in the bundleNo existing assertion depended on the old
3F/tok/sstrings, so no test was edited.Notes
Independent of #771 — different component, different concern. This branch is based on current
main(a425e41) and touches neither file that PR changes.中文说明:这一条纯粹是可读性。原来
3F +2.8K/-2744里每一段都要先翻译一遍才懂,而其中唯一值得扫一眼就看出的信号——新增和删除行数是否接近抵消(这是「整文件重写」而非「精准小改」的特征)——恰好被 compact 取整抹掉了。改成完整句子并按真实数字显示后,这个信号一眼就能看到。