Skip to content

Name the whole-poem action after what the model can do - #28

Merged
WWStoryMode merged 1 commit into
mainfrom
feat/whole-poem-by-capability
Oct 19, 2026
Merged

WWStoryMode merged 1 commit into
mainfrom
feat/whole-poem-by-capability

Conversation

@WWStoryMode

Copy link
Copy Markdown
Owner

B has always meant "the whole poem", but only Kimodo can answer that as one motion. SnapMoGen and Language of Motion cannot carry one line into the next, and SnapMoGen's worker refuses a poem outright — so pressing B on those models failed with a 503 and nothing else.

It now drafts every line instead, and the button says which it will do:

Model selected Button Hover
Kimodo Bake whole poem Generate the whole poem continuously, each line carried into the next
SnapMoGen · Language of Motion Draft all lines This model cannot carry one line into the next — generate every line alone

A label is on screen every time, where a dialog is dismissed once by the person who already knew. An unknown capability gets Draft all lines, because null is not true — the same rule askFor already follows.

No bake is recorded for a batch of drafts

The point of the change, and the reason it is not simply "let the button through". poem.baked stays null and bakeIsCurrent keeps reporting false, so the banner goes on saying there is no continuous reading.

These lines were never carried into one another. Writing them into the bake would put a claim of continuity into every session file the poem is exported to, where it would be read by people who were not here to watch the body jump between them — permanent and portable, unlike a warning someone clicks past.

The decision and its wording live in whole-poem.ts, out of the DOM and tested, for the same reason askFor and readPanel do: it is the kind of thing that can be wrong without looking wrong.

Drafting is sequential — the service gates a local worker to one generation at a time anyway, and a failure part way through then keeps every line drafted before it (4 of 8 lines were drafted, and are kept.). The stage is laid out once at the end rather than per line, because showCurrent lays every drafted motion end to end and a rating corpus can be hundreds of lines.

Two faults found while doing it, both pre-existing

A failed draft left the line spinning forever. draftLine's catch called setText with the unchanged text to clear it, but setText early-returns when the text has not moved, and invalidateFrom preserves generating on purpose. Nothing else in the state machine clears it, so the dot spun until the next retry. Poem.cancelGenerating now returns the row to what it was — never to draft, because the take that would justify that word is the one that did not arrive.

The elapsed time was never visible. All three paths wrote it just before setGenerating(false), whose default message cleared it again. They now settle through one generationSettled call, so the ordering cannot be got wrong in one place and right in another.

Tests

tsc clean; 87 pass, 0 fail (node --test src/*.test.ts), 9 of them new:

  • whole-poem.test.ts — the two actions can never share a label, the word "bake" never appears on the action that is not one, and a model that never declared is not assumed able to stitch.
  • poem.test.ts — a failed generation never leaves a row spinning; a line that already had a draft keeps it; cancelling is a no-op on a row that is not generating; cancelling never restores generating whatever it is handed.

Not verified in a browser

Stated plainly, since it is this repo's standing gap. The decision logic and the state machine are unit-tested. The relabelling on model change, the progress messages and the rows filling in one at a time are verified by inspection only.

The check worth making: reload with all three workers up, select SnapMoGen, press B on a short poem. Expect Draft all lines, each row turning into a draft in turn, visible seams, and the banner still reporting no continuous reading. Every line will also come back at ≥128 frames — SnapMoGen's floor, unchanged by this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_014yJSPiRjB5WvTH2x4LB8V6

SnapMoGen and Language of Motion cannot carry one line into the next, and
SnapMoGen's worker refuses a poem outright, so B on those models failed with a
503. It now drafts every line instead, and the button says which it will do:
"Bake whole poem" where the lines are carried, "Draft all lines" where they are
not. A label is on screen every time, where a dialog is dismissed once by the
person who already knew.

No bake is recorded for a batch of drafts. poem.baked stays null and
bakeIsCurrent keeps reporting false, because writing those lines into the bake
would put a claim of continuity into every session file the poem is exported
to, to be read by people who were not here to watch the body jump between them.
The decision and its wording live in whole-poem.ts, out of the DOM and tested,
for the same reason askFor does.

Drafting is sequential: the service gates a local worker to one generation at a
time anyway, and a failure part way then keeps every line drafted before it.
The stage is laid out once at the end rather than per line, because showCurrent
lays every drafted motion end to end and a rating corpus can be hundreds of
lines.

Two faults found while doing it, both pre-existing:

- A failed draft left the line spinning forever. The catch in draftLine called
  setText with the unchanged text to clear it, but setText early-returns when
  the text has not moved, and invalidateFrom preserves "generating" on purpose.
  Nothing else in the state machine clears it, so the dot spun until the next
  retry. Poem.cancelGenerating returns the row to what it was — never to
  "draft", because the take that would justify that word is the one that did
  not arrive.
- The elapsed time was never visible. All three paths wrote it just before
  setGenerating(false), whose default message cleared it again. They now settle
  through one generationSettled call, so the ordering cannot be got wrong in
  one place and right in another.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yJSPiRjB5WvTH2x4LB8V6
@WWStoryMode
WWStoryMode merged commit 2b3bcf3 into main Oct 19, 2026
2 checks passed
@WWStoryMode
WWStoryMode deleted the feat/whole-poem-by-capability branch October 19, 2026 13:20
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