Skip to content

Land rtext: 4 lanes - #209

Merged
XrxcGH merged 31 commits into
betafrom
train-rtext
Nov 15, 2026
Merged

XrxcGH merged 31 commits into
betafrom
train-rtext

Conversation

@XrxcGH

@XrxcGH XrxcGH commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Lands the rich text lanes on beta in one merge train.

Lanes

  • b10-text-home-tab-ui (Add Home tab controls, mini toolbar, and Aa sheet #205): already on beta, so it arrives as a no-op.
  • b11-text-format-pane (#0): the Format pane (Font, Ctrl+D, and Paragraph) with every field, units, tab stops, borders, shading, list levels, Reveal formatting, and Modify style. Flag text.formatPane.
  • b11-text-language-direction (#0): language and Do not check spelling per passage, per-run spell check, right-to-left and left-to-right paragraphs, and automatic hyphenation. Flag text.language.
  • b11-text-ruler (#0): View, Ruler with draggable indent markers and tab stops, keyboard and screen reader support. Flag text.ruler.

All three new features stay behind flags that are off.

Conflicts (8 over 3 merges)

  • docs/FEATURE-LIST.md (all 3 merges): generated, regenerated.
  • app/bundle-budget.json: kept beta's higher start-up budget.
  • app/src/editor/schema/dom.ts and textBlock.ts: union. renderStatic takes list definitions and then the direction options. tableBlock.ts, dom.test.ts, and direction.test.tsx follow the merged signature.
  • docs/tools/registry.json: union of the language and layout commands.
  • app/src/app/flagUsage.test.ts: both flags leave the waiting list.

No new ADRs. ADR 0082 gets a note on style mode.

Cross-lane fixes

  • The ruler draws the page's default tab stops set in the Format pane.
  • The static direction test checks what text.language adds on top of beta's paragraph style render.
  • The static render parity test gives the static render the text block's options.
  • The direction buttons get their own Home tab icons; the ruler command gets an icon.
  • The Draw bar icon test checks at 2400 px, since the Review tab now shows with every flag on.
  • The text lanes' command sentences move to docs/tools/featureCommandsText.ts.
  • README, FEATURES, the feature list, and the typed notes and language help pages list the new features.

Gates (local)

  • Typecheck: pass
  • Lint: pass
  • Checks: pass (0 errors)
  • Unit tests: pass (4 load timeouts on the first run passed on rerun)
  • Component tests: pass (24 load-flake files passed on rerun; the Draw bar icon test was a real failure, fixed)
  • Rust: no crate touched, so no cargo gates

🤖 Generated with Claude Code

XrxcGH and others added 30 commits November 7, 2026 09:10
Text with its own lang (a run's lang mark or a paragraph's lang) is
checked in that language only, one request per language, and its
results map back to the textblock's offsets. Text set to "do not check
spelling" (zxx) is masked like code, so it never reaches the checker.
A language without an installed checker stays unchecked, as in Word.
Suggestions use the misspelled word's own language.

textblockText reports the language spans, and SpellingService takes
them as an optional argument, so callers without languages are as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new editor extension turns a paragraph's dir, lang, and hyphenate
attributes into the element's dir, lang, and hyphens through node
decorations. Alignment is logical, as in Word: start is the right edge
of a right-to-left paragraph, so the decoration writes the physical
side. A paragraph without dir stays left to right even when it starts
with Arabic; the direction is never guessed from the text.

The editor root gets the page language, so automatic hyphenation and
the screen reader voice follow it. Decorations are redrawn only for the
top-level blocks a change touched. It registers through
editorExtensions behind text.language, with commands to set direction
and hyphenation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Language on the Review tab sets the language of the selection as a
lang run, or of the caret's paragraphs, from the page languages and the
installed spell checkers, listed by American English name. Do not check
spelling sets zxx. Right-to-left and left-to-right join the Home tab's
Paragraph group, and Automatic hyphenation the Layout tab. All sit
behind text.language and load their code when they run.

The feature list gains the five commands (registry.json, FEATURE-LIST.md
regenerated, one sentence each in featureCommands.ts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
origin/beta already builds 539.7 KB of start-up JavaScript. The
language and direction commands and their strings register at start-up
and add 1.2 KB; their code loads when a command runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A caret inside a run with its own language now changes that run, so
  "Do not check spelling" turns off and "Use the page language" works
  there (G1).
- Static paragraphs get dir, lang, the physical side, and hyphens from
  the same directionDom the editor uses, so the page does not reflow
  and spell check reads their language before the editor mounts (G2).
- EditorHost.pageSettings gives the editor view.text; the direction
  extension and the static render use its hyphenate default (G3).
- The text.language flag description says where its buttons sit (G4).
- A run with its own language inside a zxx paragraph is checked (G5).
- The unit test asserts dir="auto" is never written (G6).
- Start-up JavaScript budget 541 to 542 KB: the static render now
  carries directionDom and the page settings reader (541.2 KB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ruler sits above the focused text block, aligned to its content box at
any zoom, in inches, centimeters, millimeters, points, or picas. Markers
move by mouse, pen, touch (44 px targets, 4 px drag threshold) or arrow
keys, snap to 1/16 inch (0.25 cm), and Alt drags freely. Clicking adds a
tab stop of the selected type; dragging a stop off the ruler removes it.
Each marker is a slider that announces its value. Behind text.ruler.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guard, tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ield indent writes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Lists tab needs to read the caret's level and change one field of it
(indent, hanging, symbol, pattern, start). listLevelAt gives the level with
defaults filled in. setListLevel writes a new list definition, as the other
list commands do, and refuses values outside the list grammar.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every field of the design's Format pane parses a typed value with units
(pt, in, cm, mm, px, pc), checks its range, and applies it through the
editor commands, so a bad value gives its message and changes nothing.
Reveal formatting lists each format at the caret with its source: direct,
paragraph, or the named style. Tests take their known answers from the unit
definitions and the spec's ranges.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The pane has six tabs (Text, Advanced, Paragraph, Tabs, Borders and shading,
Lists), a preview line, and Reveal formatting. It is non-modal, keyboard
complete, and passes axe in both themes. Ctrl+D opens it on Text. With
text.formatPane on, Modify style opens it in style mode for every style, so
each change is one notebook change with the Undo toast.

The custom color dialog now hosts the shared palette (theme colors, standard
colors, recent colors, hex, RGB, and HSL with the contrast badge), and the
pane's color fields use the same palette. Docs list the three new commands.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al in words, option strings, focus on open, fewer redraws, field checks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ects and OpenType, widow control default, page-scoped defaults, reveal wording, preview

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	docs/FEATURE-LIST.md
# Conflicts:
#	app/bundle-budget.json
#	app/src/editor/schema/dom.ts
#	app/src/features/page/blocks/textBlock.ts
#	docs/FEATURE-LIST.md
#	docs/tools/registry.json
# Conflicts:
#	app/src/app/flagUsage.test.ts
#	docs/FEATURE-LIST.md
The Format pane sets the default tab interval and the tab layout uses it,
so the ruler now draws those stops after the last set stop. Also lists the
ruler command in the generated feature list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merged lanes pushed featureCommands.ts past the 800-line limit that
the checks enforce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Beta's paraDom always draws a paragraph's stored direction and language,
in the static render and in the editor alike. The test now checks what
text.language adds on top: the dir attribute, the physical side, and the
hyphens, none of which appear when the flag is off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The right-to-left and left-to-right buttons used the indent and outdent
arrows, so two Home tab buttons looked the same. They now use plain
arrows and have Home tab icons. View, Ruler gets the ruler icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A text block passes staticOptions(host) to renderStatic, so the test does
the same with the one host it gives the mounted editor. With text.language
on, both renders then draw the same direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, FEATURES, the generated feature list, and the typed notes and
language help pages now describe the three text lanes. All three stay
behind flags that are off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With every flag on, the language lane's Language button makes the Review
tab appear. The tab list grows by 74 px, so at 2200 px Ink to shape moves
to More. The test checks the Draw bar at 2400 px, where every Draw tool
fits, and still checks Ink to shape's icon and pressed ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ath, widen the start-up budget for the new strings, make the Home tab control test wait for the bar

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, not as an icon switch's content

The layout audit flagged the hint spilling out of the icon switch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@XrxcGH
XrxcGH merged commit 6a73156 into beta Nov 15, 2026
39 of 42 checks passed
@XrxcGH
XrxcGH deleted the train-rtext branch November 15, 2026 03:32
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