Repository navigation
feat: redesign phase 6b — job cards, toasts, job cancel, narrower Inspector - #32
Merged
Merged
Conversation
… narrower Inspector
Backend:
- DELETE /api/v1/jobs/{id} cancels a queued job, or a running job that
opted in (inpainting generation, which stops between diffusers steps at
its next progress report). Jobs gain a 'cancelled' status and
'detail'/'cancellable' fields; a cancelled job still releases the
project's busy slot and leaves the previous candidates untouched.
- The depth job reports 'Loading the depth model (the first run downloads
its weights)' while the model loads.
- Inpainting failures name their cause.
Frontend:
- JobCard next to the control that started a job (label, %, detail,
Cancel where supported) and an inline error card with Retry / Open
settings / View log; the status bar mirrors Cancel.
- ToastStack over the canvas: success/info toasts dismiss after 3 s,
errors persist with actions; a cancel shows an info toast.
- Inspector narrows to the design's 328px; legacy CSS aliases removed.
- e2e: clicks aim at pixel centers, so the scenarios expect the pixels
they request instead of a layout-dependent truncation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The backend Job.request_cancel() currently accepts repeated cancels after a cancel is already requested, which conflicts with the intended cancellable semantics and can cause DELETE /jobs/{id} to incorrectly return 200 instead of 409.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Implements the “phase 6b” redesign handoff across backend, frontend, and e2e by adding cancellable background jobs (with detail lines), introducing job-linked UI feedback (JobCards + toast stack), and tightening layout (narrower Inspector + removal of legacy CSS aliases).
Changes:
- Backend: adds
DELETE /api/v1/jobs/{id}cancellation flow, a newcancelledjob terminal status, and jobdetail/cancellablefields; depth generation reports a “loading model” detail while weights load. - Frontend: adds
ToastStack/toastStore,JobCardUI, and cancel controls wired toDELETE /jobs/{id}; surfaces richer failure/cancel handling inworkflow.ts. - Tests/docs: expands unit + HTTP tests for job state machine and cancellation, updates e2e click semantics to target pixel centers, and updates architecture docs/schema.
| File | Description |
|---|---|
| parallax_maker/workflow_services.py | Reports/clears a depth-model “loading” detail around lazy load_model(). |
| parallax_maker/test_workflow_services.py | Adds regression tests for depth loading detail behavior and compatibility with plain progress callables. |
| parallax_maker/test_jobs.py | New unit tests for Job/JobManager cancellation and terminal-state semantics. |
| parallax_maker/test_inpainting_services.py | Ensures cancellation propagates unwrapped and preserves prior candidate selection. |
| parallax_maker/test_api_jobs.py | Adds HTTP-level tests for detail/cancellable fields and DELETE /jobs/{id} behaviors. |
| parallax_maker/test_api_inpainting.py | Verifies inpainting generation jobs report cancellable when queued/running. |
| parallax_maker/runtime.py | Extends progress reporter with detail() hook to feed job detail lines. |
| parallax_maker/inpainting_services.py | Preserves OperationCancelled and includes underlying exception cause in failure message. |
| parallax_maker/cancellation.py | Introduces framework-neutral OperationCancelled exception shared across services/jobs. |
| parallax_maker/api/schemas.py | Extends JobView + job status literal with cancelled, detail, cancellable. |
| parallax_maker/api/projects.py | Implements DELETE /jobs/{id} route; ensures cancelled jobs return project and release busy slot. |
| parallax_maker/api/jobs.py | Adds job cancellation state, detail line support, and cancelled terminal status handling in worker. |
| parallax_maker/api/inpainting.py | Makes inpainting jobs cancellable and avoids late set_progress(1.0) that could flip to cancelled. |
| parallax_maker/api/errors.py | Adds NotCancellable 409 API error for rejected cancels. |
| parallax_maker/_api_test_helpers.py | Treats cancelled as a terminal job status in polling helper. |
| frontend/src/lib/workflow.ts | Centralizes failure/cancel reporting into toasts + inline JobCard errors; uses job tracking vs raw progress. |
| frontend/src/lib/workflow.test.ts | Adds tests for toast/error/cancellation behavior and Retry action wiring. |
| frontend/src/lib/state/toasts.svelte.ts | New toast store with auto-dismiss (success/info) and persistent errors with actions. |
| frontend/src/lib/state/toasts.svelte.test.ts | Unit tests for toast timing, persistence, action execution, and max toast cap. |
| frontend/src/lib/state/jobs.svelte.ts | Extends job store with job mirroring (track), cancellability, cancel action, and last error. |
| frontend/src/lib/state/jobs.svelte.test.ts | Adds tests for job labeling, tracking fields, cancellability gating, and cancel behavior. |
| frontend/src/lib/components/shell/AppShell.svelte | Narrows Inspector via --inspector-w rather than hard-coded width. |
| frontend/src/lib/components/shell/ActivityIndicator.svelte | Uses shared job labels and adds Cancel/Cancelling UI driven by job store. |
| frontend/src/lib/components/shell/ActivityIndicator.test.ts | Tests Cancel button visibility/behavior when job is cancellable. |
| frontend/src/lib/components/segmentation/SegmentPanel.svelte | Adds JobCards for segmentation and slice generation feedback. |
| frontend/src/lib/components/inpainting/InpaintPanel.svelte | Replaces legacy progress bar with JobCard for generation/mutation jobs. |
| frontend/src/lib/components/ground/SceneSideView.svelte | Updates colors to non-legacy CSS variables. |
| frontend/src/lib/components/ground/GroundPanel.svelte | Fixes SceneSideView import to local ground component path. |
| frontend/src/lib/components/feedback/ToastStack.svelte | New toast UI component rendered over the canvas. |
| frontend/src/lib/components/feedback/ToastStack.test.ts | Tests toast rendering, dismiss, and action behavior. |
| frontend/src/lib/components/feedback/JobCard.svelte | New inline job card UI with progress/detail/cancel + persistent error card actions. |
| frontend/src/lib/components/feedback/JobCard.test.ts | Tests JobCard idle/running/detail/cancel/error-card rendering and actions. |
| frontend/src/lib/components/dialogs/SettingsDialog.svelte | Updates failure styling to use non-legacy danger color variables. |
| frontend/src/lib/components/dialogs/ExportDialog.svelte | Replaces export/animation progress bars with JobCards. |
| frontend/src/lib/components/depth/ModeTab.svelte | Replaces upload/depth progress bar with JobCard. |
| frontend/src/lib/components/canvas/CanvasArea.svelte | Mounts ToastStack over the canvas area. |
| frontend/src/lib/api/schema.json | Updates generated schema for job detail/cancellable and cancelled status. |
| frontend/src/lib/api/generated.ts | Updates generated TS types to include cancelled, detail, cancellable. |
| frontend/src/lib/api/client.ts | Adds cancelJob() and JobCancelledError handling in polling. |
| frontend/src/lib/api/client.test.ts | Tests polling cancellation and DELETE cancel request wiring. |
| frontend/src/app.css | Removes legacy CSS variable aliases now that remaining components were updated. |
| e2e/ux-parity.spec.ts | Adjusts commentary/expectations around click rounding tolerance under fractional zoom. |
| e2e/parallax-maker.spec.ts | Updates expected pixels/depth/log output to match pixel-center click behavior. |
| e2e/drivers/svelte.ts | Clicks pixel centers to avoid scale-dependent truncation into neighboring pixels. |
| docs/svelte-migration/ARCHITECTURE.md | Documents DELETE /jobs/{id} behavior and job view fields/status updates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.


The second half of phase 6 of the Claude Design handoff (
docs/redesign/HANDOFF.md§9, §10, §11.3).Backend
DELETE /api/v1/jobs/{id}returns 200 with the job, 404 for an unknown id, and 409not_cancellablewhen the job can't be stopped. It cancels:set_progress(1.0)after storing candidates, so a late cancel can't mark a finished generation "cancelled".JobViewgains thecancelledstatus,detailandcancellable(true only while a cancel would be accepted).ARCHITECTURE.mdis updated.Frontend
JobCardsits next to the control that started the job (depth, segmentation, split, inpainting, export, animation). It shows the label, %, the detail line and Cancel when the server says the job can stop. After a failure it shows an inline error card with Retry (generation), Open settings (inpainting-related jobs) and View log. The status bar mirrors Cancel.ToastStackover the canvas: success and info toasts dismiss after 3 s; errors persist with the same actions. A cancel shows an info toast.e2e
Verified manually against the real models:
Tests: pytest 480, vitest 413,
svelte-checkclean, e2e 46/46 locally.🤖 Generated with Claude Code