Skip to content

Spike: visible controls under collapsed-frame containers on cut pages (revisit seeding) #304

Closed

Description

@SSFSKIM

Question

Since #301, a walk the node budget cuts reads first the elements whose frames show in the window. A container that reports a collapsed 1-pt frame while its children fill the viewport (for example a float's parent in Chromium) is deferred. A visible control under it can then be cut, and #296's stale-point guard checks that control container-only. The #299 spike's full trees held up to 28 such strips per page. In #301's A/B none of them stood over visible content: the guard's checked share was 100% on every cut page.

#301 first built a hit-test seeding pass for this case. The design session dropped it (ruling 66f90453): seedPromoted was 0 in all 56 rows, at a p95 of 250 ms.

Spike

Measure the case on real pages likely to have it: layouts with floats, absolutely positioned overlays, and sticky or collapsed wrappers. Examples are news sites, documentation sites with sidebars, and web apps that need no login. For each page, scroll to where the budget cuts, then count the clickable points that read unrecordedDescendant under a collapsed-frame container. Use the #299 kit on probe/299-hosted.

If a page shows such points, revisit seeding with its measured benefit: the equivalent of seedPromoted > 0.

Also in scope: a wide shown list starves the visible siblings after it (design session ruling 76660861)

On #301's walk, the selection reads every child of a shown list or table to learn their frames, and that spends the node budget. On a local 3,000-row table in Chrome (run https://github.com/SSFSKIM/cua/actions/runs/42246731024, b268504), reading all 3,008 rows spends the 4,000-node budget before preorder returns to Chrome's toolbar and infobar. Those 11 clickable points per observation stay container-only: the guard's checked share is 92.1 / 93.6 / 94.1 / 94.1% at top / 25 / 50 / 90%, against main's 92.1 / 34 / 32 / 31%. The dropped hit-test seeding had covered them (ab0e019, run 42231389508).

Candidate fixes:

  • read a child's frame before charging it to the budget;
  • a cheap pass over the window's chrome (toolbars) first;
  • a bounded seed limited to the window's non-web area.

Price each in walk ms against the coverage it buys.

Activity

  1. added
    status:ready-for-implementer
    priority:P3
    spike
    on Nov 6, 2026
  2. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 6, 2026
  3. SSFSKIM commented on Nov 6, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Taken by cursor235 (design session 0a8bbaa2)

  4. SSFSKIM commented on Nov 7, 2026

    @SSFSKIM
    OwnerAuthor

    Findings: the two holes, measured (hosted macOS, main f20a25e, 2 reps)

    Hole 1 (collapsed-frame containers) never occurs. Hole 2 (a wide list starving later siblings) is real, and one fix closes it for a few ms. The spike also found a third hole, in #301's record-only bisection, on Safari.

    Scope: 234 observations, 57,836 clickable points on a 20-pt grid, at top / 25 / 50 / 90%.

    • Chrome for Testing: 20 pages: 15 public, including BBC, Guardian, GitHub issues, MDN, w3schools, k8s, npm, docs.python.org, Rust, Go, Wikipedia (an article and a table), HN, IANA and OSM, plus local fixtures for floats, overlays and tables of 3,000 and 6,000 rows.
    • Safari: a subset of 7.
    • Kit: branch probe/304-hosted, head 07ed050. It is instrumented on the runner only, and no product code changed.

    How often each hole occurs

    hole observations pages container-only points
    1: under a ≤1-pt strip 0 / 234 – 0
    2: a sibling starved by a wide list 37 / 234 Chrome: iana-media, local-table, local-table-bar, local-table-6k 1,684 (2.9%)
    3 (new): the width rule omits a list and the record's bisection finds nothing 8 / 234 Safari: docs.python.org 804 (1.4%)
    other, or the budget 0 – 0

    Hole 1: Chrome gives empty or collapsed wrappers their descendants' union bounds. The float, fixed-banner and zero-height wrappers all reported their children's frames.

    • A strip with showing children arises only as the offscreen-clamped ancestor of fixed or sticky content.
    • Those hits did have a strip ancestor in the full tree: 3,148 points in 30 observations. The walk had read all of them early, because those wrappers sit early in the document.

    Hole 2, the mechanism:

    • Rows: Chrome answers AXVisibleChildren on an AXTable with every row, so the width rule keeps all 3,001 and charges each one.
    • Cells: each AXColumn lists every cell again. The walk charged 818 offscreen cells on the 3,000-row table and 2,042 on IANA's page.
    • The budget runs out before the walk reaches Chrome's toolbar and tab strip. On IANA it runs out before the next visible tables.
    • This issue's own sighting reproduced: 89.8–94.1% checked on the local table.
    • IANA reached 48.6% at 90% down. The 6,000-row table reached 32.8% at 90%.

    Hole 3: docs.python.org in Safari, nothing cut, 36.8–91.1% checked on all 8 observations.

    • The width rule omits the body's 667 children.
    • recordedChildPositions (Walk.swift:160–162) picks the axis by comparing the first and last framed children. The body's last child is a 10-pt group framed at the body's own top. With equal minY and minX the function returns [], and the record holds none of the body's children.
    • A diagnostic run confirmed it by reading those children.

    Per page (checked / container-only / unrecorded %, per rep where the two differ; main's walk ms)

    • Unaffected: every page and position not listed below was 100/0/0.
    • Chrome iana-media: top 100. At 25% 59.7–60. At 50% 55.2–55.3. At 90% 48.6–48.9. Walk 1.6–2.9 s.
    • Chrome local-table: 89.8–94.1. Walk 1.5–3.2 s.
    • Chrome local-table-bar: 88.3–90.9.
    • Chrome local-table-6k: 84.3–93.9 above 90%, and 32.8–38 at 90%.
    • Safari py-docs: top 84.7, 25% 39.5, 50% 91.1, 90% 36.8. Walk 0.2–0.9 s.

    Cut but 100%: go-http, hn-thread, py-docs, rust-vec, wiki-article, wiki-table and the local float and overlay fixtures in Chrome, and Wikipedia in Safari.

    Fixes priced offline (a replay over the wide engine's full trees, on the 119 cut observations)

    The replay matches main's own guard share within 1 pt on 233 of 234 observations. The one miss is the 6,000-row table read before Chrome had built it: 56 nodes.

    fix checked, mean / min % container-only left added walk ms, p50 / p95
    none (main) 94.3 / 32.8 1,684 0 / 0
    read a wide list's frames before charging them: lists > 100, bisected to the shown run 100 / 100 0 3 / 24
    the same plus not taking up AXColumn children 100 / 100 0 2 / 5
    the same, reading every child's frame linearly 100 / 100 0 344 / 1,805
    AXColumn children not taken up, alone 98.4 / 32.8 313 0 / 0
    a pass over the window's non-web chrome first 96.3 / 38.9 1,277 0 / 0
    hit-test seeding at the container-only points, 20 / 40 / 80 pt 98.7 / 96.1 / 95.4 534 / 1,282 / 1,445 up to 377 / 2,203
    strips peeked, or strips first (hole 1's candidates) 94.3 / 32.8 1,684 0 to 450 / 1,224
    node budget 8,000 98.0 / 88.3 430 2,011 / 3,836

    Unit prices on the runner: a frame read 0.06 ms, a children read 0.075 ms, a full node read 0.55 ms, a hit-test with its parent chain 1.43 ms.

    The column skip was also built and checked live, on the runner only:

    • the barred 3,000-row table went to 100% in 8 of 8 observations;
    • IANA went from 48–60% to 100%;
    • nothing changed on the 6,000-row table, as the replay predicted.

    So it can't stand alone.

    Not yet verified: the bisected frame-first fix's cost is a replay estimate (read counts × the unit prices). It was not measured on a live build.

    Runs

    Traps for the next probe

    • Match a hit's chain to the record by path, not by role and frame. Chrome clamps many offscreen boxes to the same strip frame. The role-and-frame matching produced 6 false thin-gap points on Wikipedia.
    • Columns relist cells. A replay has to model that, or it overstates coverage on Chrome tables.
    • Walk time depends on run order. An engine observing right after the 40–84k-node wide walk ran 0.4–1.3 s slower.
    • A heavy page can be read before it is built. Check the read count.
    • Safari scrolling works through the web scroll area's vertical scroll bar AXValue.

    Sminos-Session: cursor235#b93055dd (cua on macbook)

  5. 6 remaining items

  6. added
    status:in-review
    and removed
    status:in-progress
    on Nov 7, 2026
  7. SSFSKIM commented on Nov 7, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: PR #311 (with #309)

  8. removed
    status:in-review
    on Nov 7, 2026
  9. SSFSKIM commented on Nov 7, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #311 (0.27.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P3spike

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions