Repository navigation
feat(mobile): fold failed calls too, and shorten the folded step summary - #657
Merged
Merged
Conversation
Two follow-ups on the folded step line:
- A failed call now folds with the rest and counts under its own kind (a
failed run is still a run, a failed read still a read). The run stays
honest about it: the summary line carries the alert glyph and a danger
tint, and names the failure count to screen readers — only a call that is
still running keeps a row of its own, since that is live progress.
- The counts read as short verbs merged into one line ("运行 5 次 · 思考 3 次
· 写入 1 次") instead of stacking the sentence-form row labels ("已运行 5
次 · 已思考 3 次"). The same short verbs back an expanded burst row.
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.
Follow-up on #656, from review feedback on the folded step line.
1. A failed call folds — and still counts
foldableStepused to excludestatus === "failed", so one bad call split the run in two and left a red row on screen. A failure now folds with the rest and counts under its own kind (a failed run is still a run; a failed read still counts as a read).The run stays honest about it, so nothing goes quiet:
accessibilityLabel), since a marker carried only by colour reads to no one;运行失败label.The only row that still refuses to fold is a call that is still running — that is live progress, not history.
2. Shorter counts
The counts stacked sentence-form row labels (
已运行 5 次 · 已思考 3 次 · 已写入 1 次/Ran a command 5× · Thought 3× · Wrote a file 1×). They now use short verbs merged into one line:Single-row labels (
已运行/Ran a command) are unchanged — they are one per line, so they do not stack, and they keep desktop parity. The now-unusedchat.runCountkey is replaced bychat.stepSummary+ the short verbs; an expanded burst row ("运行 3 次") uses the same wording.Tests
TimelineCard.test.tsnow covers: a failed call folding + counting under its kind + being flagged (and its row still labelled on expand), a clean run carrying no alert, all five kinds merged into one line, plus the existing fold / drill-down / streaming-tail cases.Local (mobile-scoped):
npm run typecheck✅ ·npm run lint✅ ·npm test— 95 suites / 1334 tests ✅