Skip to content

Move 42 browser tests off the feature gallery onto small pages - #2485

Merged
max-sixty merged 15 commits into
mainfrom
gallery-small-pages
Oct 12, 2026
Merged

max-sixty merged 15 commits into
mainfrom
gallery-small-pages

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Forty-two browser tests opened the whole feature gallery, a thousand elements and ten live samples, only for one passage, thread, suggestion or widget it happens to hold, and spent most of their time waiting for it to present. They now serve a small page with just that shape, and each protects the same behavior. Two are folded into tests whose journeys already covered them. Locally the moved tests take about 210 s of call time against about 1,150 s on the gallery; in CI run 38171553443 they cost 2,748 s.

The commits go by area: margin (d973d0e5a), the interaction runner, which now gets the gallery's #bg-interactions section alone (8069e4d41, 8dd02d6e6), startup (5c015b24f), navigation, threads and widgets (b644c2566), and drawing, reactions, drafts, share and notices (aa49ace29). Fixtures several modules share live in tests/render_cases_interaction.py. Each commit message names the page each test now uses.

Faster pages exposed what the gallery's slow frames had hidden:

  • A runtime fix (464799691, margin-layout.js and margin-projection.js). When a layout pass folded a pin whose open face showed its options inline, such as a suggestion's Accept and Reject at 390px, it seated the toggle by the row's pre-fold data-lf-options-open. The toggle landed about 30px left and jumped back a frame later without input. The fold now states whether the folded pin shows its options (fold.open()), and the pass seats by that.
  • Timing the gallery had hidden. Share ignores a press for a second after a copy, and a paused animation can still be pending right after Pause; the share and interaction-replay tests now wait for each (aa49ace29, e8389b1f0).
  • Coverage the moves would have dropped, each restored and checked by planting the fault it guards: Send returning focus to More when a gesture step displaced Comment (2848db662), a thread row with a newer non-question reply after an open question (093cefe70), and a thread card tall enough to clip (d280081e9).

test_site.py's waits_for_slow_contained_page_state, which had failed since #2447, now reads LIVE_ROOT from runtime/context.js, where #2447 moved it.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 15 commits October 11, 2026 17:44
… small pages

Fourteen margin tests opened the feature gallery only for one passage, cluster or
suggestion it happens to hold, and spent most of their time waiting for it to present.
They now serve a page with just that shape, and each protects the same behavior:

- MARGIN_ACTIONS_PAGE (the three-suggestion paragraph, a crowded suggestion): a settled
  page with a standing reaction renders no margin per frame; Ask binding badges hang on
  a suggestion's Accept and Reject (renamed without "feature gallery"); an undone
  decision leaves every suggestion pin where it stood at 390px; a replaced margin host
  does not inherit pointer ownership; a suggestion's margin entry goes through fail,
  pending, settle, agent work and revision (renamed); a reaction pin unfolds from its
  seat at 390px.
- LONG_PAGE with comments on its last paragraphs: re-laying a compact margin keeps the
  user at the document's end.
- LONG_PAGE with an Ask in its middle: margin hover requires pointer movement.
- LONG_PAGE with reactions above a fragment target: the fragment lands at the top edge
  once those controls are presented (renamed).
- THREAD_CARD_PAGE, new: a paragraph in the right cell of a two-up pair and a crowded
  suggestion, each with a seeded thread. The free-margin, beside-its-words, short-rail
  and crowded-cluster thread card placements keep their geometric preconditions, and
  each holds on this page at the widths the gallery used.

test_a_folded_compact_map_closes_its_banner_overflow_with_it is removed: its journey
is test_the_small_screen_map_is_a_complete_accessible_sheet's pointer route, which now
also asserts that More folds when Escape closes the map.

The lifecycle test drops its check of the gallery's seeded accepted suggestion, which
test_the_feature_gallery_balances_one_margin_entry_sample_with_feature_sections makes
too. Locally each moved test runs in 2-6 s of call time against 16-32 s on the gallery.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… alone

Nine test_site.py tests drive the runtime's interaction runner, which the feature
gallery hosts in its #bg-interactions section, and paid for the rest of the gallery:
a thousand elements and nine other live samples. serve_interaction_gallery builds a
page from that section as the gallery's source holds it, the gallery's own
interaction style rules, the section behind a first page view as it stands there,
and the thread its comment and Threads replays import. Each test protects the same
behavior as before: drives_real_widgets, contained_replay_leaves_the_page_around_it,
reduced_motion_leaves_gallery_play_explicit, reads_where_it_is_now,
contains_page_chrome, waits_for_a_restored_frame_tab,
waits_for_slow_contained_page_state, contained_page_retries_a_failed_first_state_read
and reports_sample_document_without_leaf.

