Add saved OpenUI comparison sections to documents #414
- MA
## What changed
- Add one saved `openui-options` composition to ordinary documents: image or text previews, a comparison table, expandable details, and a per-reader category filter. - Validate a bounded OpenUI declaration graph before rendering. The canonical source stays editable and survives malformed input; a valid edit restores the preview. - Load the pinned OpenUI runtime only for documents with this fence. - Refine reading in the document: compact media-and-copy rows where space allows, denser comparisons, visible narrow-table scroll guidance, and keyboard filter navigation. The authoring syntax and saved data stay the same.
## Preview
These are browser captures of saved documents. The pandas example compares current output with a proposed plain default; the pagination example is synthetic and uses a comparison-first order.
### Pandas at document width
| Before | After | | --- | --- | |  |  |
### Pagination at narrow width
| Before | After | | --- | --- | |  |  |
## Verification
- `bun run types`, `bun run ci`, and `bun run build` passed at the design milestone. - Focused code, OpenUI schema, and source-offset tests passed (49 tests). - Chromium composition suite passed (4/4): two saved content sets, keyboard and read-only filters, horizontal lanes, source repair, reload, and diagram coexistence. Screenshots require decoded image pixels.
The two test documents were manually authored. A separate Planner check will assess live model-authored source against the documented grammar; this PR does not claim that result.
MaggieAppletonreferenced this in Route Planner visual authoring through Jev #415last month on GitHub
MaggieAppletonready-for-reviewlast month on GitHub
github-actions[bot]added label maintenance:workinglast month on GitHub
<!-- chopin:pr-maintenance:v1 --> **PR maintenance: working**
rebase in progress.
Inspected head: 66815629938c6ffb89693de6bd44a337c145563d
Base head: 7c690cbcfdf23f1e1925f493bd4e10949afcb76d
[PR readiness runs](https://github.com/githubnext/chopin/actions/workflows/pr-readiness.yml) · [CI run](https://github.com/githubnext/chopin/actions/runs/37914650272) <!-- chopin:pr-maintenance-auth:eyJwYXlsb2FkIjp7InNjaGVtYVZlcnNpb24iOjEsInJlcG9zaXRvcnkiOiJnaXRodWJuZXh0L2Nob3BpbiIsInJldmlzaW9uIjowLCJwcnMiOnsiNDE0Ijp7ImJvZHkiOiI8IS0tIGNob3Bpbjpwci1tYWludGVuYW5jZTp2MSAtLT5cbioqUFIgbWFpbnRlbmFuY2U6IHdvcmtpbmcqKlxuXG5yZWJhc2UgaW4gcHJvZ3Jlc3MuXG5cbkluc3BlY3RlZCBoZWFkOiA2NjgxNTYyOTkzOGM2ZmZiODk2OTNkZTZiZDQ0YTMzN2MxNDU1NjNkXG5cbkJhc2UgaGVhZDogN2M2OTBjYmNmZGYyM2YxZTE5MjVmNDkzYmQ0ZTEwOTQ5YWZjYjc2ZFxuXG5bUFIgcmVhZGluZXNzIHJ1bnNdKGh0dHBzOi8vZ2l0aHViLmNvbS9naXRodWJuZXh0L2Nob3Bpbi9hY3Rpb25zL3dvcmtmbG93cy9wci1yZWFkaW5lc3MueW1sKSDCtyBbQ0kgcnVuXShodHRwczovL2dpdGh1Yi5jb20vZ2l0aHVibmV4dC9jaG9waW4vYWN0aW9ucy9ydW5zLzM3OTE0NjUwMjcyKSIsImJsb2NrZXJJZCI6bnVsbH19fSwic2lnbmF0dXJlIjoiMGEzMmQyZWIxN2RkOTFmMTAzN2RmMjYzZGFmY2Q1YjYxOWViNGJkYjZjNTU3M2ViZjQ0YTU1MWJjY2NkY2YyYiJ9 -->
MaggieAppletonconvert-to-draftlast month on GitHub
MaggieAppletonready-for-reviewlast month on GitHub
- MA
Closing after design review. Chopin already lets the Planner select from its allowed MDX components in a collaborative document. This PR adds a separate OpenUI authoring language for a comparison interface that can be composed from native MDX elements; we are not proceeding with this OpenUI implementation.