Grilling: reading-toggle interaction model #68

Closed
opened 2026-10-05 11:18:30 +02:00 by AlexKucera · 1 comment
Owner

Part of #20

Question

How does the reading toggle behave as an interaction? Decide:

  • Affordance + placement — toolbar button in PostEditorView (next to the SaveStateDot crumb?), menu item, keyboard shortcut (⌘R? ⌥⌘R?), or several of these.
  • State persistence — per-app (UserDefaults) vs per-post (the .museion-state.json sidecar already carries cursor state) vs none (always open in editing). What a new session opens into.
  • Edit intent while reading — clicking/typing in the rendered text: auto-flip back to editing at that paragraph, or reading mode is strictly look-but-not-touch with an explicit toggle-back? (Spike was strictly view-only.)
  • Scroll/selection mapping across the toggle — v1 keeps none (revert to top / saved cursor) or maps by paragraph index? The sidecar already stores scrollOffset + selection for editing mode.
  • Conflict alert while reading — the #67 external-change alert can fire mid-read; does reading mode show it, and does Yes-reload re-render the blocks?

Ground in the landed #19 surface (PostEditorView toolbar, EditorSession conflict flow) and ADR-0010's stance that reading is a presentation of the same TextKit2 document, not a separate view stack.

[Generated by AI]

Part of #20 ## Question How does the reading toggle behave as an interaction? Decide: - **Affordance + placement** — toolbar button in `PostEditorView` (next to the SaveStateDot crumb?), menu item, keyboard shortcut (⌘R? ⌥⌘R?), or several of these. - **State persistence** — per-app (UserDefaults) vs per-post (the `.museion-state.json` sidecar already carries cursor state) vs none (always open in editing). What a new session opens into. - **Edit intent while reading** — clicking/typing in the rendered text: auto-flip back to editing at that paragraph, or reading mode is strictly look-but-not-touch with an explicit toggle-back? (Spike was strictly view-only.) - **Scroll/selection mapping across the toggle** — v1 keeps none (revert to top / saved cursor) or maps by paragraph index? The sidecar already stores scrollOffset + selection for editing mode. - **Conflict alert while reading** — the #67 external-change alert can fire mid-read; does reading mode show it, and does Yes-reload re-render the blocks? Ground in the landed #19 surface (`PostEditorView` toolbar, `EditorSession` conflict flow) and ADR-0010's stance that reading is a presentation of the same TextKit2 document, not a separate view stack. [Generated by AI]
AlexKucera added the wayfinder:grilling label 2026-10-05 11:18:30 +02:00
AlexKucera added a new dependency 2026-10-05 11:18:51 +02:00
AlexKucera self-assigned this 2026-10-05 11:22:33 +02:00
Author
Owner

Resolution

All six sub-questions resolved live with Alexander, 2026-10-05.

Affordance + placement (Q1): three affordances — a labeled toolbar button whose title swaps Read ⇄ Edit, placed at the far left of the PostEditorView toolbar before the crumb; a View menu item "Toggle Reading Mode"; and ⌘R. (No refresh concept exists in the app to collide with.)

Drafts (Q2): the toggle exists in draft mode too. Reading a half-formed draft is exactly when you want it rendered; draft mode renders the live draft text, no session machinery.

State persistence (Q3): none. Reading is a transient act of inspection, not a document property. Every fresh open lands in editing with the restored cursor. Predictable is calm.

Edit intent while reading (Q4): clicking the rendered text flips back to editing at that spot — Alexander overrode the view-only recommendation: the click is an intentional act, and hunting a button is less calm than the drop. Selection stays possible via native drag-select; a tap with no selection = edit intent.

Click/select discrimination + caret (Q7/Q8, round 2): tap with no resulting selection flips (drag-select never registers as a tap); the caret lands at the start of the clicked paragraph — paragraph granularity, not character-exact through the inline parse. Known edge: triple-click paragraph-select may register a tap; calibration nit, not a blocker.

Scroll/selection mapping (Q5): attempted, with fallback. Reading opens scrolled to the paragraph containing the editing caret (top-aligned); toggle-back and click-to-edit land via paragraph-index mapping (block index → source range is arithmetic on the \n\n split). Click-to-edit mapping survives regardless (cheap); only the scroll-position half is subject to the fallback.

Jank arbiter (Q10): the build (#71) implements full mapping best-effort. Visibly janky at build time (flash of unstyled text, scroll jump, wrong paragraph, focus glitch) → the builder ships no-mapping and flags it in the build resolution. Calibration (#72) is the final judge; a not-calm ruling on mapping graduates a fix-or-strip polish ticket.

Conflict alert while reading (Q6): the #67 alert shows in reading mode (it hangs off PostEditorView, above the surface swap — free), and Yes-reload re-renders: reading binds to session.text + loadGeneration, so a reload bump refreshes the blocks.

Glossary: Reading Mode entered into CONTEXT.md (rendered presentation, view-and-select, click drops to editing; distinct from Pass).

[Generated by AI]

## Resolution All six sub-questions resolved live with Alexander, 2026-10-05. **Affordance + placement (Q1):** three affordances — a labeled toolbar button whose title swaps **Read** ⇄ **Edit**, placed at the far left of the `PostEditorView` toolbar before the crumb; a View menu item "Toggle Reading Mode"; and `⌘R`. (No refresh concept exists in the app to collide with.) **Drafts (Q2):** the toggle exists in draft mode too. Reading a half-formed draft is exactly when you want it rendered; draft mode renders the live draft text, no session machinery. **State persistence (Q3):** none. Reading is a transient act of inspection, not a document property. Every fresh open lands in editing with the restored cursor. Predictable is calm. **Edit intent while reading (Q4):** clicking the rendered text flips back to editing **at that spot** — Alexander overrode the view-only recommendation: the click is an intentional act, and hunting a button is less calm than the drop. Selection stays possible via native drag-select; a tap with no selection = edit intent. **Click/select discrimination + caret (Q7/Q8, round 2):** tap with no resulting selection flips (drag-select never registers as a tap); the caret lands at the **start of the clicked paragraph** — paragraph granularity, not character-exact through the inline parse. Known edge: triple-click paragraph-select may register a tap; calibration nit, not a blocker. **Scroll/selection mapping (Q5):** attempted, with fallback. Reading opens scrolled to the paragraph containing the editing caret (top-aligned); toggle-back and click-to-edit land via paragraph-index mapping (block index → source range is arithmetic on the `\n\n` split). Click-to-edit mapping survives regardless (cheap); only the scroll-position half is subject to the fallback. **Jank arbiter (Q10):** the build (#71) implements full mapping best-effort. Visibly janky at build time (flash of unstyled text, scroll jump, wrong paragraph, focus glitch) → the builder ships no-mapping and flags it in the build resolution. Calibration (#72) is the final judge; a not-calm ruling on mapping graduates a fix-or-strip polish ticket. **Conflict alert while reading (Q6):** the #67 alert shows in reading mode (it hangs off `PostEditorView`, above the surface swap — free), and Yes-reload re-renders: reading binds to `session.text` + `loadGeneration`, so a reload bump refreshes the blocks. Glossary: **Reading Mode** entered into CONTEXT.md (rendered presentation, view-and-select, click drops to editing; distinct from Pass). [Generated by AI]
Sign in to join this conversation.