From 4a20522eecc02f8a03e823596c3aedbc93c00374 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 26 Jun 2026 23:00:54 +0700 Subject: [PATCH] feat(promptbox): full editing controls in fullscreen focus mode Add a footer to the fullscreen prompt modal (desktop lib + webapp) so focus mode is a complete editing surface, not just the textarea: - Model selector, always-on reference-image row, and a Done button (closes the modal) instead of Generate. - Video: also surfaces the input-mode (keyframe/reference) picker and the @Characters button (seedance_2p0). Shared image-row / character / input-mode elements are reused inline and in the modal (DRY). - Webapp: model selector + leftToolbar + image row in the footer. Layout: editor area is flex-1/min-h-0/overflow-hidden with the image row and footer shrink-0, so the editor takes only the leftover space and scrolls internally - resizing the window shorter no longer overflows. MentionTextarea gains a `style` prop so the modal can cap resize/height. --- .../src/components/prompt-box/PromptBox.tsx | 49 +++--- .../prompt-box/PromptFullscreen.tsx | 40 +++-- .../promptbox/src/lib/PromptBox2D.tsx | 17 ++- .../promptbox/src/lib/PromptBox3D.tsx | 17 ++- .../promptbox/src/lib/PromptBoxEdit.tsx | 16 +- .../promptbox/src/lib/PromptBoxImage.tsx | 17 ++- .../promptbox/src/lib/PromptBoxVideo.tsx | 143 ++++++++++-------- .../src/lib/PromptFullscreenModal.tsx | 42 +++-- 8 files changed, 230 insertions(+), 111 deletions(-) diff --git a/frontend/apps/artcraft-webapp/src/components/prompt-box/PromptBox.tsx b/frontend/apps/artcraft-webapp/src/components/prompt-box/PromptBox.tsx index 591f3990e2..608cd01bbd 100644 --- a/frontend/apps/artcraft-webapp/src/components/prompt-box/PromptBox.tsx +++ b/frontend/apps/artcraft-webapp/src/components/prompt-box/PromptBox.tsx @@ -323,24 +323,28 @@ export const PromptBox = forwardRef( }); }, [prompt, hasMentionItems, mentionRegex, mentionLabelMap, mentionItems]); + // Shared reference-image row, used both inline (gated by isImageRowVisible) + // and always-on in the fullscreen focus modal. + const imagePromptRowEl = supportsImagePrompts ? ( + + ) : null; + return (
- {isImageRowVisible && ( - - )} + {isImageRowVisible && imagePromptRowEl} {mediaReferenceRow} @@ -555,7 +559,17 @@ export const PromptBox = forwardRef(
- + + {modelSelector} + {leftToolbar} + + } + imagePromptRow={imagePromptRowEl} + > {hasMentionItems && mentionItems ? ( ( mentionItems={mentionItems} placeholder={placeholder} className="promptbox-scrollbar h-full min-h-0 w-full overflow-y-auto text-base-fg placeholder-base-fg/60" - style={{ maxHeight: "calc(70vh - 7rem)", resize: "none" }} + style={{ resize: "none" }} colorMap={mentionColorMap} onKeyDown={(e) => { if ( @@ -581,7 +595,6 @@ export const PromptBox = forwardRef(