Skip to content

lint: enable oxlint func-style rule and convert function expressions - #12371

Closed
DrJKL wants to merge 6 commits into
mainfrom
glary/oxlint-func-style
Closed

DrJKL wants to merge 6 commits into
mainfrom
glary/oxlint-func-style

Conversation

@DrJKL

@DrJKL DrJKL commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Created by the Glary-Bot Agent


Summary

Enables eslint/func-style in oxlint with declaration mode to enforce function declarations over function expressions and variable-initialized arrow functions (matches AGENTS.md guidance: "Do not use function expressions if it's possible to use function declarations instead").

Changes

  • What:
    • Adds "func-style": ["error", "declaration"] to .oxlintrc.json
    • Excludes vendored src/lib/litegraph/** via override
    • Converts 2,261 violations across src/, browser_tests/, apps/, packages/, and scripts/ from const foo = () => {} / const foo = function() {} patterns to function foo() {} declarations
    • Manually adjusts a small number of edge cases:
      • let cleanup = () => {} reassignable placeholders → file-local function noop*() declaration + typed let
      • Nested arrows that closed over narrowed locals → capture into typed const so inner function declarations preserve narrowing (useCurveEditor, useRangeEditor, useNodeResize, useAppModeWidgetResizing)
      • Widget composables (useBooleanWidget, useComboWidget, useFloatWidget, useIntWidget, useStringWidget, useMarkdownWidget, useImagePreviewWidget, useImageUploadWidget) → return value typed via satisfies/as to keep ComfyWidgetConstructor[V2] contract
      • ConfirmationDialogContent.vue: renamed local onConfirm → handleConfirm to avoid vue/no-dupe-keys collision with the onConfirm prop now that it's a function declaration
      • ImpactTelemetryProvider.{ts,test.ts}: kept the self-referencing queueFn.a ??= [] pattern with a hoisted declaration + as NonNullable<Window['ire']> cast
  • Breaking: None
  • Dependencies: None

Review Focus

  • Most of the diff is mechanical (const x = () => {} → function x() {}). The interesting edits are the handful of files listed above where the naive conversion would have changed semantics or lost type information.
  • func-style flags const X = () => {} even inside function bodies, so this touches many nested helpers — the codemod ran iteratively to handle nesting safely.
  • The vendored src/lib/litegraph/** tree is intentionally excluded via override; it can be migrated in a follow-up if desired.
  • Pre-existing type-aware oxlint errors (no-console, no-floating-promises, no-explicit-any) are unchanged vs. main.

Verification

  • pnpm dlx oxlint --config .oxlintrc.json → 0 func-style violations (was 2,261)
  • pnpm typecheck → passes
  • pnpm lint → 0 errors, 3 warnings (same as baseline)
  • pnpm knip → passes
  • pnpm test:unit → 10,796 passed, 8 skipped
  • pnpm build → succeeds
  • pnpm format:check → passes

┆Issue is synchronized with this Notion page by Unito

Enables eslint/func-style in oxlint with declaration mode to enforce
function declarations over function expressions and arrow expressions
assigned to variables. Vendored litegraph is excluded via override.

Converts existing function expressions and variable-initialized arrow
functions to function declarations across src/, browser_tests/, apps/,
packages/, and scripts/. Adjusts a handful of let-reassignable callback
placeholders, narrowed variable patterns, and typed widget constructors
to keep type safety intact.

Pre-existing type-aware oxlint errors (no-console, no-floating-promises,
no-explicit-any) are unchanged from main.
@coderabbitai

coderabbitai Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4d6ace2d-da58-4664-8d7e-aa6e459065bf

📥 Commits

Reviewing files that changed from the base of the PR and between 96ba23e and efdbcb8.

📒 Files selected for processing (2)
  • browser_tests/tests/subgraph/subgraphSlots.spec.ts
  • src/composables/graph/useGraphNodeManager.ts
✅ Files skipped from review due to trivial changes (2)
  • browser_tests/tests/subgraph/subgraphSlots.spec.ts
  • src/composables/graph/useGraphNodeManager.ts

📝 Walkthrough

Walkthrough

Enforces func-style: "declaration" in lint config and refactors codebase to use function declarations over arrow functions. Updates some exported functions’ forms, Storybook/ASTRO getStaticPaths exports, and minor internal helpers across components, composables, tests, and scripts. No behavioral changes intended.

Changes

Unified function declaration refactor

Layer / File(s) Summary
Lint configuration update
.oxlintrc.json
Adds func-style=declaration globally with override disabling it under src/lib/litegraph/**.
Export form adjustments
packages/shared-frontend-utils/*, src/base/*, apps/desktop-ui/src/utils/*
Converts several exported arrow functions to named exports without logic changes.
Storybook decorator and Astro page exports
.storybook/preview.ts, apps/desktop-ui/.storybook/preview.ts, apps/website/src/pages/**
Refactors Storybook decorators and Astro getStaticPaths exports from typed arrow constants to named function declarations; removes unused type imports.
Frontend components/composables
src/components/**, src/composables/**, apps/desktop-ui/src/**
Rewrites local handlers and helpers from arrow functions to function declarations across Vue SFCs and composables.
Browser tests and fixtures
browser_tests/**
Refactors test helpers and route handlers to function declarations; preserves test behavior.
Build/test scripts and stories
scripts/**, *.stories.ts
Rewrites helpers to function declarations with same behavior.
Miscellaneous internal refactors
Various files
Converts miscellaneous small handler and helper functions to named declarations for code consistency and function hoisting.

Sequence Diagram(s)

(omitted; no multi-component control-flow changes)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

size:XXL

Suggested reviewers

  • christian-byrne
  • trsommer
  • AustinMroz

Poem

A hop, a skip, refactors done,
From arrows to functions, one by one.
The linter thumps its gentle drum,
“Declarations!”—so they come.
Code-burrows tidy, swift and bright—
Ship it, and nibble greens tonight! 🥕🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch glary/oxlint-func-style

@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-12371.vercel.app

This commit: https://website-frontend-mtmk6jpo0-comfyui.vercel.app

Last updated: 2026-05-20T20:16:51Z for efdbcb8

@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 05/20/2026, 06:52:08 PM UTC

Links

@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1625 passed, 0 failed · 3 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1604 / ❌ 0 / ⚠️ 3 / ⏭️ 5)
  • 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)

@codecov

codecov Bot commented May 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.40361% with 409 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/composables/graph/useGroupMenuOptions.ts 0.00% 46 Missing ⚠️
src/composables/graph/useNodeMenuOptions.ts 0.00% 34 Missing ⚠️
src/components/sidebar/tabs/AssetsSidebarTab.vue 0.00% 15 Missing ⚠️
...ebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vue 7.14% 13 Missing ⚠️
...s/custom/widget/WorkflowTemplateSelectorDialog.vue 0.00% 11 Missing ⚠️
...rc/components/helpcenter/HelpCenterMenuContent.vue 15.38% 11 Missing ⚠️
src/components/sidebar/ComfyMenuButton.vue 0.00% 10 Missing ⚠️
src/composables/graph/useSelectionMenuOptions.ts 18.18% 9 Missing ⚠️
src/components/common/TreeExplorer.vue 0.00% 8 Missing ⚠️
...ponents/sidebar/tabs/modelLibrary/DownloadItem.vue 0.00% 8 Missing ⚠️
... and 100 more
@@             Coverage Diff             @@
##             main   #12371       +/-   ##
===========================================
- Coverage   74.48%   59.36%   -15.12%     
===========================================
  Files        1524     1412      -112     
  Lines       92182    72075    -20107     
  Branches    25282    19143     -6139     
===========================================
- Hits        68659    42786    -25873     
- Misses      22665    28816     +6151     
+ Partials      858      473      -385     
Flag Coverage Δ
e2e ?
unit 59.36% <38.40%> (-0.53%) ⬇️

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

Files with missing lines Coverage Δ
packages/shared-frontend-utils/src/formatUtil.ts 77.85% <100.00%> (-0.56%) ⬇️
packages/shared-frontend-utils/src/networkUtil.ts 18.18% <100.00%> (-22.73%) ⬇️
src/base/common/downloadUtil.ts 97.10% <100.00%> (+3.95%) ⬆️
src/base/wheelGestures.ts 100.00% <100.00%> (ø)
...nents/bottomPanel/tabs/shortcuts/ShortcutsList.vue 100.00% <100.00%> (ø)
...ponents/bottomPanel/tabs/terminal/LogsTerminal.vue 100.00% <100.00%> (ø)
src/components/builder/useAppModeWidgetResizing.ts 96.66% <100.00%> (-0.11%) ⬇️
src/components/common/CustomizationDialog.vue 88.09% <100.00%> (-8.52%) ⬇️
src/components/common/UrlInput.vue 95.55% <100.00%> (ø)
src/components/common/UserAvatar.vue 100.00% <100.00%> (ø)
... and 150 more

... and 938 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/components/dialog/UnloadWindowConfirmDialog.vue (1)

21-30: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set event.returnValue in beforeunload handler for cross-browser reliability.

preventDefault() plus return true is not consistently sufficient for unload prompts. Set event.returnValue explicitly in the guarded branch.

💡 Proposed fix
 function handleBeforeUnload(event: BeforeUnloadEvent) {
   if (
     settingStore.get('Comfy.Window.UnloadConfirmation') &&
     workflowStore.modifiedWorkflows.length > 0
   ) {
     event.preventDefault()
-    return true
+    event.returnValue = ''
+    return ''
   }
   return undefined
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/dialog/UnloadWindowConfirmDialog.vue` around lines 21 - 30,
The beforeunload handler handleBeforeUnload should set event.returnValue for
cross-browser reliability when prompting the user: inside the guarded branch
where you currently call event.preventDefault() and return true (checking
settingStore.get('Comfy.Window.UnloadConfirmation') and
workflowStore.modifiedWorkflows.length > 0), assign event.returnValue = '' (or a
localized string) before returning to ensure browsers show the confirmation
dialog consistently.
src/components/common/BackgroundImageUpload.vue (1)

56-75: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Localize toast error strings instead of hardcoding English text.

The alert messages are user-facing and should go through vue-i18n rather than inline template strings.

As per coding guidelines: "Use vue-i18n for ALL user-facing strings, configured in src/locales/en/main.json".

Also applies to: 77-101

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/common/BackgroundImageUpload.vue` around lines 56 - 75, The
toast error messages in uploadFile are hardcoded English; import and use
vue-i18n (useI18n) in this component and replace the literal string passed to
useToastStore().addAlert with a localized key (e.g. t('upload.backgroundFailed',
{ status: resp.status, statusText: resp.statusText })) so the message comes from
src/locales/en/main.json; likewise update the other user-facing alerts in the
same file (lines around the uploadFile usage, referenced as the other alert
calls at 77-101) to use t(...) keys and add the corresponding entries to the
locale file.
src/components/bottomPanel/tabs/terminal/BaseTerminal.vue (1)

72-88: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Handle clipboard write failures in handleCopy.

navigator.clipboard.writeText(...) can reject (permissions/insecure context), and this path currently has no handling.

💡 Proposed fix
 async function handleCopy() {
   const existingSelection = terminal.getSelection()
   const shouldSelectAll = !existingSelection
   if (shouldSelectAll) terminal.selectAll()

   const selectedText = shouldSelectAll
     ? terminal.getSelection()
     : existingSelection

   if (selectedText) {
-    await navigator.clipboard.writeText(selectedText)
-
-    if (shouldSelectAll) {
-      terminal.clearSelection()
-    }
+    try {
+      await navigator.clipboard.writeText(selectedText)
+      if (shouldSelectAll) {
+        terminal.clearSelection()
+      }
+    } catch {
+      // optionally show toast/dialog if available in this component context
+    }
   }
 }

As per coding guidelines: "Implement proper error handling in all code" and "Provide user-friendly and actionable error messages".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/bottomPanel/tabs/terminal/BaseTerminal.vue` around lines 72 -
88, Wrap the navigator.clipboard.writeText call in a try/catch inside
handleCopy; on failure catch the error, log it (console.error) and show a
user-friendly message (e.g. alert('Failed to copy to clipboard: ' +
error.message)), and ensure you still clear the selection if you had
auto-selected (use terminal.clearSelection when shouldSelectAll is true) so UI
state is consistent; keep using terminal.selectAll(), terminal.getSelection(),
and terminal.clearSelection as in the diff.
src/components/common/InputKnob.vue (1)

77-84: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove the side effect from the displayValue formatter function.

The displayValue function is passed as :value-template to the Knob component and is called during every render to format the display text. Calling updateValue(value) within it causes unnecessary state mutations and update:modelValue emissions on every render, creating render churn. State updates are already properly handled by the @update:model-value event handlers on both components. Remove the updateValue(value) call to keep displayValue as a pure formatter.

Proposed fix
 function displayValue(value: number): string {
-  updateValue(value)
   const stepString = (props.step ?? 1).toString()
   const resolution = stepString.includes('.')
     ? stepString.split('.')[1].length
     : 0
   return value.toFixed(props.resolution ?? resolution)
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/common/InputKnob.vue` around lines 77 - 84, The displayValue
formatter has a side effect: it calls updateValue(value) on each render; remove
that call from the displayValue function so it becomes a pure formatter. Keep
the remaining logic (computing stepString, resolution, and returning
value.toFixed(...)) unchanged, and rely on the existing `@update`:model-value
handlers and the updateValue method elsewhere to perform state updates/emits.
🧹 Nitpick comments (2)
apps/website/src/pages/zh-CN/demos/[slug].astro (1)

2-2: 💤 Low value

Unused import: GetStaticPaths type is no longer used.

The GetStaticPaths type was used in the previous typed function expression but is now unused after converting to an untyped function declaration.

Consider either:

  1. Removing the unused import, or
  2. Restoring the type annotation with a typed function declaration
Option 1: Remove unused import
-import type { GetStaticPaths } from 'astro'
 import BaseLayout from '../../../layouts/BaseLayout.astro'
Option 2: Restore type annotation (if stronger type safety is preferred)
-export function getStaticPaths() {
+export function getStaticPaths(): ReturnType<GetStaticPaths> {
   return demos.map((demo) => ({
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/website/src/pages/zh-CN/demos/`[slug].astro at line 2, The import
GetStaticPaths is no longer used; remove the unused import statement "import
type { GetStaticPaths } from 'astro'" from the top of the file to eliminate the
unused-type warning, or if you want stronger typing, restore the type annotation
by converting the untyped getStaticPaths function back to a typed declaration
using the GetStaticPaths type (e.g., annotate the getStaticPaths symbol) so the
import is actually referenced.
src/components/queue/job/useJobErrorReporting.test.ts (1)

16-21: ⚡ Quick win

Avoid double-cast in the test factory; prefer a satisfies-validated shape.

This keeps the helper strongly typed and prevents silent drift as TaskItemImpl evolves.

Based on learnings: "In test files matching **/*.test.ts under src, when creating test helper functions that construct mock objects implementing an interface, prefer using satisfies InterfaceType for shape validation instead of type assertions like ... as any / double-casts."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/queue/job/useJobErrorReporting.test.ts` around lines 16 - 21,
The factory currently returns an object via a double-cast to TaskItemImpl;
replace the double-cast with a satisfies-based shape check: build the object
(using the existing properties jobId, errorMessage, executionError, createTime
?? Date.now()) into a const (e.g. const task = { ... } ) and use "satisfies
TaskItemImpl" on that const so the shape is validated at compile time, then
return that const directly instead of using "as Partial<TaskItemImpl> as
TaskItemImpl".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/bottomPanel/tabs/terminal/BaseTerminal.vue`:
- Around line 72-88: Wrap the navigator.clipboard.writeText call in a try/catch
inside handleCopy; on failure catch the error, log it (console.error) and show a
user-friendly message (e.g. alert('Failed to copy to clipboard: ' +
error.message)), and ensure you still clear the selection if you had
auto-selected (use terminal.clearSelection when shouldSelectAll is true) so UI
state is consistent; keep using terminal.selectAll(), terminal.getSelection(),
and terminal.clearSelection as in the diff.

