Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Composer: a link with its words opens the composer, and a folded prompt shows one whole line

Adarshd015e20ccbf9
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsx
index 7a4aae6d..ba97c94c 100644
--- a/src/components/studio/composer.tsx
+++ b/src/components/studio/composer.tsx
@@ -393,7 +393,9 @@ export function Composer({ docked }: { docked: boolean }) {
useUploadReaper(draft);
// Typed into before the page hydrated: the prompt already has focus (onFocus never ran).
useLayoutEffect(() => {
- if (root.current?.contains(document.activeElement)) setFocused(true);
+ // Opened on a link that carries its words (?prompt=: a Home picture, a hand-off): the composer starts open, so the
+ // whole prompt shows rather than its first line.
+ if (root.current?.contains(document.activeElement) || new URLSearchParams(window.location.search).has("prompt")) setFocused(true);
}, []);
useEffect(() => {
const el = root.current;
diff --git a/src/components/studio/prompt-input.tsx b/src/components/studio/prompt-input.tsx
index a90eaef6..41ae1bba 100644
--- a/src/components/studio/prompt-input.tsx
+++ b/src/components/studio/prompt-input.tsx
@@ -156,7 +156,8 @@ export const PromptInput = forwardRef<
return (
<div className={cn("relative", className)}>
- <div ref={mirror} aria-hidden className={cn(shared, "pointer-events-none absolute inset-0 overflow-hidden text-foreground")}>
+ {/* Collapsed (docked, not focused), the words show as exactly one line ending in "…", never a cut second line. */}
+ <div ref={mirror} aria-hidden className={cn(shared, "pointer-events-none absolute inset-0 overflow-hidden text-foreground", collapsed && "line-clamp-1")}>
<Highlights text={value} handles={handles} />
</div>
<textarea