The best way to control Claude Code, Codex and more from any computer or phone
Prevent ChatView header overflow with long thread titles
- add `min-w-0` to ChatView container wrappers to allow proper flex shrinking - make thread title truncatable with `truncate` and `title` tooltip - keep action controls fixed-width with `shrink-0` to preserve header layout
Julius Marminge committed
Feb 16, 2026 at 11:09 UTC
7a5dd62d2f799bd41982eeae04eb24a97c0a7430
1 file changed
+7
-5
apps/web/src/components/ChatView.tsx
+7
-5
@@ -969,7 +969,7 @@ export default function ChatView() {
969
// Empty state: no active thread
970
if (!activeThread) {
971
return (
972
- <div className="flex min-h-0 flex-1 flex-col bg-background text-muted-foreground/40">
972
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-muted-foreground/40">
973
{isElectron && (
974
<div className="drag-region flex h-[52px] shrink-0 items-center border-b border-border px-5">
975
<span className="text-xs text-muted-foreground/50">No active thread</span>
@@ -985,7 +985,7 @@ export default function ChatView() {
985
}
986
987
return (
988
- <div className="flex min-h-0 flex-1 flex-col bg-background">
988
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background">
989
{/* Top bar */}
990
<header
991
className={`flex items-center justify-between border-b border-border px-5 ${isElectron ? "drag-region h-[52px]" : "py-3"}`}
@@ -1304,11 +1304,13 @@ const ChatHeader = memo(function ChatHeader({
1304
}: ChatHeaderProps) {
1305
return (
1306
<>
1307
- <div className="flex items-center gap-3">
1308
- <h2 className="text-sm font-medium text-foreground">{activeThreadTitle}</h2>
1307
+ <div className="flex min-w-0 flex-1 items-center gap-3">
1308
+ <h2 className="truncate text-sm font-medium text-foreground" title={activeThreadTitle}>
1309
+ {activeThreadTitle}
1310
+ </h2>
1311
{activeProjectName && <Badge variant="outline">{activeProjectName}</Badge>}
1312
</div>
1311
- <div className="flex items-center gap-3">
1313
+ <div className="shrink-0 flex items-center gap-3">
1314
{activeProjectName && <OpenInPicker keybindings={keybindings} />}
1315
{activeProjectName && <GitActionsControl api={api} gitCwd={gitCwd} />}
1316
<Button