Skip to content

Diagrams: the stack mirrors right to left, and a group's label gives way to its lines - #139

Merged
bmjcoding merged 5 commits into
mainfrom
claude/diagrams-rtl
Nov 24, 2026
Merged

bmjcoding merged 5 commits into
mainfrom
claude/diagrams-rtl

Conversation

@bmjcoding

Copy link
Copy Markdown
Owner

The diagram gaps left after batch B (#130), from the backlog: the stacked figure right to left, a stacked group's label under lines, and the automatic schema right to left.

What it does

  • The stacked figure mirrors right to left (d3bf93d4). The rail and trunk run down the right, branches indent from the right, and the end lines and gutter are on the left. Decision 1.7 listed these as logical; batch B shipped them as a named gap. At 390, every right-to-left figure matches its left-to-right one flipped to within 0.6px. Foundations' "stacked, not yet" now says it mirrors.

  • The automatic CIMIP schema right to left (de08d47d): a same-column turn-back takes the end side, and gutter lanes count from the right. It draws 4 crossings, as left to right, down from 6, with no warning.

  • A stacked group's label gives way to the lines at its top edge (45de6973, Fable's ruling DECISIONS 363, option 1 of three proved):

    • an incoming stem moves first, until it's space-2-5 past the label's plate;
    • then a label still crossed slides along the edge to the first place space-2-5 clear of every line;
    • where there is no such place, it keeps its plate over the line, and a development build warns.

    "Data & logs" is 10 clear at 390 and 320, in both directions. The foundations sentence is verbatim, and decision 1.3's text is updated in the record.

  • Author strings are isolated (e4b99501): each author string in a figure is wrapped in <bdi>, so a right-to-left heading's closing quote stays at its end. A fact fix. A linked card name is not isolated, because its arrow would jump to the start; that needs the arrow redrawn, and is left.

For the owner's eye

.review/council/diagrams-rtl/pictures/:

  • ruled-item2-{dark,light} (before and after; 390 RTL, 320 RTL, 320 LTR)
  • item1-architecture-390-* and item1-flow-390-* (the stack mirrored)
  • item3-schema-1440-*

Council

  • Built by Opus to decision 1.7 and the batch B decision.
  • Item 2: Fable ruled between the builder's three proved options. Option 3 (the plate over the lines) breaks "nothing is cut"; option 2 puts the label in the opposite corner from its parent's.
  • Review: not reviewed by a code or pixel seat after the build. The pictures were checked by the lead.

Checks

Lint (5 of 5 steps), both typechecks, npm run build and npm run sizes pass. No tests were run. The owner paused all tests until the open work is finished (DECISIONS 330, 359). diagram-rtl.test.mjs and the label and quote tests are written, not run. The skill's diagram module budget rises to 148,000, with its reason recorded.

Left alone:

  • The drawn (wide) layout still rounds half pixels the left-to-right way: up to 1.4px off a true mirror. Changing it would move approved pixels.
  • A right-to-left flowchart card is 1px shorter than left to right; this was already on main.

🤖 Generated with Claude Code

bmjcoding and others added 5 commits November 24, 2026 12:46
Batch B shipped the stacked form unmirrored as a named gap. The rail and the
trunk now run down the start side (the right), a branch is indented from the
right with its end lane on the left, and the end lines and the end gutter are
on the left. Every place across in stackedGeometry is written from a card's
start or end edge; the drawing's gutter padding and a branch's margins swap
under data-rtl. Right to left, the stack's half-pixel snap and a label's
whole-pixel move take the left of two equal places, so the figure is the
left-to-right one mirrored exactly (a 1px tie otherwise unseated a label and
grew the architecture 32px at 390). Foundations now says the stack mirrors.

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

CIMIP's automatic schema warned "a gutter holds 4 lanes side by side, closer
than space-3" and drew 6 crossings right to left against 4 left to right
(DECISIONS 322, "Already decided, not built", item 3). A same-column
turn-back chose its side by physical column: right to left it now takes the
end side (the left), and the start side in the last column, which is column 1
of the mirrored model. A one-column schema keeps its turn-backs' room on the
left. A column gutter's lanes are counted from its right, so the crossing
search's ties fall the mirrored way. The schema now draws its 4 crossings,
with no tight gutter, mirrored to the half-pixel snap.

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

diagram-rtl.test.mjs proves the stack mirrors at 390 (architecture, the
automatic architecture, the data flow: cards, labels and lines to the half
pixel, the gutter on the left), a branch's margins and the trunk's and end
lines' sides, and the schema: no tight gutter and as many crossings right to
left, mirrored to a pixel, and a one-column schema's turn-backs on the left.
Written while browser tests are paused (DECISIONS 330); not yet run.

The HTML skill's diagram module is regenerated; its budget rises 145450 to
146000 for the shared engine's right-to-left code (budgets are soft, with the
reason recorded). export-sizes.json regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s ruling)

Option 1 of diagrams-rtl item 2, as ruled (diagrams-rtl/ruling.md), in the
shared engine, so React and the HTML skill alike:
- A stem into a group's first card, from a card outside the group, moves
  toward the end until its stroke is space-2-5 past the label's plate, only
  while it stays space-6 inside the end edge of both cards. Its label goes
  with it; the stems below keep their slots. The stem is placed against the
  label's start seat.
- If a line still runs through the label's band, the label slides along the
  top edge, from its start seat toward the end, to the first place whose
  words are space-2-5 from every stroke through the band and end space-3
  before the group's inner end edge (--_gx, added to the seat's inset). Edge
  labels are seated against it where it lands.
- No such place: the label keeps its start seat on its plate, and a
  development build warns "a stacked group's label has no clear seat on its
  top edge". A bare stack puts every label back on its seat.
- Right to left mirrors all of it.

Foundations takes the ruling's sentence verbatim with the stacked rules. The
replacement text for decision 1.3 is for the record; the lead applies it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys at the end

Right to left, the source line `docs/architecture.md, "The shape"` showed
its closing quote at the start of the line. The title, the source line, a
group's label, a card's kind, name and detail, a column's type and a table's
name (and a foreign key's table) are now each a first-strong isolate
(<bdi>). Their lines still align to the figure's start, and nothing changes
left to right. A linked name is not isolated, because its cue is drawn after
its last word and has to stay at the end of the line in the figure's
direction.

Tests (written, not run, DECISIONS 330 and 359): no line under either group
label at 320 and 390 in both directions, the two clearances, the stem moved
at 320 and unmoved at 390, the last resort and its warning, and the source
line ending in its quote right to left.

The HTML skill's parts are regenerated, including the manifest, which the
last commit left stale at the old budget. The diagram module's budget goes
from 146000 to 148000, with the reason recorded. export-sizes.json is
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmjcoding
bmjcoding marked this pull request as ready for review November 24, 2026 19:12
@bmjcoding
bmjcoding merged commit 62c0364 into main Nov 24, 2026
1 of 2 checks passed
@bmjcoding
bmjcoding deleted the claude/diagrams-rtl branch November 24, 2026 19:12
bmjcoding added a commit that referenced this pull request Nov 24, 2026
…le regenerated

modules.json merged as data: main's file with this branch's own changes (tabs and
link-tabs budgets and usage, the tabs-scroll class, the comment's added reason).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bmjcoding added a commit that referenced this pull request Nov 24, 2026
…ize table regenerated

modules.json merged as data: main's file with this branch's own changes (the toggle and
glyph budgets and the comment's added reason).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bmjcoding added a commit that referenced this pull request Nov 24, 2026
…ble 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