Skip to content

[backport core/1.55] perf: skip document-wide modal scans while typing (#19057) - #19190

Merged
christian-byrne merged 1 commit into
core/1.55from
backport-19057-core-155
Sep 28, 2026
Merged

christian-byrne merged 1 commit into
core/1.55from
backport-19057-core-155

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Target-native backport of #19057. Includes the production change and unit coverage; omits main-only performance harness/CI files absent from this release branch. App typecheck passed locally.

- skip document-wide modal scans for native text-editing events while
preserving modal handling for other inputs
- honor store-backed auto-queue mode and cover native editor fast paths
- measure composer typing during the workload, with two unmeasured
type-and-clear warm-ups and named Playwright phases
- close both frame-measurement boundaries and recover cleanly from page
closure or bounded rAF timeouts

This is the measured optimization following the original harness in
[#19051](#19051) and
the protocol-compliant warmed baseline in
[#19159](#19159).

- [Warmed baseline exact-head
run](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/36371643330):
46/46 localhost and 4/4 cloud performance tests passed; retained
`perf-metrics` contains 49 measurements, including two samples for each
agent-composer arm.
- The current exact-head run compares the same 73-character workload
after rebasing onto that warmed baseline.
- The durable regression assertion verifies native contenteditable,
input, and textarea events do not invoke the document-wide modal scan.

- `pnpm vitest run src/scripts/changeTracker.test.ts` — 80 passed
- `pnpm vitest run
browser_tests/fixtures/helpers/PerformanceHelper.test.ts` — 2 passed
- real Chromium immediate-block frame falsifier — 1 passed
- `pnpm typecheck:browser`
- focused formatting and lint checks
- pre-push Knip and changed-file Fallow audit passed

Backport targets: core/1.54, cloud/1.54, core/1.55, cloud/1.55.

---------

Co-authored-by: Alexander Brown <drjkl@comfy.org>
(cherry picked from commit ad31025)
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 7f0c9d58-924a-4484-bf1a-60ffe2728b2d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@christian-byrne
christian-byrne enabled auto-merge (squash) September 28, 2026 05:05
@github-actions
github-actions Bot requested a review from huang47 September 28, 2026 05:05
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/28/2026, 05:09:31 AM UTC

Links

🎭 Playwright: ✅ 2123 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2102 / ❌ 0 / ⚠️ 1 / ⏭️ 13)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 46042169551fac1c8170d247004942af1a85344d

Full docs: ADR-DEVEX-LINT-0015

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

@christian-byrne
christian-byrne merged commit fa2f9a5 into core/1.55 Sep 28, 2026
94 checks passed
@christian-byrne
christian-byrne deleted the backport-19057-core-155 branch September 28, 2026 05:12
@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff              @@
##           core/1.55   #19190     +/-   ##
============================================
  Coverage      84.66%   84.66%             
============================================
  Files           2301     2301             
  Lines         131970   132034     +64     
  Branches       33750    35662   +1912     
============================================
+ Hits          111732   111792     +60     
- Misses         19919    19923      +4     
  Partials         319      319             
Flag Coverage Δ
unit 80.60% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scripts/changeTracker.ts 95.61% <100.00%> (+0.31%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne
christian-byrne removed the request for review from huang47 September 28, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants