Skip to content

fix: keep outline paging stable during editing - #27

Merged
callumalpass merged 1 commit into
lab/sdk-0ecbef41from
fix/writer-cursor-update-loop
Oct 18, 2026
Merged

callumalpass merged 1 commit into
lab/sdk-0ecbef41from
fix/writer-cursor-update-loop

Conversation

@callumalpass

@callumalpass callumalpass commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Reveal the outline's heading page when its logical row changes, not every time editing reparses the same row.
  • Removes redundant pending state updates that accumulate into React #185 during production typing/undo/redo.
  • Preserve distant-heading paging; Preview, cursor updates, compilation and record saving are unchanged.

Rebased onto LAB e9173b10385e2f155bdcf0bd3596978c52b29796 (#28). The duplicate real-CSL fixture commit was dropped because it is already upstream; the PR contains only the six-file outline regression change. Both feedback and editing build scripts/documentation are preserved.

Reproduction and validation

  • Optimized production bundle with real compiler WASM and real Preview canvases reproduces React #185 before the fix. Loopback only; external requests blocked.
  • Restoring the old effect fails the focused test (five redundant reveals) and the production browser regression. The fix passes both; distant-heading paging remains covered.
  • Production browser test: ~1900-word manuscript, per-character typing, cursor movement, four undo/redo rounds, exact final text and completed canvas rendering. CI runs it separately from existing development-browser suites.
  • Exact head 40eaf94e44b749bcbdaa9c3d08ea336fe8aeee20: full remote check PASS (core65/app297 passing, existing skips retained).
  • GitHub CI 39139551805 SUCCESS: checks, production build, optimized real-canvas editing, baseline/reliability suites and private-feedback desktop/mobile acceptance with intercepted delivery.

No E2E assertions, timeouts or budgets weakened. No deployment or main-branch change. Demo-enabled optimized builds are isolated test fixtures, not deployment artifacts or connected/native acceptance evidence.

@callumalpass

Copy link
Copy Markdown
Contributor Author

Export-test profiling and narrow fixture fix

Compared unchanged LAB baseline 4c73b184 with the cursor fix at b4ef8552, using identical temporary instrumentation during both complete app unit suites (Node 22.22.0):

Profile Baseline Cursor fix
Export/discovery test total 2,154.6ms 2,147.4ms
CSL engine construction (three calls) 2,091.9ms 2,085.8ms
Metadata (seven calls, inclusive) 0.30ms 0.29ms

Approximately 97% is repeated construction of the real citeproc engine for the 242,663-byte Chicago stylesheet. Both runs perform three exports, six assembly passes and seven metadata calls. The production workspace/core export paths are identical between these commits; no extra export work from RecordHeadings was observed. The earlier baseline CI result (4,649ms) was already marginal against the unchanged 5,000ms deadline.

This follow-up only selects the existing 17,587-byte IEEE stylesheet for the workspace-state test fixture. It retains the real engine, records, nested chapters, image and all discovery/refusal/recovery assertions; adds an assertion that the mapped fixture style actually reaches the workspace; and leaves Chicago-specific coverage in the core suite unchanged. There are no production changes, mocks added, assertions removed, or timeout/E2E-budget changes.

With IEEE selected, the same instrumented test takes 79.8ms on both versions, including all three real exports. All instrumentation was removed before committing. Full remote pnpm check passes (core 65 passing/4 existing skips, app 292 passing/1 existing skip; Node tests also pass). Exact-head GitHub CI will provide the hosted confirmation; this does not claim the whole workflow is green yet.

@callumalpass
callumalpass force-pushed the fix/writer-cursor-update-loop branch from dc4ac4e to 40eaf94 Compare October 18, 2026 15:14
@callumalpass

Copy link
Copy Markdown
Contributor Author

Rebased onto LAB e9173b1 (#28); dropped the duplicate CSL fixture commit already upstream. Exact head 40eaf94 is green in CI 39139551805, including optimized real-canvas editing, baseline/reliability browser suites and unchanged private-feedback desktop/mobile acceptance. Full remote check also passes. No deployment performed.

@callumalpass
callumalpass marked this pull request as ready for review October 18, 2026 15:20
@callumalpass
callumalpass merged commit 1259e86 into lab/sdk-0ecbef41 Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant