| index cc3e507..66a2aa5 100644 |
| --- a/docs/superpowers/specs/2026-11-22-native-redesign-design.md |
| +++ b/docs/superpowers/specs/2026-11-22-native-redesign-design.md |
| @@ -454,6 +454,8 @@ So a delta cannot be forwarded as a patch. |
| - the pagination caches (Incremental pagination); |
| - a weak reference to the text view. |
| |
| + Attaching a *different* text view (the host rebuilt without the model opening again: an iPad split collapsing, a restructured window) lets the old one go and draws the new one whole. `reset()`, when the replica changes (open, a new draft, a discard), clears what the surface remembers so the next publication is drawn whole, but keeps the attached text view: a new draft or a discard keeps the same host, which nothing rebuilds to attach it again (S1a review, #170 finding 2; coordinator's ruling). |
| + |
| It exposes the live text storage as the content that `DocumentCommands`, word counts and `DocumentToolbarSelection` read. |
| 4. **The block index tracks storage, not publications** (finding 1). |
| - The authority for "which characters belong to which block" is the storage's `.docsTopBlock` attribute (`NativeTextProjection.swift:25`), which optimistically typed text inherits. |
| @@ -479,10 +481,11 @@ So a delta cannot be forwarded as a patch. |
| - **(a)** a publication applied (item 5); |
| - **(b)** the edit queue draining: `drainEdits` ends with `editing` empty and `editingTask` cleared; |
| - **(c)** composition ending: `compositionChanged(false)`, and the text view's `unmarkText` / marked text committed or cancelled; |
| - - **(d)** the generation catching up: `projectionGeneration` changes, or `didRender` advances `renderedGeneration` to it; |
| - - **(e)** `inputPaused` cleared. |
| + - **(d)** the generation catching up: `projectionGeneration` changes. |
| |
| SwiftUI's `updateNSView` / `updateUIView` no longer retries renders, so these hooks are the only triggers. A test covers each, including (b) and (c) with no later publication: storage must converge with nothing else arriving. |
| + |
| + **Two events are not triggers** (revision 3 listed them; S1a review, #170 finding 6, coordinator's ruling). `canRender` reads neither `inputPaused` nor `renderedGeneration`, so neither `inputPaused` being cleared nor `didRender` advancing `renderedGeneration` can be the event that unblocks a waiting publication. `canRender` must not start reading `inputPaused`: a reader's input is paused for good, and it would then never see a peer's change. A writer paused by a refused command still holds it in `editing`, as pending input, so (b) draws when the queue drains after the retry. The implementation still calls `flushIfDeferred()` at both points, because it costs nothing, but no test claims them as triggers. |
| 7. **Per-block rendering:** |
| - `NativeTextProjection.renderBlock(node, neighbours:)` renders one top-level block, including inline code and the list numbering inside it. |
| - After a block changes, spacing attributes are recomputed for its neighbours only (`DocumentBlockSpacing` collapses margins between neighbours). |
| @@ -695,7 +698,7 @@ If a platform's large-document check fails with non-contiguous layout, that plat |
| - **Library:** shelf of five, the four groups in a fixed time zone, searching ungrouped, `Excerpt` decoded, dates via the locale. |
| - **Replica dirty log:** revisions advance on every projection call; the dirty set returned with a presentation covers exactly `(since, resultRevision]`; it is nil past the log or across an unknown entry (including `delta.applied` returning nil); a stale publication (`resultRevision ≤ appliedRevision`) is dropped. |
| - **Block index under optimistic typing:** typing, Return, Backspace at a block's start and a paste go through the real text view with no publication. The index's runs equal the `.docsTopBlock` runs read fresh from storage, including provisional blocks. When the publication then arrives, reconciliation produces a full render's storage. |
| - - **Deferred flush triggers (finding 2):** one test per trigger (a)–(e) in §7 Design 6. Each has a publication arriving while that condition blocks rendering, and *no later publication*. Storage converges to a full render once the condition clears. |
| + - **Deferred flush triggers (finding 2):** one test per trigger (a)–(d) in §7 Design 6. Each has a publication arriving while that condition blocks rendering, and *no later publication*. Storage converges to a full render once the condition clears. |
| - **Block render equivalence (property test, Low 17):** random edit sequences over fixtures with nested lists, quotes, headings, inline code, images and alignment. The edits include: |
| - insert and remove at index 0; |
| - split and merge across blocks; |
| @@ -811,3 +814,10 @@ If a platform's large-document check fails with non-contiguous layout, that plat |
| | 12 | Centring mechanism | §1 Page centring: a flipped `DocsDeskView` as the document view, with the text view's frame origin at `leading / m` | |
| | 13 | S0 coverage | §11: an iPad-width editor screen, and an after-scripted-edit screen on Mac and iPhone | |
| | 14 | S1 split (coordinator's ruling) | Plan: S1a (probes, log, surface, per-block, isolation, iOS reconciliation) and S1b (pagination, lazy layout, fallbacks) | |
| + |
| +## S1a amendments (#170, coordinator's rulings, 2026-11-24) |
| + |
| +| # | Finding | Where answered | |
| +|---|---|---| |
| +| 2 | A second text view on one surface was never drawn; should `reset()` drop the text view? | §7 Design 3: attaching a different view draws it whole; `reset()` keeps the attached view | |
| +| 6 | Triggers (e) and `didRender`'s half of (d) cannot unblock anything | §7 Design 6: four triggers, (a)–(d); the two events are no longer triggers, and why | |