waits_for_slow_contained_page_state also reads LIVE_ROOT from runtime/context.js,
where #2447 moved it; it read undefined from storage.js and failed since.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The positioning-module tests needed a page that presents, a paragraph to answer and
a thread to walk to, and opened the whole feature gallery for them; they now serve
LONG_PAGE, with an anchored comment where `t` needs a thread. The opt-in page
interface test needs the interaction runner's page interface, and serves the
gallery's interaction section alone (serve_interaction_gallery). The behavior each
protects is unchanged: floating_ui_loads_after_the_page_presents,
an_unavailable_floating_ui_module_withdraws_the_response,
an_unavailable_floating_ui_module_closes_the_thread_card and
opt_in_page_interface_joins_initial_widget_settlement.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…llery

Six navigation, thread and widget tests opened the feature gallery for one passage,
thread or widget it happens to hold. They now serve a page with just that shape, and
each protects the same behavior:

- WORKSHOP_THREADS_PAGE (test_render_threads.py; three anchored threads, one with a
  question on the user and one resolved): thread rows name the action in their
  status (renamed without "gallery"); thread navigation lands after resizing an open
  reply; a thread walk card leaves and returns with its anchor.
- The gallery's rollout tab set, cut from its source with the gallery's rule that
  narrows it, inside a section: overflowing section tabs reveal and open their
  sections (renamed).
- QUICK_KEYS_PAGE, a Question beside a page-scoped command with a context key:
  quick shortcuts can be disabled without withdrawing commands. Send now closes the
  page comment card onto the row's visible Comment control; the gallery's gesture
  step had displaced that control and sent focus to More instead.
- NESTED_PROPOSAL_PAGE, a block proposal holding a Question: a choice inside a
  proposal survives its undo and a reload, and suggestion emphasis skips the Ask's
  generated key hints.

test_the_feature_gallery_hides_an_accepted_proposal_slot is folded into
test_a_choice_inside_a_proposal_survives_its_undo, whose journey already accepted
the proposal; it now asserts the retired slot is hidden there.

Locally the moved tests run in 0.5-1.9 s of call time against 8-35 s on the gallery.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… gallery

Ten tests opened the feature gallery for one passage, thread or option pair it
happens to hold. They now serve a page with just that shape, and each protects the
same behavior:

- MAP_CHOICE_PAGE (test_render_drawing.py), two joined options with prose around
  them: a drawing is sent and replayed as an ordinary comment, its mark carried by a
  scroll without a repaint; a draw press uses the exact target under its start.
- REACTED_PAGE, a passage with the user's standing reaction: `e` opens a passage's
  reactions and a digit chooses (renamed without "gallery").