In `@src/components/common/BackgroundImageUpload.vue`:
- Around line 56-75: The toast error messages in uploadFile are hardcoded
English; import and use vue-i18n (useI18n) in this component and replace the
literal string passed to useToastStore().addAlert with a localized key (e.g.
t('upload.backgroundFailed', { status: resp.status, statusText: resp.statusText
})) so the message comes from src/locales/en/main.json; likewise update the
other user-facing alerts in the same file (lines around the uploadFile usage,
referenced as the other alert calls at 77-101) to use t(...) keys and add the
corresponding entries to the locale file.

In `@src/components/common/InputKnob.vue`:
- Around line 77-84: The displayValue formatter has a side effect: it calls
updateValue(value) on each render; remove that call from the displayValue
function so it becomes a pure formatter. Keep the remaining logic (computing
stepString, resolution, and returning value.toFixed(...)) unchanged, and rely on
the existing `@update`:model-value handlers and the updateValue method elsewhere
to perform state updates/emits.

In `@src/components/dialog/UnloadWindowConfirmDialog.vue`:
- Around line 21-30: The beforeunload handler handleBeforeUnload should set
event.returnValue for cross-browser reliability when prompting the user: inside
the guarded branch where you currently call event.preventDefault() and return
true (checking settingStore.get('Comfy.Window.UnloadConfirmation') and
workflowStore.modifiedWorkflows.length > 0), assign event.returnValue = '' (or a
localized string) before returning to ensure browsers show the confirmation
dialog consistently.

---

Nitpick comments:
In `@apps/website/src/pages/zh-CN/demos/`[slug].astro:
- Line 2: The import GetStaticPaths is no longer used; remove the unused import
statement "import type { GetStaticPaths } from 'astro'" from the top of the file
to eliminate the unused-type warning, or if you want stronger typing, restore
the type annotation by converting the untyped getStaticPaths function back to a
typed declaration using the GetStaticPaths type (e.g., annotate the
getStaticPaths symbol) so the import is actually referenced.

In `@src/components/queue/job/useJobErrorReporting.test.ts`:
- Around line 16-21: The factory currently returns an object via a double-cast
to TaskItemImpl; replace the double-cast with a satisfies-based shape check:
build the object (using the existing properties jobId, errorMessage,
executionError, createTime ?? Date.now()) into a const (e.g. const task = { ...
} ) and use "satisfies TaskItemImpl" on that const so the shape is validated at
compile time, then return that const directly instead of using "as
Partial<TaskItemImpl> as TaskItemImpl".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f627d28f-1caa-43c8-b2c1-e8ef579f3c84

📥 Commits

Reviewing files that changed from the base of the PR and between a95e53b and 3e56bc9.

📒 Files selected for processing (300)
  • .oxlintrc.json
  • .storybook/preview.ts
  • apps/desktop-ui/.storybook/preview.ts
  • apps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vue
  • apps/desktop-ui/src/components/common/UrlInput.vue
  • apps/desktop-ui/src/components/install/DesktopSettingsConfiguration.vue
  • apps/desktop-ui/src/components/install/InstallLocationPicker.vue
  • apps/desktop-ui/src/components/install/MigrationPicker.vue
  • apps/desktop-ui/src/components/maintenance/TaskListItem.vue
  • apps/desktop-ui/src/components/maintenance/TaskListPanel.vue
  • apps/desktop-ui/src/components/maintenance/TerminalOutputDrawer.vue
  • apps/desktop-ui/src/composables/bottomPanelTabs/useTerminal.ts
  • apps/desktop-ui/src/composables/bottomPanelTabs/useTerminalBuffer.ts
  • apps/desktop-ui/src/constants/desktopMaintenanceTasks.ts
  • apps/desktop-ui/src/stores/maintenanceTaskStore.ts
  • apps/desktop-ui/src/utils/electronMirrorCheck.ts
  • apps/desktop-ui/src/views/DesktopDialogView.vue
  • apps/desktop-ui/src/views/DesktopUpdateView.vue
  • apps/desktop-ui/src/views/DownloadGitView.vue
  • apps/desktop-ui/src/views/InstallView.stories.ts
  • apps/desktop-ui/src/views/InstallView.vue
  • apps/desktop-ui/src/views/MaintenanceView.stories.ts
  • apps/desktop-ui/src/views/MaintenanceView.vue
  • apps/desktop-ui/src/views/ManualConfigurationView.vue
  • apps/desktop-ui/src/views/MetricsConsentView.vue
  • apps/desktop-ui/src/views/NotSupportedView.vue
  • apps/desktop-ui/src/views/ServerStartView.vue
  • apps/desktop-ui/src/views/WelcomeView.vue
  • apps/website/e2e/demos.spec.ts
  • apps/website/e2e/responsive.spec.ts
  • apps/website/src/components/careers/RolesSection.vue
  • apps/website/src/components/product/local/HeroSection.vue
  • apps/website/src/composables/useParallax.ts
  • apps/website/src/composables/usePinScrub.ts
  • apps/website/src/pages/cloud/supported-nodes/[pack].astro
  • apps/website/src/pages/customers/[slug].astro
  • apps/website/src/pages/demos/[slug].astro
  • apps/website/src/pages/p/supported-models/[slug].astro
  • apps/website/src/pages/zh-CN/cloud/supported-nodes/[pack].astro
  • apps/website/src/pages/zh-CN/customers/[slug].astro
  • apps/website/src/pages/zh-CN/demos/[slug].astro
  • apps/website/src/scripts/snakeGame.ts
  • browser_tests/fixtures/helpers/AssetHelper.ts
  • browser_tests/fixtures/helpers/AssetsHelper.ts
  • browser_tests/fixtures/helpers/NodeReplacementHelper.ts
  • browser_tests/fixtures/helpers/SubgraphHelper.ts
  • browser_tests/fixtures/helpers/TemplateHelper.ts
  • browser_tests/fixtures/sharedWorkflowImportFixture.ts
  • browser_tests/fixtures/utils/litegraphUtils.ts
  • browser_tests/tests/actionbar.spec.ts
  • browser_tests/tests/canvasLayoutSettings.spec.ts
  • browser_tests/tests/canvasModeSelector.spec.ts
  • browser_tests/tests/canvasSettings.spec.ts
  • browser_tests/tests/changeTracker.spec.ts
  • browser_tests/tests/defaultKeybindings.spec.ts
  • browser_tests/tests/dialog.spec.ts
  • browser_tests/tests/groupCopyPaste.spec.ts
  • browser_tests/tests/groupNode.spec.ts
  • browser_tests/tests/imageCompare.spec.ts
  • browser_tests/tests/interaction.spec.ts
  • browser_tests/tests/load3d/gizmoControls.spec.ts
  • browser_tests/tests/load3d/load3d.spec.ts
  • browser_tests/tests/nodeHelp.spec.ts
  • browser_tests/tests/nodeSearchBox.spec.ts
  • browser_tests/tests/nodeSearchBoxV2.spec.ts
  • browser_tests/tests/nodeSearchBoxV2Extended.spec.ts
  • browser_tests/tests/painter.spec.ts
  • browser_tests/tests/propertiesPanel/errorsTabMissingMediaRuntime.spec.ts
  • browser_tests/tests/queueNotificationBanners.spec.ts
  • browser_tests/tests/remoteWidgets.spec.ts
  • browser_tests/tests/selectionToolbox.spec.ts
  • browser_tests/tests/selectionToolboxSubmenus.spec.ts
  • browser_tests/tests/sidebar/sidebarSplitterWidth.spec.ts
  • browser_tests/tests/subgraph/subgraphBreadcrumb.spec.ts
  • browser_tests/tests/subgraph/subgraphPromotion.spec.ts
  • browser_tests/tests/subgraph/subgraphSerialization.spec.ts
  • browser_tests/tests/subgraph/subgraphZeroUuid.spec.ts
  • browser_tests/tests/versionMismatchWarnings.spec.ts
  • browser_tests/tests/vueNodes/groups/groups.spec.ts
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
  • browser_tests/tests/vueNodes/interactions/node/move.spec.ts
  • browser_tests/tests/vueNodes/widgets/legacy.spec.ts
  • browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts
  • browser_tests/tests/widget.spec.ts
  • browser_tests/tests/workflowPersistence.spec.ts
  • browser_tests/utils/backupUtils.ts
  • packages/shared-frontend-utils/src/formatUtil.ts
  • packages/shared-frontend-utils/src/networkUtil.ts
  • scripts/check-unused-i18n-keys.ts
  • scripts/collect-i18n-general.ts
  • scripts/size-report.js
  • src/App.vue
  • src/base/common/downloadUtil.ts
  • src/base/credits/comfyCredits.ts
  • src/base/wheelGestures.ts
  • src/components/MenuHamburger.vue
  • src/components/TopMenuSection.test.ts
  • src/components/TopMenuSection.vue
  • src/components/actionbar/BatchCountEdit.vue
  • src/components/actionbar/ComfyActionbar.test.ts
  • src/components/actionbar/ComfyActionbar.vue
  • src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue
  • src/components/bottomPanel/BottomPanel.vue
  • src/components/bottomPanel/tabs/shortcuts/ShortcutsList.vue
  • src/components/bottomPanel/tabs/terminal/BaseTerminal.vue
  • src/components/bottomPanel/tabs/terminal/CommandTerminal.vue
  • src/components/bottomPanel/tabs/terminal/LogsTerminal.test.ts
  • src/components/bottomPanel/tabs/terminal/LogsTerminal.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/builder/AppModeWidgetList.vue
  • src/components/builder/useAppModeWidgetResizing.ts
  • src/components/card/Card.stories.ts
  • src/components/common/BackgroundImageUpload.vue
  • src/components/common/CustomizationDialog.vue
  • src/components/common/DeviceInfo.vue
  • src/components/common/ExtensionSlot.vue
  • src/components/common/FormImageUpload.vue
  • src/components/common/InputKnob.vue
  • src/components/common/InputSlider.vue
  • src/components/common/LazyImage.vue
  • src/components/common/TreeExplorer.vue
  • src/components/common/TreeExplorerTreeNode.vue
  • src/components/common/TreeExplorerV2Node.vue
  • src/components/common/UrlInput.vue
  • src/components/common/UserAvatar.vue
  • src/components/common/UserCredit.test.ts
  • src/components/custom/widget/WorkflowTemplateSelectorDialog.vue
  • src/components/dialog/UnloadWindowConfirmDialog.vue
  • src/components/dialog/content/ApiNodesSignInContent.vue
  • src/components/dialog/content/ConfirmationDialogContent.vue
  • src/components/dialog/content/ErrorDialogContent.vue
  • src/components/dialog/content/SignInContent.vue
  • src/components/dialog/content/UpdatePasswordContent.vue
  • src/components/dialog/content/setting/CurrentUserMessage.vue
  • src/components/dialog/content/setting/LegacyCreditsPanel.vue
  • src/components/dialog/content/setting/UsageLogsTable.vue
  • src/components/dialog/content/signin/ApiKeyForm.vue
  • src/components/dialog/content/signin/SignInForm.vue
  • src/components/graph/CanvasModeSelector.vue
  • src/components/graph/DomWidgets.vue
  • src/components/graph/GraphCanvas.vue
  • src/components/graph/GraphCanvasMenu.vue
  • src/components/graph/NodeContextMenu.vue
  • src/components/graph/NodeTooltip.vue
  • src/components/graph/TitleEditor.vue
  • src/components/graph/modals/ZoomControlsModal.vue
  • src/components/graph/selectionToolbox/BypassButton.vue
  • src/components/graph/selectionToolbox/ColorPickerButton.vue
  • src/components/graph/selectionToolbox/ConfigureSubgraph.vue
  • src/components/graph/selectionToolbox/ExecuteButton.test.ts
  • src/components/graph/selectionToolbox/ExecuteButton.vue
  • src/components/graph/selectionToolbox/InfoButton.test.ts
  • src/components/graph/selectionToolbox/InfoButton.vue
  • src/components/graph/selectionToolbox/Load3DViewerButton.vue
  • src/components/graph/selectionToolbox/MaskEditorButton.test.ts
  • src/components/graph/selectionToolbox/MaskEditorButton.vue
  • src/components/graph/selectionToolbox/NodeOptionsButton.vue
  • src/components/graph/selectionToolbox/SubmenuPopover.vue
  • src/components/graph/widgets/DomWidget.vue
  • src/components/graph/widgets/TextPreviewWidget.test.ts
  • src/components/helpcenter/HelpCenterMenuContent.vue
  • src/components/load3d/Load3DControls.vue
  • src/components/load3d/Load3dViewerContent.vue
  • src/components/load3d/controls/CameraControls.vue
  • src/components/load3d/controls/GizmoControls.vue
  • src/components/load3d/controls/PopupSlider.vue
  • src/components/load3d/controls/SceneControls.vue
  • src/components/load3d/controls/ViewerControls.vue
  • src/components/load3d/controls/viewer/ViewerExportControls.vue
  • src/components/load3d/controls/viewer/ViewerSceneControls.vue
  • src/components/maskeditor/BrushCursor.test.ts
  • src/components/maskeditor/BrushSettingsPanel.test.ts
  • src/components/maskeditor/BrushSettingsPanel.vue
  • src/components/maskeditor/ColorSelectSettingsPanel.test.ts
  • src/components/maskeditor/ColorSelectSettingsPanel.vue
  • src/components/maskeditor/ImageLayerSettingsPanel.test.ts
  • src/components/maskeditor/ImageLayerSettingsPanel.vue
  • src/components/maskeditor/MaskEditorContent.test.ts
  • src/components/maskeditor/MaskEditorContent.vue
  • src/components/maskeditor/PaintBucketSettingsPanel.test.ts
  • src/components/maskeditor/PaintBucketSettingsPanel.vue
  • src/components/maskeditor/PointerZone.test.ts
  • src/components/maskeditor/PointerZone.vue
  • src/components/maskeditor/ToolPanel.test.ts
  • src/components/maskeditor/ToolPanel.vue
  • src/components/maskeditor/controls/DropdownControl.test.ts
  • src/components/maskeditor/controls/DropdownControl.vue
  • src/components/maskeditor/controls/SliderControl.test.ts
  • src/components/maskeditor/controls/SliderControl.vue
  • src/components/maskeditor/controls/ToggleControl.test.ts
  • src/components/maskeditor/controls/ToggleControl.vue
  • src/components/maskeditor/dialog/TopBarHeader.test.ts
  • src/components/maskeditor/dialog/TopBarHeader.vue
  • src/components/node/NodePreview.vue
  • src/components/queue/JobHistoryActionsMenu.test.ts
  • src/components/queue/JobHistoryActionsMenu.vue
  • src/components/queue/QueueNotificationBanner.stories.ts
  • src/components/queue/QueueOverlayActive.test.ts
  • src/components/queue/QueueOverlayExpanded.vue
  • src/components/queue/QueueOverlayHeader.test.ts
  • src/components/queue/QueueProgressOverlay.vue
  • src/components/queue/dialogs/QueueClearHistoryDialog.vue
  • src/components/queue/job/JobAssetsList.test.ts
  • src/components/queue/job/JobContextMenu.test.ts
  • src/components/queue/job/JobDetailsPopover.vue
  • src/components/queue/job/JobFilterActions.vue
  • src/components/queue/job/JobFilterTabs.vue
  • src/components/queue/job/useJobErrorReporting.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • src/components/queue/job/useQueueEstimates.test.ts
  • src/components/queue/job/useQueueEstimates.ts
  • src/components/rightSidePanel/errors/swapNodeGroups.test.ts
  • src/components/rightSidePanel/errors/useErrorGroups.test.ts
  • src/components/rightSidePanel/errors/useErrorReport.test.ts
  • src/components/rightSidePanel/shared.test.ts
  • src/components/searchbox/NodeSearchBox.vue
  • src/components/searchbox/NodeSearchFilter.vue
  • src/components/searchbox/v2/NodeSearchCategorySidebar.test.ts
  • src/components/searchbox/v2/NodeSearchCategorySidebar.vue
  • src/components/searchbox/v2/NodeSearchContent.test.ts
  • src/components/searchbox/v2/NodeSearchFilterBar.test.ts
  • src/components/sidebar/ComfyMenuButton.vue
  • src/components/sidebar/SideToolbar.vue
  • src/components/sidebar/SidebarBottomPanelToggleButton.vue
  • src/components/sidebar/SidebarLogoutIcon.vue
  • src/components/sidebar/SidebarSettingsButton.vue
  • src/components/sidebar/SidebarShortcutsToggleButton.vue
  • src/components/sidebar/SidebarTemplatesButton.vue
  • src/components/sidebar/tabs/AssetsSidebarListView.test.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.ts
  • src/components/sidebar/tabs/BaseWorkflowsSidebarTab.vue
  • src/components/sidebar/tabs/JobHistorySidebarTab.vue
  • src/components/sidebar/tabs/ModelLibrarySidebarTab.vue
  • src/components/sidebar/tabs/NodeLibrarySidebarTab.vue
  • src/components/sidebar/tabs/modelLibrary/DownloadItem.vue
  • src/components/sidebar/tabs/modelLibrary/ModelTreeLeaf.vue
  • src/components/sidebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vue
  • src/components/sidebar/tabs/nodeLibrary/NodeTreeFolder.vue
  • src/components/sidebar/tabs/nodeLibrary/NodeTreeLeaf.vue
  • src/components/sidebar/tabs/queue/MediaLightbox.test.ts
  • src/components/sidebar/tabs/workflows/WorkflowTreeLeaf.vue
  • src/components/tab/TabList.stories.ts
  • src/components/templates/thumbnails/CompareSliderThumbnail.test.ts
  • src/components/templates/thumbnails/HoverDissolveThumbnail.test.ts
  • src/components/toast/RerouteMigrationToast.vue
  • src/components/topbar/CurrentUserButton.vue
  • src/components/topbar/CurrentUserPopoverLegacy.vue
  • src/components/topbar/LoginButton.vue
  • src/components/topbar/TopbarBadge.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/topbar/WorkflowTabPopover.vue
  • src/components/topbar/WorkflowTabs.vue
  • src/components/ui/search-input/AsyncSearchInput.test.ts
  • src/components/ui/select/SelectDropdown.stories.ts
  • src/components/ui/slider/Slider.vue
  • src/components/widget/layout/BaseModalLayout.stories.ts
  • src/components/widget/layout/BaseModalLayout.vue
  • src/components/widget/nav/NavItem.vue
  • src/components/widget/nav/NavTitle.vue
  • src/components/widget/panel/LeftSidePanel.vue
  • src/composables/auth/useAuthActions.ts
  • src/composables/auth/useCurrentUser.ts
  • src/composables/billing/useBillingContext.ts
  • src/composables/bottomPanelTabs/useLogsTerminal.ts
  • src/composables/bottomPanelTabs/useShortcutsTab.ts
  • src/composables/bottomPanelTabs/useTerminal.ts
  • src/composables/canvas/useSelectedLiteGraphItems.ts
  • src/composables/canvas/useSelectionToolboxPosition.ts
  • src/composables/element/useAbsolutePosition.ts
  • src/composables/element/useCanvasPositionConversion.ts
  • src/composables/element/useDomClipping.ts
  • src/composables/element/useOverflowObserver.ts
  • src/composables/functional/useChainCallback.test.ts
  • src/composables/graph/contextMenuConverter.test.ts
  • src/composables/graph/contextMenuConverter.ts
  • src/composables/graph/useCanvasRefresh.ts
  • src/composables/graph/useFrameNodes.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/composables/graph/useGroupMenuOptions.ts
  • src/composables/graph/useImageMenuOptions.ts
  • src/composables/graph/useMoreOptionsMenu.ts
  • src/composables/graph/useNodeArrangement.ts
  • src/composables/graph/useNodeCustomization.ts
  • src/composables/graph/useNodeMenuOptions.ts
  • src/composables/graph/useSelectedNodeActions.ts
  • src/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionOperations.ts
  • src/composables/graph/useSelectionState.ts
  • src/composables/graph/useSubgraphOperations.ts
  • src/composables/graph/useVueNodeLifecycle.ts
  • src/composables/maskeditor/splineUtils.ts
  • src/composables/maskeditor/useBrushPersistence.test.ts
  • src/composables/maskeditor/useCanvasHistory.test.ts
  • src/composables/maskeditor/useCanvasHistory.ts
  • src/composables/maskeditor/useCanvasManager.ts
  • src/composables/maskeditor/useCanvasTools.ts
  • src/composables/maskeditor/useCanvasTransform.test.ts
  • src/composables/maskeditor/useCanvasTransform.ts

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
Codemod converted typed const-arrow getStaticPaths into untyped function
declarations, leaving the GetStaticPaths import unused in 7 astro pages.
@glary-bot

glary-bot Bot commented May 20, 2026

Copy link
Copy Markdown

Triaged the CodeRabbit review:

Addressed (pushed):

  • Unused GetStaticPaths import in apps/website/src/pages/**/*.astro — confirmed introduced by the codemod (converted typed const-arrow into untyped function declaration, leaving the type import dangling). Dropped the import in all 7 astro pages.

Skipping (out of scope — pre-existing on main, not touched by this PR):

  • UnloadWindowConfirmDialog.vue:21-30 (set event.returnValue in beforeunload)
  • BackgroundImageUpload.vue:56-101 (localize toast strings via vue-i18n)
  • BaseTerminal.vue:72-88 (handle clipboard.writeText rejection)
  • InputKnob.vue:77-84 (side effect in displayValue formatter)

These are all flagged as "outside diff range" by CodeRabbit itself. Per AGENTS.md: "Only fix lint or test issues that are new to the current branch." Happy to file follow-ups if the team wants them addressed separately.

Skipping (not new):

  • useJobErrorReporting.test.ts:16-21 Partial<TaskItemImpl> as TaskItemImpl double-cast — the cast is pre-existing on main; only the function shape (const = () => → function) was changed by the codemod.

@DrJKL
DrJKL marked this pull request as ready for review May 20, 2026 06:02
@DrJKL
DrJKL requested a review from a team May 20, 2026 06:02
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 20, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
Codemod converted const-arrow findIndex into a function declaration,
which loses the outer 'if (!node) return null' narrowing of node when
the inner function captures it. Capture into a typed local first.
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
Two new const-arrow expressions landed via the merged subgraph IO PR
in browser_tests/tests/subgraph/subgraphSlots.spec.ts; convert them
to function declarations to satisfy func-style.
@DrJKL

DrJKL commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing because @AustinMroz hates me and wants me to continue to suffer.

@DrJKL DrJKL closed this May 28, 2026
@glary-bot

glary-bot Bot commented May 28, 2026

Copy link
Copy Markdown

😄 Noted — closing it is. Branch + codemod left intact in case the team wants to revisit later (with allowArrowFunctions: true, with per-file disables for the gnarly cases, or staged file-by-file). Just ping if it should be reopened.

kaili-yang pushed a commit to kaili-yang/ComfyUI_frontend that referenced this pull request Oct 7, 2026
…plan's prices as numbers (Comfy-Org#20448)

## Why
The bot sync Comfy-Org#20408 (cloud@7c76793) is red, and the 1.56 QA fixes stack
on these types (FE-3293 Comfy-Org#20430; FE-3292 next). cloud#12343 / Comfy-Org#12371
added `cancelable` and the op plan's `tier` / `price_cents` /
`monthly_price_cents` / `currency` / `team_credit_stop_id` to
`BillingOpStatusResponse`.

## Root cause
The new plan prices are int64, so the generated zod coerces them to
`bigint`, while the generated TS type says `number`.
`BillingOpStatusSchema` in account-core already maps the other cents
fields through `wireCents`, but not these two, so `BillingOpStatus`
stopped accepting a `BillingOpStatusResponse` (typecheck failure in
`customerActionParity.test.ts`).

## How
- The bot's regenerated `packages/ingest-types`, unchanged.
- `BillingOpStatusSchema` extends `plan` with `price_cents` /
`monthly_price_cents` read through `wireCents`, the same way as
`amount_charged_cents` and `credits_added`.

## AS IS / TO BE
Not user-facing: types plus schema only. AS IS is CI typecheck red on
Comfy-Org#20408; TO BE is green here.

## Test plan
- [x] account-core `src/core/billing`: 736 passed
- [x] `typecheck:app` and `typecheck:account-core` (pre-commit)

Supersedes Comfy-Org#20408.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants