refactor: extract inpainting services - #8
Open
provos wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the web UI inpainting workflow by extracting inpainting state mutation, artifact persistence, candidate generation, and slice versioning into a framework-neutral InpaintingService, leaving Dash callbacks as thin adapters for transport, rendering, and PreventUpdate control flow.
Changes:
- Introduces
parallax_maker/inpainting_services.pywith command/result dataclasses and anInpaintingServiceorchestration layer. - Refactors Dash callback adapters in
components.pyandwebui.pyto call the service instead of mutatingAppStatedirectly. - Adds new Python adapter/service contract tests and extends Playwright E2E coverage for inpainting behaviors (Fill/Enhance/Erase/Undo-Redo/prompt persistence).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| parallax_maker/webui.py | Wires a shared InpaintingService into callback registration and routes prompt/model/undo/selection adapters through the service. |
| parallax_maker/components.py | Reworks inpainting + canvas callbacks to translate UI transport into service commands and map domain errors to Dash control flow/logs. |
| parallax_maker/inpainting_services.py | Adds the framework-neutral inpainting workflow service, including mask/workflow artifacts, pipeline reuse, candidate generation, and slice versioning. |
| parallax_maker/e2e_server.py | Extends E2E state payload with slice filenames for deterministic browser assertions. |
| parallax_maker/test_components.py | Updates component tests to construct callbacks with an InpaintingService and artifact/pipeline stubs. |
| parallax_maker/test_inpainting_webui_adapters.py | Adds unit coverage for webui.py inpainting adapter callbacks and their error→PreventUpdate mapping. |
| parallax_maker/test_inpainting_services.py | Adds contract tests for the new service’s behaviors (mask, prompts/model persistence, generation, apply/erase, undo/redo). |
| parallax_maker/test_inpainting_component_adapters.py | Adds contract tests for Dash callback adapters around the service boundary. |
| e2e/parallax-maker.spec.ts | Expands Playwright coverage for fill/enhance/erase flows, undo/redo, and prompt persistence. |
| e2e/helpers/app.ts | Adds helper utilities + extends E2EState typing for new assertions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification