Skip to content

webviews: frame and event waits in the latency harness and wheel pass-through (fixed waits 75 → 26) - #23650

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
scroll-jitter-2/fixed-waits-b1
Oct 21, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
scroll-jitter-2/fixed-waits-b1

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

The next batch of the fixed-waits ratchet. The baseline goes from 75 to 26 (base after #23584/#23585, which this PR merged); this PR removes 49 waits.

  • test/latency/actions.ts (23 → 0): between runs, the harness waits for the page to hold still (quiet: 10 painted frames with no DOM change and nothing animating) instead of fixed settle(ms) sleeps. Each prepare step waits for the state it needs:

    • the sidebar slide's end
    • "sidebar reverse": the slide's own currentTime reaching 50 ms, or the slide having ended when a loaded frame outlasts it
    • the rich document shown
    • the model or slash menu closed after Escape

    scripts/latency/run.ts installs the painted-frame helpers once per page.

  • test/latency/picker.harness.tsx (7 → 0) and test/latency/mock-host.ts (3 → 0): the mock hosts' reply delay is the stand-in for the IPC round trip the harness measures against, so it is marked // fixed-wait: rather than removed.

  • test/agent-pane-wheel-pass-through.test.ts (16 → 0): after a wheel, a draft insert or arrow keys, the test waits for the transcript's offset, the draft's offset and the composer card's box to hold for 6 painted frames (still).

Runs on cmux16 at 4eb8754:

  • wheel-pass-through, chromium + webkit: 5/5 (6 tests each).
  • bun run latency, 5 full runs over both engines: every action took all 5 samples with no prepare errors, except "model menu open", which never responds at base either. WebKit's budget passes match base (17–20 of 23 per run, against 17 at base). Chromium on cmux16 paints at 17–30 Hz and fails its budgets at base too.

Agent session: cmux16

🤖 Generated with Claude Code

…-through

The latency harness lets the page settle between runs by waiting for it to
hold still (10 painted frames with no DOM change and nothing animating),
and its prepare steps wait for the state they need: the sidebar slide's
end, the slide 50 ms in, the rich document shown, the menu closed. The
mock hosts' reply delay is the IPC round trip the harness measures
against, so it is marked. wheel-pass-through waits for the transcript,
the draft and the composer card to hold for 6 painted frames instead of
fixed sleeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-f5e3-77e3-a3e6-159012f35d5f&host=cmux16
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by scroll-jitter-2 on cmux16 · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 4eb8754: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23650 -f ref=scroll-jitter-2/fixed-waits-b1 -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 602ea72; does not block

Tour of 4eb87541ba (run): no media. The tour did not run: only webview code changed (6 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label to tour it on a Mac.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-6ykq3 created for this PR by the cmux coordinator.

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 9 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp8keow_t8/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpjqwxuk4e/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_a_file_a_test_reads_selects_that_test (main.PullRequestTiers.test_a_file_a_tes
t_reads_selects_that_test)/
test_a_file_a_test_reads_selects_that_test (main.PullRequestTiers.test_a_file_a_tes
t_reads_selects_that_test)
View Logs
test_a_shared_module_selects_its_dependents (main.PullRequestTiers.test_a_shared_mo
dule_selects_its_dependents)/
test_a_shared_module_selects_its_dependents (main.PullRequestTiers.test_a_shared_mo
dule_selects_its_dependents)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

teamleaderleo and others added 3 commits October 21, 2026 12:27
…er-2/fixed-waits-b1

# Conflicts:
#	webviews/scripts/fixed-waits-baseline.tsv
…er-2/fixed-waits-b1

# Conflicts:
#	webviews/scripts/fixed-waits-baseline.tsv
@teamleaderleo teamleaderleo changed the title webviews: frame and event waits in the latency harness and wheel pass-through (fixed waits 327 → 278) webviews: frame and event waits in the latency harness and wheel pass-through (fixed waits 75 → 26) Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent review, scroll-jitter-2 on cmux16): SHIP at 4eb8754. Re-reviewed after the sidebar-reverse fix and after both base merges, whose only conflict was fixed-waits-baseline.tsv (base's file minus my 4 rows; baseline 26). Local runs at this head: wheel-pass-through 5/5 in chromium and webkit, and latency harness 5/5 runs with no new errors. The only red is Tier routing (tests/test_cmux_next_route.py, Swift module lists that changed on base), which this webviews-only diff can't affect.

@teamleaderleo
teamleaderleo merged commit 253aed0 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the scroll-jitter-2/fixed-waits-b1 branch October 21, 2026 20:01
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant