tui: inpainting canvas — interactive keyboard mask editor #132
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a user in inpaint mode, I want a full-screen overlay where I can paint a mask over the init image with the keyboard, so that I can run inpainting jobs without leaving the terminal.
Background
Issue #23 was closed but
crates/loom-tui/src/components/inpaint.rsis a 150-line stub — there's no canvas, no brush, no mask export. This ticket implements the full editor.Acceptance criteria
Overlay
OverlayKind::InpaintCanvas { init_path }opens from the Generate screen when in Inpaint modeGrayImagemask buffer sized to the init image is owned by the overlay stateBrush controls
h/j/k/land arrow keys move the cursor by one image-pixel × stride (stride =max(1, brush_radius / 2))Spacepaints a circular stamp at the cursor; held-down auto-repeat respectedxerases under the cursor;cclears the whole mask[/]decrement/increment brush radius (range 1–128)Confirm / cancel
Enterwrites the mask to a temp PNG (8-bit grayscale, white = inpaint), setsparams.mask_pathon the Generate screen, closes the overlayEscdiscards and closes without changesradius: N · pixels masked: MPerformance
Tests
(x, y)with radiusrproduces expected non-zero pixel countOut of scope
References
crates/loom-tui/src/components/inpaint.rs(stub to replace)crates/loom-gtk/src/pages/edit/mask_canvas.rs(GTK reference, lines 193+)