Skip to content

Commit 216e744

Browse files
authored
Merge branch 'main' into jaeone/fe-1173-gated-hf-download-hint-action
2 parents 3e045e1 + b5d17f9 commit 216e744

551 files changed

Lines changed: 31306 additions & 6818 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/checks/playwright-e2e.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ tools: [Read, Grep]
77

88
You are reviewing Playwright E2E test code in `browser_tests/`. Focus on issues a **reviewer** would catch that an author might miss — flakiness risks, fixture misuse, test isolation problems, and convention violations.
99

10+
**Rulebook — single source of truth:** `browser_tests/README.md` is the canonical
11+
browser-test guide. Every rule below is enforced against it; when in doubt, read
12+
that file. The checks in this profile are the reviewer-facing subset of that
13+
guide — they do not add new conventions of their own.
14+
1015
Reference docs (read if you need full context):
1116

12-
- `browser_tests/README.md` — setup, patterns, screenshot workflow
13-
- `browser_tests/AGENTS.md` — directory structure, fixture overview
14-
- `docs/guidance/playwright.md` — type assertion rules, test tags, forbidden patterns
15-
- `.claude/skills/writing-playwright-tests/SKILL.md` — anti-patterns, retry patterns, Vue Nodes vs LiteGraph decision guide
17+
- **`browser_tests/README.md`** — canonical guide: setup, directory structure,
18+
writing conventions, typed mocks, flake prevention, screenshot workflow
19+
- `.claude/skills/writing-playwright-tests/SKILL.md` — authoring anti-patterns,
20+
retry patterns, Vue Nodes vs LiteGraph decision guide
21+
- `.claude/skills/hardening-flaky-e2e-tests/SKILL.md` — flake transforms
22+
- `browser_tests/AGENTS.md` and `docs/guidance/playwright.md` are stubs that
23+
redirect to the canonical guide
1624

1725
## Checks
1826

@@ -47,9 +55,9 @@ Reference docs (read if you need full context):
4755

4856
### Convention Violations (Minor)
4957

50-
11. **Missing test tags**Every `test.describe` should have `tag` with at least one of: `@smoke`, `@slow`, `@screenshot`, `@canvas`, `@node`, `@widget`, `@mobile`, `@2x`. See `.claude/skills/writing-playwright-tests/SKILL.md` for when to use each.
58+
11. **Missing project-routing tags**Project-routing tags are load-bearing: `playwright.config.ts` selects which project/run a test lands in by grepping `@mobile`, `@2x`, `@0.5x`, `@perf`, `@audit`, `@cloud`, `@oss`. A test that must run in one of those projects but lacks the tag silently won't run there. Organizational tags (`@smoke`, `@slow`, `@screenshot`, `@canvas`, `@node`, `@widget`, `@vue-nodes`, `@subgraph`, `@ui`) are for `--grep` filtering and are encouraged but not mandatory. See `browser_tests/README.md` → Test Tags.
5159

52-
12. **`as any` type assertions** — Forbidden in E2E tests. Use specific type assertions or test-local type helpers. See `docs/guidance/playwright.md` for acceptable patterns.
60+
12. **`as any` type assertions** — Forbidden in E2E tests. Use specific type assertions or test-local type helpers. See `browser_tests/README.md` → Type safety for acceptable patterns.
5361

5462
13. **Screenshot tests without masking dynamic content** — Timestamps, version numbers, or other non-deterministic content in screenshots will cause flakes. Use `mask` option.
5563

@@ -65,10 +73,22 @@ Reference docs (read if you need full context):
6573

6674
18. **Vue Nodes / LiteGraph mismatch** — If testing Vue-rendered node UI (DOM widgets, CSS states), should use `comfyPage.vueNodes.*`. If testing canvas interactions/connections, should use `comfyPage.nodeOps.*`. Mixing both in one test is a smell.
6775

