Repository navigation
perf(webviews): avoid redundant New Tab motion scans - #21320
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
all web/size checks green |
|
Passes: CI passes on CI passes on Written by |
|
|
|
Bead |
|
The
The same hook failure appears on neighboring fast-tier runs for other heads ( |
Gallery38 states changed: agent-pane.transcript/long-code, agent-pane.chat-width/wide, agent-pane.transcript/archive-chat-key, agent-pane.chat-width/standard, agent-pane.new-tab/dictation-menu, ... · 3 play checks failed Diff page and renders (the run's 32 more on the diff page. Live preview (follows this branch; start it with
Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):
97 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes. |
|
Fleet audit receipt: the exact-head |
|
Reconciliation note: the current-base patch still removes the prototype stack stability fix/test from merged #21325. Please rebase and preserve the landed workspace-switch stability change; keep only the intended |
This comment has been minimized.
This comment has been minimized.
e60d5ca to
2a4db79
Compare
|
Visual review: HQ feed · workflow run |
- vp fmt webviews/src/agent-session/acpmux/newtab/listMotion.ts Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/39109931396
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
- vp fmt webviews/src/agent-session/acpmux/newtab/listMotion.ts Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/39111552622
…il 10-21 From coord-2's re-review: - Fetch the base's 9 days with blobs. Blobless, blame fetched blobs one by one and passed its 30 s timeout on busy files, so #21724's takeback of #21320 and #21536 went unflagged; with blobs it is flagged in seconds. - A file the revert check couldn't read is listed in the report for a manual check, never skipped silently. - Generated settings exports (*.sha256, settings-export/, the settings schema) don't count toward the 40-line runtime threshold. - The evidence check is advisory (a warning, check passes) until 2026-10-21T00:00Z, so pull requests already in flight can add evidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sk evidence check (#21718) * ci(cmux-next): path-based risk tiers with an evidence check Label each feat-cmux-next pull request risk:low, risk:medium or risk:high from the paths it changes, and keep a 'risk evidence' check red until the description has that tier's evidence: a screenshot for medium, plus a reviewed SHA and an executed runtime test for high. The policy is in docs/ci/risk-tiers.md and CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): close the risk evidence bypasses review found - Grade on every pull_request_target event with job-level concurrency, and move the unit tests to risk-tier-tests.yml, so no skipped 'risk evidence' run can become the newest check and read as a pass. - Check out the classifier at github.workflow_sha. - Grade merge gates, CODEOWNERS, publish/deploy workflows, schemas/, and the BrowserImport, BrowserAutomation and Cloud targets high; stop treating every .txt and src/ fixture as low. - Proof needs media, not any URL; field values must be on the same line; a runtime SHA must be a commit on the pull request. - risk:waived counts only when an admin or maintainer added it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): read risk:waived only when evidence is missing A failed permission lookup no longer turns a check with full evidence red, and reads as no waiver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): grade workflows high and keep file names out of workflow commands From coord-2's review of #21691: every .github/workflows and .github/actions file runs with secrets or a write token and decides what other pull requests skip, so it is high tier. File names in the report have control characters and backticks replaced, so a newline in a name can't start a :: command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): sharper risk designations - Always high, at any size: release and signing, migrations, schemas/defaults, the protocol spec, pins, the merge gates and the workflows that route checks (cmux-next.yml, ci.yml, ci-guards.yml, ...). - Runtime paths (daemon, acpmux, backend, Remote, Terminal, ...) are high only when the change is over 40 lines outside tests and generated files; a smaller one is medium, which a reviewer can read whole. - Other workflows and actions are medium. - New: a pull request that takes back another pull request's change from the last 7 days (deletes what it added, restores what it replaced) is high and names it. On #21194's squash this names exactly the five PRs it undid (#21199, #21234, #21369, #21384, #21446); moves and generated files don't count. The workflow fetches the base's last 9 days blobless for it. On the 10-04..10-18 history by path: 225 low, 1207 medium, 617 high (30%), down from 856 high (42%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): printable() also replaces C1 controls and line separators Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): a line moved to another file isn't taken back #21242 moved #20398's mouseDownCanMoveWindow override from SidebarContainerView into SidebarResizeHandle; the revert check read the move as a revert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): full-blob base fetch, visible blame gaps, advisory until 10-21 From coord-2's re-review: - Fetch the base's 9 days with blobs. Blobless, blame fetched blobs one by one and passed its 30 s timeout on busy files, so #21724's takeback of #21320 and #21536 went unflagged; with blobs it is flagged in seconds. - A file the revert check couldn't read is listed in the report for a manual check, never skipped silently. - Generated settings exports (*.sha256, settings-export/, the settings schema) don't count toward the 40-line runtime threshold. - The evidence check is advisory (a warning, check passes) until 2026-10-21T00:00Z, so pull requests already in flight can add evidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: register tests/test_risk_tier.py in the execution registry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): base history in a fresh repo, a time budget, and the merge base From review of fa3750e: - actions/checkout turns a sparse checkout into a blobless partial clone, and a later fetch into it stays blobless, so blame still fetched blobs one at a time. Fetch the base's 9 days into a fresh repository instead (about 60 s, not a partial clone; blame then takes about 2 s on #21724). - The revert check stops after 120 s and lists what it didn't reach as 'check by hand', so the job always ends inside its 5-minute timeout (a timed-out risk evidence check is red and can't be waived). - Blame at the merge base the patches are relative to, not the base tip. - Docs: re-run risk evidence on open PRs at the advisory cutover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): cap the base history fetch at 150 s From review of 8a61191: an uncapped fetch could still run the job past its 5-minute timeout, and a timed-out risk evidence check is red. A slow fetch now skips the revert check with a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(risk tiers): cover the audit misgrades and advisory-era verdicts The designation audit found paths graded too high (Rust *_tests.rs, spec prose), too low (nested deploy and signing scripts, merge-gate helpers, OptChat backend, pins), and that a risk evidence check that passed while advisory stays green after the cutover. These tests fail until the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(risk tiers): apply the designation audit and refuse advisory-era verdicts Agents audited the designations against 40 merged and 30 open PRs. - Rust *_tests.rs, tests.rs and tests_v2/ grade as tests, and spec Markdown as docs. The cmux-tui/spec JSON stays a contract. - Nested deploy, signing, nightly, promote and rollback scripts and workflows, scripts/ci/lib, the gh-merge-green helpers, merge-main.sh and the god-file check now grade high. The merge-gate rule moves first, so select_package_tests.py can never match the test rule. - The OptChat agent backend counts as runtime (its inspector stays UI). ghostty.h, homebrew-cmux and .xcode-version count as pins. - A Demo, Video or Recording heading holds proof. - ENFORCE_FROM moves to 2026-10-24 00:00 UTC. After that, gh-merge-green reads ENFORCE_FROM from the base's risk-tier.yml and refuses a risk evidence verdict that finished before the cutover, or no verdict at all. - The module docstring now matches the rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(risk tiers): judge a verdict by its start and refuse an unreadable cutover Review nits on 83f662d: a job that started before the cutover can grade as advisory and still finish after it, and a risk-tier.yml whose ENFORCE_FROM no longer parses silently skipped the gate. Also test_*.py scripts and fixtures should grade as tests. These fail until the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(risk tiers): judge a verdict by its job start; refuse an unreadable cutover gh-merge-green now compares the risk evidence job start time with ENFORCE_FROM, since the job decides advisory-or-not while it runs, and refuses when risk-tier.yml is readable but has no ENFORCE_FROM in the expected form instead of skipping the gate. test_*.py scripts and fixtures under scripts/ grade as tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>






What changed
Avoid redundant layout scans in the cmux-next New Tab list-motion hook. The hook now remeasures only when its row selector or key signature changes, while ResizeObserver continues to rebaseline geometry for resize-only changes. Cleanup restores the observer lifecycle under React StrictMode, cancels stale animations on transient DOM mismatches, and uses a collision-safe key signature.
Verification
bun build webviews/src/agent-session/acpmux/newtab/listMotion.ts --outfile /tmp/cmux-listMotion-check2.js --target browser --external reactgit show --check 207dd96e89c3The full React Doctor script is already present in
webviews/package.json, but this checkout has no installed webview dependencies, sobun run react-doctor:cicould not start (react-doctor: command not found).Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Avoids redundant New Tab layout scans by running the list-motion effect and turn-marker pass only when their inputs change instead of on every render.
JSON.stringifyfor a collision-safe row key signature and restores ResizeObserver cleanup so StrictMode remounts stay in sync.Written for commit 2fdb8ad. Summary will update on new commits.