Skip to content

Conversation

@psychedelicious
Copy link
Contributor

Summary

Fixes a bug I noticed when testing graphs. This was the sequence of events that triggered the issue:

  1. Start new canvas
  2. Add control layer
  3. Filter it
  4. Apply filter
  5. Change control layer model
  6. Filter automatically starts
  7. Cancel it
  8. Generate
  9. The control layer is used for generation, but it is all black, regardless of its content after the first filter.

The issue is related to how the filter module passes the filtered image back to the layer when it's done.

The filtered image is reparented via a konva API, but we did not reset the filter module's reference to the image. Later on, the filter module sees this image in its state and erroneously assumes it owns the image. It does some cleanup and destroys the image, inadvertently destroying it in layer.

The solution is to ensure that when filtering completes, nulls out that reference to the reparented image.

Related Issues / Discussions

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Jul 2, 2025
@psychedelicious psychedelicious enabled auto-merge (rebase) July 3, 2025 02:27
@psychedelicious psychedelicious force-pushed the psyche/fix/ui/canvas-filter-bug branch from 7777ee5 to 0aaa3a7 Compare July 3, 2025 02:27
@psychedelicious psychedelicious merged commit f0a6c4a into main Jul 3, 2025
12 checks passed
@psychedelicious psychedelicious deleted the psyche/fix/ui/canvas-filter-bug branch July 3, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants