Commit Graph

748 Commits

Author SHA1 Message Date
Alexander Brown
fdbbddaf62 fix: include type augmentation files in browser_tests tsconfig
- Add src/types/**/*.d.ts and global.d.ts to include array

- Use vue-tsc for typecheck:browser to match main typecheck

- Fixes ~160 src/ type errors in browser test compilation

Amp-Thread-ID: https://ampcode.com/threads/T-019c16af-3867-74d9-9242-e3fa8e17947e
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 21:57:52 -08:00
Alexander Brown
9cbba233aa fix: replace unsupported _vue selector with getByLabel in VueNodeHelpers
Amp-Thread-ID: https://ampcode.com/threads/T-019c169e-9615-7608-9421-0c009920efe4
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 21:57:50 -08:00
github-actions
03d54833d4 [automated] Update test expectations 2026-02-01 01:13:52 +00:00
Alexander Brown
818d0ef5f6 fix: update nodeLibrary customize dialog selectors
Replace getByRole('radio') with button group selectors.

The Customize Folder dialog now uses PrimeVue SelectButton components instead of radio buttons.

Amp-Thread-ID: https://ampcode.com/threads/T-019c1698-7c35-747e-8b78-b9d47f49c950
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 16:33:12 -08:00
Alexander Brown
8ccc8b9d8f fix: browser test fixes and typecheck script
- Fix widgetTextBox locator in ComfyPage
- Add exact match for 'Add' button in search filter panel
- Fix ClipboardHelper to properly handle undefined vs null locators
- Use canvasOps.dragAndDrop in NodeOperationsHelper
- Use nodeOps.waitForGraphNodes in link interaction tests
- Add typecheck:browser script for browser tests

Amp-Thread-ID: https://ampcode.com/threads/T-019c1696-c595-7724-8dca-64f73f19f478
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 16:25:40 -08:00
Alexander Brown
959e91bf4d test: add BottomPanel page object for E2E tests
Extract repeated locators into BottomPanel and ShortcutsTab page objects.

Refactor bottomPanelShortcuts.spec.ts and menu.spec.ts to use the new page object.

Amp-Thread-ID: https://ampcode.com/threads/T-019c167b-dacb-706c-9626-4a31a1f6ab6e
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 16:05:37 -08:00
Alexander Brown
4e00e8428f refactor: wire helpers into ComfyPage and update test usages
Phase 2 of ComfyPage refactor:

- Add ToastHelper, DragDropHelper, CommandHelper instances to ComfyPage

- Remove migrated methods from ComfyPage (command, toast, dragDrop, workflow, canvasOps, nodeOps methods)

- Update all test files to use new helper paths

- Keep visibleToasts as passthrough getter for backward compatibility

Amp-Thread-ID: https://ampcode.com/threads/T-019c1666-ed27-773c-976a-07cc805d7a6c
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 15:44:57 -08:00
Alexander Brown
be7f5b30b7 refactor: create and extend browser test helpers for ComfyPage extraction
Phase 1 of ComfyPage refactor - extract method groups into helpers:

- New ToastHelper: toast error/visibility/close methods

- New DragDropHelper: file and URL drag-and-drop methods

- New CommandHelper: command execution and registration

- Extended WorkflowHelper: undo/redo queue, modified state, export

- Extended CanvasHelper: group position/drag, edge connect/disconnect

- Extended NodeOperationsHelper: prompt dialog, node drag, widget adjust

Amp-Thread-ID: https://ampcode.com/threads/T-019c165a-5aba-7582-9f2b-e5b2bba2783b
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 15:44:56 -08:00
GitHub Action
218fe314ee [automated] Apply ESLint and Oxfmt fixes 2026-01-31 23:17:30 +00:00
Alexander Brown
be427c325b refactor(tests): use DefaultGraphPositions constants for raw coordinates
- Replace hardcoded coordinates with DefaultGraphPositions references

- Fix y-coordinate inconsistency (625 vs 645) in emptyLatentWidgetClick usage

Amp-Thread-ID: https://ampcode.com/threads/T-019c161a-ed63-7545-bbd0-655efec143c4
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 14:39:22 -08:00
Alexander Brown
ccf459684e refactor: remove ComfyPage wrapper methods, use helpers directly
- Remove 27 deprecated/wrapper methods from ComfyPage
- Migrate callers to use helper classes directly:
  - keyboard.selectAll/bypass/undo/redo/moveUp/moveDown
  - clipboard.copy/paste
  - settings.setSetting/getSetting
  - workflow.loadWorkflow/deleteWorkflow/setupWorkflowsDirectory
  - contextMenu.clickMenuItem/clickLitegraphMenuItem
  - nodeOps.resizeNode with DefaultGraphPositions
  - canvasOps.clickEmptySpace with DefaultGraphPositions
- Replace deprecated node click methods with direct canvas clicks
- Replace position getter properties with DefaultGraphPositions imports

Amp-Thread-ID: https://ampcode.com/threads/T-019c15e7-2319-76ec-855e-098ec75ef18a
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 13:48:43 -08:00
Alexander Brown
c87b863a3b Use named imports. 2026-01-31 13:22:15 -08:00
Alexander Brown
5b6d1f5bdb refactor: inject KeyboardHelper into ClipboardHelper
Remove duplicated nextFrame and ctrlSend methods from ClipboardHelper
by delegating to KeyboardHelper instead.

Amp-Thread-ID: https://ampcode.com/threads/T-019c15b9-efed-72eb-b092-1e92a11f44e3
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 12:33:38 -08:00
Alexander Brown
98c90d16a0 test: remove unused select2Nodes and fix flaky timeout
- Remove select2Nodes helper method from NodeOperationsHelper
- Replace usages with selectNodes(['CLIP Text Encode (Prompt)'])
- Increase flaky timeout in mobileBaseline test from 256ms to 5000ms

Amp-Thread-ID: https://ampcode.com/threads/T-019c15b9-efed-72eb-b092-1e92a11f44e3
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 12:24:32 -08:00
Alexander Brown
7f2454efec fix(browser_tests): replace .nth() with semantic selectors
- Remove unused saveButton selector from ComfyMenu
- Replace widgetTextBox .nth(1) with node-scoped selector
- Replace .nth(3) toast selector with .p-toast-message filter
- Replace .nth(1) category selector with getByTestId
- Replace .nth(1) node selector with getNodeInFolder() helper
- Add nodeSelector(), folderSelector(), getNodeInFolder() methods
- Add saveButton and nodeLibrary TestIds to selectors.ts

Amp-Thread-ID: https://ampcode.com/threads/T-019c155c-92e1-76f3-b6ce-7fc3ffa11582
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 10:52:41 -08:00
Alexander Brown
22ff808d59 fix(browser_tests): use getByRole for interactive elements
Replace fragile CSS selectors with Playwright getByRole() for better

accessibility-based testing:

- bottomPanelShortcuts.spec.ts: button[aria-label] -> getByRole

- execution.spec.ts: .p-dialog-close-button -> getByRole

- backgroundImageUpload.spec.ts: button:has(.pi-*) -> getByRole

- nodeHelp.spec.ts: button:has(.pi-question) -> getByRole

- BaseDialog.ts: closeButton uses getByRole

- ComfyNodeSearchBox.ts: Add button uses getByRole

- Topbar.ts: close-button uses getByRole

