Skip to content

refactor: extract inpainting services - #8

Open
provos wants to merge 3 commits into
mainfrom
codex/extract-inpainting-services
Open

refactor: extract inpainting services#8
provos wants to merge 3 commits into
mainfrom
codex/extract-inpainting-services

Conversation

@provos

@provos provos commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • extract mask, prompt, model, candidate, apply/erase, and slice-version workflows into a framework-neutral InpaintingService
  • reduce Dash callbacks to transport, rendering, logging, and PreventUpdate adapters
  • fix candidate generation mutation, stale selection, pipeline/upscaler invalidation, and duplicate erase logging
  • add deterministic Playwright coverage for Fill, Enhance, Erase, Undo/Redo, and prompt persistence

Verification

  • 252 Python tests passed
  • 11 Playwright tests passed
  • Black and focused flake8 clean
  • git diff --check clean
  • independent review found no remaining P1/P2 issues

Copilot AI lite review requested due to automatic review settings August 14, 2026 05:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py with command/result dataclasses and an InpaintingService orchestration layer.
  • Refactors Dash callback adapters in components.py and webui.py to call the service instead of mutating AppState directly.
  • 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.

Comment thread parallax_maker/inpainting_services.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants