fix(web): keep narrow chat headers readable and aligned #12453
Mergedshivamhwp(GitHub profile, opens in a new tab)merged 10 commits into
main fromrefs/pull/12453/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/web/src/components/chat/ChatHeader.tsx line 459OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -419,20 +459 @@419- onAddScript={onAddProjectScript}420- onUpdateScript={onUpdateProjectScript}421- onDeleteScript={onDeleteProjectScript}422- />423- )}424- {showOpenInPicker && (425- <OpenInPicker426- environmentId={activeThreadEnvironmentId}427- keybindings={keybindings}428- availableEditors={availableEditors}429- openInCwd={openInCwd}430- />431- )}432- {activeProjectName && (433- <GitActionsControl434- gitCwd={gitCwd}435- activeThreadRef={scopeThreadRef(activeThreadEnvironmentId, activeThreadId)}436- onOpenPullRequest={onOpenPullRequest}437- {...(draftId ? { draftId } : {})}438- />459+ {isMobile && (activeProjectScripts || showOpenInPicker || (activeProjectName && gitCwd)) ? (
shivamhwp(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- apps/web/src/components/chat/OpenInPicker.tsx lines 315 to 333OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -276,0 +313,21 @@313+ return (314+ <>315+ {primaryOption && (316+ <MenuItem317+ className="min-h-10 sm:min-h-10"318+ disabled={!openInCwd || remote.mode === "remote-unavailable"}319+ onClick={() => openInEditor(preferredEditor)}320+ >321+ <primaryOption.Icon className={cn("size-4", getOpenInIconClass(primaryOption.kind))} />322+ <span className="truncate">Open in {primaryOption.label}</span>323+ {openFavoriteEditorShortcutLabel && (324+ <MenuShortcut>{openFavoriteEditorShortcutLabel}</MenuShortcut>325+ )}326+ </MenuItem>327+ )}328+ <MenuSub>329+ <MenuSubTrigger className="min-h-10 sm:min-h-10">330+ <SquareArrowOutUpRightIcon className="size-4" />331+ Open in…332+ </MenuSubTrigger>333+ <MenuSubPopup className="max-w-[calc(100vw-2rem)] [&_[data-slot=menu-item]]:min-h-10">apps/web/src/components/GitActionsControl.tsx lines 1749 to 1750OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1661,0 +1730,21 @@1730+ </p>1731+ )}1732+ {gitStatusForActions &&1733+ gitStatusForActions.refName !== null &&1734+ !gitStatusForActions.hasWorkingTreeChanges &&1735+ gitStatusForActions.behindCount > 0 &&1736+ gitStatusForActions.aheadCount === 0 && (1737+ <p className="px-2 py-1.5 text-xs text-warning">Behind upstream. Pull/rebase first.</p>1738+ )}1739+ {gitStatusError && <p className="px-2 py-1.5 text-xs text-destructive">{gitStatusError}</p>}1740+ </>1741+ );1742+1743+ if (!gitCwd) return null;1744+1745+ return (1746+ <>1747+ {presentation === "menu" ? (1748+ !isRepo ? (1749+ <MenuItem1750+ className="min-h-10 sm:min-h-10"apps/web/src/components/ProjectScriptsControl.tsx lines 224 to 242OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -158,0 +222,21 @@222+ {presentation === "menu" ? (223+ <>224+ {primaryScript && (225+ <MenuItem className="min-h-10 sm:min-h-10" onClick={() => onRunScript(primaryScript)}>226+ <ScriptIcon icon={primaryScript.icon} className="size-4" />227+ <span className="truncate">Run {primaryScript.name}</span>228+ <MenuShortcut>229+ {shortcutLabelForCommand(keybindings, commandForProjectScript(primaryScript.id))}230+ </MenuShortcut>231+ </MenuItem>232+ )}233+ {primaryScript || importableScripts.length > 0 ? (234+ <MenuSub235+ open={actionsMenuOpen.scripts}236+ onOpenChange={(open) => setActionsMenuOpen({ scripts: open, imports: false })}237+ >238+ <MenuSubTrigger className="min-h-10 sm:min-h-10">239+ <ScriptIcon icon="play" className="size-4" />240+ Project actions241+ </MenuSubTrigger>242+ <MenuSubPopup className="max-w-[calc(100vw-2rem)] [&_[data-slot=menu-item]]:min-h-10">
- apps/web/src/components/ui/menu.tsx line 113Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -104,3 +110,8 @@104110 );105111 }106112113+// Trim font leading so visible letters center with the icons in touch rows.114+// Symmetric padding keeps accents and descenders inside truncated labels.115+function MenuItemLabel({ className, ...props }: React.ComponentProps<"span">) {116+ return (117+ <span
- apps/web/src/components/WorkspaceBreadcrumb.tsx lines 29 to 37OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -26,3 +26,12 @@2626 readonly current?: boolean;2727 }282829+export function WorkspaceBreadcrumbText({30+ children,31+ className,32+}: {33+ readonly children: ReactNode;34+ readonly className?: string;35+}) {36+ return (37+ <span
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed