Skip to content

Commit ae2bb04

Browse files
fix(web): fix header action labels collapsing too early by correcting flex distribution
The header split 50/50 between title and actions via two flex-1 divs. Both children had flex: 1 1 0%, giving the actions div only 398px at 1100px viewport — barely above the @sm (384px) threshold. Labels collapsed to icons at ~1060px even though there was plenty of room. - Change title div from flex-1 to flex-initial shrink so it takes only its content width instead of always claiming 50% - Add overflow-hidden to actions div to prevent button overflow - Revert label shortening from PR #771 (full text now fits) The @container/header-actions query stays on the actions div, now measuring ~660px at 1100px (actual available space) instead of 398px. Labels stay visible until the viewport genuinely gets tight. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 89ffcf4 commit ae2bb04

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apps/web/src/components/GitActionsControl.logic.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ describe("when: working tree has local changes", () => {
344344
assert.deepInclude(quick, {
345345
kind: "run_action",
346346
action: "commit_push_pr",
347-
label: "Commit, push & PR",
347+
label: "Commit, push & create PR",
348348
});
349349
});
350350

@@ -455,7 +455,7 @@ describe("when: working tree has local changes and branch is behind upstream", (
455455
assert.deepInclude(quick, {
456456
kind: "run_action",
457457
action: "commit_push_pr",
458-
label: "Commit, push & PR",
458+
label: "Commit, push & create PR",
459459
});
460460
});
461461

apps/web/src/components/GitActionsControl.logic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export function resolveQuickAction(
219219
return { label: "Commit & push", disabled: false, kind: "run_action", action: "commit_push" };
220220
}
221221
return {
222-
label: "Commit, push & PR",
222+
label: "Commit, push & create PR",
223223
disabled: false,
224224
kind: "run_action",
225225
action: "commit_push_pr",

apps/web/src/components/chat/ChatHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const ChatHeader = memo(function ChatHeader({
5555
}: ChatHeaderProps) {
5656
return (
5757
<div className="flex min-w-0 flex-1 items-center gap-2">
58-
<div className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden sm:gap-3">
58+
<div className="flex min-w-0 flex-initial shrink items-center gap-2 overflow-hidden sm:gap-3">
5959
<SidebarTrigger className="size-7 shrink-0 md:hidden" />
6060
<h2
6161
className="min-w-0 shrink truncate text-sm font-medium text-foreground"
@@ -74,7 +74,7 @@ export const ChatHeader = memo(function ChatHeader({
7474
</Badge>
7575
)}
7676
</div>
77-
<div className="@container/header-actions flex min-w-0 flex-1 items-center justify-end gap-2 @sm/header-actions:gap-3">
77+
<div className="@container/header-actions flex min-w-0 flex-1 items-center justify-end gap-2 overflow-hidden @sm/header-actions:gap-3">
7878
{activeProjectScripts && (
7979
<ProjectScriptsControl
8080
scripts={activeProjectScripts}

0 commit comments

Comments
 (0)