Amp-Thread-ID: https://ampcode.com/threads/T-019c155c-92e1-76f3-b6ce-7fc3ffa11582
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 10:46:11 -08:00
Alexander Brown
2622b16571 test(browser): add ContextMenu page object (Phase 5.1)
Amp-Thread-ID: https://ampcode.com/threads/T-019c137b-34ba-736a-afb6-0a41baf9358f
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:58:23 -08:00
Alexander Brown
ea1d284b22 test(browser): add BaseDialog class (Phase 5.2)
Amp-Thread-ID: https://ampcode.com/threads/T-019c137b-34ba-736a-afb6-0a41baf9358f
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:57:43 -08:00
Alexander Brown
4ffbcc7165 test: add deprecation notices to legacy node click methods (Phase 4.5)
Amp-Thread-ID: https://ampcode.com/threads/T-019c1373-f6d0-7426-a3ee-5673891f9dcc
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:53:40 -08:00
Alexander Brown
aea5afa8f3 test: extract SettingsHelper from ComfyPage (Phase 4.1)
Amp-Thread-ID: https://ampcode.com/threads/T-019c1373-f6d0-7426-a3ee-5673891f9dcc
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:50:20 -08:00
Alexander Brown
10eddeb153 test: replace hardcoded positions with computed NodeReference positions
- nodeSearchBox.spec.ts: Use NodeReference.getOutput() for CLIP output slot position

- rightClickMenu.spec.ts: Use NodeReference.getTitlePosition() for node dragging

- Add getTitlePosition() helper to NodeReference for drag operations

Amp-Thread-ID: https://ampcode.com/threads/T-019c1367-6a59-7752-9329-17cbf152fc62
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:41:11 -08:00
Alexander Brown
062c4d3964 refactor: replace fragile CSS selectors in SidebarTab.ts and SettingDialog.ts
Amp-Thread-ID: https://ampcode.com/threads/T-019c1359-48cc-7676-abc8-2de8c57b52cf
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:26:28 -08:00
Alexander Brown
e193924a36 refactor: replace fragile CSS selectors with data-testid in ComfyPage.ts
Amp-Thread-ID: https://ampcode.com/threads/T-019c1359-48cc-7676-abc8-2de8c57b52cf
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:24:24 -08:00
Alexander Brown
4a155dd796 feat: add centralized test selectors constants file
Amp-Thread-ID: https://ampcode.com/threads/T-019c1359-48cc-7676-abc8-2de8c57b52cf
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:21:06 -08:00
Alexander Brown
b7986ae5f6 fix: remove setTimeout anti-patterns in test fixtures
Remove redundant setTimeout calls inside page.evaluate() in SubgraphHelper.ts.

The waits were unnecessary since proper Playwright waitForSelector calls already exist after the evaluate returns.

Amp-Thread-ID: https://ampcode.com/threads/T-019c134d-cf30-7028-aca7-cfc6227c90ef
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:17:40 -08:00
Alexander Brown
b01426be5d fix: remove setTimeout anti-pattern in toggleTheme
Amp-Thread-ID: https://ampcode.com/threads/T-019c134d-cf30-7028-aca7-cfc6227c90ef
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 01:17:00 -08:00
Alexander Brown
681709f8e7 refactor(browser_tests): remove deprecated proxy methods from ComfyPage
Migrate all test callers to use helper classes directly:

- nodeOps: getGraphNodesCount, getNodeRefById, selectNodes, etc.

- canvasOps: dragAndDrop, zoom, pan, resetView, etc.

- subgraph: rightClickInputSlot, connectToOutput, etc.

Reduces ComfyPage.ts from 1335 to 1085 lines (-250 lines).

Amp-Thread-ID: https://ampcode.com/threads/T-019c1318-58b7-757f-801c-5b676f0d3421
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 00:52:33 -08:00
Alexander Brown
2c7dad3088 refactor: extract NodeOperationsHelper from ComfyPage.ts
Phase 5 of ComfyPage refactoring: extracts node query, selection, resize, and group conversion operations into NodeOperationsHelper.

Methods extracted: getGraphNodesCount, getSelectedGraphNodesCount, getNodes, waitForGraphNodes, getFirstNodeRef, getNodeRefById, getNodeRefsByType, getNodeRefsByTitle, selectNodes, select2Nodes, resizeNode, convertAllNodesToGroupNode

ComfyPage.ts: 1383 -> 1329 lines (-54)

