The legacy generation form was removed in cd6e16196, but several code
paths that only existed to support it were left behind. Remove them:
- NEW_FORM_ONLY / isNewFormOnly (workflows.ts) and syncLegacyFormStore
(generation-graph.store.ts) — the latter wrote media-type/engine to
generation-form.store, which nothing reads anymore (only buzzType is).
- Legacy enhancement modals (Upscale image/video, background removal,
video interpolation) + GenForm, WhatIfAlert, SourceImageUpscale, and
legacy-generator.store — all only reachable via the now-dead
useLegacy modal branch in useGeneratedItemWorkflows. Enhancement
workflows now always route through the in-form flow.
- ModalSubmitButton (only used by those modals).
Kept generation-form.store and Orchestrator/GenerateButton — both still
used by the v2 FormFooter. Updated docs + the add-generation-support
skill (NEW_FORM_ONLY no longer exists).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5.6 KiB
Legacy Generator Files
This document tracks all files added to support the legacy generator forms. These files can be removed once the transition to the new data-graph based generator is complete.
Overview
The legacy generator uses:
generation-graph.store.tsfor incoming data (shared with new generator)legacy-metadata-mapper.tsto convert between formatsgenerateFromGraph/whatIfFromGraphroutes for submission
Files to Remove
Image Generation - Legacy Form
src/components/ImageGeneration/GenerationForm/
├── GenerationFormLegacy.tsx # Re-export wrapper (entry point)
├── GenerationForm.tsx # Combined image/video form with toggle
├── GenerationFormProvider.tsx # Form context with legacy data mapping
├── GenerationForm2.tsx # Full image form UI (~2700 lines from civitai)
├── GenerationForm2.module.scss # Styles for GenerationForm2
├── GenerationForm2.module.scss.d.ts # TypeScript declarations for styles
└── TextToImageWhatIfProvider.tsx # Cost estimation provider
Video Generation
src/components/Generation/Video/
├── VideoGenerationProvider.tsx # Video engine state management
├── VideoGenerationFormWrapper.tsx # Engine selection UI
├── VideoGenerationForm.tsx # Main form with graph routes
├── ViduFormInput.tsx
├── HunyuanFormInput.tsx
├── KlingFormInput.tsx
├── MinimaxFormInput.tsx
├── HaiperFormInput.tsx
├── MochiFormInput.tsx
├── LightricksFormInput.tsx
├── Ltx2FormInput.tsx
├── Veo3FormInput.tsx
├── SoraFormInput.tsx
└── WanFormInput/
├── WanFormInput.tsx
├── Wan21FormInput.tsx
├── Wan22FormInput.tsx
├── Wan25FormInput.tsx
└── Wan225bFormInput.tsx
Supporting Components
src/components/ImageGeneration/GenerationForm/
├── InputQuantity.tsx # Quantity input component
└── BaseModelSelect.tsx # Base model selector modal
GenForm.tsxandWhatIfAlert.tsxwere removed along with the legacy enhancement modals (see "Legacy enhancement modals" below).generation-form.store.tsis kept — it's now shared infra (the v2FormFooterreadsbuzzTypefrom it).
Legacy enhancement modals
Removed once the legacy form was gone — they were only reachable when
useLegacyGeneratorStore.useLegacy was true, and now everyone routes through the
in-form enhancement flow (applyWorkflowWithCheck in useGeneratedItemWorkflows.ts):
src/components/Orchestrator/components/UpscaleImageModal.tsx
src/components/Orchestrator/components/UpscaleVideoModal.tsx
src/components/Orchestrator/components/BackgroundRemovalModal.tsx
src/components/Orchestrator/components/VideoInterpolationModal.tsx
src/components/Generation/Form/GenForm.tsx # only used by those modals
src/components/Generation/Alerts/WhatIfAlert.tsx # only used by those modals
src/components/Generation/Input/SourceImageUpscale.tsx # only used by UpscaleImageModal
src/store/legacy-generator.store.ts # only consumer was the modal branch
Also dropped: the ModalSubmitButton export in Orchestrator/components/GenerateButton.tsx
and the modal-handler block (MODAL_WORKFLOWS / shouldOpenModal / openEnhancementModal)
in useGeneratedItemWorkflows.ts.
Modified Files
These files were modified and may need changes reverted:
Schema Changes
src/server/schema/generation.schema.ts
- Added
stepstogenerationLimitsSchema - Added
stepstodefaultsByTierfor all tiers
Router Changes
src/server/routers/orchestrator.router.ts
- Added
imageUploadroute import - Added
imageUploadmutation endpoint
Temporary Legacy Sync in Shared Files
— removed. Along
with it: syncLegacyFormStore() in src/store/generation-graph.store.tsisNewFormOnly / NEW_FORM_ONLY in
src/shared/data-graph/generation/config/workflows.ts (its only consumer) and the
legacy-sync mocks in generation-graph.store.test.ts.
Files That Should NOT Be Removed
These are shared infrastructure used by both old and new generators:
src/store/generation-graph.store.ts # Shared data store
src/store/generation-form.store.ts # UI prefs (buzzType) — read by v2 FormFooter
src/store/remix.store.ts # Remix tracking
src/server/services/orchestrator/legacy-metadata-mapper.ts # Data conversion utils
Removal Checklist
Most of this was completed by commit cd6e16196 (legacy form + orphaned code) and a
follow-up that removed syncLegacyFormStore. Remaining state:
- Remove legacy form files from
src/components/ImageGeneration/GenerationForm/:GenerationFormLegacy.tsx,GenerationForm.tsx,GenerationFormProvider.tsx,GenerationForm2.tsx,GenerationForm2.module.scss(.d.ts),TextToImageWhatIfProvider.tsx - Remove
src/components/Generation/Video/directory - Remove
InputQuantity.tsxandBaseModelSelect.tsx - Remove
syncLegacyFormStore+isNewFormOnly/NEW_FORM_ONLYand update references - Remove the legacy enhancement modals +
GenForm.tsx/WhatIfAlert.tsx/SourceImageUpscale.tsx/legacy-generator.store.tsand the modal branch inuseGeneratedItemWorkflows.ts(see "Legacy enhancement modals" above) - [~]
generation-form.store.ts— kept, now shared infra (v2FormFooterreadsbuzzType) - Revert
stepsaddition ingeneration.schema.ts(if not needed) - Remove
imageUploadroute fromorchestrator.router.ts(if not needed elsewhere)
Date Added
Files added: 2026-02-05