Repository navigation
Conversation
milanb17
force-pushed
the
mb/whiteboard-block-components-12ca8f
branch
30 times, most recently
from
November 11, 2026 20:55
d84585e to
40d0a5a
Compare
milanb17
force-pushed
the
mb/whiteboard-block-components-12ca8f
branch
18 times, most recently
from
November 12, 2026 22:41
d9251e0 to
3601975
Compare
A standalone Vite playground for a new whiteboard block: a sandboxed stage runs an agent's script against a wb SDK with nodes, nested groups, wires, ELK layout with an overlap check, steps and scenarios with request moves, code claims verified against the repository, and Observable Plot charts. PLAN.md lays out moving it into Whiteboard. Agent-Session: db53cef1-7052-40f4-80b7-97044c16c38b
milanb17
force-pushed
the
mb/whiteboard-block-components-12ca8f
branch
2 times, most recently
from
November 13, 2026 00:47
38b7874 to
53ae59a
Compare
A new `diagram` block runs an agent's JavaScript module against a `wb` SDK in the existing sandboxed stage: C4 nodes, nested groups and wires laid out by ELK with an overlap check, steps whose moves send tokens along the wires, scenarios, played timelines, and Observable Plot charts. ELK, d3 and Plot reach the stage as text over its port on first use, so the stage keeps its no-network policy. Every node and wire can link to code with evidence: text that must sit in the linked lines. A publish whose evidence is elsewhere is refused with the line it moved to, and a board that moves to new commits marks such links stale. Readers toggle Verify to see each claim's state; stale links show as changed without hiding the diagram. Agents author diagrams as files (diagram.js, frames.json, scenarios.json, block.json) with the existing checkout, publish and render tools. Renders and session_get report script errors, findings (overlaps, moves without a wire, unknown code names) and claim counts. Instructions, a wb.d.ts held to the runtime, and six reference diagrams ship with them. With Animations on, agents can no longer insert animation, clip, flow_diagram, sequence or call_stack_diff blocks; existing ones still render and still take updates. The authoring guide points design and implementation diagrams at `diagram`. Agent-Session: db53cef1-7052-40f4-80b7-97044c16c38b
milanb17
force-pushed
the
mb/whiteboard-block-components-12ca8f
branch
from
November 13, 2026 03:25
53ae59a to
9567de0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits:
packages/animation-labplayground andPLAN.md.What it adds
diagramblock (whiteboard-document/src/blocks/diagram.ts). An agent's markup (html), JavaScript module (script) or both draw in the existing sandboxed stage, the script with a globalwb:movessend tokens along the wires:faileddraws one red, andloststops it halfway for a message that never arrives;diagram.htmlas the page, laid out as any web page is:<div data-wb-drawing>marks wherewbdraws and takes the drawing's size, so panels, tables and logs sit around it with flow, flex or grid. Without markup the page is that element alone. The page's styles are scoped to it with@scope, so they never reach whatwbdraws.data-wb-from,data-wb-untilanddata-wb-onlyshow an element by frame with no script.app/src/diagram/wb-runtime.ts), ported from the lab onto the stage's MessagePort.width;diagram.htmlhas nodata-wb-drawing(an error), and page styles that namebody,:rootorwb's own elements.quotesof each range's first and last lines.code: falsemarks a node or wire that is not code, such as a repository drawn as a database.animation/timeline-controls.tsx): a round play button, a track of steps or chapters with their names, and the current caption. Space plays and pauses; the arrow keys step.session_checkoutandfromFileswork with a folder holdingdiagram.html,diagram.jsor both.session_render(frame: "all"renders every frame of every scenario) andsession_getreport script errors, findings and claim counts (matches,changed,unlinked).diagraminstructions topic, awb.d.tsheld to the runtime withsatisfies, and ten reference diagrams: layered architecture, request fan-out, fan-out, shared lock, sequence, call path, request with state, played request, latency chart and rolled die.animation,clip,flow_diagram,sequenceorcall_stack_diff.diagram.How the authoring experience was tuned
An agent (Fable) drew three new diagrams a round on a test board, using only what the whiteboard serves an author, and logged every point of friction. Each round's fixes went into the stage first, then the references, then the instructions. Round 10 came back satisfied. The rounds produced the hand-placed routing, the findings with numbers,
lostmoves,code: false, and thefan-outandshared-lockreferences.Where it differs from PLAN.md
{ source, evidence, label? }, as the plan's D6 suggested.session_renderhas noverifyinput. A render returns the claim counts and findings from the canvas's run report instead, so the Desktop render verb and the protocol are unchanged.wb.selectablefor ids and labels only.Tests
diagram.test.ts(schema rules);code-evidence.test.ts;diagram-block.browser.test.tsx: layout and size, routing and labels, findings, claim counts, stale links,code: false, script and syntax errors, steps, timeline, markup without a script, the drawing placed wheredata-wb-drawingsits, page styles kept off the drawing, and a missing mount;references.browser.test.tsx: every reference runs clean through every scenario, with no findings;local-data(stale evidence), attached-Desktop and headless-host tests.store-upgrade.test.tsnow pins its clock: a fixture board put in Trash on 2026-10-13 reached the 30-day purge, which failed it onmaintoo.pnpm lintandpnpm format:checkare clean; thedeslop-uipass has run. It moved the players' glyphs intoui/icons.tsxand put the player onIconButton,useTooltip,textStyles.truncateandKbd.Checked in Desktop
The player in dark and light: play, pause and replay, Space and the arrow keys, Tab through the track and step names, and the captions on hover and focus. That check found step names cut off and running together at mid widths. Names under stops now show only when every one fits whole, as below the narrow breakpoint.
Not done