Skip to content

Diagrams: app actions in the foot, one column at most 480, and a refused PNG explained - #143

Merged
bmjcoding merged 7 commits into
mainfrom
claude/diagram-actions
Nov 25, 2026
Merged

bmjcoding merged 7 commits into
mainfrom
claude/diagram-actions

Conversation

@bmjcoding

@bmjcoding bmjcoding commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

A seat for an app's own actions in a diagram's foot, the single column's width, and a refused PNG download. CIMIP's lead found all three while adopting main (relayed by the Basalt gaps thread). The foot seat was decided in a light council round on diagrams; the other two were ruled by the decider.

What it does

  • actions on all five diagrams (DiagramAction and DiagramActionContext, our own types).
    • Where they sit: after Basalt's own controls and before "Clear highlight": View as list, Expand, run, Pause animations, the actions, Clear highlight.
    • How they look: small secondary Buttons with words only, space-2 apart, wrapping from the start edge. A development warning past three actions or a 24-character label.
    • In the viewer: they follow the figure (inViewer: false leaves one out), and are handed the viewer's drawing and layout at 100%. At 390 each row of actions takes 52px from the stage.
    • Size: a figure with actions loads diagram-actions on demand, so a figure with none is at most 512 bytes over main (+499 to +505 measured), with no Base UI in any diagram's static graph.
    • settle() runs before onSelect.
  • Two faults on main fixed:
    • the viewer's end group wraps and starts on the start edge, where it was cut off at 390;
    • the whole foot is hidden in print. "View as list" used to print.
  • Export: it reads the viewer's drawing with the list open, and a figure with no box rejects and makes no file.
  • A drawn one-column layout (authored or automatic) is at most 480 (size-breakpoint-container) on the start edge, or its track's least width where that is more. The viewer's Fit and scroll take the drawing's own box.
  • A refused "Download PNG" (the skill) shows a note under the buttons: "This page's security policy blocks the PNG. Download SVG still works." It is text-xs, in secondary ink.
    • The button keeps its seat and focus, with aria-disabled and aria-describedby.
    • No figure on the page tries again after the first refusal.
    • Other failures say "The PNG could not be made."
  • Words: foundations and AGENTS.md, verbatim from the decision and rulings.

For the owner's eye

.review/council/diagrams-cimip/foot-build/shots/:

  • the foot with one to three actions, still and animated;
  • the viewer at 1440 and 390, both themes, and right to left;
  • print;
  • the one-column figure and its viewer;
  • the refused PNG in the foot and the viewer.

Council

  • The foot seat: a light round. Opus drafted A, B and C. Neon checked: A 8/10, B 4/10, C 3/10. Fable decided A, accepting all blocking findings. Neon gave no final position: its usage limit failed both attempts, and the council's rule is not to retry a usage limit, so it sat out. The decider had accepted every one of Neon's blocking findings.
  • The rulings: Fable ruled the single column (B of three proved options: the stack's 480 cap) and the refused PNG.
  • Review: not reviewed by a seat after the build.

Checks

Lint (5 of 5 steps), both typechecks, npm run build and npm run sizes pass. No tests were run (DECISIONS 330, 359). Written, not run:

  • diagram-actions.test.mjs and diagram-foot.test.mjs (the decision's eleven);
  • diagram-one-column.test.mjs;
  • the refused-PNG cases in content-policy.test.mjs.

Five skill budgets are raised with their reasons: diagram, diagram-zoom, diagram-export and two usage caps. Two of them were already over on main.

🤖 Generated with Claude Code

bmjcoding and others added 7 commits November 24, 2026 13:50
…ect a figure with no box

The export lifts hidden from the viewer's sizer for the synchronous read and puts it back before it returns,
so an action or the skill's Download SVG pressed with the list open writes the same drawing. A figure that is
not displayed rejects with an error that says so, and no file is made (the foot decision, 2.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oot does not print

The end group gains flex-wrap and min-width: 0 and its auto margin moves to the zoom group's end, so it stays at
the row's end while it shares the row and starts on the start edge on a row of its own (3.1). In print the whole
foot is display: none, so "View as list" no longer prints (3.2). React and the skill; the print test asserts every
control in the foot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e viewer

`actions` on all five diagrams (DiagramAction, DiagramActionContext with layout; our own types): Basalt's
secondary small Button, after Basalt's controls and before "Clear highlight", and in the viewer's end group
after "View as list" unless inViewer is false. The diagram-actions module loads only for a figure that has
some and is handed to the viewer as a prop: a figure with none is +499 to +505 B over main, no Base UI in a
diagram's static graph, no new import in diagram-viewer. A page press settles a running entrance before
onSelect. The viewer's figure takes the source and reports its layout. The foot decision's eleven tests are
written and not run (DECISIONS 359).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…int and the export of a hidden figure

The foot decision's section 5 words, verbatim, and the usage line for actions with the viewer's 52px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A drawn layout of one column (architecture, flowchart, data flow, schema; not a sequence) is capped at
size-breakpoint-container on the start edge, or at its column's least width where that is more. The engine writes
the column's least width with the layout (--_one), so the cap is in place before the drawing is measured; before
script the same cap holds at the token. The viewer fits and scrolls the drawing's own box (drawnSize), and its sizer
clips the empty layer. React and the skill; foundations, AGENTS.md and the skill's usage take the ruling's words.
The ruling is the decider's alone (diagrams-cimip ruling 1: no draft, no check); its tests are written and not run
(DECISIONS 359). +173 B on each diagram.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… switched off

When diagramToPng rejects because the page's content policy refuses every way (the export now names that error
DiagramPolicyError), the foot gets one line under its buttons, "This page's security policy blocks the PNG.
Download SVG still works.", and "Download PNG" takes aria-disabled and aria-describedby the note, keeping its seat
and focus. After the first refusal no figure tries again; each Download PNG answers its own first press at once.
Any other failure says "The PNG could not be made." or "The SVG could not be made." and the next press clears it.
Spoken once (announce on the page, the viewer's status in the viewer); in the viewer the note is last in the
controls' row on the end edge. The console keeps the developer's error. Clear highlight mounts before the note.
React draws nothing new. The ruling is the decider's alone (diagrams-cimip ruling 2: no draft, no check); its tests
are written and not run (DECISIONS 359). text-secondary on level 1 is already in the contrast tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the reasons in modules.json

diagram 148000 to 148700 (main was already 148204 after #142), diagram-zoom 17800 to 18000, diagram-export 10450 to
12850 (main was already 11147), and the usage caps diagram 5050 to 5100 and diagram-export 700 to 760. The diagram
usage line on one column is shortened to the ruling's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmjcoding
bmjcoding marked this pull request as ready for review November 25, 2026 00:49
@bmjcoding
bmjcoding merged commit 1890615 into main Nov 25, 2026
1 of 2 checks passed
@bmjcoding
bmjcoding deleted the claude/diagram-actions branch November 25, 2026 00:50
bmjcoding added a commit that referenced this pull request Nov 25, 2026
…e regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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