- PANEL_PAGE with a thread the agent spoke in last: a reply's reactions keep their
  keys in a covering Threads panel; a new agent comment is announced without moving
  focus (renamed; it dropped the gallery guide's wording check).
- REPLY_HOST_PAGE with an agent thread: an automatic revision, in place or fresh,
  keeps the Threads panel's empty reply focused (renamed).
- LONG_PAGE at a paragraph fragment: Share copies access after a bare reload, and
  the recipient now lands on the shared passage rather than merely seeing it.
- REVISED_QUOTES_PAGE: a revision preserves every open quoted thread (renamed).
- COMPARE_NOTE_PAGE, a sidenote beside prose and tiles: a page hands its note strip
  back when the panel takes the room.

The share journey's second copy now waits for the copy button to leave its second
of success feedback, during which Web Awesome ignores a press, and reads the
clipboard rather than the first copy's notice; the gallery's slowness had hidden
both.

Locally the moved tests run in 0.5-11 s of call time against 9-58 s on the gallery.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The moves off the feature gallery left three fixtures imported across test modules:
the nested-proposal page (navigation and widgets), the workshop threads page and its
events (threads and navigation), and the interaction-gallery fragment with its seeded
thread (site and startup). They now live in render_cases_interaction.py, where
tests/AGENTS.md puts reusable browser cases, and the fragment's thread reuses the
workshop page's id for the same gallery thread. No test's behavior changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s would spread

When a layout pass folded a pin whose unfolded face showed its peers inline, such as
a suggestion's Accept and Reject at 390px once the user had moved on, the pass read
the row's `data-lf-options-open` to decide whether the folded row stood open. That
attribute describes the face the row wears before the fold, and an unfolded face
shows its peers inline, so the pass seated the toggle as an open folded row's,
spread a control's width to the left. The refresh the fold triggers then presents
the toggle closed, and the next pass moves it to its seat: the user saw the toggle
land about 30px left and jump back a frame later without input.

The fold now states whether the pin, standing folded, shows its options
(`fold.open()`, read from the cluster projection margin-projection.js already uses
for `fold.controls()`), and the pass seats by that.

test_a_decision_undone_leaves_every_suggestion_pin_where_it_stood failed on every run
on a quiet host once it moved off the feature gallery, whose slow frames let the
follow-up pass land before the read. It passes now, and an agent comment arriving
after an undo folds the pin straight to its seat.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Moving test_quick_shortcuts_can_be_disabled_without_withdrawing_commands off the
feature gallery dropped an incidental check: there a task on the user stood its
Done step on the banner row while the page comment card was open, so Send handed
focus to More, the door bannerControlDoor names for a displaced row control.
Nothing else covered that fallback.

test_send_returns_to_more_when_a_gesture_step_displaced_the_comment_control opens
the card with `c` on a small page twice: first with the row as it stands, where Send
returns to Comment, then after a task on the user arrives and its Done step takes
Comment's place, where Send returns to More. With bannerControlDoor's More fallback
removed, the second landing fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…'s had

WORKSHOP_THREADS_PAGE, which test_thread_rows_name_action_in_existing_status moved
to from the feature gallery, dropped the gallery's last reply in the photo thread
and gave its timestamp to the question. The row then could not tell a thread on the
user for an outstanding question from one whose latest message is a question. The
question stands at 00:12:55 again, followed at 00:12:56 by a reply that is not one,
so "On you to answer" follows the open question while the recency follows the newest
message. With the prompt derived only from the thread's latest message, the row test
fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The four thread-card tests moved off the feature gallery seed the gallery's photo
thread on THREAD_CARD_PAGE, but with short text in place of its question's pasted
image, so the transcript stood about 245px tall against about 460px. The two
`clipped <= 0` assertions then passed a card too short for a real thread: with the
transcript capped at 250px they still passed. The question carries the gallery's
image again, laid into the page's media, and the same cap now fails both, clipping
218px and 252px.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tion

serve_interaction_gallery split the feature gallery's stylesheet at a six-space
closing brace to find its rules, so a reformatted or minified sheet would hand the
fragment page one undivided chunk, @import of /page/theme.css and every unrelated
rule included, while its guard still passed. It now parses the sheet with tinycss2,
already the dependency leaf's own style code uses, and keeps each top-level rule or
block that names an interaction class; an @import has no block and stays behind. On
the gallery as written and on a whitespace-minified copy it selects the same 17
rules, where the split took the whole minified sheet. The served fragment is
unchanged in behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_the_interaction_gallery_drives_real_widgets read a paused animation's time
right after Pause, while the pause could still be pending, and again 800ms later,
once it had committed at another time: on the interaction-gallery fragment it failed
about half its runs (66.7ms, then 50.0ms). The feature gallery's slow frames had let
the pause commit first. The first reading now waits until no animation under the
suggestion is pending, the completion Web Animations declares. It passes 6/6. The
behavior protected, that Pause freezes the replay, is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 67c6ef0 into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the gallery-small-pages branch October 12, 2026 04:45
max-sixty added a commit that referenced this pull request Oct 12, 2026
)

`test_a_fragment_lands_after_presented_controls_take_space` (before
#2485,
`test_the_feature_gallery_fragment_lands_after_presented_controls_take_space`)
can no longer fail, so this deletes it and its stale `cost_tiers.json`
entry.

It was written in 9df147a, when a docked margin row could take space
in the page above a fragment's target after the browser had landed it,
so presentation flushed margin layout before landing again. Since #1164
every margin row stands absolutely placed in the chrome's margin layer
("nothing it draws moves that content", `margin-layout.js`'s header), so
no row can push the target down. The test passes with the
`app.overlay?.flushLayout()` before `landFragment()` removed, and still
passes with Chrome's scroll anchoring turned off; a per-frame probe
showed the target and the document height unchanged while twenty margin
clusters arrived above it.

The landing a user depends on stays covered by
`test_an_arrival_keeps_a_readable_native_fragment_where_the_browser_landed_it`
(a fresh fragment lands at the landing edge) and
`test_a_gallery_import_settles_before_initial_presentation` (the
destination stays in view through a deferred interface start). Both pass
on this branch.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.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