-
Notifications
You must be signed in to change notification settings - Fork 433
feat: Migrate to Jobs API (PR 2 of 3) #7170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jobs-api-pr1-infrastructure
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
🎭 Playwright Test Results⏰ Completed at: 12/05/2025, 01:01:42 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/05/2025, 12:52:10 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
de0d169 to
5cb2579
Compare
a1869fe to
d38a8a6
Compare
Adds Jobs API types, fetchers, and new API methods without breaking existing code. This is the foundation for migrating from legacy /history and /queue endpoints to the unified /jobs endpoint. New files: - src/platform/remote/comfyui/jobs/types/jobTypes.ts - Zod schemas for Jobs API - src/platform/remote/comfyui/jobs/fetchers/fetchJobs.ts - Fetchers for /jobs endpoint - src/platform/remote/comfyui/jobs/index.ts - Barrel exports - tests-ui/tests/platform/remote/comfyui/jobs/fetchers/fetchJobs.test.ts API additions (non-breaking): - api.getQueueFromJobsApi() - Queue from /jobs endpoint - api.getHistoryFromJobsApi() - History from /jobs endpoint - api.getJobDetail() - Full job details including workflow and outputs Part of Jobs API migration. See docs/JOBS_API_MIGRATION_PLAN.md for details. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Adds Jobs API types, fetchers, and new API methods without breaking existing code. This is the foundation for migrating from legacy /history and /queue endpoints to the unified /jobs endpoint. New files: - src/platform/remote/comfyui/jobs/types/jobTypes.ts - Zod schemas for Jobs API - src/platform/remote/comfyui/jobs/fetchers/fetchJobs.ts - Fetchers for /jobs endpoint - src/platform/remote/comfyui/jobs/index.ts - Barrel exports - tests-ui/tests/platform/remote/comfyui/jobs/fetchers/fetchJobs.test.ts API additions (non-breaking): - api.getQueueFromJobsApi() - Queue from /jobs endpoint - api.getHistoryFromJobsApi() - History from /jobs endpoint - api.getJobDetail() - Full job details including workflow and outputs Part of Jobs API migration. See docs/JOBS_API_MIGRATION_PLAN.md for details. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
5cb2579 to
0a619ec
Compare
d38a8a6 to
eb0ca33
Compare
This PR switches the frontend from legacy /history and /queue endpoints to the unified /jobs API. Key changes: - Rewrite TaskItemImpl in queueStore.ts to wrap JobListItem - Update api.ts getQueue()/getHistory() to use Jobs API - Update all queue composables (useJobList, useJobMenu, useResultGallery) - Update useJobErrorReporting to use execution_error.exception_message - Update JobGroupsList.vue workflowId access - Update reconciliation.ts to work with JobListItem - Update all related tests Breaking changes: - getQueue() now returns JobListItem[] instead of legacy tuple format - getHistory() now returns JobListItem[] instead of HistoryTaskItem[] - TaskItemImpl.outputs now lazily loads via loadFullOutputs() Part of Jobs API migration. Depends on PR 1 (jobs-api-pr1-infrastructure). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
eb0ca33 to
5ef30f3
Compare
Summary
Migrate frontend from legacy
/history,/history_v2, and/queueendpoints to the unified/jobsAPI with memory optimization and lazy loading.This is PR 2 of 3 - Core migration, depends on PR 1.
Changes
What:
api.getQueue()andapi.getHistory()implementations to use Jobs API fetchers/jobs/{id}endpoint inuseJobMenuTaskItemImplclass wrappingJobListItemfor queue store compatibilityreconcileHistorytoreconcileJobsfor clarityexecution_start_timeandexecution_end_timefrom API for execution timingworkflowIdfrom job instead of nestedworkflow.iduseJobMenuto fetch job details on demand (openJobWorkflow,exportJobWorkflow)Breaking: Requires backend Jobs API support (ComfyUI with
/jobsendpoint)Review Focus
useJobMenu:openJobWorkflowandexportJobWorkflownow fetch from API on demand instead of accessingtaskRef.workflowTaskItemImplwrapper: AdaptsJobListItemto existing queue store interfaceexecution_errorfield from API for rich error dialogsFiles Changed
src/scripts/api.ts- UpdatedgetQueue()andgetHistory()to use Jobs APIsrc/stores/queueStore.ts- AddedTaskItemImpl, updated to useJobListItemsrc/composables/useJobMenu.ts- Lazy loading for workflow accesssrc/composables/useJobList.ts- Updated typesDependencies
Next PR
┆Issue is synchronized with this Notion page by Unito