docs/plans/2026-04-29-slate-v2-integration-local-triage-plan.md
Status: complete
Identify .tmp/slate-v2 Playwright integration rows that are redundant, low-value,
or better covered by generated stress / package contracts, so
bun test:integration-local can shrink without gutting browser-regression
coverage.
bun test:integration-local just to triage; use listing,
static clustering, and targeted rows first.bun check plus
targeted Playwright rows.bun test:integration-local, which takes over 10 minutes.bunx playwright test --list before cleanup: 676 rows, 30 files, 169 rows
per project across Chromium, Firefox, mobile, and WebKit.playwright/stress/** was included in
test:integration-local, even though test:stress and
test:stress:replay already own that lane..tmp/slate-v2/package.json so test:integration and
test:integration-local run playwright/integration only.bunx playwright test playwright/integration --list after cleanup: 588 rows,
28 files, 147 rows per project.bun check passes after the script change.PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration --max-failures=1 --reporter=line passes 588/588 across Chromium, Firefox,
mobile, and WebKit.bun check passes in .tmp/slate-v2.Exclude playwright/stress/** from test:integration*.
test:stress and
test:stress:replay.Delete route-smoke rows that are strictly weaker than existing rows in the same file or generated stress:
playwright/integration/examples/richtext.test.ts
renders rich textinserts text through browser inputruns a traced slate-browser scenarioplaywright/integration/examples/markdown-shortcuts.test.ts
contains quoteplaywright/integration/examples/forced-layout.test.ts
checks for the elementsplaywright/integration/examples/images.test.ts
contains imageplaywright/integration/examples/hovering-toolbar.test.ts
hovering toolbar appearsDelete Playwright rows that are already better covered by package-level app-owned customization tests:
playwright/integration/examples/markdown-preview.test.ts
checks for markdownpackages/slate-react/test/app-owned-customization.tsx
Editable supports app-owned markdown preview projectionsplaywright/integration/examples/forced-layout.test.ts
DRY or chromium-scope, not delete blindly:
playwright/integration/examples/styling.test.ts
records kernel commands for structural browser editsrecords kernel commands for proof-handle editsrecords allowed kernel transitions for movement commandsrecords core command metadata for keydown movementrecords kernel policies for browser command and repair tracesrecords core command metadata for text input and deleterecords selectionchange and repair kernel resultstest:stress.Status: complete
Trigger: user sees many reds and wants fixes to begin before the full integration sweep finishes.
Run policy:
playwright/integration with --max-failures=1 and retries disabled.in_progress until the active red cluster is fixed or a real
blocker prevents autonomous progress.Current red cluster:
PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration --max-failures=1 --reporter=lineplaywright/integration/examples/inlines.test.ts /
wraps typed URL text as a link command on Chromium.onDOMBeforeInput, while the
slate-browser handle's insertText() path applies Editable inputRules.
That made the app behavior split between native browser events and command
style text insertion.Editable inputRules and keep the test
on editor.insertText(...), which is cross-browser and exercises the shared
command/input-rule path.EditableInputRule was not exported and
EditableTextBlocks did not expose/forward inputRules to EditableDOMRoot.
Patch: export the input-rule types and forward inputRules through the
public Editable wrapper.PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration/examples/inlines.test.ts -g "wraps typed URL text as a link command" --reporter=line passes on Chromium, Firefox, mobile, and
WebKit.Second red cluster:
playwright/integration/examples/markdown-shortcuts.test.ts /
can add list items on Chromium.onDOMBeforeInput, while the browser handle's command-style
insertText() path only runs Editable inputRules.Editable inputRules; keep
onDOMBeforeInput only for the Android pending-diff microtask.PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration/examples/markdown-shortcuts.test.ts --reporter=line
passes 16/16 across Chromium, Firefox, mobile, and WebKit.Third red cluster:
playwright/integration/examples/persistent-annotation-anchors.test.ts /
keeps the annotation anchor attached across fragment insert, text insert, and clear on Chromium.tx.nodes.insert(...) at a text point even though the contract expects Slate
fragment insertion semantics, where the trailing inserted block merges with
the current text block.tx.fragment.insert(...).PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration/examples/persistent-annotation-anchors.test.ts --reporter=line passes 4/4 across Chromium, Firefox, mobile, and WebKit.Fourth red cluster:
playwright/integration/examples/large-document-runtime.test.ts
/ preserves app-owned rich HTML paste over shell-backed selection on
Firefox.insertData handler used raw node insertion for content
that should follow fragment replacement semantics. That left
browser/transport differences to decide whether replacement happened.insertData fallback directly where needed,
import DOM selection before fallback, and make the custom rich HTML paste
handler call tx.fragment.insert(...) with the deserialized paragraph.PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/integration/examples/large-document-runtime.test.ts -g "preserves .*paste" --reporter=line passes 12/12 across Chromium, Firefox, mobile, and
WebKit.