docs/plans/2026-05-28-split-rich-text-viewer-pages.md
Objective: Split the generated Evidence Kit rich-text viewer into two pages: a comparison page for apples-to-apples editor rows and a Slate v2 internals page for diagnostic rows that should not pretend to compare against other editors.
Goal plan: docs/plans/2026-05-28-split-rich-text-viewer-pages.md
Completion threshold:
The split is complete when benchmarks/render-rich-text-viewer.mjs emits
rich-text.html / rich-text-data.json for comparison rows and
slate-v2-internals.html / slate-v2-internals-data.json for v2-only rows,
generated checks pass, npm run check passes in benchmarks/editor, both
served HTML routes return HTTP 200, served JSON proves there are no internal
category leaks on the comparison page, and this plan passes the autogoal
completion check.
Verification surface:
/Users/zbeyens/git/plate-2/benchmarks/editor/benchmarks/render-rich-text-viewer.mjs/Users/zbeyens/git/plate-2/benchmarks/editor/docs/perf/rich-text.html/Users/zbeyens/git/plate-2/benchmarks/editor/docs/perf/rich-text-data.json/Users/zbeyens/git/plate-2/benchmarks/editor/docs/perf/slate-v2-internals.html/Users/zbeyens/git/plate-2/benchmarks/editor/docs/perf/slate-v2-internals-data.jsonhttp://127.0.0.1:8765/rich-text.html and
http://127.0.0.1:8765/slate-v2-internals.htmlConstraints:
docs:perf and docs:perf:check stay simple.Boundaries:
benchmarks/results/rich-text-editors-latest.json.docs/perf on port 8765.Blocked condition: Work would stop only if generated rows could not be deterministically split, the generator could not check both page/data pairs, or the static server could not serve both routes. None of those happened.
Phase / pass table:
| Phase | Status | Evidence |
|---|---|---|
| Source map | complete | Identified 16 Slate v2-only internal categories and comparison workload fixtures. |
| Generator split | complete | render-rich-text-viewer.mjs now emits comparison and internals page/data pairs. |
| Generated docs | complete | docs:rich-text wrote all four generated files. |
| Package verification | complete | npm run check passed in benchmarks/editor. |
| Served proof | complete | Both HTML routes returned HTTP 200 and both JSON routes had expected row/category counts. |
| Closure | complete | This file records evidence and passes check-complete. |
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Active goal checked or created | yes | Autogoal created for the viewer split. |
| Source of truth read before edits | yes | Read current viewer generator, package scripts, and generated benchmark data shape. |
| Edit scope selected | yes | Only viewer generator, generated docs/data, and this plan changed for this task. |
| Browser route selected | yes | rich-text.html and slate-v2-internals.html under the existing static server. |
| Browser tool decision recorded | yes | Browser MCP was not exposed; HTTP served-route proof used against the same local target. |
Work Checklist:
Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Comparison page generated | yes | Generate rich-text.html and rich-text-data.json | Comparison JSON has 542 rows, 11 groups, and zero internal category leaks. |
| Internals page generated | yes | Generate slate-v2-internals.html and slate-v2-internals-data.json | Internals JSON has 326 rows, 16 groups, and all expected internal categories. |
| Docs check | yes | Run generated docs check | npm run docs:rich-text:check checked both page/data pairs. |
| Package check | yes | Run package gate | npm run check passed in benchmarks/editor. |
| Served HTML proof | yes | Hit both served HTML routes | Both returned HTTP 200. |
| Served JSON proof | yes | Hit both served data routes | JSON smoke proof returned expected split counts. |
| Goal plan complete | yes | Run autogoal completion check | check-complete passed. |
Verification evidence:
cd benchmarks/editor && npm run docs:rich-text wrote
rich-text.html, rich-text-data.json, slate-v2-internals.html, and
slate-v2-internals-data.json.cd benchmarks/editor && npm run docs:rich-text:check passed and checked both
page/data pairs.cd benchmarks/editor && npm run check passed.curl -I --max-time 2 http://127.0.0.1:8765/rich-text.html
returned HTTP 200.curl -I --max-time 2 http://127.0.0.1:8765/slate-v2-internals.html
returned HTTP 200.internalLeaks: [].missingExpectedInternalCategories: [].Reboot status:
Complete. rich-text.html is the comparison page; slate-v2-internals.html is
the v2-only proof page. Both are generated by npm run docs:rich-text.
Open risks: The category split is manually curated in the generator. If new Slate v2-only categories are added later, they must be added to the internal category set or they will appear on the comparison page.