Skip to content

Unify initial widget drawings and thread controls - #4488

Merged
max-sixty merged 9 commits into
mainfrom
codex/lit-render-ownership
Oct 27, 2026
Merged

max-sixty merged 9 commits into
mainfrom
codex/lit-render-ownership

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Remove the separate x-prepaint markup path and use x-initial as the single contract for a widget's first drawing. Tally retains one Lit template from initial paint through live updates; file tree, editor and trace adopt their initial pending nodes. This removes duplicate schema validation, Python placeholder insertion, browser insertion and placeholder CSS. Markdown retains its separate server-rendered content path.

Thread headers and settlement controls now belong to their surrounding Lit templates, removing detached render roots and the Resolve/Reopen node cache. Reopening explicitly lands in the reply field while retaining the existing guards against stealing a later focus choice. Pointer presses on controls in the same thread retain the active reply until the action runs, preventing Reopen from retiring its own margin card; explicit Resolve and outside presses still dismiss it. Generic thread DOM relations move to their shared selectors owner so both rendering and composition use the same parts without a dependency cycle. The package-author contract is updated and the protocol advances to 33 because vendored declarations change.

The change removes 12 lines overall: source/docs shrink by 111 lines, while behavioral tests grow by 30 and generated assets by 69. Focused browser coverage exercises initial-node retention, lazy producers introduced by revisions and frozen replies, tally navigation and undo, and thread reopening/refusal/focus. The alert-page startup comparison against main retains 35 code requests through initial semantic presentation and removes 77 combined document/code bytes; neither arm reports browser errors.

Validation: Opus review and repair review, independent live-browser reviews, 128 focused model tests, 29 build tests, 682 runtime tests and 85 Worker tests. Focused Chromium journeys also cover keyboard/pointer Reopen, outside dismissal, panel transfer, shadow-input focus, and editing a message while retaining an unfinished reply.

Inherited diagnostic: the behavior assertions in test_reply_editing_and_saved_words_have_separate_resolution_lifetimes[panel-user] pass, but teardown reports typed words leaving the screen. This also reproduces on an isolated snapshot of main c4411611e. The resolution/words-visibility diagnostic family is tracked in #4401; this result does not establish that the two cases share a cause.

This was written by Codex on behalf of max-sixty

@max-sixty
max-sixty merged commit d519ad1 into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/lit-render-ownership branch October 27, 2026 18:45
leaf-agent added a commit that referenced this pull request Oct 27, 2026
The pointer adapter-failure cases assumed that opening reactions ended
reply editing. #4488 intentionally keeps editing active for presses
within the same thread, so all eight cases stopped before injecting
their adapter failure.

End the pointer case's composition explicitly with Escape before opening
reactions. This preserves its saved-draft retirement scenario, the
keyboard case's active-reply continuation scenario, and the existing
checks for draft recovery, stale picker release and healthy sibling
updates. No runtime behavior changes.

An expanded experiment with active pointer compositions exposed a
moved-outlet continuation defect, recorded with reproduction details in
#4504. The saved-draft cases here and the existing keyboard continuation
case remain distinct coverage.

Validation: reproduced the old assertion on current main; the nine
focused adapter-failure cases pass with this setup correction.

Closes #4494 — automated triage

Co-authored-by: leaf-agent <[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