Amp-Thread-ID: https://ampcode.com/threads/T-019c1313-7d0e-718d-911b-f6954a15eb9b
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 00:05:51 -08:00
Alexander Brown
efbb3b07f3 style: remove semicolons from litegraphUtils.ts
Amp-Thread-ID: https://ampcode.com/threads/T-019c1300-e933-769c-b05f-ea00c2d32dd1
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 00:01:17 -08:00
Alexander Brown
5ddce4025c refactor: extract CanvasHelper from ComfyPage.ts
- Create CanvasHelper class for canvas viewport operations

- Extract pan, zoom, dragAndDrop, rightClick, doubleClick methods

- Extract moveMouseToEmptyArea, convertOffsetToCanvas methods

- Add deprecation proxies for backward compatibility

- Add canvasOps property to ComfyPage

Amp-Thread-ID: https://ampcode.com/threads/T-019c1300-e933-769c-b05f-ea00c2d32dd1
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 23:45:43 -08:00
Alexander Brown
e4b520c602 refactor: extract SubgraphHelper from ComfyPage.ts
- Create browser_tests/fixtures/helpers/SubgraphHelper.ts with 10 methods

- Add subgraph: SubgraphHelper property to ComfyPage

- Replace original methods with deprecation proxy stubs

- Reduces ComfyPage.ts from 1633 to 1409 lines (~224 lines removed)

Amp-Thread-ID: https://ampcode.com/threads/T-019c12cc-5256-7359-b830-28d1c3639daa
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 22:49:43 -08:00
Alexander Brown
ca7ed8c8e9 refactor: extract DebugHelper from ComfyPage.ts
- Create browser_tests/fixtures/helpers/DebugHelper.ts with 7 methods

- Add debug: DebugHelper property to ComfyPage

- Replace debug methods with deprecation proxies delegating to this.debug

- Reduces ComfyPage.ts by ~140 lines

Amp-Thread-ID: https://ampcode.com/threads/T-019c1206-3625-71ef-b976-1796574b9642
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 19:11:17 -08:00
Alexander Brown
99871796e0 refactor: extract DefaultGraphPositions constants from ComfyPage.ts
- Create browser_tests/fixtures/constants/defaultGraphPositions.ts with all hardcoded default graph positions

- Create browser_tests/fixtures/constants/types.ts with Position and Size interfaces

- Update ComfyPage.ts to import and use DefaultGraphPositions

- Reduces duplication and prepares for further modular extraction

Amp-Thread-ID: https://ampcode.com/threads/T-019c1201-adec-7363-96d5-446d0a98e4cf
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 19:07:34 -08:00
Alexander Brown
2717f8d489 test: migrate brittle :nth-child() selectors to getByRole('radio')
- Replace 4 CSS selectors with semantic locators in nodeLibrary.spec.ts

- Uses PrimeVue SelectButton's accessible radio button names

- Part of Playwright best practices remediation

Amp-Thread-ID: https://ampcode.com/threads/T-019c11ff-0d10-771a-abaf-7d8d908800b3
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 19:02:53 -08:00
Alexander Brown
a014e8a5da test: replace expect() with waitFor() in fixture files
Per Playwright best practices, assertions belong in tests, not fixtures.
Fixture methods should use waitFor() for preconditions instead.

- vueNodeFixtures.ts: setTitle(), cancelTitleEdit() use waitFor()
- Topbar.ts: closeTopbarMenu() uses waitFor({ state: 'hidden' })
- ComfyPage.ts: ConfirmDialog.click(), closeDialog(), clickDialogButton(),
  closeToasts() all converted to waitFor()
- templates.ts: renamed waitForMinimumCardCount to expectMinimumCardCount
  to clarify it contains an assertion (uses expect().toPass() pattern)

Amp-Thread-ID: https://ampcode.com/threads/T-019c11f8-acd2-7429-8bec-525ad47a47c4
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 19:00:00 -08:00
Alexander Brown
1ec55fdf31 test: replace waitForTimeout with retrying assertions
- widget.spec.ts: use expect().toPass() for combo refresh

- subgraph.spec.ts: use comfyPage.setup() after reload

- nodeLibrary.spec.ts: use toHaveCount() for debounced search

