Repository navigation
Fix thread focus during optimistic settlement - #625
Merged
Merged
Conversation
leaf-agent
approved these changes
Sep 12, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 12, 2026
Resolving a selected thread updated the panel optimistically but deferred its focus handoff until the request completed. During that gap, focus fell to the Threads list, so pressing `c` opened the page comment box and cancelled the eventual landing. Move settlement landing into the optimistic transition and restore it on refusal. Resolve now selects the next available thread immediately, while Reopen enters its reply and conditionally restores the reader's exact lifecycle/search view if the request fails. Existing focus-intent guards keep later reader navigation authoritative. Browser coverage holds accepted and refused Resolve/Reopen requests, presses `c` before acknowledgement, retains drafts, and covers last-thread and later-destination behavior. The complete conversation browser file passes 76 tests. The current-head full suite passed 1,036 tests; its two intermittent render-startup failures reproduced on a frozen current-main worktree with the same two-worker selection. > _This was written by Codex on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Sep 17, 2026
…ruled out (#768) The cutover list scored its candidates from a survey's estimates. Six of the rows ranked next were measured against the code, and every one was stale or overstated; an independent review then confirmed the six verdicts and corrected three of the reasons behind them. The rows now carry what was measured, and the ones the measurements ruled out have moved to the survey note, whose table is now named Rejected. What the measurements found: - **`html` as the page scroller** was already done: `26feec8b` made the switch on 2026-08-29, `theme.css` holds the rule, and the runtime reads `document.scrollingElement`. The row is gone. - **Same-document View Transitions** claimed ~150 lines against a `motion.js` of 87. The update applies after the old state is captured, later than the gesture's own turn; pointer input misses the page while it animates; a fold collapses height so later content slides, which a root cross-fade does not draw; and board cards move inside their own scroller, whose clip a snapshot escapes under the Chrome 125 floor. #666 removed the paint-boundary transition version travel used, which also leaves `theme.css`'s `lf-versioning` rule dead — deleted here. - **idiomorph for the version patch**: a live-tree diff keeps only the reader state an exclusion names, while `dom-children.js` compares authored source with authored source and keeps all of it. It has needed no fix since #514 split it out. - **`tsc --checkJs`** runs in under a second, but a bug-back over six runtime fixes (#404, #448, #625, #660, #676, #757) found no error that the fix removed from the files it touched, and the errors it does report are inference artifacts. - **Browser-owned anchoring** was spiked on `agent-a4111d25e33d466d2`. All three capture paths cut over and the anchors matched the Python capture exactly, but Python grew by 168 lines, a quoted `leaf comment` went from 0.2 s to 1.3 s and now needs Chrome, and the anchor tests went from 8 s to 37 s: the refusals and the diagnostics for a quote the page does not show read authored source the rendered page no longer holds. - **The user-level daemon** nets roughly zero lines. The browser already receives pushes over `EventSource`, the 70 µs stat loop serves CLI writers in other processes, pid probing and most locks stay, Windows is not a goal, and a user-level database stops the page directory being the deployment unit. Two rows are new. A size-first sweep of the largest hand-written mechanisms found one candidate the defect-led survey missed: serving each page through starlette and uvicorn, which `mcp` already installs, keeping one process per page. And the keyboard system becomes item #24 under architecture simplification: the reader keeps every key, sequence, hint, and the one-press-per-layer Escape, while the code that infers which surfaces are open — where ten of the last 24 keyboard fixes landed — gives way to a layer stack that openers push and closes pop. No library owns that; the ones that came closest are in Rejected. The preamble now says effort and confidence are estimates unless a row cites a measurement. Checks: the everyday suite (1,135) and `test_a_revision_navigates_without_the_view_transition_api`, which exercises activation with the View Transition API switched off, both pass; pre-commit is green on the changed files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Resolving a selected thread updated the panel optimistically but deferred its focus handoff until the request completed. During that gap, focus fell to the Threads list, so pressing
copened the page comment box and cancelled the eventual landing.Move settlement landing into the optimistic transition and restore it on refusal. Resolve now selects the next available thread immediately, while Reopen enters its reply and conditionally restores the reader's exact lifecycle/search view if the request fails. Existing focus-intent guards keep later reader navigation authoritative.
Browser coverage holds accepted and refused Resolve/Reopen requests, presses
cbefore acknowledgement, retains drafts, and covers last-thread and later-destination behavior. The complete conversation browser file passes 76 tests. The current-head full suite passed 1,036 tests; its two intermittent render-startup failures reproduced on a frozen current-main worktree with the same two-worker selection.