Enforce reader ownership across chat scroll work - #458
Conversation
c9412ae to
d7f43a5
Compare
Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
d7f43a5 to
a5f9a52
Compare
Review synthesisThis review was run twice: once against Verdict: approve with nits — the direction and the layering are right, and the one substantive issue found has already been fixed on this head. The core insight is correct and worth having: the reserved-bottom → Already resolved on this headThe review against
const restoresQuestionSubmissionBase =
event === 'layout:question-viewport-release'
&& previousMode?.kind === 'ANCHOR_AT'
&& Number.isFinite(previousMode.questionSubmitViewportH)
&& previousMode.questionSubmitBaseMode === proposedMode
if (restoresQuestionSubmissionBase) return proposedModeThe accompanying test is the right shape too — it covers the [NIT]
|
Summary
Why
This is a focused follow-up to #220, #342, and #430, which established quiet reader settlement, atomic footer geometry, and a stable final-turn range. The residual alignment in #436 preserved those foundations, but it also retained an inherited transition that converted a reader reaching the physical bottom while reservation remained into
PIN_USER_MSG.That transition recreated automatic layout authority from reader movement and could snap the viewport back toward the latest prompt. A timing gate alone also allowed delayed work captured before a later gesture to become eligible again once the gate expired.
This change narrows the state-machine entrances: only Send creates a pin, and only an unreserved real-content-bottom gesture or an already-armed pin consuming its reservation enters follow. A monotonic reader generation permanently rejects stale direct and indirect geometry work.
Testing