The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
design(W1): Measure-Spalte, Brand-Fonts, ein Composer, Streaming-Zustand, Header-Rezept
Davidbcec642baf3d
diff --git a/index.html b/index.htmlindex 50875672..ae46954b 100644--- a/index.html+++ b/index.html@@ -14,6 +14,10 @@<meta charset="UTF-8" /><link rel="icon" type="image/png" href="/favicon.png" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <!-- Brand faces (Inter / JetBrains Mono / Space Grotesk), self-hosted.+ index.css declares the Inter stack but nothing ever shipped the face,+ so every install outside this dev box rendered in system-ui. -->+ <link rel="stylesheet" href="/fonts/lu-fonts.css" /><title>Locally Uncensored</title></head><body style="background:#161616;margin:0">diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsxindex 085755c3..2f10f66d 100644--- a/src/components/chat/ChatInput.tsx+++ b/src/components/chat/ChatInput.tsx@@ -247,7 +247,7 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp}, [addFiles])return (- <div className="px-3 pb-2 pt-1 w-full max-w-[70%] mx-auto">+ <div className="px-3 pb-2 pt-1 w-full max-w-[var(--lu-measure)] mx-auto">{/* Approval used to live here as a popup over the chat input.Per user feedback ("eventuell in den chat einarbeiten") it nowrenders INSIDE the pending tool-call block in MessageList, sodiff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsxindex 829756df..657c9e38 100644--- a/src/components/chat/ChatView.tsx+++ b/src/components/chat/ChatView.tsx@@ -147,289 +147,301 @@ export function ChatView() {return (<div className="h-full flex flex-col min-w-0">- <AnimatePresence mode="wait">- {!activeConversationId ? (- // ── Homepage: just logo, no prompt ──- <motion.div- key="home"- className="flex-1 flex flex-col items-center justify-center"- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- exit={{ opacity: 0, y: -20 }}- transition={{ duration: 0.2 }}- >- <img src="/LU-monogram-bw.png" alt="" width={46} height={46} className="dark:invert-0 invert opacity-20" />+ {/* One composer, two places. The landing state used to render a logo and+ nothing else, so the screen you arrive on had no input field at all.+ sendMessage creates the conversation when none is active (useChat.ts),+ so the same element serves both branches — and it has to stay OUTSIDE+ the AnimatePresence as ONE instance: a second copy per branch would+ drop the draft the moment the first message creates the conversation,+ which is worse than having no input field at all. */}+ <div className="flex-1 flex overflow-hidden min-h-0">+ <div className="flex-1 flex flex-col min-w-0 relative">+ {chatMode === 'codex' && activeConversationId ? (+ <CodexView />+ ) : (<>+ <AnimatePresence mode="wait">+ {!activeConversationId ? (+ // ── Homepage: logo above the shared composer ──+ <motion.div+ key="home"+ className="flex-1 flex flex-col items-center justify-center min-h-0"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ exit={{ opacity: 0, y: -20 }}+ transition={{ duration: 0.2 }}+ >+ <img src="/LU-monogram-bw.png" alt="" width={46} height={46} className="dark:invert-0 invert opacity-20" />- {models.length > 0 && !activeModel && (- <p className="text-[0.6rem] text-amber-500/60 mt-3">Select a model above.</p>- )}- </motion.div>- ) : (- // ── Active chat ──- <motion.div- key="chat"- className="flex-1 flex overflow-hidden"- initial={{ opacity: 0, y: 20 }}- animate={{ opacity: 1, y: 0 }}- transition={{ duration: 0.25, ease: 'easeOut' }}- >- <div className="flex-1 flex flex-col min-w-0 relative">- {chatMode === 'codex' ? (- <CodexView />- ) : (<>- {/* Top bar — slim: session/meta controls only. Docs · Plugins ·- Tools + the model picker moved into the composer action bar- (web parity, David 2026-07-11); Memory stands alone top-right. */}- <div className="flex items-center gap-1.5 px-2 pt-0.5">- <AgentModeToggle />- <AgentWorkspaceBadge />+ {models.length > 0 && !activeModel && (+ <p className="text-[0.6rem] text-amber-500/60 mt-3">Select a model above.</p>+ )}+ </motion.div>+ ) : (+ // ── Active chat ──+ <motion.div+ key="chat"+ className="flex-1 flex flex-col min-w-0 min-h-0"+ initial={{ opacity: 0, y: 20 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.25, ease: 'easeOut' }}+ >+ {/* Top bar — slim: session/meta controls only. Docs · Plugins ·+ Tools + the model picker moved into the composer action bar+ (web parity, David 2026-07-11); Memory stands alone top-right. */}+ <div className="flex items-center gap-1.5 px-2 pt-0.5">+ <AgentModeToggle />+ <AgentWorkspaceBadge />- {/* Spacer */}- <div className="flex-1" />+ {/* Spacer */}+ <div className="flex-1" />- {/* Token Counter */}- <TokenCounter />+ {/* Token Counter */}+ <TokenCounter />- {/* Context window picker (Ollama num_ctx / LM Studio loaded ctx) */}- <ContextDropdown />+ {/* Context window picker (Ollama num_ctx / LM Studio loaded ctx) */}+ <ContextDropdown />- {/* Small-Model Mode — only relevant when the agent loop (tools)- is active; plain chat has no tool calls to lean out. */}- {isAgentActive && <SmallModelModeToggle />}+ {/* Small-Model Mode — only relevant when the agent loop (tools)+ is active; plain chat has no tool calls to lean out. */}+ {isAgentActive && <SmallModelModeToggle />}- {/* Memory — standalone, top-right (moved out of the header model- picker; David 2026-07-11). View / add / delete injected context. */}- <MemoryDebugToggle />+ {/* Memory — standalone, top-right (moved out of the header model+ picker; David 2026-07-11). View / add / delete injected context. */}+ <MemoryDebugToggle />- {/* Export */}- <div className="relative">- <button- onClick={() => setExportOpen(!exportOpen)}- className="flex items-center gap-1 px-2 py-0.5 rounded border border-gray-200 dark:border-white/[0.06] hover:border-gray-400 dark:hover:border-white/15 text-gray-500 transition-colors text-[0.55rem]"- title="Export chat"- >- <Download size={10} />- </button>- {exportOpen && (- <>- <div className="fixed inset-0 z-40" onClick={() => setExportOpen(false)} />- <div className="absolute right-0 top-full mt-1 z-50 w-32 rounded-lg bg-white dark:bg-[#1a1a1a] border border-gray-200 dark:border-white/10 shadow-xl py-1">- {(['markdown', 'json'] as const).map(fmt => (- <button- key={fmt}- onClick={async () => {- const conv = conversations.find(c => c.id === activeConversationId)- setExportOpen(false)- if (!conv) return- const result = await exportConversation(conv, fmt)- if (result.status === 'saved' && result.path) {- setExportToast(`Saved to ${result.path}`)- } else if (result.status === 'downloaded') {- setExportToast(`Downloaded .${fmt === 'markdown' ? 'md' : 'json'}`)- }- // status === 'cancelled' → no toast, user closed the dialog- }}- className="w-full text-left px-3 py-1 text-[0.55rem] text-gray-400 hover:bg-white/5 hover:text-gray-200 transition-colors"- >- .{fmt === 'markdown' ? 'md' : fmt}- </button>- ))}- </div>- </>- )}- </div>- </div>+ {/* Export */}+ <div className="relative">+ <button+ onClick={() => setExportOpen(!exportOpen)}+ className="flex items-center gap-1 px-2 py-0.5 rounded border border-gray-200 dark:border-white/[0.06] hover:border-gray-400 dark:hover:border-white/15 text-gray-500 transition-colors text-[0.55rem]"+ title="Export chat"+ >+ <Download size={10} />+ </button>+ {exportOpen && (+ <>+ <div className="fixed inset-0 z-40" onClick={() => setExportOpen(false)} />+ <div className="absolute right-0 top-full mt-1 z-50 w-32 rounded-lg bg-white dark:bg-[#1a1a1a] border border-gray-200 dark:border-white/10 shadow-xl py-1">+ {(['markdown', 'json'] as const).map(fmt => (+ <button+ key={fmt}+ onClick={async () => {+ const conv = conversations.find(c => c.id === activeConversationId)+ setExportOpen(false)+ if (!conv) return+ const result = await exportConversation(conv, fmt)+ if (result.status === 'saved' && result.path) {+ setExportToast(`Saved to ${result.path}`)+ } else if (result.status === 'downloaded') {+ setExportToast(`Downloaded .${fmt === 'markdown' ? 'md' : 'json'}`)+ }+ // status === 'cancelled' → no toast, user closed the dialog+ }}+ className="w-full text-left px-3 py-1 text-[0.55rem] text-gray-400 hover:bg-white/5 hover:text-gray-200 transition-colors"+ >+ .{fmt === 'markdown' ? 'md' : fmt}+ </button>+ ))}+ </div>+ </>+ )}+ </div>+ </div>- {/* The plan, for plain chat and for Agent alike. It belongs with- the standing status controls in the header, not at the prompt- box: the Chat surface has no right-hand column to hand it to,- and this row is where everything that is TRUE OF THE SESSION- rather than of the next message already lives (agent toggle,- workspace, token counter, context window, memory). Collapsed- by default so it costs one line above the transcript. */}- <PlanBar />+ {/* The plan, for plain chat and for Agent alike. It belongs with+ the standing status controls in the header, not at the prompt+ box: the Chat surface has no right-hand column to hand it to,+ and this row is where everything that is TRUE OF THE SESSION+ rather than of the next message already lives (agent toggle,+ workspace, token counter, context window, memory). Collapsed+ by default so it costs one line above the transcript. */}+ <PlanBar />- <MessageList- isGenerating={isGenerating}- isThisChatGenerating={activeGenerating}- isLoadingModel={isLoadingModel}- onRegenerate={regenerateMessage}- onEdit={editAndResend}- pendingApprovalId={pendingApproval?.id ?? null}- onApprove={approveToolCall}- onReject={rejectToolCall}- />+ <MessageList+ isGenerating={isGenerating}+ isThisChatGenerating={activeGenerating}+ isLoadingModel={isLoadingModel}+ onRegenerate={regenerateMessage}+ onEdit={editAndResend}+ pendingApprovalId={pendingApproval?.id ?? null}+ onApprove={approveToolCall}+ onReject={rejectToolCall}+ />- {/* Remote session banners */}- {isThisRemoteActive && (- <div className="mx-3 mb-1.5 flex items-center justify-between gap-2 px-2.5 py-1 rounded border border-green-500/25 bg-green-500/5 text-[0.6rem]">- <div className="flex items-center gap-1.5 text-green-400">- <Radio size={10} className="animate-pulse" />- <span className="font-medium">Live</span>- <span className="text-green-500/60">- {mobileConnectedCount > 0- ? `, ${mobileConnectedCount} mobile${mobileConnectedCount === 1 ? '' : 's'} connected`- : ', ready for mobile'}- </span>- </div>- <button- onClick={handleRemoteReactivate}- disabled={remoteLoading}- title="Regenerate passcode, keep this chat"- className="flex items-center gap-1 px-1.5 py-0.5 rounded text-blue-400 hover:bg-blue-500/15 border border-blue-500/20 transition-all disabled:opacity-50"- >- <RefreshCw size={9} className={remoteLoading ? 'animate-spin' : ''} />- Restart- </button>- </div>- )}- {isThisRemoteStopped && (- <div- className={- 'mx-3 mb-1.5 flex items-start justify-between gap-2 px-2.5 py-1 rounded border text-[0.6rem] ' +- (remoteError- ? 'border-red-500/30 bg-red-500/5'- : 'border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.02]')- }- >- <div className={'flex flex-col gap-0.5 min-w-0 ' + (remoteError ? 'text-red-400' : 'text-gray-500')}>- <div className="flex items-center gap-1.5">- <Radio size={10} />- <span className="font-medium">Server stopped</span>- <span className={remoteError ? 'text-red-400/70' : 'text-gray-500/70'}>- {remoteError ? ', last attempt failed' : ', restart to reconnect mobile'}- </span>- </div>- {/* #29: surface the actual reason (port in use,- firewall, etc.) so the user knows why Restart is- not coming back, instead of staring at a button- that does nothing. */}- {remoteError && (- <div className="text-[0.55rem] text-red-300/80 break-words pl-4 leading-snug">- {remoteError}+ {/* Remote session banners */}+ {isThisRemoteActive && (+ <div className="mx-3 mb-1.5 flex items-center justify-between gap-2 px-2.5 py-1 rounded border border-green-500/25 bg-green-500/5 text-[0.6rem]">+ <div className="flex items-center gap-1.5 text-green-400">+ <Radio size={10} className="animate-pulse" />+ <span className="font-medium">Live</span>+ <span className="text-green-500/60">+ {mobileConnectedCount > 0+ ? `, ${mobileConnectedCount} mobile${mobileConnectedCount === 1 ? '' : 's'} connected`+ : ', ready for mobile'}+ </span></div>- )}- </div>- <div className="flex items-center gap-1 shrink-0">- {remoteError && (<button- onClick={remoteClearError}- title="Dismiss error"- className="p-0.5 rounded text-red-400/70 hover:text-red-300 hover:bg-red-500/15 transition-all"+ onClick={handleRemoteReactivate}+ disabled={remoteLoading}+ title="Regenerate passcode, keep this chat"+ className="flex items-center gap-1 px-1.5 py-0.5 rounded text-blue-400 hover:bg-blue-500/15 border border-blue-500/20 transition-all disabled:opacity-50">- <X size={9} />+ <RefreshCw size={9} className={remoteLoading ? 'animate-spin' : ''} />+ Restart</button>- )}- <button- onClick={handleRemoteReactivate}- disabled={remoteLoading}- title="Start a fresh server and reattach this chat"+ </div>+ )}+ {isThisRemoteStopped && (+ <divclassName={- 'flex items-center gap-1 px-2 py-0.5 rounded transition-all disabled:opacity-50 font-medium ' ++ 'mx-3 mb-1.5 flex items-start justify-between gap-2 px-2.5 py-1 rounded border text-[0.6rem] ' +(remoteError- ? 'text-red-300 hover:bg-red-500/15 border border-red-500/40'- : 'text-green-400 hover:bg-green-500/15 border border-green-500/30')+ ? 'border-red-500/30 bg-red-500/5'+ : 'border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.02]')}>- <RefreshCw size={9} className={remoteLoading ? 'animate-spin' : ''} />- {remoteError ? 'Retry' : 'Restart'}- </button>- </div>- </div>- )}-- <ChatInput- onSend={sendMessage}- onStop={stopGeneration}- isGenerating={isGenerating}- pendingApproval={pendingApproval}- onApprove={approveToolCall}- onReject={rejectToolCall}- // Commands need the tool catalog to drive, which only Agent- // mode has here. Plain chat leaves "/cmd" as ordinary text.- slashCommands={isAgentActive}- onAttachDocs={appMode !== 'cloud' ? () => setRagPanelOpen(true) : undefined}- composerModel={- <div className="flex items-center gap-1.5">- {/* What this chat's answers were written by, when that is- not what the picker says (Meldung 4, R5 re-measure). */}- <ConversationModelNote />- <ModelSelector openUpward />- </div>- }- // No plan lives here. The prompt window is the prompt window- // (David, 2026-08-22): the plan band sits under the header row- // above, next to the other standing status controls.- composerAbove={<><LoopBar onStop={stopGeneration} /><GoalBar /><GroupCostHint /></>}- composerActions={- <>- {/* Documents (RAG) — local-embeddings only, so hide in- Cloud mode (web parity). */}- {appMode !== 'cloud' && (- <button- onClick={() => setRagPanelOpen(!ragPanelOpen)}- className={- 'flex items-center gap-1 px-2 py-1.5 rounded-md transition-all shrink-0 text-[0.6rem] font-medium ' +- (ragPanelOpen || ragEnabled- ? 'bg-green-500/15 text-green-400 border border-green-500/30'- : 'text-gray-500 hover:text-gray-300 hover:bg-white/5')- }- title="Document Chat (RAG)"- >- <FileText size={11} />- <span>Docs</span>- {docCount > 0 && (- <span className={- 'min-w-[12px] h-[12px] flex items-center justify-center rounded-full text-[0.45rem] font-bold ' +- (ragEnabled ? 'bg-green-500 text-white' : 'bg-white/15 text-gray-300')- }>- {docCount}- </span>- )}- </button>- )}-- {/* Plugins (Chat Tools + Caveman + Personas) */}- <PluginsDropdown openUpward />-- {/* Tools — agent permission overrides (only when agent active) */}- {isAgentActive && (- <div className="relative">+ <div className={'flex flex-col gap-0.5 min-w-0 ' + (remoteError ? 'text-red-400' : 'text-gray-500')}>+ <div className="flex items-center gap-1.5">+ <Radio size={10} />+ <span className="font-medium">Server stopped</span>+ <span className={remoteError ? 'text-red-400/70' : 'text-gray-500/70'}>+ {remoteError ? ', last attempt failed' : ', restart to reconnect mobile'}+ </span>+ </div>+ {/* #29: surface the actual reason (port in use,+ firewall, etc.) so the user knows why Restart is+ not coming back, instead of staring at a button+ that does nothing. */}+ {remoteError && (+ <div className="text-[0.55rem] text-red-300/80 break-words pl-4 leading-snug">+ {remoteError}+ </div>+ )}+ </div>+ <div className="flex items-center gap-1 shrink-0">+ {remoteError && (+ <button+ onClick={remoteClearError}+ title="Dismiss error"+ className="p-0.5 rounded text-red-400/70 hover:text-red-300 hover:bg-red-500/15 transition-all"+ >+ <X size={9} />+ </button>+ )}<button- onClick={() => setToolsDropdownOpen(!toolsDropdownOpen)}- className="flex items-center gap-1 px-2 py-1.5 rounded-md text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-all shrink-0 text-[0.6rem] font-medium"+ onClick={handleRemoteReactivate}+ disabled={remoteLoading}+ title="Start a fresh server and reattach this chat"+ className={+ 'flex items-center gap-1 px-2 py-0.5 rounded transition-all disabled:opacity-50 font-medium ' ++ (remoteError+ ? 'text-red-300 hover:bg-red-500/15 border border-red-500/40'+ : 'text-green-400 hover:bg-green-500/15 border border-green-500/30')+ }>- <Wrench size={11} className="text-green-400" />- <span>Tools</span>- <ChevronDown size={9} className={`transition-transform ${toolsDropdownOpen ? 'rotate-180' : ''}`} />+ <RefreshCw size={9} className={remoteLoading ? 'animate-spin' : ''} />+ {remoteError ? 'Retry' : 'Restart'}</button>- {toolsDropdownOpen && (- <>- <div className="fixed inset-0 z-40" onClick={() => setToolsDropdownOpen(false)} />- <div className="absolute left-0 bottom-full mb-0.5 z-50 w-28 rounded-md bg-white dark:bg-[#1a1a1a] border border-gray-200 dark:border-white/10 shadow-xl py-0.5 px-0.5">- <PermissionOverrideBar />- </div>- </>- )}</div>+ </div>+ )}+ </motion.div>+ )}+ </AnimatePresence>++ {/* Code mode brings its own composer, so it stays out of this one. */}+ {chatMode !== 'codex' && (+ <ChatInput+ onSend={sendMessage}+ onStop={stopGeneration}+ isGenerating={isGenerating}+ pendingApproval={pendingApproval}+ onApprove={approveToolCall}+ onReject={rejectToolCall}+ // Commands need the tool catalog to drive, which only Agent+ // mode has here. Plain chat leaves "/cmd" as ordinary text.+ slashCommands={isAgentActive}+ onAttachDocs={appMode !== 'cloud' ? () => setRagPanelOpen(true) : undefined}+ composerModel={+ <div className="flex items-center gap-1.5">+ {/* What this chat's answers were written by, when that is+ not what the picker says (Meldung 4, R5 re-measure). */}+ <ConversationModelNote />+ <ModelSelector openUpward />+ </div>+ }+ // No plan lives here. The prompt window is the prompt window+ // (David, 2026-08-22): the plan band sits under the header row+ // above, next to the other standing status controls.+ composerAbove={<><LoopBar onStop={stopGeneration} /><GoalBar /><GroupCostHint /></>}+ composerActions={+ <>+ {/* Documents (RAG) — local-embeddings only, so hide in+ Cloud mode (web parity). */}+ {appMode !== 'cloud' && (+ <button+ onClick={() => setRagPanelOpen(!ragPanelOpen)}+ className={+ 'flex items-center gap-1 px-2 py-1.5 rounded-md transition-all shrink-0 text-[0.6rem] font-medium ' ++ (ragPanelOpen || ragEnabled+ ? 'bg-green-500/15 text-green-400 border border-green-500/30'+ : 'text-gray-500 hover:text-gray-300 hover:bg-white/5')+ }+ title="Document Chat (RAG)"+ >+ <FileText size={11} />+ <span>Docs</span>+ {docCount > 0 && (+ <span className={+ 'min-w-[12px] h-[12px] flex items-center justify-center rounded-full text-[0.45rem] font-bold ' ++ (ragEnabled ? 'bg-green-500 text-white' : 'bg-white/15 text-gray-300')+ }>+ {docCount}+ </span>)}- </>- }- />- </>)}- </div>+ </button>+ )}- {/* RAG Panel */}- <AnimatePresence>- {ragPanelOpen && (- <ErrorBoundary fallbackClassName="w-[280px] shrink-0 h-full border-l border-white/5 bg-[#363636] flex flex-col items-center justify-center p-6 gap-3">- <RAGPanel conversationId={activeConversationId} onClose={() => setRagPanelOpen(false)} />- </ErrorBoundary>- )}- </AnimatePresence>- </motion.div>- )}- </AnimatePresence>+ {/* Plugins (Chat Tools + Caveman + Personas) */}+ <PluginsDropdown openUpward />++ {/* Tools — agent permission overrides (only when agent active) */}+ {isAgentActive && (+ <div className="relative">+ <button+ onClick={() => setToolsDropdownOpen(!toolsDropdownOpen)}+ className="flex items-center gap-1 px-2 py-1.5 rounded-md text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-all shrink-0 text-[0.6rem] font-medium"+ >+ <Wrench size={11} className="text-green-400" />+ <span>Tools</span>+ <ChevronDown size={9} className={`transition-transform ${toolsDropdownOpen ? 'rotate-180' : ''}`} />+ </button>+ {toolsDropdownOpen && (+ <>+ <div className="fixed inset-0 z-40" onClick={() => setToolsDropdownOpen(false)} />+ <div className="absolute left-0 bottom-full mb-0.5 z-50 w-28 rounded-md bg-white dark:bg-[#1a1a1a] border border-gray-200 dark:border-white/10 shadow-xl py-0.5 px-0.5">+ <PermissionOverrideBar />+ </div>+ </>+ )}+ </div>+ )}+ </>+ }+ />+ )}+ </>)}+ </div>++ {/* RAG Panel */}+ <AnimatePresence>+ {ragPanelOpen && activeConversationId && (+ <ErrorBoundary fallbackClassName="w-[280px] shrink-0 h-full border-l border-white/5 bg-[#363636] flex flex-col items-center justify-center p-6 gap-3">+ <RAGPanel conversationId={activeConversationId} onClose={() => setRagPanelOpen(false)} />+ </ErrorBoundary>+ )}+ </AnimatePresence>+ </div>{/* Export toast */}<AnimatePresence>diff --git a/src/components/chat/GoalBar.tsx b/src/components/chat/GoalBar.tsxindex 58805f2a..42ef517f 100644--- a/src/components/chat/GoalBar.tsx+++ b/src/components/chat/GoalBar.tsx@@ -17,7 +17,7 @@ export function GoalBar() {if (!activeConversationId || !goal?.text) return nullreturn (- <div className="w-full max-w-[70%] mx-auto px-3 pb-1 flex justify-center">+ <div className="w-full max-w-[var(--lu-measure)] mx-auto px-3 pb-1 flex justify-center"><div className="w-full flex items-center gap-1.5 px-2 py-1 rounded-md border border-purple-500/20 bg-purple-500/[0.04]"><Target size={9} className="text-purple-400 shrink-0" /><span className="text-[0.55rem] uppercase tracking-wider text-gray-500 shrink-0">goal</span>diff --git a/src/components/chat/LoopBar.tsx b/src/components/chat/LoopBar.tsxindex 4326569a..cd5eba26 100644--- a/src/components/chat/LoopBar.tsx+++ b/src/components/chat/LoopBar.tsx@@ -31,7 +31,7 @@ export function LoopBar({ onStop }: Props) {const passLabel = loop.cap > 0 ? `pass ${loop.pass} of ${loop.cap}` : `pass ${loop.pass}`return (- <div className="w-full max-w-[70%] mx-auto px-3 pb-1 flex justify-center">+ <div className="w-full max-w-[var(--lu-measure)] mx-auto px-3 pb-1 flex justify-center"><div className="w-full flex items-center gap-1.5 px-2 py-1 rounded-md border border-blue-500/25 bg-blue-500/[0.05]"><RefreshCw size={9} className="text-blue-400 shrink-0 animate-spin" style={{ animationDuration: '3s' }} /><span className="text-[0.55rem] uppercase tracking-wider text-gray-500 shrink-0">loop</span>diff --git a/src/components/chat/MessageBubble.tsx b/src/components/chat/MessageBubble.tsxindex 252acf5e..0a0c5565 100644--- a/src/components/chat/MessageBubble.tsx+++ b/src/components/chat/MessageBubble.tsx@@ -36,9 +36,11 @@ interface Props {/** True for the last visible message — gates the VRAM hand-off card so it* only renders in the active assistant turn, not in every historical one. */isLast?: boolean+ /** This bubble is the one currently streaming — hides its action bar. */+ isStreaming?: boolean}-function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, onApprove, onReject, isLast }: Props) {+function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, onApprove, onReject, isLast, isStreaming }: Props) {const [copied, setCopied] = useState(false)const [isEditing, setIsEditing] = useState(false)const [editContent, setEditContent] = useState('')@@ -454,7 +456,12 @@ function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, o{/* Action bar UNDER the message (David 2026-06-06: "eigene Leiste unterder Nachricht" instead of cramped hover-icons in the corner). Biggertargets, always visible but subtle; assistant left, user right. */}- {!isEditing && (+ {/* Hidden while this very turn still streams: the bar used to hang on+ !isEditing alone, so Copy/Regenerate/Delete rendered under a+ half-written answer from the first token on. Gated on the live+ generating flag rather than on `usage`, because a backend that+ never reports usage would otherwise lose the bar for good. */}+ {!isEditing && !isStreaming && (<div className={'flex items-center gap-0.5 ' + (isUser ? 'justify-end pr-0.5' : 'justify-start pl-0.5')}>{isUser && onEdit && (<button onClick={startEdit} className="p-1 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors" aria-label="Edit message" title="Edit"><Pencil size={12} /></button>diff --git a/src/components/chat/MessageList.tsx b/src/components/chat/MessageList.tsxindex 75fd1d1c..57a08993 100644--- a/src/components/chat/MessageList.tsx+++ b/src/components/chat/MessageList.tsx@@ -77,13 +77,16 @@ export function MessageList({ isGenerating, isThisChatGenerating, isLoadingModel>{/* Single wrapper so the hook's ResizeObserver sees ALL content height,anchor included (G33). */}- <div ref={contentRef}>+ <div ref={contentRef} className="mx-auto w-full max-w-[var(--lu-measure)]">{visibleMessages.map((message) => (<MessageBubblekey={message.id}message={message}isLast={message.id === lastVisibleId}+ // The live generating flag, not `message.usage`: a backend that+ // never reports usage would lose the action bar for good.+ isStreaming={showTyping && message.id === lastVisibleId && message.role === 'assistant'}onRegenerate={message.role === 'assistant' && onRegenerate && !isGenerating? handleRegenerate: undefined}diff --git a/src/components/chat/PlanBar.tsx b/src/components/chat/PlanBar.tsxindex f7b890ab..5c9ba5c5 100644--- a/src/components/chat/PlanBar.tsx+++ b/src/components/chat/PlanBar.tsx@@ -65,7 +65,12 @@ export function PlanBar({ variant = 'header' }: Props) {return (<div- className={panel ? 'w-full p-1.5' : 'w-full px-2 pt-1'}+ // 'header' sits directly above the transcript, so it rides the SAME+ // measure column and the same px-3 gutter the bubbles use — a band that+ // ran the full window width while the answers below it stopped at 760px+ // read as a second, wider layout stacked on the first. 'panel' is the+ // Code Explorer column and owns its own width, so it keeps out of this.+ className={panel ? 'w-full p-1.5' : 'mx-auto w-full max-w-[var(--lu-measure)] px-3 pt-1'}data-testid={panel ? 'plan-panel' : 'plan-header'}><div className="w-full rounded-md border border-blue-500/20 bg-blue-500/[0.04]">diff --git a/src/components/chat/WorkingAnchor.tsx b/src/components/chat/WorkingAnchor.tsxindex 964d8b13..6e09e7f1 100644--- a/src/components/chat/WorkingAnchor.tsx+++ b/src/components/chat/WorkingAnchor.tsx@@ -34,7 +34,7 @@ export function WorkingAnchor({ isRunning, label }: Props) {if (!isRunning) return nullreturn (- <div className="flex items-center gap-2 px-3 py-1.5" data-testid="working-anchor">+ <div className="flex items-center gap-2 pl-11 pr-3 py-1.5" data-testid="working-anchor"><span className="lu-tool-shimmer text-[0.7rem] font-medium">{label ?? 'Working'}</span>{elapsed >= 1 && (<span className="text-[0.6rem] text-gray-500 dark:text-gray-500 font-mono tabular-nums">diff --git a/src/components/chat/__tests__/plan-done-vs-applied.test.ts b/src/components/chat/__tests__/plan-done-vs-applied.test.tsindex 01afc3cb..d312f05f 100644--- a/src/components/chat/__tests__/plan-done-vs-applied.test.ts+++ b/src/components/chat/__tests__/plan-done-vs-applied.test.ts@@ -58,8 +58,16 @@ describe('the plan moved into the panel (C2)', () => {expect(src).toMatch(/panel = variant === 'panel'/)// The old 70% wrapper was the composer's; in a 280px column it squeezed the// plan into a third of the panel, and at the prompt box it had no business- // being at all.- expect(src).toMatch(/panel \? 'w-full p-1\.5' : 'w-full px-2 pt-1'/)+ // being at all. The panel therefore still owns its full column width and+ // must never pick up a measure or a percentage.+ expect(src).toMatch(/panel \? 'w-full p-1\.5'/)+ const panelBranch = src.slice(src.indexOf("panel ? 'w-full p-1.5'"))+ expect(panelBranch.slice(0, panelBranch.indexOf(':'))).not.toMatch(/max-w-|70%/)+ // The header band, by contrast, sits directly above the transcript and+ // rides the SAME measure column and gutter as the bubbles (design wave 1) —+ // a status band running the full window width above 760px of answers read+ // as a second layout stacked on the first.+ expect(src).toMatch(/mx-auto w-full max-w-\[var\(--lu-measure\)\] px-3 pt-1/)})it('the clear button and the staged count came along, unchanged', () => {diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsxindex 2a72f4c0..905105de 100644--- a/src/components/layout/Header.tsx+++ b/src/components/layout/Header.tsx@@ -138,16 +138,25 @@ export function Header() {updateSettings({ theme: settings.theme === 'dark' ? 'light' : 'dark' })}+ // ONE recipe for every nav item, in the bar and in the overflow menu alike:+ // h-7 so each one is a real click target instead of a 9px word, a filled+ // rounded-md for the active view so "where am I" survives a glance, and the+ // idle/hover pair as the only other state. Bare colour-only labels gave the+ // active tab no hit area and no boundary, which is why the row read as+ // running text rather than as navigation.+ const NAV_BASE = 'flex items-center h-7 px-2 rounded-md text-[0.68rem] font-medium transition-colors'+ const NAV_ACTIVE = 'bg-gray-100 dark:bg-white/[0.08] text-gray-900 dark:text-white'+ const NAV_IDLE = 'text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-white/[0.05]'+ const navClass = (active: boolean, full = false) =>+ `${full ? 'w-full text-left ' : ''}${NAV_BASE} ${active ? NAV_ACTIVE : NAV_IDLE}`+const textNav = (view: string, label: string) => (<buttononClick={() => {useCompareStore.getState().setComparing(false)setView(view as any)}}- className={`text-[0.6rem] font-medium transition-colors ${currentView === view && !isComparing- ? 'text-gray-900 dark:text-white'- : 'text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white'- }`}+ className={navClass(currentView === view && !isComparing)}>{label}</button>@@ -160,10 +169,7 @@ export function Header() {setView(view as any)setShowMoreMenu(false)}}- className={`text-left text-[0.6rem] font-medium transition-colors ${currentView === view && !isComparing- ? 'text-gray-900 dark:text-white'- : 'text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white'- }`}+ className={navClass(currentView === view && !isComparing, true)}>{label}</button>@@ -213,7 +219,12 @@ export function Header() {and the utilities (right). The per-row Lichtschalter that used tolive here has moved INTO the dropdown — each model row in`ModelSelector` has its own load/unload toggle next to the name. */}- <div className="lg:absolute lg:left-1/2 lg:-translate-x-1/2 flex items-center justify-center gap-2 min-w-0 ">+ {/* In flow, not absolutely centered. The model picker that this slot was+ centred for has moved into the composer, so the only thing left here+ is the stale chip — and an out-of-flow box cannot reserve its own+ width, so it spanned the whole bar and swallowed clicks meant for the+ nav and the utilities beside it. */}+ <div className="flex items-center justify-center gap-2 min-w-0 shrink">{/* Model picker + Memory moved out of the header into the composer /top-right (web parity, David 2026-07-11). Only the stale-manifestwarning still surfaces here — chat/code only, never Create. */}@@ -270,8 +281,8 @@ export function Header() {{/* Desktop navigation */}<div className={isCreateView- ? "hidden xl:flex items-center gap-2.5"- : "hidden lg:flex items-center gap-2.5"+ ? "hidden xl:flex items-center gap-0.5"+ : "hidden lg:flex items-center gap-0.5"}>{textNav('chat', 'Chat')}{textNav('create', 'Create')}@@ -281,10 +292,7 @@ export function Header() {useCompareStore.getState().setComparing(true)setView('chat')}}- className={`text-[0.6rem] font-medium transition-colors ${isComparing- ? 'text-gray-900 dark:text-white'- : 'text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white'- }`}+ className={navClass(isComparing)}>Compare</button>@@ -312,7 +320,7 @@ export function Header() {{showMoreMenu && (<div onPointerDown={(e) => e.stopPropagation()} className="absolute right-0 top-full mt-2 w-40 rounded-lg border border-gray-200 dark:border-white/10 bg-white dark:bg-[#1a1a1a] shadow-xl z-50">- <div className="flex flex-col gap-2 p-3">+ <div className="flex flex-col gap-0.5 p-1.5">{dropdownNav('chat', 'Chat')}{dropdownNav('create', 'Create')}@@ -323,10 +331,7 @@ export function Header() {setView('chat')setShowMoreMenu(false)}}- className={`text-left text-[0.6rem] font-medium transition-colors ${isComparing- ? 'text-gray-900 dark:text-white'- : 'text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white'- }`}+ className={navClass(isComparing, true)}>Compare</button>diff --git a/src/index.css b/src/index.cssindex 7d7868f3..4d84388c 100644--- a/src/index.css+++ b/src/index.css@@ -69,6 +69,12 @@--control-h-md: 32px; /* default control height */--control-h-lg: 40px; /* primary Create button */+ /* Chat measure — ONE column for transcript, composer and status anchor.+ They used to be two independent formulas (max-w-[70%] on the composer,+ no max-width at all on the message list), which put the answer text and+ the input box 157px apart at 1600px and let a line run to ~130 chars. */+ --lu-measure: 760px;+/* Radii */--radius-control: 8px;--radius-panel: 12px;