diff --git a/src/ui/ThreadView.tsx b/src/ui/ThreadView.tsx
index 5cc5d61..f756cb2 100644
--- a/src/ui/ThreadView.tsx
+++ b/src/ui/ThreadView.tsx
@@ -17,7 +17,7 @@ import { BAR } from "./edges.ts";
import type { T3Session, ThreadHistory } from "../client/session.ts";
import { liveWorkEntryLabel, workEntryDisplayLabel, type MessagesTimelineRow, type Timeline, type WorkLogEntry } from "../model/timeline.ts";
import { blockFor } from "../model/transcript.ts";
-import { firstLine } from "./text.ts";
+import { firstLine, truncate } from "./text.ts";
import { colors, getMarkdownStyle, toneColor } from "./theme.ts";
/** What a right-click in the conversation was on. */
@@ -37,6 +37,9 @@ export interface ConversationMouse {
readonly openTurnDiff: (checkpointTurnCount: number) => void;
}
+/** Prose stops at this width on wide terminals, left-aligned. */
+const CONTENT_WIDTH = 100;
+
/** The conversation, row for row as the web app derives it (MessagesTimeline.logic). */
export function ThreadView(props: {
readonly timeline: Timeline | null;
@@ -71,7 +74,7 @@ export function ThreadView(props: {
{props.error ? {props.error} : null}
{/* Prose stops at reading width on wide terminals; the composer below stays full width. */}
-
+
{props.loading && !timeline ? Loading… : null}
{history?.hasMore || history?.error ? : null}
{timeline?.rows.filter((row) => !isPendingApprovalRow(row, pendingIds)).map((row) => (
@@ -342,10 +345,12 @@ function OmittedOutput({ session, source }: { readonly session: T3Session; reado
/** One work/tool line, everywhere the same: glyph, label, result details right-aligned. */
function WorkLine(props: { readonly glyph: string; readonly glyphColor: string; readonly label: string; readonly labelColor: string; readonly detail?: string; readonly selectable?: boolean }) {
+ // The label gives up whatever the right-hand details take, within the reading width.
+ const label = truncate(props.label, CONTENT_WIDTH - 2 - (props.detail ? props.detail.length + 2 : 0));
return (
{`${props.glyph} `}
- {props.label}
+ {label}
{props.detail ? (
<>