Skip to content

Studio: a turn card at Your turn: one line, what's next, what was done, and a box that sends (#1062) - #1070

Merged
danielrispler merged 7 commits into
mainfrom
issue-1062-turn-card
Dec 2, 2026
Merged

danielrispler merged 7 commits into
mainfrom
issue-1062-turn-card

Conversation

@danielrispler

@danielrispler danielrispler commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

At Your turn or Idle, the session panel (Context mode) leads with a turn card: the Headline, what's next for Daniel, what the agent did, a Reply row of pills, and a box that sends through Send.

 turn writer (one call per summarised turn, unchanged count)
   headline, lines
+  next     ≤3 × ≤14 words, grounded            → None if absent or all dropped
+  did      ≤3 × ≤14 words, grounded, agent_says
+  prompts  ≤2 agent (quote passes `quoted` vs final reply) + ≤1 suggested (no quote)
 stored TurnSummary / wire / ui/types.ts: the three fields optional (old summaries read as None)
 <SessionPanel> (Context mode)
+  <TurnCard>  only at your_turn | idle; Decision mode wins
+    Headline (or the reply's first line), keeps "Agent says:"
+    YOU NEXT 1..3 | "Nothing waiting on you" (empty list) | left out (old summary)
+    AGENT DID 1..3, then "Not done: …" from `open` Body lines
+    REPLY  (agent pill)(agent pill)(✦ suggested pill, dashed)
+           [ box ]  Enter → send_guard ✓ → see_session → send ; Shift+Enter new line
+                    guard refuses / not Herdr → Copy & Jump (Enter only says why)
+    ▸ Full reply   (reuses the story's response fold)
   <SessionCard>          unchanged
   <SinceYouLooked>       unchanged

The box's draft (and focus) is one node per session, kept through the keyed patch like an Ask box, and dropped when the session leaves the list (forgetReplies).

Evidence

  • Before: the panel showed the session card and the timeline; acting on a turn meant going to the terminal.
    After: snap fixture mapSessionPanelTurnCard (README's spotlit.png, regenerated):
    turn card
  • npm run check passes on the tip (Rust + 1118 node tests, lint, knip, clippy, system-map check); windows.yml green on x64 and arm64 for every merge.
  • Each new test row was run red first (assertion failures), e.g.:
    writer table: "a list whose every item is dropped is no list"     red: prompts [] vs null → green
    writer table: agent prompt whose quote isn't in the final reply    red → green
    panel: Enter sends after see_session; Shift+Enter / IME Enter don't red → green
    panel: a guard answer landing after the next turn is dropped        red: "Enter sends…" vs "Send is off: …" → green
    panel: the card's line keeps "Agent says:"                          red: "Fixed the overlay" → green
    
    The stored-sample test (full-10/) and the pure turnCardOf table were written after their code and not seen red.

Tests merged

Four writer tests became rows of a_summary_reply_reads_into_its_headline_body_and_lists (understanding/tests/writer.rs), exact inputs kept; none was @law:-tagged:

  • typed_lines_parse_and_a_line_of_an_unknown_type_is_dropped → 1 row
  • a_fix_with_no_passed_check_is_the_agents_claim_and_one_with_a_passed_check_is_not → 4 rows
  • a_line_with_a_number_or_id_the_turn_lacks_is_stripped_and_true_numbers_stay → 3 rows
  • a_reply_with_a_null_or_missing_quiz_gives_the_summary_alone_and_logs_nothing → 2 rows

Notes

Correctness pass

/code-review high on the whole branch (standards, spec and a correctness reviewer that ran the tests and mutated rows). Fixed: a next list whose every item was dropped read "Nothing waiting on you"; a suggested prompt kept its quote; a late send_guard answer could overwrite the next turn's; the duplicated inHerdr/Enter handling; the held as kept name clash; the fold key derived from its title. Rejected: "the card shows the whole reply when unsummarised" (turn.message is already the first line, core/src/studio/take.rs:911-915).

Snap

snap (2/2) failed on mapSessionPanelReplay ("DIV.hint covers the map at 410,570 with the session panel open"), and failed again on its one rerun. It reproduced locally at the map fixtures' 1900x1180 (red on the branch, green on main): the fixture presses the replay's ›, whose "Next step (→)" hint stays open; the turn card moves the timeline down, so that hint now reaches the bare map the shared check tests. The fixture now lets go of the focus before the check (53f468e); the product behaves as on main.

Outside review

gemini-4-neon-medium — cost: 5.6 min, 252527 tokens; Gemini quota left: weekly 63% to 62%, 5h 58% to 52%

  • Fixed: turnCardOf stripped "Agent says:" from a guarded Headline, so the card showed an unbacked claim as fact while did kept the prefix (d433dcd). The correctness pass's spec reviewer had reported it; I had rejected it then because the timeline row strips it too.

Merge Danger

Door: two-way

The stored summary gains three optional fields; the previous build reads them (no deny_unknown_fields), but a previous build that rewrites a stored summary would drop them.

Blast Radius: session panel

The card sits above the session card at Your turn/Idle, pushing the timeline down. The box sends real prompts into a Herdr session, behind the existing send_guard.

Closes #1062
Closes #1067
Closes #1068
Closes #1069

🤖 Generated with Claude Code

danielrispler and others added 6 commits December 2, 2026 12:42
…rompts (#1067)

The turn summary gains next, did and prompts, optional on the stored type
and on the wire, each item held to grounded, its word limit, agent_says
(did) and the word-for-word quote check (agent prompts), dropped not cut.
The summary's reply-parsing tests become one table; a new frozen sample
full-10 carries the fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-1067-turn-writer-fields

# Conflicts:
#	understanding/tests/fixtures/stored/README.md
…rn and Idle (#1068)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The turn card gains its Reply row: up to two agent pills (solid) then one
suggested pill (dashed, muted, after a ✦), each hover naming who wrote it
and holding the whole text. A pill fills and focuses the box, a one-line
textarea that grows (field-sizing). Enter sends the box past send_guard
with the generic send, after see_session; Shift+Enter and an input
method's Enter don't. Where Send can't type, the box has Copy & Jump or
Copy reply and Enter only says why. A failed send keeps the text. The box
is one held node per session, so a draft and its focus survive the card
being drawn anew as its summary arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A list the writer filled whose every item is dropped is stored as none, so
a turn that asked things never reads "Nothing waiting on you"; a suggested
prompt's quote is emptied. A turn's send_guard answer that lands after the
guard was asked again is dropped. The box's Enter goes through onEnter,
whose new lines option leaves Shift+Enter to the field; inHerdr is one
function in jump.ts for the planning view and the card; the held import no
longer shadows a local name, and the response fold's key part is passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… review of spec #1062)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danielrispler
danielrispler marked this pull request as ready for review December 2, 2026 11:38
… map check (spec #1062)

The turn card moves the timeline down, so the › button's "Next step" hint reached the bare map the shared check tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danielrispler
danielrispler merged commit d7a4be0 into main Dec 2, 2026
9 checks passed
@danielrispler
danielrispler deleted the issue-1062-turn-card branch December 2, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant