Repository navigation
[backport core/1.54] perf: cut lint and typecheck time and memory (manual, lint-staged, CI) - #18683
Conversation
#18495) Cuts lint and typecheck time and memory for manual runs, lint-staged, and CI; one commit per phase. - **What**: - Phase 1: ESLint no longer builds a type-aware program (`projectService` removed; the one type-aware rule made syntactic), runs with `--concurrency auto` and content-keyed caches; `comfy/use-global-pinia` oxlint plugin caches parsed modules; CI lint split into parallel `lint` / `typecheck` / `typecheck-aux` / `repo-checks` jobs behind the unchanged `lint-and-format` gate, with ESLint/Stylelint caches restored between runs. - Phase 2: every tsconfig gets its own incremental state via `${configDir}` under `node_modules/.cache/tsbuildinfo` (was `dist/`, wiped by every build), restored/saved in the CI typecheck jobs. Fixes a latent bug: package tsconfigs inherited the root `tsBuildInfoFile` and overwrote it on every `pnpm typecheck`, so the root program never ran warm. - Phase 3: pre-commit typechecks only the programs that own staged files (`typecheck:app`, `:browser`, `:scripts`, `:tools`, `:website`, `:billing-web`, packages) and drops the >10-file repo-wide `pnpm lint` escalation. - Phase 4: `pnpm lint` / `lint:fix` run one bare `eslint` over the repository instead of `eslint src scripts` + `lint:website` + four per-package `eslint src` runs; `lint:website` scripts, the `eslint-website` CI cache, and the CI "Lint workspace packages" step are gone. `oxlint:main` picks up the three package `src` dirs those scripts covered. `.agents/checks/eslint.strict.config.js` (needs an uninstalled plugin) and `ComfyUI/**` (CI server checkout) are ignored. - Follow-ups: `use-global-pinia` and `no-array-copy-method` plugin helpers split so fallow's `new-only` complexity gate passes; `astro.test.ts` asserts the staged ESLint command by shape rather than exact flags. - **Breaking**: `vue/no-unused-properties` no longer sees props declared via imported `defineProps<T>()` types; `no-es2023-array-copy-method` is now syntactic (flags any `.with()`/`.toSorted()`-style call); `enforce-canonical-classes` runs with `collapse: false`. Measured on a 16-core machine (before → after): | Check | Before | After | |---|---|---| | `eslint src scripts` cold | 241 s / 6.8 GB | 38 s / 11.3 GB (8 workers); warm 12 s / 2.5 GB | | `pnpm lint` warm | ~300 s | 76 s / 4.2 GB | | `pnpm typecheck` warm | ~98 s / 5.4 GB | 32 s / 2.6 GB | | root `vue-tsc --noEmit` warm | 79 s | 18 s | | `typecheck:browser` / `:scripts` warm | 37 s / 33 s | 10 s / 10 s | | pre-commit hook, 3 ts files | ~3 min | 34 s | | `pnpm lint` after Phase 4 (bare `eslint`, 6,496 files) | — | 50 s / 4.0 GB | - `--concurrency auto` trades peak memory for wall time (~11 GB on 16 cores, ~4 GB on 4-vCPU CI runners). - CI gate job (`needs` + `if: always()` + `jq` over `needs.*.result`) keeps the required check name; branch protection is unchanged. - knip cache is intentionally not persisted in CI (mtime-keyed). - `typescript-native-bridge` was evaluated (root vue-tsc 79 → 48 s cold) but not adopted: tsgo 7.0.2 reports 75 new errors in tests using `fromPartial()` from `@total-typescript/shoehorn`. Tracks FE-2769. <details> <summary><b>Investigation report</b> (measurements at <code>main</code> 66db80a, root causes, what shipped vs. what was recommended)</summary> Measured on a 16-core / 31 GB machine (Node 26.8.2, pnpm 11.13.1) with `/usr/bin/time -v`. CI numbers come from run 35774754864 (ubuntu-latest, 4 vCPU). Tool versions: TypeScript 6.0.3, vue-tsc 3.3.11, ESLint 10.10.0, typescript-eslint 8.69.0, eslint-plugin-better-tailwindcss 4.7.0, oxlint 1.77.0 + oxlint-tsgolint 7.0.2001, oxfmt 0.59.0. <details> <summary><b>1. Where the time and memory go</b></summary> | Step (cold) | Local wall | Local peak RSS | CI wall | | --- | --- | --- | --- | | `vue-tsc --noEmit` (root program) | 82–86 s | 4.8–5.3 GB | 73 s | | `vue-tsc` warm with `.tsbuildinfo` present | 18.5 s | 2.6 GB | never (cache not restored) | | `eslint src scripts` | 241 s | 6.8 GB | 3m12s (`lint:fix`) + 3m36s (`lint`) | | `eslint apps/website/**` | – | – | 74 s, run twice | | `oxlint … --type-aware` | 32 s | 5.2 GB | 31 s, run twice | | `oxlint:audit` | 11 s | 0.37 GB | 10 s, run twice | | stylelint (cold) | – | 0.24 GB | ~20 s, run three times | | `typecheck:browser` / `:scripts` / `:tools` | – | – | 38 s / 33 s / 10 s | | oxfmt `--check` | 5 s | – | 14 s | | knip `--cache` | – | – | 8 s | The lint-format CI job ran everything serially in one 4 vCPU runner: ~16 minutes, of which ~6.5 minutes was ESLint on the same files twice and ~2.5 minutes other repeated work (website ESLint, oxlint, stylelint). Setup (checkout + `pnpm install`) is only ~40 s, so splitting into parallel jobs is cheap. </details> <details> <summary><b>2. Root causes, ranked by cost</b></summary> <details> <summary><b>2.1 ESLint built a full TypeScript program for one rule</b> (−80 s, −4.2 GB)</summary> `eslint.config.ts` set `parserOptions.projectService: true` for every `.ts/.mts/.vue` file. The only enabled rule that read type information was the in-house `es2022-compat/no-array-copy-method` (`tools/eslint-plugins/noEs2023ArrayCopyMethod.ts`, calls `program.getTypeChecker()`). All seven enabled `@typescript-eslint/*` rules are syntactic; `consistent-type-imports` calls `getParserServices(context, true)` and works without a program. Measured with a config that disables `projectService` and that one rule: `eslint src scripts` drops from 241 s / 6.8 GB to 159 s / 2.6 GB. `src/**` (non-test) contains zero calls to `.toSorted(`, `.toReversed(`, `.toSpliced(` or `.with(`, so a syntactic replacement has no false positives today. Changing `lib` to ES2022 is not an option: `src` uses `findLast`/`findLastIndex` (queueStore, dynamicWidgets, useAssetSelection, …), which are also ES2023. Latent bug uncovered: `no-undef` was only disabled for `*.ts` (via `tseslint.configs.recommended`), not `*.vue`. The TS program masked it; without `projectService`, six false positives appear (`NodeListOf`, `Keyframe`, `FocusOptions`, `EventListener`, …). Fixed with `{ files: ['**/*.vue'], rules: { 'no-undef': 'off' } }`. Removing `projectService` also makes ESLint's `--concurrency` safe (each worker would otherwise build its own multi-GB program). Measured with the no-project config and `--concurrency 4` (CI core count): 58 s wall, 7.0 GB total RSS (≈1.75 GB per worker). **Shipped:** `projectService` removed, the rule made syntactic in the plugin (tests rewritten), `no-undef` off for `.vue`, `--concurrency auto`. Side effect: `vue/no-unused-properties` loses visibility into props declared via *imported* `defineProps<T>()` types; five now-unused `eslint-disable` directives in `src/components/ui/**` were removed. </details> <details> <summary><b>2.2 <code>better-tailwindcss/enforce-canonical-classes</code> was ~56 s of the 63 s tailwind cost</b></summary> `TIMING=all` attributes 61 s to `vue/no-child-content`; that is an artifact of eslint-plugin-vue's shared template traversal. Ablation on `src/**/*.vue` (753 files) gives the real picture: | Config (`src/**/*.vue`, no projectService) | Wall | RSS | | --- | --- | --- | | all 7 better-tailwindcss rules on | 87 s | 2.35 GB | | all 7 off | 18.7–19.6 s | 0.94–0.96 GB | | only `enforce-canonical-classes` | **75.9 s** | **2.27 GB** | | only `enforce-consistent-class-order` | 23.2 s | 1.09 GB | | only `no-conflicting-classes` | 23.5 s | 1.21 GB | | only `no-deprecated-classes` | 23.4 s | 1.10 GB | | only `no-duplicate-classes` / `no-unnecessary-whitespace` / `no-concatenated-classes` | 20.1–20.3 s | 0.96–0.98 GB | Why: each rule calls a `synckit` worker per class-string literal (≈6,600 `class=` attrs plus 651 `cn()` calls). The Tailwind design system is cached per worker, but `getCanonicalClasses` (lib/tailwindcss/canonical-classes.async.v4.js) calls Tailwind's `canonicalizeCandidates` on every literal and then re-runs it once per removed class to find the necessary subset (quadratic). Nothing memoizes per class name, even though the class vocabulary in this repo is small and repeats constantly. **Shipped:** the rule stays on as `error` with `collapse: false`, which skips the quadratic subset search. oxlint/oxfmt were checked as replacements: oxlint JS plugins cannot see Vue templates and oxfmt only sorts classes, so neither can take over this rule. Upstream memoization of `canonicalizeCandidates` per class name remains the real fix. </details> <details> <summary><b>2.3 CI pipeline shape</b></summary> - `ci-lint-format.yaml` ran `pnpm lint:fix` (oxlint ×2, eslint src, eslint website), then `stylelint:fix`, `format`, then `lint-format-verify` which ran `pnpm typecheck`, `pnpm lint` (stylelint, oxlint ×2, eslint src, eslint website, 4 package lints), `pnpm stylelint` again, `format:check`, `knip`, `locale:check`, `adr:check`, and three more vue-tsc programs. All serial, one runner. - The second `eslint src --cache` took 3m36s right after the `--fix` run wrote `.eslintcache`. Locally the same sequence (`--cache --fix` then `--cache`) is 255 s → 7 s, and neither `oxfmt --write` nor `stylelint --fix` invalidates the cache. Fresh checkouts have different mtimes, which is why the caches now run with `--cache-strategy content`. - No tool cache (`.eslintcache`, `.stylelintcache`, `*.tsbuildinfo`, knip cache) was saved or restored between runs; only the pnpm store was cached. **Shipped:** parallel `lint` / `typecheck` / `typecheck-aux` / `repo-checks` jobs feeding a `lint-and-format` gate job (same required-check name); the PR workflow's `lint` job runs the fixers once, commits, and comments as before; the merge-queue workflow's `lint` job runs `pnpm lint` + `pnpm format:check` (duplicate `pnpm stylelint` dropped). New composite actions `tool-cache-restore` / `tool-cache-save` key on `<scope>-<os>-<lockfile hash>-<config hash>-<sha>` with config-prefix then lockfile-prefix `restore-keys`; the config hash covers `eslint.config.ts`, `tools/eslint-plugins/**`, `.stylelintrc.json`, and `**/tsconfig*.json`. knip's cache is not persisted (mtime-keyed). </details> <details> <summary><b>2.4 Typecheck</b></summary> - `--extendedDiagnostics`: 9,123 files, 1.09 M lines of TS, 715 K lines of `.d.ts`, 1.38 M types, 5.5 M instantiations, Program 12.7 s, Bind 3.3 s, **Check 63.2 s**, 4.6 GB heap. - Test files are the majority of what gets checked: `src/**/*.test.ts` is 447 K lines (1,551 files) against 263 K lines of non-test TS and 104 K lines of `.vue`. Excluding `*.test.ts`, `*.stories.ts` and `__tests__` from the program: 48.5 s / 3.6 GB (Check 34.6 s, 772 K types, 2.95 M instantiations). - `incremental: true` wrote `dist/tsconfig.tsbuildinfo` (3 MB). `pnpm clean` deletes `dist`, every vite build wipes it, CI never restored it. Warm incremental run is 18.5 s / 2.6 GB with zero instantiations. - `browser_tests`, `scripts`, `tools` each extend the root tsconfig and build separate programs that re-check the `src` files they import (81 s serial in CI). - `oxlint --type-aware` builds a fourth program (tsgolint, Go): 5.2 GB, 32 s. Without `--type-aware` the same paths take 14 s / 2.3 GB. It is also run once per package. **Found while implementing:** `packages/*/tsconfig.json` extend the root tsconfig and inherited `tsBuildInfoFile`, which TypeScript resolves relative to the *declaring* config. Every package `tsc --noEmit` therefore overwrote the root program's buildinfo with a ~60 KB file, so `pnpm typecheck` never ran the root program warm — on `main` too. `${configDir}` in the path gives each extending config its own file (`tsconfig.types.json` shares the root directory and is build-only, so it has `incremental: false`). **Shipped:** `${configDir}/node_modules/.cache/tsbuildinfo/tsconfig.tsbuildinfo` in the root config, explicit sibling files for `browser_tests`/`scripts`/`tools`/`build`, CI restore/save of `node_modules/.cache/tsbuildinfo` and `packages/*/node_modules/.cache/tsbuildinfo`. Verified the buildinfo is mtime-independent (touching every file still yields a warm run) and stores relative paths, so it is cacheable across checkouts. **Not shipped:** the app/test tsconfig split (two programs cost more locally than one warm incremental program, and CI parallelism already gets most of the benefit); project references for `browser_tests`/`scripts`/`tools`; consolidating per-package `oxlint --type-aware` into one root run (each package run is 3–10 s). </details> <details> <summary><b>2.5 lint-staged</b></summary> `lint-staged.config.ts` ran the full `pnpm typecheck` (root vue-tsc + four package typechecks) on every commit that touched a `.ts/.vue/.astro` file, plus `typecheck:browser` / `typecheck:website` when relevant, and `pnpm lint` repo-wide when more than 10 lint-able files were staged. With no warm `.tsbuildinfo`, that was ~85 s and 5 GB per commit before ESLint even started. `scripts/` and `tools/` changes were never typechecked against their own tsconfig. **Shipped:** each staged file is routed to the tsconfig that includes it (`browser_tests/`, `scripts/`, `tools/`, `apps/website/`, `apps/billing-web/` → their own script; `packages/<x>/` → the package script *and* the root program, since the root consumes packages; everything else → `typecheck:app`). The >10-file `pnpm lint` escalation is gone; per-file ESLint uses `--cache-strategy content --concurrency auto` and stylelint uses `--cache --cache-strategy content`, matching the package scripts. Per-file `oxlint --type-aware` stays (2.3 s per invocation; it is the only remaining type-aware lint). `check-unused-i18n-keys` and `check-frozen-dirs` (0.7 s each) and the pre-push `knip` are unchanged. </details> </details> <details> <summary><b>3. <code>typescript-native-bridge</code> trial (not adopted)</b></summary> `typescript-native-bridge@6.0.3-bridge.17.tsgo.7.0.2` as the workspace `typescript` override (catalog + `overrides`), measured on the root program with stock tsbuildinfo removed: | | Stock TS 6.0.3 | TNB (tsgo 7.0.2) | |---|---|---| | root `vue-tsc --noEmit` cold | 78.8 s / 5.4 GB | 48.2 s / 5.2 GB | | root `vue-tsc --noEmit` warm | 18.2 s / 2.6 GB | 12.9 s / 3.9 GB | | errors | 0 | **75** (59 × TS2322, 15 × TS2345, 1 × TS2321) | Every error is in a test calling `fromPartial()` from `@total-typescript/shoehorn`: tsgo 7.0.2 resolves `PartialDeepObject<LGraphNode>`, `PartialDeepObject<LGraph>`, `PartialDeepObject<HTMLCanvasElement & ICustomEventTarget<…>>` differently from TS 6.0.3, so `LGraphNode` is "not assignable" to its own partial. Not a drop-in until shoehorn's types or tsgo change. The override was reverted; `pnpm-lock.yaml` is untouched in this PR. </details> <details> <summary><b>4. Results on this branch</b></summary> | Check | Before | After | |---|---|---| | `eslint src scripts` cold | 241 s / 6.8 GB | 38 s / 11.3 GB (8 workers) | | `eslint src scripts` warm | — | 12 s / 2.5 GB | | `pnpm lint` warm | ~300 s | 76 s / 4.2 GB | | `pnpm typecheck` cold | ~98 s / 5.4 GB | 98 s / 5.4 GB | | `pnpm typecheck` warm | ~98 s (never warm: packages clobbered the root tsbuildinfo) | 32 s / 2.6 GB | | root `vue-tsc --noEmit` warm | 79 s | 18 s / 2.6 GB | | `typecheck:browser` / `:scripts` / `:tools` warm | 37 s / 33 s / 3 s | 10 s / 10 s / 3 s | | `oxlint:audit` | 11.6 s | 4.9 s | | `oxlint:main` | 28 s | 22 s (remaining ~16 s / 4 GB is the tsgolint type-aware program) | | pre-commit hook (3 ts files) | ~3 min | 34 s | ESLint `--concurrency auto` picks min(ceil(uncached files / 50), cores / 2) workers, so a 4-vCPU CI runner uses 2 workers (~4 GB) and a 16-core machine 8 (~11 GB). Running `eslint <file>` without `--cache` deletes `.eslintcache`; every script now passes `--cache`. </details> <details> <summary><b>4a. Phase 4: bare <code>eslint</code></b></summary> Bare `eslint --cache --cache-strategy content --concurrency auto` lints 6,496 files (adds `browser_tests` 697, `apps` 1,485, `packages` 203, `tools` 107, plus `build`, `.storybook`, `__mocks__`, and root configs) in 41 s / 12.5 GB cold and 19 s warm on 16 cores, versus 12 s warm for `src scripts` alone. The extra directories were already linted by `lint:website` and the per-package `eslint src` runs, so the repo-wide total is lower, not higher: `pnpm lint` on this branch is 50 s / 4.0 GB (was 76 s after Phase 1). Only one new error surfaced: `.agents/checks/eslint.strict.config.js` imports `eslint-plugin-sonarjs`, which is not installed (knip already ignores the file), so it is now in `ignores`. The other 186 findings are pre-existing warnings. Per-package `lint` scripts (`packages/account-core`, `account-ui`, `billing-contract`, `apps/billing-web`) are kept for standalone use but nothing at the root or in CI invokes them any more. From the package cwd, ESLint still resolves the root flat config, and `oxlint:main` now covers their `src` directories with the root oxlint config. The oxlint plugin refactor keeps behavior: a probe test file mocking `@/stores/helpCenterStore` and calling `vi.mocked(useX)` produced the same 2 `use-global-pinia` reports before and after. </details> <details> <summary><b>5. Verification notes</b></summary> - All measurements are single runs except vue-tsc cold (three runs, 82–86 s); treat ±10 % as noise. - `eslint --cache` warm run after a `--fix` run: 255 s → 7 s locally; after `oxfmt --write`: 7 s; after `stylelint --fix`: 7 s. - Gates on the final tree: `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm knip`, `yamllint` + `actionlint` on the changed workflows and actions, `tools/eslint-plugins/noEs2023ArrayCopyMethod.test.ts` (12), `tools/oxlint-plugins/globalPinia.test.ts` (29), `scripts/lint-staged-config.test.ts` (14). - The Phase 3 commit was itself made through the new pre-commit hook (`typecheck:app` + `typecheck:scripts` only, 34 s wall). - Phase 4 gates: `pnpm lint` (exit 0, 186 pre-existing warnings), `pnpm knip`, `pnpm format:check`, `pnpm typecheck:tools`, `yamllint` + `actionlint` on both lint workflows, `fallow audit --changed-since main` (verdict `pass`, 0 introduced complexity findings), plugin tests 41 + `astro.test.ts` 4 + `lint-staged-config.test.ts` 14. </details> </details> --------- Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a0d047-bd73-76ae-9847-102da217cad0
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🌐 Website E2ETip All tests passed.
🎭 Playwright: ✅ 1949 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-24T02:57:15.422Z",
"gitSha": "6cdc9ab15fba7e57acee3235fd698f34f16cc845",
"branch": "backport-18495-to-core-1.54",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2041.5910000000395,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.207999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 530.4499999999999,
"heapDeltaBytes": -9444684,
"heapUsedBytes": 60766660,
"domNodes": -279,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 8.628,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2044.2039999999793,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.187,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 499.24099999999993,
"heapDeltaBytes": -3135816,
"heapUsedBytes": 67139632,
"domNodes": -280,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.778,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2011.1969999999815,
"styleRecalcs": 81,
"styleRecalcDurationMs": 34.455,
"layouts": 14,
"layoutDurationMs": 4.3759999999999994,
"taskDurationMs": 937.982,
"heapDeltaBytes": -3358764,
"heapUsedBytes": 67882588,
"domNodes": -280,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 176.165,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1890.0760000000218,
"styleRecalcs": 77,
"styleRecalcDurationMs": 30.699000000000005,
"layouts": 14,
"layoutDurationMs": 3.967,
"taskDurationMs": 882.473,
"heapDeltaBytes": -13157304,
"heapUsedBytes": 57485156,
"domNodes": -279,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 160.95700000000002,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.4399999999823,
"styleRecalcs": 33,
"styleRecalcDurationMs": 16.082,
"layouts": 6,
"layoutDurationMs": 1.059,
"taskDurationMs": 357.977,
"heapDeltaBytes": 4648464,
"heapUsedBytes": 75825808,
"domNodes": 77,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 9.922,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.0950000000203,
"styleRecalcs": 32,
"styleRecalcDurationMs": 15.876000000000001,
"layouts": 6,
"layoutDurationMs": 1.084,
"taskDurationMs": 365.812,
"heapDeltaBytes": 4234100,
"heapUsedBytes": 74720576,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 16.205,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 657.8529999999887,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.984999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 459.9439999999999,
"heapDeltaBytes": -7941720,
"heapUsedBytes": 63276128,
"domNodes": 18,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 163.992,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 658.52000000001,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.442000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 445.04900000000004,
"heapDeltaBytes": 18679812,
"heapUsedBytes": 88967824,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 162.633,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2061.302000000012,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.4620000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 611.8189999999998,
"heapDeltaBytes": 10750264,
"heapUsedBytes": 87309444,
"domNodes": -270,
"jsHeapTotalBytes": -888832,
"scriptDurationMs": 34.70899999999999,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2037.7559999999448,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.152,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 599.9689999999998,
"heapDeltaBytes": 10650656,
"heapUsedBytes": 87163496,
"domNodes": -274,
"jsHeapTotalBytes": -2461696,
"scriptDurationMs": 31.884999999999998,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2279.86199999998,
"styleRecalcs": 64,
"styleRecalcDurationMs": 10.452,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1623.231,
"heapDeltaBytes": 19044612,
"heapUsedBytes": 85083912,
"domNodes": -278,
"jsHeapTotalBytes": 2060288,
"scriptDurationMs": 826.2049999999999,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2442.664000000036,
"styleRecalcs": 67,
"styleRecalcDurationMs": 14.225000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1743.856,
"heapDeltaBytes": 6936416,
"heapUsedBytes": 84321932,
"domNodes": -279,
"jsHeapTotalBytes": 647168,
"scriptDurationMs": 875.7629999999999,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3677.5260000000003,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.227999999999998,
"layouts": 60,
"layoutDurationMs": 11.328000000000001,
"taskDurationMs": 1752.1339999999998,
"heapDeltaBytes": 9490280,
"heapUsedBytes": 76386908,
"domNodes": -274,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 812.0540000000001,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3583.0139999999346,
"styleRecalcs": 60,
"styleRecalcDurationMs": 9.274999999999999,
"layouts": 60,
"layoutDurationMs": 11.652999999999999,
"taskDurationMs": 1704.8579999999997,
"heapDeltaBytes": 9457412,
"heapUsedBytes": 76871832,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 781.173,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3026.867999999979,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.616000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1908.5330000000001,
"heapDeltaBytes": 22403712,
"heapUsedBytes": 90443636,
"domNodes": 0,
"jsHeapTotalBytes": 1204224,
"scriptDurationMs": 947.76,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3107.232999999951,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.818,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1952.8159999999998,
"heapDeltaBytes": 23948720,
"heapUsedBytes": 92468268,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 991.9270000000001,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2048.6229999999637,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.351000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 608.4140000000001,
"heapDeltaBytes": 8071572,
"heapUsedBytes": 86204064,
"domNodes": -272,
"jsHeapTotalBytes": -1675264,
"scriptDurationMs": 37.017999999999994,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2005.1590000000488,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.014000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 530.5079999999999,
"heapDeltaBytes": 22155652,
"heapUsedBytes": 88387348,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 32.739000000000004,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 607.6320000000237,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.261,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.903,
"heapDeltaBytes": 14646404,
"heapUsedBytes": 80932108,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 140.49599999999998,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 590.7469999999648,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.126000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.64700000000005,
"heapDeltaBytes": 13946412,
"heapUsedBytes": 86408252,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 142.424,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2022.688999999957,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.410000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 477.414,
"heapDeltaBytes": 5867904,
"heapUsedBytes": 79177108,
"domNodes": -297,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 7.864000000000001,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2023.7380000000371,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.236999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 499.8960000000001,
"heapDeltaBytes": -8109584,
"heapUsedBytes": 64002404,
"domNodes": -294,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.302,
"eventListeners": -240,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1719.1670000000272,
"styleRecalcs": 77,
"styleRecalcDurationMs": 26.063000000000002,
"layouts": 18,
"layoutDurationMs": 4.243,
"taskDurationMs": 806.111,
"heapDeltaBytes": -7290968,
"heapUsedBytes": 64917940,
"domNodes": -297,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 105.72000000000001,
"eventListeners": -242,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.468999999966,
"styleRecalcs": 78,
"styleRecalcDurationMs": 27.025000000000002,
"layouts": 18,
"layoutDurationMs": 4.554000000000001,
"taskDurationMs": 806.0749999999999,
"heapDeltaBytes": -14736552,
"heapUsedBytes": 58404404,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 106.312,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.03100000005,
"styleRecalcs": 19,
"styleRecalcDurationMs": 32.085,
"layouts": 15,
"layoutDurationMs": 15.530000000000003,
"taskDurationMs": 935.1880000000001,
"heapDeltaBytes": 21988892,
"heapUsedBytes": 105490196,
"domNodes": 13751,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 31.236,
"eventListeners": 2385,
"totalBlockingTimeMs": 149,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8520.249999999976,
"styleRecalcs": 249,
"styleRecalcDurationMs": 35.3,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5836.522999999999,
"heapDeltaBytes": -8059416,
"heapUsedBytes": 68212224,
"domNodes": -282,
"jsHeapTotalBytes": 946176,
"scriptDurationMs": 2722.776,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8553.29699999993,
"styleRecalcs": 245,
"styleRecalcDurationMs": 32.077,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5989.097999999999,
"heapDeltaBytes": 13288520,
"heapUsedBytes": 89786332,
"domNodes": -273,
"jsHeapTotalBytes": -1220608,
"scriptDurationMs": 2809.485,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16902.60699999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16423.588,
"heapDeltaBytes": -27935292,
"heapUsedBytes": 177911480,
"domNodes": -8068,
"jsHeapTotalBytes": -9576448,
"scriptDurationMs": 277.055,
"eventListeners": -14931,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 17047.24900000008,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16616.832,
"heapDeltaBytes": -64953044,
"heapUsedBytes": 177763272,
"domNodes": -8068,
"jsHeapTotalBytes": -21278720,
"scriptDurationMs": 279.68100000000004,
"eventListeners": -14931,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20958.417999999994,
"styleRecalcs": 172,
"styleRecalcDurationMs": 18.58099999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20615.754,
"heapDeltaBytes": -31194928,
"heapUsedBytes": 192611092,
"domNodes": -8069,
"jsHeapTotalBytes": -17203200,
"scriptDurationMs": 923.9079999999999,
"eventListeners": -14927,
"totalBlockingTimeMs": 58,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21377.828000000023,
"styleRecalcs": 172,
"styleRecalcDurationMs": 18.16599999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20992.487999999998,
"heapDeltaBytes": -37806008,
"heapUsedBytes": 192890336,
"domNodes": -8068,
"jsHeapTotalBytes": -17022976,
"scriptDurationMs": 943.4420000000001,
"eventListeners": -14929,
"totalBlockingTimeMs": 111,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6137.675000000001,
"styleRecalcs": 20,
"styleRecalcDurationMs": 98.54299999999999,
"layouts": 20,
"layoutDurationMs": 29.682000000000013,
"taskDurationMs": 6042.664,
"heapDeltaBytes": -40461464,
"heapUsedBytes": 177303632,
"domNodes": -8068,
"jsHeapTotalBytes": 10457088,
"scriptDurationMs": 110.926,
"eventListeners": -14927,
"totalBlockingTimeMs": 562,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 6292.418999999995,
"styleRecalcs": 20,
"styleRecalcDurationMs": 94.60199999999996,
"layouts": 20,
"layoutDurationMs": 28.676999999999992,
"taskDurationMs": 6149.13,
"heapDeltaBytes": -46570660,
"heapUsedBytes": 185434356,
"domNodes": -8066,
"jsHeapTotalBytes": -1355776,
"scriptDurationMs": 104.01400000000001,
"eventListeners": -14925,
"totalBlockingTimeMs": 648,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8508.229000000028,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8333.142999999998,
"heapDeltaBytes": 2840136,
"heapUsedBytes": 178657092,
"domNodes": -1,
"jsHeapTotalBytes": -19398656,
"scriptDurationMs": 132.89000000000007,
"eventListeners": -14,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8681.512999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8418.927000000001,
"heapDeltaBytes": -2523528,
"heapUsedBytes": 180120688,
"domNodes": 0,
"jsHeapTotalBytes": -8388608,
"scriptDurationMs": 134.262,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 446.4020000000346,
"styleRecalcs": 13,
"styleRecalcDurationMs": 18.122,
"layouts": 2,
"layoutDurationMs": 0.522,
"taskDurationMs": 98.24900000000001,
"heapDeltaBytes": 4774028,
"heapUsedBytes": 73203016,
"domNodes": 122,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.3469999999999995,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 502.26199999997334,
"styleRecalcs": 20,
"styleRecalcDurationMs": 29.637,
"layouts": 3,
"layoutDurationMs": 1.5340000000000003,
"taskDurationMs": 121.24099999999999,
"heapDeltaBytes": 4863892,
"heapUsedBytes": 73276832,
"domNodes": 140,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 9.042,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
}
]
}🔬 E2E CoverageNote Shard completeness could not be verified for this run, so these totals may not be comparable with a whole merge.
Top 10 files by uncovered lines
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.54 #18683 +/- ##
=============================================
- Coverage 83.73% 82.23% -1.51%
=============================================
Files 2103 2533 +430
Lines 124634 132320 +7686
Branches 33417 33422 +5
=============================================
+ Hits 104366 108813 +4447
- Misses 20089 22993 +2904
- Partials 179 514 +335
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 435 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…e node/title/widget state (#18075) Manual backport of #18075 to core/1.54. Automated backport failed: #18075 (comment) Cherry-picked from 96821ac. Dependency check: the bot flagged a possible stacking conflict with #18727, #18722, #18683, #17872 (all still open against core/1.54). None of those touch graphMutations.ts, graphMutations.test.ts or agentConversationFixture.ts, so they are not the cause. The real causes: - graphMutations.ts: core/1.54 predates #18191 ("keep the ghost placement flag out of the document"), which hoisted node flags into a local `flags` variable (`cloneNodeFlags`) reused by `lastSerialization`. #18191 has no needs-backport label and was never backported here. Resolved by keeping core/1.54's existing flags handling (`cloneRecord(payload.flags)` / `structuredClone(payload)`) and porting only #18075's actual change: `resolveNodeTitle` plus the new `titleReconcileBaseline` field. - graphMutations.test.ts: pure insertion, no real conflict — accepted the new test cases as-is. - browser_tests/fixtures/agentConversationFixture.ts and the new browser_tests/tests/agent/agentCrdtReconcileOverwrite.spec.ts: this fixture (and the wider main-only agent Playwright test scaffolding it depends on, e.g. agentTabSwitchCatchUp.spec.ts) does not exist on core/1.54 at all — introduced by main-only work, not by any of the PRs above. Dropped from this backport along with the Topbar.ts#openBlankTabAndReturn() helper added only for that spec, so the branch keeps compiling. The runtime fix ships with its Vitest regression coverage (graphMutations.test.ts, agentNodeMaterializer.test.ts); the e2e visual-proof spec is left for a follow-up once the agent Playwright fixture infrastructure itself is backported. Validation on this branch: - pnpm exec vitest run src/workbench/extensions/agent - pnpm exec eslint / pnpm exec oxfmt --check on touched files - pnpm typecheck
…e node/title/widget state (#18075) (#18758) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-org.slack.com/archives/C0BGH348Z0C/p1789514768597649)_ Manual backport of #18075 to `core/1.54`. The automated backport failed with merge conflicts: #18075 (comment) Cherry-picked from `96821ace03bc81d7a29965751a401fcf1818cae3` (`git cherry-pick -x -m 1`). ## Dependency check The bot flagged a possible stacking conflict with #18727, #18722, #18683, #17872 (all still open against `core/1.54`). None of them touch `graphMutations.ts`, `graphMutations.test.ts`, or `agentConversationFixture.ts` — they are not the cause of this conflict. The real causes: - **`graphMutations.ts`** — `core/1.54` predates #18191 ("keep the ghost placement flag out of the document"), which hoisted node flags into a local `flags` variable (`cloneNodeFlags`) that `lastSerialization` also started reusing. #18191 is merged to `main` but carries no `needs-backport` label and was never backported to `core/1.54`. Resolved by keeping `core/1.54`'s existing flags handling (`flags: cloneRecord(payload.flags)` / `lastSerialization: structuredClone(payload)`) and porting only #18075's actual change: `resolveNodeTitle(payload, incumbent)` for the title, plus the new `titleReconcileBaseline` field feeding it. - **`graphMutations.test.ts`** — pure insertion (no code on the `HEAD` side of the conflict), accepted the new test cases as-is. - **`browser_tests/fixtures/agentConversationFixture.ts`** and the new **`browser_tests/tests/agent/agentCrdtReconcileOverwrite.spec.ts`** — this Playwright fixture (and the wider main-only agent-test scaffolding it depends on, e.g. `agentTabSwitchCatchUp.spec.ts`) does not exist on `core/1.54` at all; it isn't introduced by any of the PRs above. Dropped from this backport, along with the `Topbar.ts#openBlankTabAndReturn()` helper added only for that spec, so the branch keeps compiling. The runtime fix ships with its Vitest regression coverage (`graphMutations.test.ts`, `agentNodeMaterializer.test.ts`); the e2e visual-proof spec is left for a follow-up once the agent Playwright fixture infrastructure itself is backported. ## Validation - `pnpm exec vitest run src/workbench/extensions/agent` — 1 pre-existing, unrelated failure in `AgentPanelRoot.test.ts` (confirmed present on `core/1.54` before this backport, untouched by this diff); everything else passes, including the 2 intentional `it.fails` cases this PR introduces. - `pnpm exec eslint` / `pnpm exec oxfmt --check` clean on all touched files. - `pnpm typecheck` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L4WMaCPdk7KSva7vwKfz19 --- _Generated by [Claude Code](https://claude.ai/code/session_01L4WMaCPdk7KSva7vwKfz19)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…assets flag, retire Comfy.Assets.UseAssetAPI (#18727) Manual backport of #17117 to `core/1.54`. The automated backport failed with merge conflicts (#17117 (comment)). Cherry-picked from dffad2d (`git cherry-pick -x`). ## Why #17117 retires the hidden `Comfy.Assets.UseAssetAPI` setting and the `Comfy.ToggleAssetAPI` command. The model library, sidebar tab and model store follow `useFeatureFlags().flags.assetsEnabled` (cloud, or the server advertises the `assets` feature). `Comfy.BrowseModelAssets` opens the browser through `openModelLibraryBrowser()`, and the widget asset-picker gate is renamed to `shouldUseWidgetAssetPicker` / `isWidgetAssetPickerEnabled` and fixed to `isCloud`. Without it, a stale persisted setting can still route the model library to `/api/assets` on a backend that doesn't serve it. ## Dependency check The bot flagged a possible stacking conflict with #18722, #18683, #18334 and #17872. None of the four touch any file changed by #17117, so they aren't the cause. The conflicts are real and come from main-only test refactors that aren't on `core/1.54`: the `vi.mock(import(...))` migrations (#17173, #17175, #17176, #17178, #17179) and the global-Pinia test migrations (#17231, #17234, #17235, #17236, #17237, #17270), plus #16891. All production code, locale, script and e2e changes applied cleanly. ## Conflict resolution All 7 conflicts were in unit tests. Each one keeps `core/1.54`'s mocking style (hoisted `vi.mock` stores, no global Pinia) and ports only the setting-to-flag change: - `src/components/sidebar/tabs/ModelLibrarySidebarTab.test.ts`: kept the target's store/download/setting mocks. Dropped the `Comfy.Assets.UseAssetAPI` branch and added a `useFeatureFlags` mock (`featureFlagState.assetsEnabled`) in its place. - `src/composables/useCoreCommands.test.ts`: kept the target's mocks and `createMockSettingStore`. Added the `useFeatureFlags` mock. The `BrowseModelAssets` tests toggle `assetsEnabled` instead of the setting. - `src/platform/assets/services/assetService.test.ts`: kept the target's imports and mocks. Took the rename to `shouldUseWidgetAssetPicker` and removed the setting-store mock. - `src/platform/assets/utils/assetPreviewUtil.test.ts`: kept the target's `vi.mock` style. Added the `useFeatureFlags` mock and removed the `isAssetAPIEnabled` / `getServerFeature` mocks. - `src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.test.ts`: kept the target's two remote-combo tests, which are absent on main. Took the renamed test and the `shouldUseWidgetAssetPicker` mock. - `src/stores/modelStore.test.ts`: kept the target's `mockDistribution` mock. Took #17117's `remoteConfig` holder mock and reactive `serverFeatures` state, so the store's flag watcher fires and state doesn't leak between tests. - `src/stores/workspace/sidebarTabStore.test.ts`: kept the target's command/menu/setting store mocks. Added the `useFeatureFlags` and `openModelLibraryBrowser` mocks and dropped the `Comfy.Assets.UseAssetAPI` setting reads. No other changes from main are included. ## Validation - Static check: no remaining `Comfy.Assets.UseAssetAPI`, `isAssetAPIEnabled`, `shouldUseAssetBrowser`, `ToggleAssetAPI` or `usesAssetApi` references in `src`, `browser_tests`, `scripts` or `.github`. - `pnpm install --frozen-lockfile`: ok - `pnpm typecheck`: clean - `eslint`, `oxlint`, `oxfmt --check` on changed files: 0 errors - `vitest run` on the touched tests plus `src/stores`, `src/platform/assets`, `src/components/sidebar` and `src/composables/useFeatureFlags*`: 129 files, 2339 passed - `vitest run` on `scripts/checkAssetsFlagArtifact.test.ts`, `widgetInputs`, `missingModelPipeline`, `src/renderer/extensions/vueNodes/widgets` and `useCoreCommands`: 66 files, 960 passed - `vite build` followed by `EXPECTED_DISTRIBUTION=localhost EXPECTED_FRONTEND_COMMIT=<HEAD> pnpm test:assets-flag-artifact`: pass - Local e2e against a real ComfyUI backend without `--enable-assets` (`/api/features` reports `assets: false`), with a temporary request guard that is not included in this PR: - A walk of the sidebars, model library refresh, asset/model commands, missing-model workflows, upload and run, the assets sidebar, linear mode and vue-node dropdowns: 10/10 passed. This covered a user with a stale persisted `Comfy.Assets.UseAssetAPI=true`. No `/api/assets*` requests were made. - `browser_tests/tests/sidebar/modelLibrary.spec.ts`: 13/13 passed with no `/api/assets*` requests.
Backport of #18495 to
core/1.54Manually resolved stable-branch conflicts and imported the later-main lint tooling required by the original change. The global Pinia rule is registered but not enabled because
core/1.54has not yet migrated its existing tests. The target package version remains1.54.8;pnpm-lock.yamlwas regenerated withpnpm install.Manually created after the backport workflow reported conflicts.