Skip to content

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.

fix(chat): das Transkript ragt beidseitig ueber die Promptbox hinaus

David7798e5bd2ffe
diff --git a/src/components/chat/MessageList.tsx b/src/components/chat/MessageList.tsx
index 21eb5a74..d6f23457 100644
--- a/src/components/chat/MessageList.tsx
+++ b/src/components/chat/MessageList.tsx
@@ -7,6 +7,7 @@ import { WorkingAnchor } from './WorkingAnchor'
import { CompactBlock } from './CompactBlock'
import { compactionAnchors } from '../../lib/compact-summary'
import { Hinweis } from '../ui/Hinweis'
+import { TRANSCRIPT_MAX_PX } from './composer-width'
/**
* Above this many visible messages the transcript stops paying full layout +
@@ -153,8 +154,18 @@ export function MessageList({ isGenerating, isThisChatGenerating, isLoadingModel
}}
>
{/* Single wrapper so the hook's ResizeObserver sees ALL content height,
- anchor included (G33). */}
- <div ref={contentRef} className="mx-auto w-full max-w-[var(--lu-measure)]">
+ anchor included (G33).
+
+ Die Breite kommt aus `composer-width.ts` und nicht mehr aus
+ `--lu-measure`. David, 05.09.2026: das Transkript stand exakt auf
+ der Spaltenbreite und war damit sogar schmaler als die Promptbox
+ darunter (759 gegen 792,3 gerenderte px am Windows-Bau). Es soll
+ links und rechts um je rund 20 Prozent ueber die Box hinausragen,
+ bei gleicher Mitte. `TRANSCRIPT_MAX_PX` rechnet das aus der Breite
+ der Promptbox aus, damit hier keine zweite Zahl neben der einen
+ steht; als `style`, weil Tailwind Klassennamen scannt und eine
+ gerechnete Breite deshalb keine Regel bekaeme. */}
+ <div ref={contentRef} className="mx-auto w-full" style={{ maxWidth: TRANSCRIPT_MAX_PX }}>
{visibleMessages
.map((message, index) => (
// The wrapper carries the skip hint so MessageBubble keeps owning
diff --git a/src/components/chat/__tests__/long-transcripts-stay-cheap.test.ts b/src/components/chat/__tests__/long-transcripts-stay-cheap.test.ts
index 2a1e0ea5..9e665d11 100644
--- a/src/components/chat/__tests__/long-transcripts-stay-cheap.test.ts
+++ b/src/components/chat/__tests__/long-transcripts-stay-cheap.test.ts
@@ -51,10 +51,15 @@ describe('every message stays mounted — no window, no slice', () => {
expect(anchor).toBeGreaterThan(wrapper)
})
- it('the measure column is untouched', () => {
- // W1 introduced this; a virtualisation rewrite is exactly the kind of
- // change that quietly drops it.
- expect(list).toContain('max-w-[var(--lu-measure)]')
+ it('the column cap is still there, and it is the derived one', () => {
+ // W1 introduced a cap here; a virtualisation rewrite is exactly the kind
+ // of change that quietly drops it. Since 05.09.2026 the cap is no longer
+ // `--lu-measure`: David asked for a transcript that overhangs the prompt
+ // box by about 20 percent on each side, and that number is derived from
+ // the composer width in composer-width.ts instead of standing next to it.
+ expect(list).toContain('TRANSCRIPT_MAX_PX')
+ expect(list).toContain('mx-auto w-full')
+ expect(list).not.toContain('max-w-[var(--lu-measure)]')
})
})
diff --git a/src/components/chat/composer-width.ts b/src/components/chat/composer-width.ts
index 08c18c88..97de978a 100644
--- a/src/components/chat/composer-width.ts
+++ b/src/components/chat/composer-width.ts
@@ -54,3 +54,38 @@
* einer gepflegt, hier viermal.
*/
export const COMPOSER_MAX_W = 'max-w-[713px]'
+
+/**
+ * Das Innenpolster des Fensterrahmens, `px-3` links wie rechts.
+ *
+ * COMPOSER_MAX_W deckelt den RAHMEN um das Fenster, nicht das Fenster. Wer
+ * die sichtbare Kante der Promptbox braucht, muss diese 24 abziehen; am
+ * laufenden Windows-Bau (1296x808, --ui-scale 1.15) sind das 819,9 gerenderte
+ * px fuer den Rahmen und 792,3 fuer die Box darin.
+ */
+const COMPOSER_PAD_PX = 24
+
+/** Die sichtbare Breite der Promptbox, in Entwurfspixeln. */
+export const COMPOSER_BOX_PX =
+ Number(COMPOSER_MAX_W.match(/(\d+)/)![1]) - COMPOSER_PAD_PX
+
+/**
+ * Wie breit das Transkript ist, abgeleitet und nicht daneben gestellt.
+ *
+ * David, 05.09.2026: das Transkript stand exakt auf `--lu-measure` (759
+ * gerenderte px) und war damit sogar schmaler als die Promptbox darunter
+ * (792,3). Er will es links und rechts um je rund 20 Prozent ueber die Box
+ * hinausragen sehen, also die 1,4-fache Breite bei gleicher Mitte.
+ *
+ * Die Zahl steht deshalb NICHT als zweite Konstante daneben, sondern faellt
+ * aus der Breite der Promptbox: 689 x 1,4 = 964,6, gerundet 965. Wer oben die
+ * 713 aendert, aendert diese Zahl mit; eine Drift zwischen beiden ist nicht
+ * moeglich.
+ *
+ * Als Zahl und nicht als Tailwind-Klasse: Tailwind SCANNT Klassennamen aus
+ * dem Quelltext und kann nichts rechnen, eine zusammengesetzte Breitenklasse
+ * erzeugt also gar keine Regel. Und eine ausgeschriebene zweite Pixelzahl
+ * waere genau die Doppelung, die der Kopf dieser Datei fuer die vier Leisten
+ * beschreibt. Die Zahl geht deshalb als `style` an das Transkript.
+ */
+export const TRANSCRIPT_MAX_PX = Math.round(COMPOSER_BOX_PX * 1.4)