Skip to content
This repository was archived by the owner on Oct 20, 2026. It is now read-only.

A record flow re-splits after a handle resize; real-core lanes on core v0.71.13 - #6

Merged
drietsch merged 3 commits into
mainfrom
fix/gesture-reflow
Oct 17, 2026
Merged

drietsch merged 3 commits into
mainfrom
fix/gesture-reflow

Conversation

@drietsch

@drietsch drietsch commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Follows core v0.71.13 (additive on protocol 71, core ADR 159).

A record flow re-splits after a handle resize

subscribeChainReflow already re-paginates a record flow on any document.onDidChange event that carries reflow, keyed off the field's presence. Until now only a resizeFrame (mutationApplied) carried one. Core v0.71.13 also reports it on gestureCommitted when a chain frame is resized by its handles, and plugin-sdk 0.2.58 passes it through. So the fix needs no logic change in this bundle. An older host reports a handle resize without it and nothing is re-paginated, as before. The docs say so.

Real-core lanes on canvas-wasm 0.71.13, and what that moved

The real-core tests ran on canvas-wasm 0.71.1. On 0.71.13 two engine facts moved the Data Merge budget (W8), and the merge now follows them:

  • Every frame, a fresh one included, lists frameDropShadowKnockedOut: true (InDesign's default), and the merge copied it onto each of the 57 merged frames. It joins the fresh-frame defaults that are not copied, so mutation ops stay 403.
  • An item's geometry names its page's origin (pageOrigin) and answers the item transform in page space, so the hit-test probe for the page's spread origin took four tries. Where the engine names the origin, no probe runs: host calls go 17 → 16 and reads 11 → 10 (the budget is lowered). An engine without it is probed as before.

Tests

  • chain-gesture-reflow-real-core.spec.ts: 40 records paginated over two chained frames (real core, data-js, DuckDB); the first frame shortened by a resize/south gesture through the host (begin, update, commit). The flow re-paginates, the first frame holds fewer records and the second more, and all 40 are placed. A move by the gesture kit re-paginates nothing. On the 0.2.45 contract it fails ("the handle resize re-paginated the flow: expected 0 to be greater than 0").
  • merge-real-core.spec.ts: one template read with and without the page's origin gives the same frames; no probe runs with it.
  • merge.test.ts: the knocked-out shadow is a fresh-frame default.

Release

  • @paged-media/data 0.1.0-canary.16 → 0.1.0-canary.17 (package and manifest; a merge publishes it).
  • Peers unchanged: @paged-media/plugin-api / @paged-media/plugin-sdk >=0.2.45-canary.0. Detection is by field presence; nothing needs 0.2.58.
  • Real-core tests: canvas-wasm 0.71.1 → 0.71.13; contract pins (plugin-api, plugin-sdk, devDependencies) 0.2.45-canary.0 → 0.2.58-canary.0.
  • docs/status.md is read from this code at 0.1.0-canary.17 and now describes the live chain pagination.

CI note

The check job (cargo-deny) fails on three RustSec advisories against zip published 2026-10-16/17: RUSTSEC-2026-0367, -0368, -0369. All three concern ZipArchive::extract() / ZipStreamReader::extract(), which this repo does not call. This PR changes no Rust or Cargo file, so main fails the same way. Whether to upgrade zip or record an ignore is a separate decision.

🤖 Generated with Claude Code

drietsch and others added 2 commits October 17, 2026 08:37
The real-core lanes ran on canvas-wasm 0.71.1. Moving them to 0.71.13,
which reports a frame resized by its handles as a reflow (core ADR 159),
changed two things the Data Merge budget (W8) measures, both engine
facts rather than regressions of this bundle:

- Every frame, a fresh one included, now lists frameDropShadowKnockedOut
  as true (InDesign's default), and the merge copied it onto each merged
  frame: one op per record. It joins the fresh-frame defaults that are
  not copied; mutation ops stay 403.
- An item's geometry now names its page's origin in the spread
  (pageOrigin) and answers the item transform in page space, so the
  hit-test probe for the page's spread origin found it on its fourth
  try. Where the engine names the origin, the template's bounds are
  page-local already and no probe runs: host calls 17 -> 16, reads
  11 -> 10. An engine without it is probed as before; a real-core spec
  reads one template both ways and gets the same frames.

The chain subscription's docs name the handle-resize case, which needs
no code change: it re-paginates on any change that carries a reflow.

Release 0.1.0-canary.17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugin-sdk 0.2.58 passes the reflow core v0.71.13 reports on a
gestureCommitted (a frame resized by its handles) through
document.onDidChange. subscribeChainReflow re-paginates on any change
that carries a reflow, so it needs no code change; this proves it on the
real stack (core, data-js, DuckDB): 40 records paginated over two chained
frames, the first shortened by a resize gesture begun, moved and
committed through the host. The flow re-paginates, the first frame holds
fewer records and the second more, and all 40 are placed. A move by the
gesture kit reports no reflow and re-paginates nothing. On the 0.2.45
contract nothing was re-paginated.

The contract pins move to 0.2.58-canary.0; the peers stay
>=0.2.45-canary.0 (presence of the field is the feature test).
docs/status.md is read from this code at 0.1.0-canary.17, with the live
chain pagination described.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drietsch
drietsch marked this pull request as ready for review October 17, 2026 06:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drietsch
drietsch merged commit a32b5a2 into main Oct 17, 2026
4 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant