Skip to content

Show page visuals while the backend connects - #451

Merged
max-sixty merged 3 commits into
mainfrom
codex/startup-page-visuals
Sep 8, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/startup-page-visuals

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

The public feature gallery currently withholds every generated page control until its first authoritative state read returns, so a cold agent container leaves the playground's control column blank even though widget upgrade has already completed. This changes the visibility boundary from data-lf-presented to data-lf-upgraded in light and shadow DOM, while keeping durable mutations, dialogs and popovers, and the agent-derived top status panel gated on authoritative presentation. The existing presentation signal still reconciles authored geometry against replay before semantic interaction opens.

Browser regressions hold /api/state open and prove that page-local controls and previews paint and work, durable actions cannot post, the banner remains Connecting, local playground changes survive replay, and box-derived interface geometry reconciles when replay lands. The startup contract and runtime comments now describe those separate readiness facts. The unrelated receipt assertion remains on main and is intentionally left to #444, which owns its stronger positional repair.

Tests: pre-commit run --all-files (passed); reviewer selection tests/test_render_startup.py tests/test_render_widgets.py tests/test_render_gate.py (275 passed, plus the current-main receipt assertion failure owned by #444); earlier full suite before dropping that overlapping test-only repair (910 passed); leaf version check … --render on feature-gallery (light and dark); held-backend visual sweep at 1200×900 and 1440×900 in both color schemes. Candidate and main website profiles load the same 36 JS / 779 KiB, 41 code / 1048 KiB, and 49 total / 1262 KiB by feature-gallery presentation.

This was written by Codex on behalf of @max-sixty

Reveal generated page interface once widget upgrade settles, while durable actions, top-layer elements, and agent-derived status remain gated on authoritative presentation. Cover held-state startup in the feature gallery, light and shadow DOM, and preserve geometry reconciliation before semantic interaction.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The visibility move itself checks out: data-lf-upgraded is stamped only after upgradeWidgets() and settlePageInterface() resolve, and nothing about durable safety rides on paint — actionAvailable gates on runtime.statePhase !== "waiting", sendAction repeats it at the door, and the widgets that paint availability also drop the control out of the tab order, so a control released at upgrade is visible, announced disabled, and unreachable by Tab until replay lands. Generated top-layer surfaces and authored dialogs stay on data-lf-presented in both the light and shadow rules. Selection ran clean: tests/test_render_startup.py, tests/test_render_widgets.py, tests/test_render_gate.py (276 passed), plus test_render_export.py and test_render_controls.py. test_render_navigation.py::test_an_inline_thread_uses_surface_focus_until_its_reply_takes_over fails, but it fails identically at the merge base 6023c34 — not this branch's.

Two things to settle before this lands.

The thread-receipt hunk is also being fixed in #444, differently. Both PRs rewrite the same assertion in test_a_thread_says_what_the_agent_is_doing_about_it. #444 replaces the .lf-resolve sibling check with node.nextElementSibling === null — pinning that the receipt closes the message row. This PR drops the sibling clause entirely and adds expect(held_thread.locator(":scope > .lf-resolve")).to_have_count(1) — pinning that Resolve is a thread child. They conflict textually and each keeps half of what the other asserts. The hunk is unrelated to the visibility boundary this PR is about, so dropping it here and letting #444 carry the repair is the cheaper resolution; if you'd rather it land here, #444 should close and its nextElementSibling === null clause should come across, since it's the stronger statement about the receipt's own position.

The rewritten startup paragraph keeps a sentence the change makes false, in skills/leaf/assets/CLAUDE.md — see the inline note. It's the paragraph a widget author reads to learn what may reach the screen during startup, and test_generated_page_interface_reconciles_before_semantic_interaction now asserts the opposite of what it says.

Comment thread skills/leaf/assets/CLAUDE.md Resolved
@max-sixty
max-sixty merged commit f40600b into main Sep 8, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/startup-page-visuals branch September 8, 2026 17:54
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