Skip to content

Make reading keys follow the submitted comment viewport - #1637

Merged
max-sixty merged 7 commits into
mainfrom
codex/pending-reply-visibility
Oct 3, 2026
Merged

max-sixty merged 7 commits into
mainfrom
codex/pending-reply-visibility

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Long comments submitted beside a passage retain their editor viewport inside the thread transcript. That inner scrollport was absent from Leaf's reading-region registry, so native PageUp and wheel could read it while Leaf's u/d commands targeted the surrounding transcript.

Register the carried message body with the existing reading owner and release it when the body changes or the card closes. An everyday browser case checks native Tab entry, reading in both directions, preservation through a held POST's admission, and another comment after closing the first. The reading-key check fails without registration; before/after contrasts trace the regression to PR #1587.

CI also exposed a race in the detached Codex carrier fixture: correcting its fake host PID minted a new session generation before updating the page claim, so an owner scan could retire delivery during that gap. Keep the explicitly copied current generation and publish its corrected lifetime and turn fields under the session lock. The existing delivery test now asserts that same-task generation continuity; new and restarted sessions retain canonical acquisition.

Validation: all nine browser smoke cases, runtime tests, and lint; independent placement, registration-lifecycle, and fixture review. The fixture correction passes both carrier variants and 14 affected lifecycle cases. A controlled gap reproduces carrier retirement with the old fixture and successful delivery with the correction, and the old fixture fails the new assertion deterministically. The broader historical audit found no further regression in 31 existing-thread cases across three versions and ten placement journeys across those versions.

This was written by Codex on behalf of max-sixty

Require the exact sent words to remain visible while the reply POST is held, at short desktop and screenshot-sized viewports with short and long histories. Use browser intersection readings with subpixel tolerance so the check waits for smooth send landing rather than sampling it mid-scroll.

The four cases pass on the current runtime; disabling send landing in isolated served fixtures makes three fail. This adds everyday behavior coverage without changing production geometry.
Send lands the transcript end immediately. Fitting captures an established
end once when actual sizing starts and preserves that destination through all
middleware measurements. Fresh cards still open at their top, and reading
back retains the user's place. End readings and movements share the scrolling
owner with bounded feeds, editor growth, and reading restoration.

The obsolete-fit guard introduced in #1587 (946b39d) exposed a missing
destination contract: Send targeted the old 33px end, then current fitting
reduced room and moved the end to 60px. The whole pending reply stayed clipped.
Adding only that guard to the preceding version reproduces the failure;
removing only it from #1587 restores visibility. Keep the guard and repair
continuity at the geometry producer.

The everyday browser gate now holds the reply POST and verifies the actual
message body lies inside the transcript after fitting, for keyboard and
pointer sends. Existing pending-send cases also require a fresh card to open
at its top. Baseline fails both new cases; removing only the fresh-placement
condition fails the opening assertion. Earlier checks of CSS visibility and
stationary editor geometry did not establish readable sent words.

Validation: everyday Python gate, 192 runtime tests, 17 focused browser cases,
lint, independent review, original-page first-frame and readback/resize
controls, and integration with the merged finite freshness repair. The
integrated served preview keeps 207 startup requests, adding 906 bytes at
presentation. Elapsed timings are diagnostic.
…isibility

# Conflicts:
#	skills/leaf/assets/runtime/margin-projection.js
PR 1587 carries a long comment's editor viewport into the first message of
its floating thread. That nested scrollport never joined the reading-region
owner, so native PageUp and wheel could read it while Leaf's u/d commands
addressed the surrounding transcript. Before/after browser contrasts trace
the mismatch to the introducing change.

Register the carried message body through the existing owner, and release
the registration when the body changes or the card closes. The everyday
browser gate checks native Tab entry, u/d, pending-to-admitted continuity,
and another comment after closing the first. Its reading-key assertion fails
without the registration.
leaf-agent
leaf-agent previously approved these changes Oct 3, 2026
…neration

The carrier fixture copies a claim to keep the already-proven fake task alive after its starting command exits. Calling ensure_session with the worker PID minted a new generation before the claim was republished, so a concurrent owner scan saw no page and retired delivery. Holding that interval reproduces the CI failure even while the starting ancestor remains alive.

Preserve an explicitly copied current generation and publish its corrected lifetime and fixture turn fields together under the session lock. New claims, changed session IDs, stale generations, and ended sessions still use canonical session acquisition. Assert generation continuity in the existing delivery journey; the old fixture fails that assertion without relying on scheduling.
@max-sixty
max-sixty merged commit 57e52d8 into main Oct 3, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/pending-reply-visibility branch October 3, 2026 03:13
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.

2 participants