Unified Thread Layout โ€” Interactive Wireframe

Spec: 2026-04-13-unified-thread-layout-design.md | Click tabs to view each state

DONE Built and working
PARTIAL Built but not fully wired
BROKEN Built but broken
NOT BUILT In spec but not implemented

State 1: Thread (Default View)

Full-width chat thread, centered at max 800px. All content flows as messages + Living Cards.

DONE
Assistant
Welcome! I can help you create ads for your products. Select some products below and tell me what you'd like to create.
You
Generate an Instagram post for Tie Bar Wing Nut
Assistant
Here's a professional ad for the Tie Bar Wing Nut, showcasing it on a real construction site:
๐Ÿ–ผ๏ธ
[Generated Image โ€” 1080x1080]
Click to view in split-screen
IMAGE ยท Instagram ยท 1080x1080 ยท 2K
"Secure your formwork with confidence. Tie Bar Wing Nuts โ€” precision-threaded, built to last."
#reinforcement #construction #tiebarwingnut #formwork
โœ๏ธ Edit DONE
๐Ÿ“‹ Copy DONE
โฌ‡ Download DONE
๐Ÿ’พ Save NOT WIRED
๐Ÿ”„ Regen NOT WIRED
๐ŸŽจ AI Canvas DONE
v2 ยท IG ยท 1080x1080 ยท 2K DONE
๐Ÿ• History DONE
Type a message or describe what to create...
๐ŸŽค DONE
๐Ÿ“Ž UI ONLY โ€” attachments not sent to agent
โ–ถ
TB
Tie Bar โœ•
WN
Wing Nut โœ•
+
Instagram โ–พ
Platform NOT sent to agent context

State 2: Split-Screen (Editing / Building)

Chat stays on left (~45%), workspace editor on right (~55%). Resizable divider between them.

Chat Thread (still interactive)

DONE โ€” chat stays interactive
Assistant
Here's your ad. Click Edit to modify.
โœ๏ธ Editing in workspace...
EDITING ยท Image Inspector open
You
Make the background warmer
Type to chat while editing...
โ–ถ
DONE โ€” resizable

Image Inspector

โœ“ Done
๐Ÿ–ผ๏ธ
[Image with edit controls]
Brightness
Contrast
Crop
Filter

All 5 Workspace Types:

WorkspaceTriggerStatus
Image InspectorClick Edit on image cardWIRED
Canvas EditorClick AI Canvas on image cardWIRED
Carousel BuilderClick Edit in Builder on carousel cardWIRED
Before/After BuilderClick Edit in Builder on B/A cardWIRED
Text Only ModeClick Edit Variations on copy cardWIRED

State 3: Fullscreen Workspace (AI Canvas)

AI Canvas in fullscreen for pixel-precise editing. Back button returns to split-screen.

โ† Back to Chat
DONE
โœ“ Done
๐ŸŽจ

AI Canvas (SAM2 Editor)

Full-screen canvas with brush, eraser, selection tools. SAM2 mask overlay for precise editing.

๐Ÿ–Œ Brush
๐Ÿงน Eraser
โ—ป Select
โ†ฉ Undo
v3

All 5 Living Card Types

Each card type renders inline in the chat thread. All share the same lifecycle state machine.

Card Type 1: Image Result Card

๐Ÿ–ผ๏ธ Generated Image
IMAGE ยท Instagram ยท 1080x1080 ยท 2K
"Professional ad copy here..."
#hashtags
โœ๏ธ Edit DONE
๐Ÿ“‹ Copy DONE
โฌ‡ DL DONE
๐Ÿ’พ Save NOT WIRED
๐Ÿ”„ Regen NOT WIRED
๐ŸŽจ Canvas DONE
v1 DONE โ€” version dots

Card Type 2: Carousel Preview Card

CAROUSEL ยท 7 slides ยท Instagram
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Caption: "5 reasons steel reinforcement matters..."
โœ๏ธ Edit in Builder DONE
โฌ‡ Download ZIP
๐Ÿ’พ Save NOT WIRED
v1

Card Type 3: Before/After Preview Card

BEFORE / AFTER ยท Instagram ยท 1080x1080
BEFORE
AFTER
"From outdated to energy independence"
โœ๏ธ Edit in Builder DONE
โฌ‡ Download
๐Ÿ’พ Save NOT WIRED

Card Type 4: Copy Result Card

TEXT-ONLY ยท LinkedIn
HOOK
"Did you know 73% of contractors waste 2 hours per pour on manual rebar counts?"
BODY
Next Day Steel's pre-cut, labelled reinforcement arrives ready to place...
CTA
Get your free quote at nextdaysteel.co.uk
#reinforcement #construction #nextdaysteel
Hook Score: REMOVED (was in spec) 1247 chars
๐Ÿ“‹ Copy DONE
โœ๏ธ Edit Variations DONE
๐Ÿ”„ Regen NOT WIRED

Card Type 5: Video Card

VIDEO ยท Instagram Reel ยท 6s ยท 1080p
โ–ถ๏ธ
[Video Player]
โฌ‡ Download
๐Ÿ“‹ Copy Text
๐Ÿ’พ Save NOT WIRED
๐Ÿ”„ Regen NOT WIRED

Card Lifecycle State Machine

Every card goes through these states. Click each to see the visual.

State: GENERATING

Generating image...
DONE โ€” shimmer placeholder renders during generation

State: EXPANDED

