Skip to content

fix(mobile): a folded burst's children can fetch their own commands - #867

Merged
huichen merged 1 commit into
mainfrom
fix/burst-child-fetch
Sep 26, 2026
Merged

huichen merged 1 commit into
mainfrom
fix/burst-child-fetch

Conversation

@huichen

@huichen huichen commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

What a phone showed

🔧 运行 2 次  ^
    已运行
    已运行

A burst folds consecutive completed shell calls into one row. On a lean history page none of those calls carries its command (the trim drops every shell arguments), and the folded row has no call identity of its own — so its children rendered as bare labels with no press handler. The command was unreachable: not by opening the parent, not by tapping a child.

The single-row path had already solved this (ToolRow fetches its own command when opened); the folded path simply never got the same affordance, so "点击后再取" had a hole exactly where a burst is.

The fix

Each child that still has a call identity fetches its own command on tap — one tap, one command, and only for the calls the reader opens, so the byte story is unchanged (the page still drops them all):

  • a child that already carries a command stays a plain line (no press handler);
  • a child without call identity stays a label;
  • a failed fetch leaves the line as it was (a convenience, never a dependency).

Verification

  • Component tests pin all three cases, including that the sibling is not fetched when one child is opened. Falsified: forcing the child affordance off fails exactly the two tests that assert it.
  • Render harness (real UI + real projection + mock transport): the fixture gains a real burst (two adjacent successful shell calls) and lean-render-history asserts the pair folds, opening one child reveals diff notes/frank-summary.md notes/dreher-summary.md, and the sibling stays a label. Falsified: with the affordance off the scenario fails with the burst must list its two calls, got 0 (exit 1).
  • All five lean/full scenarios pass; the regenerated fixtures are a fixed point (gen-lean-render-fixtures.mjs re-run leaves git status unchanged).
  • mobile npx jest --runInBand — 2074 passed, exits cleanly; tsc --noEmit and eslint clean.

A burst ("运行 2 次") folds consecutive completed shell calls into one row. On a
lean history page none of those calls carries its command, and the folded row
has no call identity of its own — so its children rendered as bare labels and
there was no way at all to find out what ran. A reader saw "已运行" twice and a
dead end.

Each child now fetches its own command on tap, the same way a single tool row
does: one tap, one command, and only for the calls actually opened, so the byte
story is unchanged (the page still drops them all). A child that already carries
a command stays a plain line, and one without call identity is not tappable.

The render fixture gains a real burst (two adjacent successful shell calls) and
`lean-render-history` now asserts it: the pair folds, opening one child reveals
its command, and the sibling stays a label.

Verified end to end in the harness (real UI + real projection): all five
lean/full scenarios pass, and forcing the child affordance off makes
`lean-render-history` fail with "the burst must list its two calls, got 0".
@huichen
huichen enabled auto-merge (squash) September 26, 2026 06:01
@huichen
huichen merged commit a691cb8 into main Sep 26, 2026
12 checks passed
@huichen
huichen deleted the fix/burst-child-fetch branch September 26, 2026 06:03
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