Skip to content

Conversation

@ric-yu
Copy link

@ric-yu ric-yu commented Dec 4, 2025

Summary

Remove legacy history code that is no longer needed after migrating to the Jobs API.

This is PR 3 of 3 - Cleanup only, depends on PR 2.

Changes

  • What:

    • Delete legacy /history and /history_v2 fetchers and adapters
    • Delete legacy history types (HistoryTaskItem, RunningTaskItem, PendingTaskItem, etc.)
    • Delete getWorkflowFromHistory wrapper (replaced by direct fetchJobDetail + extractWorkflow)
    • Delete browser test fixtures for legacy task history
    • Remove unused Zod schemas from apiSchema.ts
  • Non-breaking: Only removes dead code after migration

Files Deleted

Legacy History Module

  • src/platform/remote/comfyui/history/ (entire directory)
    • adapters/v2ToV1Adapter.ts
    • fetchers/fetchHistoryV1.ts
    • fetchers/fetchHistoryV2.ts
    • types/historyV1Types.ts
    • types/historyV2Types.ts
    • index.ts

Legacy Workflow Helper

  • src/platform/workflow/cloud/getWorkflowFromHistory.ts
  • src/platform/workflow/cloud/index.ts

Test Fixtures

  • tests-ui/fixtures/historyFixtures.ts
  • tests-ui/fixtures/historySortingFixtures.ts
  • browser_tests/fixtures/utils/taskHistory.ts

Legacy Tests

  • tests-ui/tests/platform/remote/comfyui/history/ (all tests)

Files Modified

  • src/schemas/apiSchema.ts - Removed unused legacy types:
    • zQueueIndex, zExtraData
    • RunningTaskItem, PendingTaskItem, HistoryTaskItem, TaskItem

Dependencies

┆Issue is synchronized with this Notion page by Unito

@ric-yu ric-yu requested a review from a team as a code owner December 4, 2025 23:55
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jobs-api-pr3-cleanup

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Dec 4, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/05/2025, 01:01:48 AM UTC

📈 Summary

  • Total Tests: 492
  • Passed: 476 ✅
  • Failed: 0
  • Flaky: 6 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 467 / ❌ 0 / ⚠️ 6 / ⏭️ 10
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/05/2025, 12:52:14 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

@ric-yu ric-yu force-pushed the jobs-api-pr2-migration branch from a1869fe to d38a8a6 Compare December 5, 2025 00:08
@ric-yu ric-yu force-pushed the jobs-api-pr3-cleanup branch from 0386c8c to 07d20e6 Compare December 5, 2025 00:08
@ric-yu ric-yu force-pushed the jobs-api-pr2-migration branch from d38a8a6 to eb0ca33 Compare December 5, 2025 00:30
@ric-yu ric-yu force-pushed the jobs-api-pr3-cleanup branch from 07d20e6 to 5b2a67b Compare December 5, 2025 00:30
@ric-yu ric-yu force-pushed the jobs-api-pr2-migration branch from eb0ca33 to 5ef30f3 Compare December 5, 2025 00:42
@ric-yu ric-yu force-pushed the jobs-api-pr3-cleanup branch from 5b2a67b to ce37f14 Compare December 5, 2025 00:42
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Dec 5, 2025
Removes legacy history API code and cleans up unused types from apiSchema.ts
now that the migration to Jobs API is complete.

Deleted files:
- src/platform/remote/comfyui/history/* (except reconciliation.ts)
- src/platform/workflow/cloud/getWorkflowFromHistory.ts
- src/platform/workflow/cloud/index.ts
- browser_tests/fixtures/utils/taskHistory.ts
- tests-ui/fixtures/history*.ts
- tests-ui/tests/platform/remote/comfyui/history/**
- tests-ui/tests/platform/workflow/cloud/getWorkflowFromHistory.test.ts

Cleaned up apiSchema.ts:
- Removed legacy tuple types (zQueueIndex, zExtraData, etc.)
- Removed RunningTaskItem, PendingTaskItem, HistoryTaskItem, TaskItem
- Kept only types still in use (WebSocket messages, TaskOutput, etc.)

Part of Jobs API migration. Depends on PR 2 (jobs-api-pr2-migration).

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

Co-Authored-By: Claude <[email protected]>
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.

2 participants