Skip to content

Keep active drafts visible and settle arrival notices under the test clock - #1538

Merged
max-sixty merged 1 commit into
mainfrom
codex/geometry-batching
Oct 1, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex/geometry-batching

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

An active comment becomes hidden and loses focus when its subject remains in the document but loses its visible attachment, for example when a responsive sidebar disappears. Keep that editor in the usable window through the shared Floating UI placement path, preserving its semantic anchor, draft and focus; reattach when the subject returns. Update the offscreen contract and add ordinary-clock controls for hiding, reattachment, continued editing and deliberate dismissal. The gallery demonstrates the behavior and its corpus is regenerated.

Keep independent corpus journeys and advance their already installed test clock through every arrival-notice callback before reading. Three alternating comparisons of the original scroll, resize and draft cases on two sources reduced median wall time from 44.33s to 25.47s; accounted CPU was 29.43s versus 29.83s, so no CPU saving is established. All original assertions, fresh navigations and real-time idle observation remain. Preparation grouping was measured and rejected.

Validation: local landing selection: 1,483 passed; runtime folds: 189 passed; all pre-commit hooks, reproduced bundles, browser-framework checks/tests and Worker types/tests pass. Four ordinary-clock composer controls and five current-runtime notice/resize/draft/idle cases pass. Callback controls preserve periodic callbacks, asynchronous fetch/error collection, fixed Date and resumed real-time timers; words-loss detection remains active. Native shift controls pass under ordinary time. The existing fixed-clock/native LayoutShift timestamp mismatch is owned by PR #1533; this change does not claim shift coverage for those nightly cases. Independent review found no outstanding issues.

Startup profile: request counts remain 195 JavaScript/197 code requests; presentation loads approximately 2KB more code. Single-run elapsed differences are diagnostic.

This was written by Codex on behalf of max-sixty

…clock

An existing semantic subject may temporarily lose its visible attachment. Place the active editor in the usable window through the shared Floating UI path, preserving its anchor, draft and focus, then reattach when the subject returns. Update the offscreen contract and add ordinary-clock regression controls for hiding, reattachment, editing and deliberate dismissal.

Retain independent corpus journeys; grouping preparations established no CPU benefit. Advance the already installed test clock through every arrival-notice callback before reading. A three-pair comparison reduced median selected wall time from 44.33s to25.47s without a CPU saving. Preserve subsequent real-time idle observation and the existing fixed-clock shift-sensor limitation owned separately.
@max-sixty
max-sixty merged commit 2667ec2 into main Oct 1, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/geometry-batching branch October 1, 2026 23:32
max-sixty added a commit that referenced this pull request Oct 2, 2026
An agent resolving a thread could remove the reply being typed, while an
earlier hidden comment draft could redirect `c` away from the user's
current item. Floating composers also briefly returned at the wrong
attachment after a wheel jump, and growing replies could move their
whole card.

This change gives drafts and placement one rule across their surfaces:

- Retain a resolved thread's editor while its shared draft holds
unfinished words, including surface replacement and refused sends.
Sending the reply reopens the conversation; clearing it lets the
resolved surface close.
- Choose a comment's destination from live selection and current
page/thread standing, then carry ordinary words into an empty
destination. Existing destination drafts win. Transfer settles the exact
source generation only after destination persistence succeeds.
- Cover actual compositor frames on wheel return. The canonical
window/attachment posture landed in
[#1538](#1538); integration
removes the redundant middleware change.
- Cap reading and drafting by the same room from the held edge. Preserve
the transcript’s room so typing leaves the editor top fixed; extra draft
lines scroll inside the editor. The shared text field measures its
focused caret after its host’s available size changes and scrolls only
that host, including a large paste whose first reveal preceded the
owner’s sizing pass. A mechanical resize preserves the enclosing pane’s
reading position.

Browser coverage exercises panel, inline, bounded-pane and margin
replies; resolution, clearing, reload, replacement and send refusal;
page/thread retargeting and rejected storage writes; and native-wheel
compositor frames for element/selection comments in the document and
panes. The old draft-loss exemptions are removed. The gallery includes
the kept-draft move.

The startup verifier now collects every resource rather than truncating
at the browser's 250-entry buffer; a real HTTP/browser regression covers
260 responses.

Validation: 1,529 Python tests passed with changed nightly cases; 189
runtime, 74 browser-framework and 66 Worker tests passed; browser/Worker
type checks, pre-commit and committed bundle reproduction passed.
Focused browser regressions, original-baseline failure controls and
independent code/render review passed. The served corpus loads the same
244 code requests (241 JavaScript requests), with approximately 6KB more
code at presentation; elapsed differences are diagnostic.

> _This was written by Codex on behalf of max-sixty_
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