Repository navigation
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughEnforces 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. ChangesUnified function declaration refactor
Sequence Diagram(s)(omitted; no multi-component control-flow changes) Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
🌐 Website E2ETip All tests passed.
🔗 Website PreviewWebsite 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 |
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 1625 passed, 0 failed · 3 flaky📊 Browser Reports
|
There was a problem hiding this comment.
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 winSet
event.returnValueinbeforeunloadhandler for cross-browser reliability.
preventDefault()plusreturn trueis not consistently sufficient for unload prompts. Setevent.returnValueexplicitly 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 winLocalize toast error strings instead of hardcoding English text.
The alert messages are user-facing and should go through
vue-i18nrather 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 winHandle 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 winRemove the side effect from the
displayValueformatter function.The
displayValuefunction is passed as:value-templateto the Knob component and is called during every render to format the display text. CallingupdateValue(value)within it causes unnecessary state mutations andupdate:modelValueemissions on every render, creating render churn. State updates are already properly handled by the@update:model-valueevent handlers on both components. Remove theupdateValue(value)call to keepdisplayValueas 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 valueUnused import:
GetStaticPathstype is no longer used.The
GetStaticPathstype was used in the previous typed function expression but is now unused after converting to an untyped function declaration.Consider either:
- Removing the unused import, or
- 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 winAvoid double-cast in the test factory; prefer a
satisfies-validated shape.This keeps the helper strongly typed and prevents silent drift as
TaskItemImplevolves.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
📒 Files selected for processing (300)
.oxlintrc.json.storybook/preview.tsapps/desktop-ui/.storybook/preview.tsapps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vueapps/desktop-ui/src/components/common/UrlInput.vueapps/desktop-ui/src/components/install/DesktopSettingsConfiguration.vueapps/desktop-ui/src/components/install/InstallLocationPicker.vueapps/desktop-ui/src/components/install/MigrationPicker.vueapps/desktop-ui/src/components/maintenance/TaskListItem.vueapps/desktop-ui/src/components/maintenance/TaskListPanel.vueapps/desktop-ui/src/components/maintenance/TerminalOutputDrawer.vueapps/desktop-ui/src/composables/bottomPanelTabs/useTerminal.tsapps/desktop-ui/src/composables/bottomPanelTabs/useTerminalBuffer.tsapps/desktop-ui/src/constants/desktopMaintenanceTasks.tsapps/desktop-ui/src/stores/maintenanceTaskStore.tsapps/desktop-ui/src/utils/electronMirrorCheck.tsapps/desktop-ui/src/views/DesktopDialogView.vueapps/desktop-ui/src/views/DesktopUpdateView.vueapps/desktop-ui/src/views/DownloadGitView.vueapps/desktop-ui/src/views/InstallView.stories.tsapps/desktop-ui/src/views/InstallView.vueapps/desktop-ui/src/views/MaintenanceView.stories.tsapps/desktop-ui/src/views/MaintenanceView.vueapps/desktop-ui/src/views/ManualConfigurationView.vueapps/desktop-ui/src/views/MetricsConsentView.vueapps/desktop-ui/src/views/NotSupportedView.vueapps/desktop-ui/src/views/ServerStartView.vueapps/desktop-ui/src/views/WelcomeView.vueapps/website/e2e/demos.spec.tsapps/website/e2e/responsive.spec.tsapps/website/src/components/careers/RolesSection.vueapps/website/src/components/product/local/HeroSection.vueapps/website/src/composables/useParallax.tsapps/website/src/composables/usePinScrub.tsapps/website/src/pages/cloud/supported-nodes/[pack].astroapps/website/src/pages/customers/[slug].astroapps/website/src/pages/demos/[slug].astroapps/website/src/pages/p/supported-models/[slug].astroapps/website/src/pages/zh-CN/cloud/supported-nodes/[pack].astroapps/website/src/pages/zh-CN/customers/[slug].astroapps/website/src/pages/zh-CN/demos/[slug].astroapps/website/src/scripts/snakeGame.tsbrowser_tests/fixtures/helpers/AssetHelper.tsbrowser_tests/fixtures/helpers/AssetsHelper.tsbrowser_tests/fixtures/helpers/NodeReplacementHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/helpers/TemplateHelper.tsbrowser_tests/fixtures/sharedWorkflowImportFixture.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/tests/actionbar.spec.tsbrowser_tests/tests/canvasLayoutSettings.spec.tsbrowser_tests/tests/canvasModeSelector.spec.tsbrowser_tests/tests/canvasSettings.spec.tsbrowser_tests/tests/changeTracker.spec.tsbrowser_tests/tests/defaultKeybindings.spec.tsbrowser_tests/tests/dialog.spec.tsbrowser_tests/tests/groupCopyPaste.spec.tsbrowser_tests/tests/groupNode.spec.tsbrowser_tests/tests/imageCompare.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/load3d/gizmoControls.spec.tsbrowser_tests/tests/load3d/load3d.spec.tsbrowser_tests/tests/nodeHelp.spec.tsbrowser_tests/tests/nodeSearchBox.spec.tsbrowser_tests/tests/nodeSearchBoxV2.spec.tsbrowser_tests/tests/nodeSearchBoxV2Extended.spec.tsbrowser_tests/tests/painter.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingMediaRuntime.spec.tsbrowser_tests/tests/queueNotificationBanners.spec.tsbrowser_tests/tests/remoteWidgets.spec.tsbrowser_tests/tests/selectionToolbox.spec.tsbrowser_tests/tests/selectionToolboxSubmenus.spec.tsbrowser_tests/tests/sidebar/sidebarSplitterWidth.spec.tsbrowser_tests/tests/subgraph/subgraphBreadcrumb.spec.tsbrowser_tests/tests/subgraph/subgraphPromotion.spec.tsbrowser_tests/tests/subgraph/subgraphSerialization.spec.tsbrowser_tests/tests/subgraph/subgraphZeroUuid.spec.tsbrowser_tests/tests/versionMismatchWarnings.spec.tsbrowser_tests/tests/vueNodes/groups/groups.spec.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.tsbrowser_tests/tests/vueNodes/interactions/node/move.spec.tsbrowser_tests/tests/vueNodes/widgets/legacy.spec.tsbrowser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.tsbrowser_tests/tests/widget.spec.tsbrowser_tests/tests/workflowPersistence.spec.tsbrowser_tests/utils/backupUtils.tspackages/shared-frontend-utils/src/formatUtil.tspackages/shared-frontend-utils/src/networkUtil.tsscripts/check-unused-i18n-keys.tsscripts/collect-i18n-general.tsscripts/size-report.jssrc/App.vuesrc/base/common/downloadUtil.tssrc/base/credits/comfyCredits.tssrc/base/wheelGestures.tssrc/components/MenuHamburger.vuesrc/components/TopMenuSection.test.tssrc/components/TopMenuSection.vuesrc/components/actionbar/BatchCountEdit.vuesrc/components/actionbar/ComfyActionbar.test.tssrc/components/actionbar/ComfyActionbar.vuesrc/components/actionbar/ComfyRunButton/ComfyQueueButton.vuesrc/components/bottomPanel/BottomPanel.vuesrc/components/bottomPanel/tabs/shortcuts/ShortcutsList.vuesrc/components/bottomPanel/tabs/terminal/BaseTerminal.vuesrc/components/bottomPanel/tabs/terminal/CommandTerminal.vuesrc/components/bottomPanel/tabs/terminal/LogsTerminal.test.tssrc/components/bottomPanel/tabs/terminal/LogsTerminal.vuesrc/components/breadcrumb/SubgraphBreadcrumb.vuesrc/components/breadcrumb/SubgraphBreadcrumbItem.vuesrc/components/builder/AppModeWidgetList.vuesrc/components/builder/useAppModeWidgetResizing.tssrc/components/card/Card.stories.tssrc/components/common/BackgroundImageUpload.vuesrc/components/common/CustomizationDialog.vuesrc/components/common/DeviceInfo.vuesrc/components/common/ExtensionSlot.vuesrc/components/common/FormImageUpload.vuesrc/components/common/InputKnob.vuesrc/components/common/InputSlider.vuesrc/components/common/LazyImage.vuesrc/components/common/TreeExplorer.vuesrc/components/common/TreeExplorerTreeNode.vuesrc/components/common/TreeExplorerV2Node.vuesrc/components/common/UrlInput.vuesrc/components/common/UserAvatar.vuesrc/components/common/UserCredit.test.tssrc/components/custom/widget/WorkflowTemplateSelectorDialog.vuesrc/components/dialog/UnloadWindowConfirmDialog.vuesrc/components/dialog/content/ApiNodesSignInContent.vuesrc/components/dialog/content/ConfirmationDialogContent.vuesrc/components/dialog/content/ErrorDialogContent.vuesrc/components/dialog/content/SignInContent.vuesrc/components/dialog/content/UpdatePasswordContent.vuesrc/components/dialog/content/setting/CurrentUserMessage.vuesrc/components/dialog/content/setting/LegacyCreditsPanel.vuesrc/components/dialog/content/setting/UsageLogsTable.vuesrc/components/dialog/content/signin/ApiKeyForm.vuesrc/components/dialog/content/signin/SignInForm.vuesrc/components/graph/CanvasModeSelector.vuesrc/components/graph/DomWidgets.vuesrc/components/graph/GraphCanvas.vuesrc/components/graph/GraphCanvasMenu.vuesrc/components/graph/NodeContextMenu.vuesrc/components/graph/NodeTooltip.vuesrc/components/graph/TitleEditor.vuesrc/components/graph/modals/ZoomControlsModal.vuesrc/components/graph/selectionToolbox/BypassButton.vuesrc/components/graph/selectionToolbox/ColorPickerButton.vuesrc/components/graph/selectionToolbox/ConfigureSubgraph.vuesrc/components/graph/selectionToolbox/ExecuteButton.test.tssrc/components/graph/selectionToolbox/ExecuteButton.vuesrc/components/graph/selectionToolbox/InfoButton.test.tssrc/components/graph/selectionToolbox/InfoButton.vuesrc/components/graph/selectionToolbox/Load3DViewerButton.vuesrc/components/graph/selectionToolbox/MaskEditorButton.test.tssrc/components/graph/selectionToolbox/MaskEditorButton.vuesrc/components/graph/selectionToolbox/NodeOptionsButton.vuesrc/components/graph/selectionToolbox/SubmenuPopover.vuesrc/components/graph/widgets/DomWidget.vuesrc/components/graph/widgets/TextPreviewWidget.test.tssrc/components/helpcenter/HelpCenterMenuContent.vuesrc/components/load3d/Load3DControls.vuesrc/components/load3d/Load3dViewerContent.vuesrc/components/load3d/controls/CameraControls.vuesrc/components/load3d/controls/GizmoControls.vuesrc/components/load3d/controls/PopupSlider.vuesrc/components/load3d/controls/SceneControls.vuesrc/components/load3d/controls/ViewerControls.vuesrc/components/load3d/controls/viewer/ViewerExportControls.vuesrc/components/load3d/controls/viewer/ViewerSceneControls.vuesrc/components/maskeditor/BrushCursor.test.tssrc/components/maskeditor/BrushSettingsPanel.test.tssrc/components/maskeditor/BrushSettingsPanel.vuesrc/components/maskeditor/ColorSelectSettingsPanel.test.tssrc/components/maskeditor/ColorSelectSettingsPanel.vuesrc/components/maskeditor/ImageLayerSettingsPanel.test.tssrc/components/maskeditor/ImageLayerSettingsPanel.vuesrc/components/maskeditor/MaskEditorContent.test.tssrc/components/maskeditor/MaskEditorContent.vuesrc/components/maskeditor/PaintBucketSettingsPanel.test.tssrc/components/maskeditor/PaintBucketSettingsPanel.vuesrc/components/maskeditor/PointerZone.test.tssrc/components/maskeditor/PointerZone.vuesrc/components/maskeditor/ToolPanel.test.tssrc/components/maskeditor/ToolPanel.vuesrc/components/maskeditor/controls/DropdownControl.test.tssrc/components/maskeditor/controls/DropdownControl.vuesrc/components/maskeditor/controls/SliderControl.test.tssrc/components/maskeditor/controls/SliderControl.vuesrc/components/maskeditor/controls/ToggleControl.test.tssrc/components/maskeditor/controls/ToggleControl.vuesrc/components/maskeditor/dialog/TopBarHeader.test.tssrc/components/maskeditor/dialog/TopBarHeader.vuesrc/components/node/NodePreview.vuesrc/components/queue/JobHistoryActionsMenu.test.tssrc/components/queue/JobHistoryActionsMenu.vuesrc/components/queue/QueueNotificationBanner.stories.tssrc/components/queue/QueueOverlayActive.test.tssrc/components/queue/QueueOverlayExpanded.vuesrc/components/queue/QueueOverlayHeader.test.tssrc/components/queue/QueueProgressOverlay.vuesrc/components/queue/dialogs/QueueClearHistoryDialog.vuesrc/components/queue/job/JobAssetsList.test.tssrc/components/queue/job/JobContextMenu.test.tssrc/components/queue/job/JobDetailsPopover.vuesrc/components/queue/job/JobFilterActions.vuesrc/components/queue/job/JobFilterTabs.vuesrc/components/queue/job/useJobErrorReporting.test.tssrc/components/queue/job/useJobErrorReporting.tssrc/components/queue/job/useQueueEstimates.test.tssrc/components/queue/job/useQueueEstimates.tssrc/components/rightSidePanel/errors/swapNodeGroups.test.tssrc/components/rightSidePanel/errors/useErrorGroups.test.tssrc/components/rightSidePanel/errors/useErrorReport.test.tssrc/components/rightSidePanel/shared.test.tssrc/components/searchbox/NodeSearchBox.vuesrc/components/searchbox/NodeSearchFilter.vuesrc/components/searchbox/v2/NodeSearchCategorySidebar.test.tssrc/components/searchbox/v2/NodeSearchCategorySidebar.vuesrc/components/searchbox/v2/NodeSearchContent.test.tssrc/components/searchbox/v2/NodeSearchFilterBar.test.tssrc/components/sidebar/ComfyMenuButton.vuesrc/components/sidebar/SideToolbar.vuesrc/components/sidebar/SidebarBottomPanelToggleButton.vuesrc/components/sidebar/SidebarLogoutIcon.vuesrc/components/sidebar/SidebarSettingsButton.vuesrc/components/sidebar/SidebarShortcutsToggleButton.vuesrc/components/sidebar/SidebarTemplatesButton.vuesrc/components/sidebar/tabs/AssetsSidebarListView.test.tssrc/components/sidebar/tabs/AssetsSidebarTab.vuesrc/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.tssrc/components/sidebar/tabs/BaseWorkflowsSidebarTab.vuesrc/components/sidebar/tabs/JobHistorySidebarTab.vuesrc/components/sidebar/tabs/ModelLibrarySidebarTab.vuesrc/components/sidebar/tabs/NodeLibrarySidebarTab.vuesrc/components/sidebar/tabs/modelLibrary/DownloadItem.vuesrc/components/sidebar/tabs/modelLibrary/ModelTreeLeaf.vuesrc/components/sidebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vuesrc/components/sidebar/tabs/nodeLibrary/NodeTreeFolder.vuesrc/components/sidebar/tabs/nodeLibrary/NodeTreeLeaf.vuesrc/components/sidebar/tabs/queue/MediaLightbox.test.tssrc/components/sidebar/tabs/workflows/WorkflowTreeLeaf.vuesrc/components/tab/TabList.stories.tssrc/components/templates/thumbnails/CompareSliderThumbnail.test.tssrc/components/templates/thumbnails/HoverDissolveThumbnail.test.tssrc/components/toast/RerouteMigrationToast.vuesrc/components/topbar/CurrentUserButton.vuesrc/components/topbar/CurrentUserPopoverLegacy.vuesrc/components/topbar/LoginButton.vuesrc/components/topbar/TopbarBadge.vuesrc/components/topbar/WorkflowTab.vuesrc/components/topbar/WorkflowTabPopover.vuesrc/components/topbar/WorkflowTabs.vuesrc/components/ui/search-input/AsyncSearchInput.test.tssrc/components/ui/select/SelectDropdown.stories.tssrc/components/ui/slider/Slider.vuesrc/components/widget/layout/BaseModalLayout.stories.tssrc/components/widget/layout/BaseModalLayout.vuesrc/components/widget/nav/NavItem.vuesrc/components/widget/nav/NavTitle.vuesrc/components/widget/panel/LeftSidePanel.vuesrc/composables/auth/useAuthActions.tssrc/composables/auth/useCurrentUser.tssrc/composables/billing/useBillingContext.tssrc/composables/bottomPanelTabs/useLogsTerminal.tssrc/composables/bottomPanelTabs/useShortcutsTab.tssrc/composables/bottomPanelTabs/useTerminal.tssrc/composables/canvas/useSelectedLiteGraphItems.tssrc/composables/canvas/useSelectionToolboxPosition.tssrc/composables/element/useAbsolutePosition.tssrc/composables/element/useCanvasPositionConversion.tssrc/composables/element/useDomClipping.tssrc/composables/element/useOverflowObserver.tssrc/composables/functional/useChainCallback.test.tssrc/composables/graph/contextMenuConverter.test.tssrc/composables/graph/contextMenuConverter.tssrc/composables/graph/useCanvasRefresh.tssrc/composables/graph/useFrameNodes.tssrc/composables/graph/useGraphNodeManager.tssrc/composables/graph/useGroupMenuOptions.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/graph/useMoreOptionsMenu.tssrc/composables/graph/useNodeArrangement.tssrc/composables/graph/useNodeCustomization.tssrc/composables/graph/useNodeMenuOptions.tssrc/composables/graph/useSelectedNodeActions.tssrc/composables/graph/useSelectionMenuOptions.tssrc/composables/graph/useSelectionOperations.tssrc/composables/graph/useSelectionState.tssrc/composables/graph/useSubgraphOperations.tssrc/composables/graph/useVueNodeLifecycle.tssrc/composables/maskeditor/splineUtils.tssrc/composables/maskeditor/useBrushPersistence.test.tssrc/composables/maskeditor/useCanvasHistory.test.tssrc/composables/maskeditor/useCanvasHistory.tssrc/composables/maskeditor/useCanvasManager.tssrc/composables/maskeditor/useCanvasTools.tssrc/composables/maskeditor/useCanvasTransform.test.tssrc/composables/maskeditor/useCanvasTransform.ts
Codemod converted typed const-arrow getStaticPaths into untyped function declarations, leaving the GetStaticPaths import unused in 7 astro pages.
|
Triaged the CodeRabbit review: Addressed (pushed):
Skipping (out of scope — pre-existing on
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):
|
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.
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.
|
Closing because @AustinMroz hates me and wants me to continue to suffer. |
|
😄 Noted — closing it is. Branch + codemod left intact in case the team wants to revisit later (with |
…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>
PR Created by the Glary-Bot Agent
Summary
Enables
eslint/func-stylein oxlint withdeclarationmode 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
"func-style": ["error", "declaration"]to.oxlintrc.jsonsrc/lib/litegraph/**via overridesrc/,browser_tests/,apps/,packages/, andscripts/fromconst foo = () => {}/const foo = function() {}patterns tofunction foo() {}declarationslet cleanup = () => {}reassignable placeholders → file-localfunction noop*()declaration + typedletconstso inner function declarations preserve narrowing (useCurveEditor,useRangeEditor,useNodeResize,useAppModeWidgetResizing)useBooleanWidget,useComboWidget,useFloatWidget,useIntWidget,useStringWidget,useMarkdownWidget,useImagePreviewWidget,useImageUploadWidget) → return value typed viasatisfies/asto keepComfyWidgetConstructor[V2]contractConfirmationDialogContent.vue: renamed localonConfirm→handleConfirmto avoidvue/no-dupe-keyscollision with theonConfirmprop now that it's a function declarationImpactTelemetryProvider.{ts,test.ts}: kept the self-referencingqueueFn.a ??= []pattern with a hoisted declaration +as NonNullable<Window['ire']>castReview Focus
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-styleflagsconst X = () => {}even inside function bodies, so this touches many nested helpers — the codemod ran iteratively to handle nesting safely.src/lib/litegraph/**tree is intentionally excluded via override; it can be migrated in a follow-up if desired.no-console,no-floating-promises,no-explicit-any) are unchanged vs.main.Verification
pnpm dlx oxlint --config .oxlintrc.json→ 0func-styleviolations (was 2,261)pnpm typecheck→ passespnpm lint→ 0 errors, 3 warnings (same as baseline)pnpm knip→ passespnpm test:unit→ 10,796 passed, 8 skippedpnpm build→ succeedspnpm format:check→ passes┆Issue is synchronized with this Notion page by Unito