Skip to content

to-human: unfolded working record draws as the transcript does, fold button at its end - #178

Merged
SSFSKIM merged 3 commits into
mainfrom
working-record-regular
Sep 21, 2026
Merged

SSFSKIM merged 3 commits into
mainfrom
working-record-regular

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • An unfolded run of working record no longer forces a tool group open: the mod rewrote isExpanded to true, and an expanded group is the ctrl+o form (the engine hard-codes verbose and transcript mode for those rows). The group now draws its count line as the transcript does.
  • [ fold to report ] moves from the first row of the run to its last, and moves down as the run grows. A call's row and its result's share an id: the result row carries the button once the call has resolved, the call's row until then.
  • see() invalidates the render cache when a new row joins an open run (or a streaming message turns from record into a mark), since the row that drew the button is cached as it was. It is a top-level function now, the only place the engine's static check lets $ reach.
  • Review fix (second commit): where the engine expands a group itself (isExpanded is verbose || isTranscriptMode, and the hooks draw in the ctrl+o view too), each call's row finds its group's run through groupOf and is never added to the run order, and the group's last call draws the run's end in the group's place. Adding the calls to the order had split a historical group from its calls after a ctrl+o visit, and left a run that ends at a group with no row to draw its button once the group collapsed again.

Verification

  • tsc -p hooks/mods/tsconfig.json clean, claude plugin validate . clean, tests/mods/run-mods-tests.sh 37/37 (three new runEnd tests).
  • Live in tmux (--plugin-dir, haiku): a run of reads and shell commands unfolded mid-run shows the engine's live group row with the button under it, then the count line Read 3 files, ran 2 shell commands with the button under it once the run ends; an Agent call joining the run moves the button from the group row to the Agent's result row; [ fold to report ] folds the run back; under --verbose each call draws as its own row with the button under the last.
  • ctrl+o round trips with the run unfolded, after the run ended and while it was live: the transcript view draws the expanded rows with the button under the last, the regular view the count line with the button under it. Both reviewer findings reproduced before the second commit and pass after it. No hook failures in any run's debug log.
  • Not observed live: the button on a standalone call's row while it still runs (the engine backgrounded the Agent at once). Same recordRow path as the group row, with closes true.

…ld button at its end

Unfolding a run of working record drew every call of a tool group as its
own row with its whole output inline: the mod rewrote the group's
isExpanded to true, and an expanded group is the ctrl+o form, verbose and
transcript mode both hard-coded in the engine. The group now draws as the
transcript draws it, its count line, and under --verbose the engine's own
per-call rows.

[ fold to report ] moves from the run's first row to its last, where the
person is when they finish reading. A call's row and its result's share an
id, so the result row carries the button once the call has resolved and
the call's row only until then; a row that joins an open run, or a
streaming message that turns from record into a mark closing it, moves
the end, and see() asks for the rows again since the row that drew the
button is cached as it was. see() is a top-level function now: the
engine's static check lets $ reach only those.
…the order

The engine expands a group itself in the ctrl+o transcript (isExpanded is
verbose || isTranscriptMode), and the mod's hooks draw there too. Adding
an expanded group's calls to the run order put them after rows that had
drawn since, so a historical group opened by ctrl+o drew its calls as a
new folded run; and once the group collapsed again the calls stayed in
the order with no row to draw, so a run ending at the group lost its
fold button. A call's row now finds its group's run by groupOf, and the
group's last call draws the run's end in the group's place.

From the independent review of PR #178; both cases reproduced live
before the change and pass a ctrl+o round trip after it.
@SSFSKIM
SSFSKIM merged commit f58c478 into main Sep 21, 2026
@SSFSKIM
SSFSKIM deleted the working-record-regular branch September 21, 2026 03:15
SSFSKIM added a commit that referenced this pull request Nov 7, 2026
sminos 1.40.2: the uplink code RL10 cannot reach goes (board #178)
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