PR: #518: feat(matter): markdown-aware shared gutter rail [Story-2036] by @ankitmaheshwari-com
View PR →

Files changed

7 file(s), +312 / -16 lines

Path Role + -
src/components/matter-detail/brief/editable-field-with-history.stories.tsxComponent+110-0
src/components/matter-detail/brief/frame-summary-history.test.tsxComponent+50-0
src/components/matter-detail/brief/frame-summary-history.tsxComponent+30-13
src/components/shared/editable-surface-preset.tsComponent+10-0
src/components/shared/editable-surface.tsxComponent+6-3
src/components/shared/snapshot-preview.test.tsxComponent+41-0
src/components/shared/snapshot-preview.tsxComponent+65-0

Story-2036: markdown-aware shared gutter rail

Story-2035 made light/full reachable on the EditableSurface primitive. But the surrounding gutter rail — the History popover/modal, the Save control, ⌘Z/⌘⇧Z undo/redo, and the Mira icon, all living in EditableFieldWithHistory — still assumed plain strings: it dropped a raw version.value into the timeline previews and only ever mounted a plain edit surface. This story lifts the rail so it operates on markdown snapshots, preset-agnostic. One rail now wraps plain, light, or full — so the Brief and the Draft Workspace share it. The Brief stays on plain and is byte-for-byte unchanged.

What landed

Files

FileChange
src/components/shared/snapshot-preview.tsxnew — read-only markdown snapshot render
src/components/shared/editable-surface-preset.tsexport shared BLOCK_FORMAT_CLASS
src/components/shared/editable-surface.tsxuse BLOCK_FORMAT_CLASS (no behaviour change)
src/components/matter-detail/brief/frame-summary-history.tsxpreset prop; previews → SnapshotPreview
src/components/matter-detail/brief/editable-field-with-history.stories.tsxlight/full markdown-rail stories
src/components/shared/snapshot-preview.test.tsxnew — plain-literal vs markdown-formatted render
src/components/matter-detail/brief/frame-summary-history.test.tsxnew — restore round-trips a markdown snapshot verbatim

Verify

Out of scope

No backend wiring — versions are still mock/prop-fed (the live append-only frame-version read is a separate story). The Brief is not moved off plain; that is the frame-contract decision in RFD §3a. No new i18n copy: the rail's prototype copy is unchanged and untouched.