Repository navigation
Keep active drafts visible and settle arrival notices under the test clock - #1538
Merged
Merged
Conversation
…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.
leaf-agent
approved these changes
Oct 1, 2026
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_
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.