Skip to content

Fix thread focus during optimistic settlement - #625

Merged
max-sixty merged 2 commits into
mainfrom
codex/thread-settlement-focus
Sep 12, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex/thread-settlement-focus

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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
max-sixty merged commit 35b1209 into main Sep 12, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/thread-settlement-focus branch September 12, 2026 06:58
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]>
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