๐Ÿ–ผ๏ธ Full image visible
IMAGE ยท Instagram
All action buttons visible
โœ๏ธ Edit
๐Ÿ“‹ Copy
โฌ‡ DL
๐Ÿ’พ Save
๐Ÿ”„ Regen
๐ŸŽจ Canvas
โœ… Approve
๐Ÿ—‘ Scrap
DONE โ€” full card with all actions

State: EDITING

โœ๏ธ Editing in workspace...
EDITING โ€” Split-screen open
DONE โ€” badge overlay when workspace open

State: APPROVED (compact)

๐Ÿ–ผ๏ธ
โœ… Approved โ€” Tie Bar Wing Nut Ad
IG ยท 1080x1080 ยท v2
โฌ‡ Download
๐Ÿ“… Schedule NOT BUILT
DONE โ€” compact card with checkmark. Schedule button NOT WIRED.

State: SCRAPPED

๐Ÿ—‘ Scrapped: Tie Bar Wing Nut Instagram Ad (v1) Restore
DONE โ€” collapsed line with restore

Transition Map

GENERATING โ†’ EXPANDED โ†’ EDITING โ†’ EXPANDED (new version)
                โ”‚                          โ”‚
                โ”œโ†’ APPROVED (compact)     โ”œโ†’ APPROVED
                โ””โ†’ SCRAPPED (collapsed)  โ””โ†’ SCRAPPED
DONE โ€” state machine implemented in CardLifecycle.ts

Unified Input Bar โ€” Detailed View

Single entry point for all interactions. Sticky at bottom.

Full Input Bar Anatomy

Type a message or describe what to create...
๐ŸŽค
๐Ÿ“Ž
Instagram โ–พ
โ–ถ
TB
Tie Bar โœ•
WP
Waler Plate โœ•
WN
Wing Nut โœ•
+

Feature Status

FeatureSpec SaysStatus
Auto-grow textareaUp to 160pxDONE
Enter to sendEnter sends, Shift+Enter newlineDONE
Product trayThumbnails + X to remove + [+] to add. Max 6.DONE but no max-6 enforcement
Product pickerPopover desktop, full-screen mobileDONE
Platform selector5 platforms, persists across messagesDONE but platform NOT sent to agent
Voice input๐ŸŽค button, Web Speech APIDONE
File attach๐Ÿ“Ž button, analyze imageUI works, files NOT sent to agent
Send buttonPrimary color, disabled when emptyDONE
Stop buttonRed square during streamingDONE
Placeholder text"Type a message or describe what to create..."Shows "Type your message..." instead
Smart routingNo mode toggle, agent decidesDONE
IdeaBank suggestion chipsAgent sends suggestions when products selectedAuto-trigger removed (was too aggressive). No manual trigger.

Mobile View (<768px)

Full-width cards, compact input bar, bottom sheet for workspace.

Mobile Thread

Studio ๐Ÿ•
Assistant
Here's your ad for the Tie Bar Wing Nut.
๐Ÿ–ผ๏ธ
IMAGE ยท IG
"Secure your formwork..."
โœ๏ธ Edit
๐Ÿ“‹ Copy
โฌ‡ DL
๐ŸŽจ Canvas
Type...
โ–ถ
TB
Tie Bar โœ•
+
IG
DONE โ€” full-width cards, compact input

Mobile Workspace (Bottom Sheet)

Chat (dimmed)

Image Inspector

๐Ÿ–ผ๏ธ Image + Controls
โœ“ Done
DONE โ€” bottom sheet with drag-to-dismiss

Full Implementation Status

Every feature from the spec, with honest status.

Layout

FeatureStatusNotes
Thread state (default)DONEFull-width, 800px centered
Split-screen stateDONEResizable divider, 5 workspace types wired
Fullscreen stateDONEAI Canvas, back button
Mobile bottom sheetDONE<768px, drag to dismiss
Tablet 50/50DONE768-1023px

Input Bar

FeatureStatusNotes
Auto-grow textareaDONE
Product tray + pickerDONENo max-6 enforcement
Platform selectorBROKENUI works but platform NOT sent to agent
Voice inputDONEWeb Speech API
File attachBROKENFiles analyzed but NOT sent to agent
Send / StopDONE
IdeaBank suggestionsPARTIALAuto-trigger removed. No replacement.

Living Cards

FeatureStatusNotes
Image card renders in chatPARTIALPR #314 (Living Cards SSE) still open
Carousel cardDONEComponent built, needs SSE wiring too
Before/After cardDONEComponent built
Copy cardPARTIALAgent killed headline, caption, hookScore
Video cardDONEComponent built
Lifecycle state machineDONEAll 5 states
Version dotsDONE
Save to catalogNOT WIREDButton disabled "(coming soon)"
RegenerateNOT WIREDButton disabled "(coming soon)"
Schedule from approvedNOT BUILTNot in any card

Agent Integration

FeatureStatusNotes
Send message โ†’ agent respondsDONE
Products in agent contextDONE
Platform in agent contextBROKENNot sent
Attachments in agent contextBROKENNot sent
Brand voice / campaign / audienceNOT BUILTHardcoded null
IdeaBank via agentPARTIALAuto-trigger removed, no replacement
Content Planner deep-linkDONEPrompt/platform/aspectRatio pre-filled

Session Management

FeatureStatusNotes
Session history drawerDONE
Load old sessionDONE
New chatDONE
Session persistenceDONEMessages + cards saved to DB

Production Issues

IssueStatusNotes
Build broken (@reduxjs/toolkit)BROKENNext deploy will fail
4 test failuresBROKENLinkedIn tool count + tone tests
Redis not connectedPRE-EXISTINGSessions in memory only
StudioContext 12 generation fieldsCLEANUP NEEDEDDead fields not removed