Files
ComfyUI_frontend/AGENTS.md
bymyself 380f335bff feat: Integrate ComfyUI Manager migration with v2 API and enhanced UI
This commit integrates the previously recovered ComfyUI Manager functionality
with significant enhancements from PR #3367, including:

## Core Manager System Recovery
- **v2 API Integration**: All manager endpoints now use `/v2/manager/queue/*`
- **Task Queue System**: Complete client-side task queuing with WebSocket status
- **Service Layer**: Comprehensive manager service with all CRUD operations
- **Store Integration**: Full manager store with progress dialog support

## New Features & Enhancements
- **Reactive Feature Flags**: Foundation for dynamic feature toggling
- **Enhanced UI Components**: Improved loading states, progress tracking
- **Package Management**: Install, update, enable/disable functionality
- **Version Selection**: Support for latest/nightly package versions
- **Progress Dialogs**: Real-time installation progress with logs
- **Missing Node Detection**: Automated detection and installation prompts

## Technical Improvements
- **TypeScript Definitions**: Complete type system for manager operations
- **WebSocket Integration**: Real-time status updates via `cm-queue-status`
- **Error Handling**: Comprehensive error handling with user feedback
- **Testing**: Updated test suites for new functionality
- **Documentation**: Complete backup documentation for recovery process

## API Endpoints Restored
- `manager/queue/start` - Start task queue
- `manager/queue/status` - Get queue status
- `manager/queue/task` - Queue individual tasks
- `manager/queue/install` - Install packages
- `manager/queue/update` - Update packages
- `manager/queue/disable` - Disable packages

## Breaking Changes
- Manager API base URL changed to `/v2/`
- Updated TypeScript interfaces for manager operations
- New WebSocket message format for queue status

This restores all critical manager functionality lost during the previous
rebase while integrating the latest enhancements and maintaining compatibility
with the current main branch.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 13:44:27 -07:00

2.6 KiB

Repository Guidelines

Project Structure & Module Organization

  • Source: src/ (Vue 3 + TypeScript). Key areas: components/, views/, stores/ (Pinia), composables/, services/, utils/, assets/, locales/.
  • Routing/i18n/entry: src/router.ts, src/i18n.ts, src/main.ts.
  • Tests: unit/component in tests-ui/ and src/components/**/*.{test,spec}.ts; E2E in browser_tests/.
  • Public assets: public/. Build output: dist/.
  • Config: vite.config.mts, vitest.config.ts, playwright.config.ts, eslint.config.js, .prettierrc.

Build, Test, and Development Commands

  • pnpm dev: Start Vite dev server.
  • pnpm dev:electron: Dev server with Electron API mocks.
  • pnpm build: Type-check then production build to dist/.
  • pnpm preview: Preview the production build locally.
  • pnpm test:unit: Run Vitest unit tests (tests-ui/).
  • pnpm test:component: Run component tests (src/components/).
  • pnpm test:browser: Run Playwright E2E tests (browser_tests/).
  • pnpm lint / pnpm lint:fix: Lint (ESLint). pnpm format / format:check: Prettier.
  • pnpm typecheck: Vue TSC type checking.

Coding Style & Naming Conventions

  • Language: TypeScript, Vue SFCs (.vue). Indent 2 spaces; single quotes; no semicolons; width 80 (see .prettierrc).
  • Imports: sorted/grouped by plugin; run pnpm format before committing.
  • ESLint: Vue + TS rules; no floating promises; unused imports disallowed; i18n raw text restrictions in templates.
  • Naming: Vue components in PascalCase (e.g., MenuHamburger.vue); composables useXyz.ts; Pinia stores *Store.ts.

Testing Guidelines

  • Frameworks: Vitest (unit/component, happy-dom) and Playwright (E2E).
  • Test files: **/*.{test,spec}.{ts,tsx,js} under tests-ui/, src/components/, and src/lib/litegraph/test/.
  • Coverage: text/json/html reporters enabled; aim to cover critical logic and new features.
  • Playwright: place tests in browser_tests/; optional tags like @mobile, @2x are respected by config.

Commit & Pull Request Guidelines

  • Commits: Prefer Conventional Commits (e.g., feat(ui): add sidebar), refactor(litegraph): …. Use [skip ci] for locale-only updates when appropriate.
  • PRs: Include clear description, linked issues (Fixes #123), and screenshots/GIFs for UI changes. Add/adjust tests and i18n strings when applicable.
  • Quality gates: pnpm lint, pnpm typecheck, and relevant tests must pass. Keep PRs focused and small.

Security & Configuration Tips

  • Secrets: Use .env (see .env_example); do not commit secrets.
  • Backend: Dev server expects ComfyUI backend at localhost:8188 by default; configure via .env.