76+
### Structure, Types & Regressions (Medium)
77+
78+
19. **Non-test code inline in the spec** — Flag free-standing functions/constants at the top of a spec that do setup, wire locators, or drive reusable dialog interactions (e.g. a "close the templates dialog" helper). These belong in `browser_tests/fixtures/components/` (page objects), `fixtures/helpers/`, or a Playwright fixture. Do NOT flag top-level Playwright hooks or configuration — `test.use()`, `test.describe.configure()`, and file-level `test.beforeEach()`/`test.afterEach()` legitimately live in the spec. The target is free-standing helpers/constants/locator wiring, not Playwright's own API surface. See `browser_tests/README.md` → Test structure.
79+
80+
20. **Inline-declared types in specs/mocks** — Never hand-write `interface`/`type` shapes for API payloads, node definitions, or store data inside a spec or mock file. Must import the real type — generated packages (`@comfyorg/ingest-types`, `@comfyorg/registry-types`, `generatedManagerTypes.ts`) or `src/` Zod schemas. This requirement also applies to typed mock/data factories under `browser_tests/fixtures/data/` — the imported-type rule is enforced there despite the general `browser_tests/fixtures/` exclusion below. See `browser_tests/README.md` → Type safety and Test Data & Typed Mocks.
81+
82+
21. **Spec not nested in a feature folder** — New specs must live in a `tests/` subfolder mirroring the feature under test, not dumped at the top level of `tests/`. Flag new top-level `browser_tests/tests/*.spec.ts` additions. See `browser_tests/README.md` → Spec File Placement.
83+
84+
22. **Stale spec filename** — A spec's filename must describe the coverage it actually holds. Flag renamed/rescoped tests whose filename no longer matches their content. See `browser_tests/README.md` → Spec File Placement.
85+
86+
23. **Test edit that may undo a prior fix** — When a diff removes or weakens an existing assertion, wait, or timeout in a test, confirm the change isn't silently undoing a deliberate regression/flake fix. The author should have run a `git blame` regression-detection pass; a reviewer flags removals of load-bearing guards whose history shows they fixed a specific race or bug. See `browser_tests/README.md` → Before changing an existing test.
87+
6888
## Rules
6989

