Skip to content

feat(mobile): fold failed calls too, and shorten the folded step summary - #657

Merged
huichen merged 1 commit into
mainfrom
claude/mobile-step-summary
Sep 16, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/mobile-step-summary

Conversation

@huichen

@huichen huichen commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Follow-up on #656, from review feedback on the folded step line.

1. A failed call folds — and still counts

foldableStep used to exclude status === "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:

  • the summary line swaps its kind glyph for the alert triangle and tints the counts danger;
  • the failure count is named to screen readers (accessibilityLabel), since a marker carried only by colour reads to no one;
  • opening the run still shows the failed row with its own 运行失败 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:

before after
zh 已运行 5 次 · 已思考 3 次 · 已写入 1 次 运行 5 次 · 思考 3 次 · 写入 1 次
en Ran a command 5× · Thought 3× · Wrote a file 1× Ran 5× · Thought 3× · Wrote 1×

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-unused chat.runCount key is replaced by chat.stepSummary + the short verbs; an expanded burst row ("运行 3 次") uses the same wording.

Tests

TimelineCard.test.ts now 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 ✅

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.
@huichen
huichen enabled auto-merge (squash) September 16, 2026 07:42
@huichen
huichen merged commit fcdc71f into main Sep 16, 2026
12 checks passed
@huichen
huichen deleted the claude/mobile-step-summary branch September 16, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant