From 5147752c4537543582131bdbd76067cb65fe23e5 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Mon, 15 Jun 2026 17:09:57 -0700 Subject: [PATCH] webapp: add "Edit on Canvas" lightbox button -> PageDraw Open any image output in the image editor straight from the lightbox, matching the existing Make Video / Recreate handoffs. Mirrors the Tauri app handleEditFromGallery flow: RESET the lib store, seed the image as base (and into history), then route to /edit-image. Gated to images (hidden for video/3D), so it shows on create-image, library, and task-queue lightboxes via the shared LightboxDetails. --- .../components/lightbox/LightboxDetails.tsx | 12 +++++++++ .../src/components/lightbox/lightbox.tsx | 13 +++++++++ .../src/pages/pagedraw/edit-on-canvas.ts | 27 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 frontend/apps/artcraft-webapp/src/pages/pagedraw/edit-on-canvas.ts diff --git a/frontend/apps/artcraft-webapp/src/components/lightbox/LightboxDetails.tsx b/frontend/apps/artcraft-webapp/src/components/lightbox/LightboxDetails.tsx index df679d8606..3b3148bd7a 100644 --- a/frontend/apps/artcraft-webapp/src/components/lightbox/LightboxDetails.tsx +++ b/frontend/apps/artcraft-webapp/src/components/lightbox/LightboxDetails.tsx @@ -75,6 +75,7 @@ export interface LightboxDetailsProps { onClose?: () => void; onRecreate?: () => void; onMakeVideo?: () => void; + onEditOnCanvas?: () => void; onDelete?: () => void; showDownloadAppCta?: boolean; } @@ -90,6 +91,7 @@ export function LightboxDetails({ onClose, onRecreate, onMakeVideo, + onEditOnCanvas, onDelete, showDownloadAppCta, }: LightboxDetailsProps) { @@ -474,6 +476,16 @@ export function LightboxDetails({ Make Video )} + {onEditOnCanvas && ( + + )} {onRecreate && promptData.hasToken && (