7090
- Only review `.spec.ts` files and supporting code in `browser_tests/`
71-
- Do NOT flag patterns in fixture/helper code (`browser_tests/fixtures/`) — those are shared infrastructure with different rules
72-
- "Major" for flakiness risks (items 1-7), "medium" for fixture misuse (8-10), "minor" for convention violations (11-15), "nitpick" for test design (16-18)
91+
- Do NOT flag patterns in fixture/helper code (`browser_tests/fixtures/`) — those are shared infrastructure with different rules (exception: rule 20's imported-type requirement still applies to typed mock/data factories under `browser_tests/fixtures/data/`)
92+
- "Major" for flakiness risks (items 1-7), "medium" for fixture misuse (8-10), "minor" for convention violations (11-15), "nitpick" for test design (16-18), "medium" for structure/type/regression rules (19-23)
7393
- When flagging missing fixture usage (item 8), confirm the helper exists by checking the fixture code — don't assume
7494
- Existing tests that predate conventions are acceptable to modify but not required to fix

.agents/checks/test-quality.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Rules:
3131

3232
- Tests use **Vitest** (not Jest) — run with `pnpm test:unit`
3333
- Test files are **colocated**: `MyComponent.test.ts` next to `MyComponent.vue`
34-
- Use `@vue/test-utils` for component testing, `@pinia/testing` (`createTestingPinia`) for store tests
34+
- Use `@testing-library/vue` with `@testing-library/user-event` for new
35+
component tests, and `@pinia/testing` (`createTestingPinia`) for store tests
3536
- Browser/E2E tests use **Playwright** in `browser_tests/` — run with `pnpm test:browser:local`
3637
- Mock composables using the singleton factory pattern inside `vi.mock()` — see `docs/testing/unit-testing.md` for the pattern
3738
- Never use `any` in test code either — proper typing applies to tests too

.github/dependabot.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
labels:
9+
- 'dependencies'
10+
groups:
11+
vue:
12+
patterns:
13+
- 'vue*'
14+
- '@vue/*'
15+
- '@vueuse/*'
16+
update-types:
17+
- 'minor'
18+
- 'patch'
19+
vite-vitest:
20+
patterns:
21+
- 'vite*'
22+
- '@vitejs/*'
23+
- 'vitest*'
24+
- '@vitest/*'
25+
update-types:
26+
- 'minor'
27+
- 'patch'
28+
eslint:
29+
patterns:
30+
- 'eslint*'
31+
- '@eslint/*'
32+
- 'typescript-eslint'
33+
update-types:
34+
- 'minor'
35+
- 'patch'
36+
types:
37+
patterns:
38+
- '@types/*'
39+
update-types:
40+
- 'minor'
41+
- 'patch'
42+
storybook:
43+
patterns:
44+
- 'storybook*'
45+
- '@storybook/*'
46+
update-types:
47+
- 'minor'
48+
- 'patch'
49+
production-dependencies:
50+
dependency-type: 'production'
51+
patterns:
52+
- '*'
53+
update-types:
54+
- 'minor'
55+
- 'patch'
56+
development-dependencies:
57+
dependency-type: 'development'
58+
patterns:
59+
- '*'
60+
update-types:
61+
- 'minor'
62+
- 'patch'
63+
ignore:
64+
# 20.10.x throws a sync NotSupportedError on external <script> append,
65+
# breaking GTM/Typeform loader tests (see #13733).
66+
- dependency-name: 'happy-dom'
67+
versions: ['>=20.10.0']
68+
69+
- package-ecosystem: 'github-actions'
70+
directory: '/'
71+
schedule:
72+
interval: 'weekly'
73+
labels:
74+
- 'dependencies'
75+
- 'github-actions'
76+
groups:
77+
github-actions:
78+
patterns:
79+
- '*'
80+
update-types:
81+
- 'minor'
82+
- 'patch'

.github/workflows/ci-dist-telemetry-scan.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ jobs:
110110
fi
111111
echo '✅ No PostHog references found'
112112
113+
- name: Scan dist for Datadog RUM references
114+
run: |
115+
set -euo pipefail
116+
echo '🔍 Scanning for Datadog RUM references...'
117+
if rg --no-ignore -n \
118+
-g '*.html' \
119+
-g '*.js' \
120+
-e '@datadog/browser-rum' \
121+
-e '041a9897-5516-4b1f-a245-1a9aa6895488' \
122+
-e 'pub7704486e5b64eb4ff6f62891cda45559' \
123+
-e 'comfy-cloud-frontend' \
124+
dist; then
125+
echo '❌ ERROR: Datadog RUM references found in dist assets!'
126+
echo 'Datadog RUM must be properly tree-shaken from OSS builds.'
127+
exit 1
128+
fi
129+
echo '✅ No Datadog RUM references found'
130+
113131
- name: Scan dist for Customer.io telemetry references
114132
run: |
115133
set -euo pipefail

.github/workflows/ci-tests-e2e.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,15 @@ jobs:
131131
strategy:
132132
fail-fast: false
133133
matrix:
134-
browser: [chromium-2x, chromium-0.5x, mobile-chrome, cloud]
134+
browser:
135+
[chromium-2x, chromium-0.5x, mobile-chrome, cloud, mobile-safari]
135136
steps:
136137
- name: Checkout repository
137138
uses: actions/checkout@v6
138139
- name: Download built frontend
139140
uses: actions/download-artifact@v7
140141
with:
141-
name: ${{ matrix.browser == 'cloud' && 'frontend-dist-cloud' || 'frontend-dist' }}
142+
name: ${{ (matrix.browser == 'cloud' || matrix.browser == 'mobile-safari') && 'frontend-dist-cloud' || 'frontend-dist' }}
142143
path: dist/
143144

144145
- name: Start ComfyUI server

.github/workflows/ci-website-e2e.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66
pull_request:
77
branches-ignore: [wip/*, draft/*, temp/*]
8+
merge_group:
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.ref }}

.github/workflows/pr-cursor-review.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# SHA-pinned per zizmor `unpinned-uses: hash-pin`. Bump this SHA to pick up
3030
# upstream changes; keep `workflows_ref` matching so prompts/scripts load
3131
# from the same commit as the workflow definition.
32-
uses: Comfy-Org/github-workflows/.github/workflows/cursor-review.yml@df507e6bae179c567ad3849370f99dae588985dc # github-workflows main (df507e6)
32+
uses: Comfy-Org/github-workflows/.github/workflows/cursor-review.yml@964d5aad37cbfb57c5b23961d42c2fd85868bf1d # github-workflows main (964d5aa)
3333
with:
3434
# Overriding diff_excludes replaces the reusable default wholesale, so
3535
# this restates the generated/vendored defaults and adds this repo's heavy
@@ -48,7 +48,7 @@ jobs:
4848
:!**/*-snapshots/**
4949
:!src/workbench/extensions/manager/types/generatedManagerTypes.ts
5050
# Load the prompts/scripts from the same ref as `uses:`.
51-
workflows_ref: df507e6bae179c567ad3849370f99dae588985dc
51+
workflows_ref: 964d5aad37cbfb57c5b23961d42c2fd85868bf1d
5252
secrets:
5353
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
5454
# Optional — enables start/complete Slack DMs to the triggerer.

.pinact.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ version: 3
44

55
files:
66
- pattern: .github/workflows/*.yaml
7+
- pattern: .github/workflows/*.yml
78
- pattern: .github/actions/**/*.yaml
9+
- pattern: .github/actions/**/*.yml
810

911
# Actions that don't need SHA pinning (official GitHub actions are trusted)
1012
ignore_actions:

.stylelintrc.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
"customSyntax": "postcss-html"
77
}
88
],
9+
"languageOptions": {
10+
"syntax": {
11+
"types": {
12+
"radial-gradient()": "| <any-value>"
13+
}
14+
}
15+
},
916
"rules": {
1017
"import-notation": "string",
1118
"font-family-no-missing-generic-family-keyword": true,
1219
"declaration-property-value-no-unknown": [
1320
true,
1421
{
15-
"typesSyntax": {
16-
"radial-gradient()": "| <any-value>"
17-
},
1822
"ignoreProperties": {
1923
"speak": ["none"],
2024
"app-region": ["drag", "no-drag"],

CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@
6060
.claude/
6161
.cursor/
6262
.cursorrules
63-
**/AGENTS.md
6463
**/CLAUDE.md
64+
65+
# Agent instructions
66+
**/AGENTS.md @christian-byrne

0 commit comments

Comments
 (0)