- remoteWidgets.spec.ts: use expect().toPass() for backoff test

- litegraphUtils.ts: refactor navigateIntoSubgraph to use toPass()

Amp-Thread-ID: https://ampcode.com/threads/T-019c11f1-e839-772c-8890-b77cfdf70124
Co-authored-by: Amp <amp@ampcode.com>
2026-01-30 18:51:55 -08:00
Christian Byrne
47113b117e refactor: migrate keybindings to DDD structure (#8369)
## Summary

Migrate keybindings domain to `src/platform/keybindings/` following DDD
principles.

## Changes

- **What**: Consolidate keybinding-related code (types, store, service,
defaults, reserved keys) into a single domain module with flat structure
- Extracted `KeyComboImpl` and `KeybindingImpl` classes into separate
files
- Updated all consumers to import from new location
- Colocated tests with source files
- Updated stores/README.md and services/README.md to remove migrated
entries

## Review Focus

- Verify all import paths were updated correctly
- Check that the flat structure is appropriate (vs nested core/data/ui
layers)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8369-refactor-migrate-keybindings-to-DDD-structure-2f66d73d36508120b169dc737075fb45)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Subagent 5 <subagent@example.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-01-29 18:40:58 -08:00
Alexander Brown
82bacb82a7 test: add Playwright test tags for filtering (@smoke, @slow, @screenshot, domains) (#8441)
## Summary

Adds structured test tags to all 54 Playwright test files to enable
flexible test filtering during development and CI.

## Tags Added

| Tag | Count | Purpose |
|-----|-------|---------|
| `@screenshot` | 32 files | Tests with visual assertions
(`toHaveScreenshot`) |
| `@smoke` | 5 files | Quick essential tests for fast validation |
| `@slow` | 5 files | Long-running tests (templates, subgraph,
featureFlags) |
| `@canvas` | 15 files | Canvas/graph rendering tests |
| `@node` | 10 files | Node behavior tests |
| `@ui` | 8 files | UI component tests |
| `@widget` | 5 files | Widget-specific tests |
| `@workflow` | 3 files | Workflow operations |
| `@subgraph` | 1 file | Subgraph functionality |
| `@keyboard` | 2 files | Keyboard shortcuts |
| `@settings` | 2 files | Settings/preferences |

## Usage Examples

```bash
# Quick validation (~16 tests, ~30s)
pnpm test:browser -- --grep @smoke

# Skip slow tests for faster CI feedback
pnpm test:browser -- --grep-invert @slow

# Skip visual tests (useful for local development without snapshots)
pnpm test:browser -- --grep-invert @screenshot

# Run only canvas-related tests
pnpm test:browser -- --grep @canvas

# Combine filters
pnpm test:browser -- --grep @smoke --grep-invert @screenshot
```

## Implementation Details

- Uses Playwright's native tag syntax: `test.describe('Name', { tag:
'@tag' }, ...)`
- Tags inherit from describe blocks to child tests
- Preserves existing project-level tags: `@mobile`, `@2x`, `@0.5x`
- Multiple tags supported: `{ tag: ['@screenshot', '@smoke'] }`

## Test Plan

- [x] All existing tests pass unchanged
- [x] Tag filtering works with `--grep` and `--grep-invert`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8441-test-add-Playwright-test-tags-for-filtering-smoke-slow-screenshot-domains-2f76d73d36508184990ec859c8fd7629)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: GitHub Action <action@github.com>
2026-01-29 16:34:56 -08:00
Rizumu Ayaka
fc38f16543 fix: default image input for the template is displayed as empty on dropdown selection (#8276)
The image input for nodes loaded from templates appears empty in the
Properties Panel.

When the widget's current value (saved in the template) is not in the
available file list returned by the server, the selectedSet is empty,
causing a placeholder to be displayed instead of the actual value.

Added a missingValueItem computed property in WidgetSelectDropdown.vue.
When the current value is not in inputItems or outputItems, it creates a
fallback item and adds it to dropdownItems.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8276-fix-default-image-input-for-the-template-is-displayed-as-empty-on-dropdown-selection-2f16d73d3650817eaad5e4e33637fb74)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: github-actions <github-actions@github.com>
2026-01-29 14:19:52 -08:00
AustinMroz
3866fe7eaa Fix flake hidream test (#8406)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8406-Fix-flake-hidream-test-2f76d73d3650814daae8fb7775fa3073)
by [Unito](https://www.unito.io)
2026-01-29 00:02:30 -08:00
Benjamin Lu
cbd073f89d Add inline queue progress bar and text summary (#8271)
Add inline queue progress bar and summary per the new designs.

This adds an inline 3px progress bar in the actionbar container (docked
or floating) and a compact summary line below the top menu that follows
when floating, both gated by the QPO V2 flag and hidden while the
overlay is expanded.


https://github.com/user-attachments/assets/da8ec7b7-35f4-4d52-a83b-15c21b484eba

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8271-Add-inline-queue-progress-bar-and-summary-for-QPO-V2-2f16d73d36508132a6dff247f71e11e4)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-28 12:20:13 -08:00
Jin Yi
e3bad033ed [refactor] SearchBox and MultiSelect style improvements (#8328) 2026-01-28 02:11:45 +00:00
Alexander Brown
aa5125cef6 Chore: Oxfmt formatting pass (#8341)
## Summary

Expanding the covered files to format. One-time formatting pass. To be
added to the `.git-blame-ignore-revs`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8341-Chore-Oxfmt-formatting-pass-2f56d73d365081f2988fcb7570f9a2a1)
by [Unito](https://www.unito.io)
2026-01-27 17:59:19 -08:00
Alexander Brown
14369c08a3 refactor: parallelize bootstrap and simplify lifecycle with VueUse (#8307)
## Summary

Refactors bootstrap and lifecycle management to parallelize
initialization, use Vue best practices, and fix a logout state bug.

## Changes

### Bootstrap Store (`bootstrapStore.ts`)
- Extract early bootstrap logic into a dedicated store using
`useAsyncState`
- Parallelize settings, i18n, and workflow sync loading (previously
sequential)
- Handle multi-user login scenarios by deferring settings/workflows
until authenticated

### GraphCanvas Refactoring
- Move non-DOM composables (`useGlobalLitegraph`, `useCopy`, `usePaste`,
etc.) to script setup level for earlier initialization
- Move `watch` and `whenever` declarations outside `onMounted` (Vue best
practice)
- Use `until()` from VueUse to await bootstrap store readiness instead
of direct async calls

### GraphView Simplification
- Replace manual `addEventListener`/`removeEventListener` with
`useEventListener`
- Replace `setInterval` with `useIntervalFn` for automatic cleanup
- Move core command registration to script setup level

### Bug Fix
Using `router.push()` for logout caused `isSettingsReady` to persist as
`true`, making new users inherit the previous user's cached settings.
Reverted to `window.location.reload()` with TODOs for future store reset
implementation.

## Testing

- Verified login/logout cycle clears settings correctly
- Verified bootstrap sequence completes without errors

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-27 12:50:13 -08:00
Alexander Brown
440e25e232 fix(test): Mobile Settings (#8332)
## Summary

Bigger mask.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8332-fix-test-Mobile-Settings-2f56d73d3650813b8e39ea5d77e39c18)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-27 00:21:15 -08:00
Christian Byrne
d3e664b2dd Feat: Persist all unsaved workflow tabs (#6050)
## Summary

- Keep all drafts in localStorage, mirroring the logic from VSCode.

- Fix a bug where newly created blank workflow tabs would incorrectly
restore as defaultGraph instead of blankGraph after page refresh.

Resolves https://github.com/Comfy-Org/desktop/issues/910, Resolves
https://github.com/Comfy-Org/ComfyUI_frontend/issues/4057, Fixes
https://github.com/Comfy-Org/ComfyUI_frontend/issues/3665

## Changes

### What
- Fix `restoreWorkflowTabsState` to parse and pass workflow data from
drafts when recreating temporary workflows
- Add error handling for invalid draft data with fallback to default
workflow
- Fix E2E test `should not serialize color adjustments in workflow` to
wait for workflow persistence before assertions
- Add proper validation for workflow nodes array in test assertions

### Breaking
- None

### Dependencies
- No new dependencies added

## Review Focus

1. **Workflow restoration**: Verify that blank workflows correctly
restore as blankGraph after page refresh
2. **Error handling**: Check that invalid draft data gracefully falls
back to default workflow
3. **Test coverage**: Ensure E2E test correctly waits for workflow
persistence before checking node properties
4. **Edge cases**: Test with multiple tabs, switching between tabs, and
rapid refresh scenarios

---------

Co-authored-by: Yourz <crazilou@vip.qq.com>
2026-01-26 09:35:38 -08:00
Alexander Brown
15655ddb76 Updates: More Modal Modification (#8256)
Refactors modal dialog layouts for improved flexibility and consistency.

**Changes:**
- Add dedicated slot for left panel header title with dynamic
content/icons
- Consolidate side panel rendering within `BaseModalLayout`
- Remove redundant `PanelHeader` and `RightSidePanel` components
- Apply `select-none` to text elements to prevent accidental selection

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-23 20:41:35 -08:00
Johnpaul Chiwetelu
941cd2b4a5 refactor: improve TypeScript patterns in test files (Group 1/8) (#8253)
## Summary
Improves type safety in test files by replacing unsafe type patterns
with proper TypeScript idioms.

## Changes
- Define typed `TestWindow` interface extending `Window` for Playwright
tests with custom properties
- Use `Partial<HTMLElement>` with single type assertion for DOM element
mocks
- Remove redundant type imports
- Fix `console.log` → `console.warn` in test fixture

## Files Changed
16 test files across browser_tests, packages, and src/components

## Test Plan
-  `pnpm typecheck` passes
-  No new `any` types introduced
-  All pre-commit hooks pass

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8253-refactor-improve-TypeScript-patterns-in-test-files-Group-1-8-2f16d73d365081548f9ece7bcf0525ee)
by [Unito](https://www.unito.io)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-23 02:35:09 +01:00
Benjamin Lu
92357445e4 feat: show active jobs label in top menu (#8169)
Replace the top-menu queue history icon with a localized “N active”
label so active jobs are visible at a glance.

Requested as part of the new
[designs](https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=3381-6181&m=dev).

I checked all failing snapshots and they are all expected (1 flaky).

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8169-feat-show-active-jobs-label-in-top-menu-2ee6d73d3650812cbf0cda389395c563)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-21 20:45:29 -07:00
Alexander Brown
2db246f494 refactor: restructure BaseModalLayout from flexbox to CSS Grid (#8211)
## Summary

Refactors `BaseModalLayout` from a flexbox-based layout to CSS Grid,
enabling smoother panel transitions and improved layout control.

## Changes

### Layout Restructure

- **Flexbox → CSS Grid**: Replaced nested flexbox with a 3-column CSS
Grid (`nav | main | aside`)
- **Smooth panel transitions**: Panel show/hide now animates via
`grid-template-columns` instead of Vue `<Transition>` with `translateX`
- **Removed transition CSS**: Deleted `.slide-panel-*` and `.fade-*`
transition styles (no longer needed with grid approach)

### Right Panel Improvements

- **Dedicated header**: Added header with close button, right panel
toggle, and customizable title slot (`rightPanelHeaderTitle`,
`rightPanelHeaderActions`)
- **New prop**: Added `rightPanelTitle` prop for simple text title in
right panel header

### UX & Accessibility

- **ESC key handling**: Pressing Escape closes the right panel (if open)
before closing the dialog
- **Accessibility**: Added `aria-label` attributes to all panel toggle
and close buttons
- **i18n**: Added translation keys: `showLeftPanel`, `hideLeftPanel`,
`showRightPanel`, `hideRightPanel`, `closeDialog`

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-21 13:20:39 -08:00