Bind behavior scroll state to its document and owner

This commit is contained in:
2026-09-06 06:51:59 +03:00
parent 1b0b072c4b
commit 8c600087dc
2 changed files with 207 additions and 4 deletions
@@ -0,0 +1,32 @@
# Behavior scroll identity correction
Status: implementation and focused checks passed; full platform checks and native
acceptance are pending. Base `1b0b072` includes the independently reviewed process
camera/form corrections in `cf33785`.
The independent actual-Iced probe reproduced a preexisting navigation defect:
`topology::State::enter` cleared its mirrored offset, but the retained Scrollable
still held y180 and immediately reported it under the next process owner. The
reviewer's test is now a repository regression, using Iced's null renderer, real
layout, wheel input and observer messages. It failed against the original code
with y180 instead of zero and passes with this correction.
The existing observer now stores its mounted `(document, owner)` identity at
construction. Its diff recreates local child widget state only when that pair
changes. Keeping the same owner preserves the actual scrollable and its report;
revision, epoch, tool and form transitions are deliberately not identity keys.
No general state framework, model command, schema or persistence change is added.
The shared observer applies the same lifetime to inner-canvas and outer-page
scrolling in process and scenario views.
A second actual-Iced regression seeds a programmatic scroll operation before any
observer report, then varies document, owner, revision/epoch and form-like content
height. This guards against deriving identity from the last notification. Its
matrix covers both message families and both scroll areas: only document/owner
navigation resets to zero, and unchanged-owner edits retain y180. It also verifies
current event context and one-time reporting. Both defect probes failed before the
fix; all three observer tests and 22 process tests now pass. Existing passive clamp,
remount, palette camera, form widget-state and stale-gesture tests remain passing.
The process/native ledger, STATE and other lead-owned documents are untouched.
The lead owns independent re-review and actual native navigation acceptance.