Repository navigation
Diagrams: fixes, checks and a paint benchmark (batch A) - #126
Merged
Merged
Conversation
- Slots on a side (Neon 13): beside a straight line, two or more lines toward one end share that half of the side evenly, nested; one alone keeps the decided quarter point. Two lines no longer leave one point. - Development checks (Neon 14): every check and warning in diagram-core is written behind process.env.NODE_ENV, declared first in its function so a minifier folds it, and motionErrors returns nothing in production. An app's production build drops them and their words; the HTML skill bundles the engine as a development build, so compose.mjs still reports them. - A one-column schema with a foreign key (Neon 12) is drawn: its turn-back takes the end side and the drawing keeps space-5 there; the fit rule counts it. The old test that pinned it stacked now uses a turn-back named off a first column, which is still refused. - Labels on whole pixels (Fable P3): a seated label's box moves to the nearest whole page pixel that passes the same seat test; the seat is still chosen against the line's own centre. - A decision no taller than it is wide (Fable P4): where 62% makes the diamond taller than wide, the words' box widens to the narrowest width that fits it under that ceiling (--_ww); where none does, 62% stays. Tests: packages/react/test/diagram-fixes.test.mjs (new) and diagrams.test.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Neon's item 7 from round 65's code review, as listed in #124: - the packet's sends: with one in flight, one waits and a second is dropped, in React and through Basalt.diagram in the skill; - a flow line's cuts stop space-1 short of its head, and a line with under 48px showing has none; - the data flow's, the flowchart's and the schema's entrance totals are 1.3's; - more contrast under a theme chosen with the toggle, the system the other way; - the fit rule counts a mark's padding (space-6 a column); - React and the skill draw the same pixels for the five animated examples and the kit at rest, in both themes (the React page shares the skill core's text rendering and language); - the motion code failing to load (an app's split build whose motion chunk is refused): the figure settles, lines whole, no control, no error. Also fixes a flake in "mid-entrance, narrowed to a layout with no lines" (it failed on main too): a participant's border transition when its head becomes a chip was sampled inside its 100ms; the test now lets it end first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
packages/react/test/diagram-paint-bench.mjs: the five CIMIP examples animated and the marks kit on one React page (production build), every entrance ended, then 10s of frame times (requestAnimationFrame) and Chromium's timeline counts (paints, layouts, style recalcs, raster tasks, layer updates), against the same page still. Every figure in view by default; --height 900 for a laptop's window. Reports only; not a gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The five diagrams drop 3,227 bytes each (70,763 to 67,536 for ArchitectureDiagram): the development checks no longer ship in a production build. The whole package up front drops 0.4%. The skill's diagram module rises from 91,250 to 92,400 (92,386 measured): it bundles the engine as a development build, so it keeps the checks, and it carries the four fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…load (Neon on #126) - Blocking 1: two turn-backs to different keys were drawn on one lane. In a gutter, turn-backs beside each other now take its lanes as jogs do (a turn-back alone keeps its place); with no gutter (a one-column schema) the drawn layout refuses lines laid on one another that are not a bus, and the figure stays stacked. The geometry check (diagram-geometry.mjs) now reports any such pair in every test that uses it. - Blocking 2: when the motion code failed to load while the figure was hidden, the lines it drew once shown stayed pending. The failure is kept, and lines drawn later are settled in the frame they are drawn. The load-failure test covers a hidden figure shown afterwards. - Polish: the three checks left running in a production buildModel (the type list, a twice-used id, a sequence's participants) are behind `dev`. - Sizes: the five diagrams +44 bytes; the skill's diagram module budget 92,400 to 92,650 (92,603 measured). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er parity test - diagram-paint-bench.mjs: the window is its final height from the first frame; it waits for every figure in view to settle; it reports the figures moving (pulses and packets are finite legs, so endless animations undercounted), and layer updates (complete events only) apart from pre-paints, which every drawn frame has, the benchmark's own included. - The React and skill parity test bundles React's page once per theme and compares the screenshots' files, decoding only on a difference: 61s a theme down to 3.5s, so more marks cannot push it past the 120s limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Batch A of the diagram backlog (DECISIONS 301). These are engineering changes inside decided designs, built by Opus.
What changed
Motion checks not yet written (
2aa2cca3):A flaky test that also fails on main ("mid-entrance, narrowed…") is fixed.
Leftovers from Diagrams: architecture, flowchart, data flow, sequence and schema (DECISIONS 281, 282) #122 (
8369de9d):assignSlotsno longer double-assigns a slot;Decision diamonds no taller than wide (
8369de9d): where the 62% wrap would make one taller, the words' box widens first. The 5:1 floor stays.A paint benchmark (
bda448e1):packages/react/test/diagram-paint-bench.mjs. First numbers:Sizes
Tests (each file run alone)
diagram-fixes.test.mjs(new)diagrams.test.mjsdiagram-motion.test.mjsbundle.test.mjsdiagrams.test.mjsdiagram-motion.test.mjscompose.test.mjshtml-skill.test.mjsLint, both typechecks, the build and
sizespass.npm run checkandci:localwere not run.Open: with the decider, Fable
The builder chose these where the decision is silent:
Neon's review: 7/10, with 2 blocking findings, both fixed in
0d9017c7:The polish is also fixed:
dev;The fixes weren't re-reviewed by a seat. Fable has since ruled on the three open calls (DECISIONS 306). The diamond ceiling becomes a fit failure. The space-5 padding stands, stated as a rule. The slot sharing stands, with two fit conditions. The two changes are built with batch B.
Gate on the combined tree: main (
d1217fb3, with #125's 104 marks) was merged in at3cbc662c. There were no conflicts, and no committed file or size changed. Each file run by name:diagram-fixesdiagramsdiagram-motionbundlediagramsdiagram-motioncomposehtml-skill🤖 Generated with Claude Code