Skip to content

fix: Isolate negative prompts per generation job and persist them for LEGO workflows #1796

@ChuxiJ

Description

@ChuxiJ

Problem

Negative prompts can leak through global generation state. LEGO generation reads generationForm.negativePrompt globally, and Add Layer generation params omit negativePrompt, so stale exclusions can affect unrelated jobs and edit/regenerate cannot reliably restore the intended prompt context.

Root Cause

Negative prompting was added at form level, but not promoted to a per-job/per-clip generation contract across all workflows.

Solution

  • Store negative prompts in each generation job's explicit params.
  • Pass negative prompts through LEGO/Add Layer/MultiTrack regeneration paths.
  • Ensure queue retry and project history preserve the negative prompt used for that job.
  • Clear or isolate global form state between unrelated jobs.

Verification

  • Add tests for two consecutive jobs with different negative prompts.
  • Add retry/regenerate tests proving the original negative prompt is preserved.
  • Verify Add Layer and LEGO requests include the expected negative prompt.

Files to Touch

  • src/services/generationPipeline.ts
  • src/store/generationStore.ts
  • src/types/generation.ts
  • src/components/generation/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions