Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/browser/BrowserDeviceToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export function BrowserDeviceToolbar({
>
<SelectValue />
</SelectTrigger>
<SelectPopup align="start" alignItemWithTrigger={false} className="min-w-64">
<SelectPopup align="start" alignItemWithTrigger={false}>
<SelectItem value={RESPONSIVE_VALUE}>Responsive</SelectItem>
<SelectGroup>
<SelectGroupLabel>Standard</SelectGroupLabel>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/BranchToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const MobileRunContextSelector = memo(function MobileRunContextSelector({
{triggerContent}
<ChevronDownIcon className="size-3 shrink-0 opacity-50" />
</MenuTrigger>
<MenuPopup align="start" side="top" className="w-64" {...composerFloatingLayerProps}>
<MenuPopup align="start" side="top" {...composerFloatingLayerProps}>
{showEnvironmentPicker && availableEnvironments && onEnvironmentChange ? (
<>
<MenuGroup>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/DiffPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ export default function DiffPanel({
<span className="truncate">{selectedScopeLabel}</span>
<ChevronDownIcon className="size-3.5 shrink-0 opacity-70" />
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-60">
<DropdownMenuContent align="start">
<DropdownMenuRadioGroup value={selectedScopeValue} onValueChange={selectScopeValue}>
<DropdownMenuRadioItem value="unstaged" closeOnClick>
<span>Working tree</span>
Expand All @@ -692,7 +692,7 @@ export default function DiffPanel({
</DropdownMenuRadioGroup>
<DropdownMenuSub>
<DropdownMenuSubTrigger>Turn</DropdownMenuSubTrigger>
<DropdownMenuSubContent className="w-64">
<DropdownMenuSubContent>
<DropdownMenuRadioGroup value={selectedTurnValue} onValueChange={selectScopeValue}>
{orderedTurnDiffSummaries.map((summary) => {
const turnCount =
Expand Down
6 changes: 2 additions & 4 deletions apps/web/src/components/GitActionsControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ export default function GitActionsControl({
<SourceControlIcon className="size-4" />
<MenuItemLabel>Git actions</MenuItemLabel>
</MenuSubTrigger>
<MenuSubPopup className="min-w-32 max-w-[calc(100vw-2rem)]">{gitItems}</MenuSubPopup>
<MenuSubPopup>{gitItems}</MenuSubPopup>
</MenuSub>
</>
)
Expand Down Expand Up @@ -1859,9 +1859,7 @@ export default function GitActionsControl({
>
<ChevronDownIcon aria-hidden="true" className="size-4" />
</MenuTrigger>
<MenuPopup align="end" className="w-full">
{gitItems}
</MenuPopup>
<MenuPopup align="end">{gitItems}</MenuPopup>
</Menu>
</Group>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/LegacySidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ function ProjectSortMenu({
</TooltipTrigger>
<TooltipPopup side="right">Sidebar options</TooltipPopup>
</Tooltip>
<MenuPopup align="end" side="bottom" className="min-w-52">
<MenuPopup align="end" side="bottom">
<MenuGroup>
<div className="px-2 py-1 sm:text-xs font-medium text-muted-foreground">
Sort projects
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/components/ProjectScriptsControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ export default function ProjectScriptsControl({
<ScriptIcon icon="play" className="size-4" />
<MenuItemLabel>Project actions</MenuItemLabel>
</MenuSubTrigger>
<MenuSubPopup className="min-w-32 max-w-[calc(100vw-2rem)]">
{scriptItems}
</MenuSubPopup>
<MenuSubPopup>{scriptItems}</MenuSubPopup>
</MenuSub>
) : (
<MenuItem
Expand Down
10 changes: 2 additions & 8 deletions apps/web/src/components/RightPanelTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,7 @@ function RightPanelEmptyState(props: {
>
<ChevronDown className="size-3.5" />
</MenuTrigger>
<MenuPopup
align="end"
side="bottom"
sideOffset={6}
className="min-w-40 max-w-56"
>
<MenuPopup align="end" side="bottom" sideOffset={6} className="max-w-56">
{props.browserProfiles.map((profile) => (
<MenuItem
key={profile.id}
Expand Down Expand Up @@ -1273,7 +1268,6 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
align="start"
side="bottom"
sideOffset={6}
className="min-w-44"
onKeyDownCapture={handleAddSurfaceMenuKeyDown}
>
{addSurfaceActions.map((action) => {
Expand Down Expand Up @@ -1314,7 +1308,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
and run to 48 characters, which would otherwise widen
the popup to fit-content and wrap.
*/}
<MenuSubPopup className="min-w-40 max-w-56">
<MenuSubPopup className="max-w-56">
{browserProfiles.map((profile) => (
<MenuItem
key={profile.id}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ function SnoozePopoverButton(props: {
</TooltipTrigger>
<TooltipPopup>Snooze thread</TooltipPopup>
</Tooltip>
<PopoverPopup side="bottom" align="end" className="w-56" viewportClassName="p-1">
<PopoverPopup side="bottom" align="end" width="sm" viewportClassName="p-1">
{presets.map((preset) => (
<button
key={preset.id}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/AssistantCitationChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export function AssistantCitationChip({
return false;
}}
aria-label="Edit citation comment"
className="w-72 max-w-[calc(100vw-1rem)]"
width="md"
viewportClassName="p-3"
onPointerDown={(event) => event.stopPropagation()}
>
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/components/chat/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ export const ChatHeader = memo(function ChatHeader({
keepMounted
aria-label="Header actions"
align="end"
className="min-w-56 max-w-[calc(100vw-2rem)]"
finalFocus={actionsCollapsed ? undefined : false}
>
<div ref={mountMenuActions} className="contents" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ export const ComposerPendingApprovalActions = memo(function ComposerPendingAppro
>
<EllipsisIcon />
</MenuTrigger>
<MenuPopup
{...composerFloatingLayerProps}
side="top"
align="end"
className="w-56 max-w-[calc(100vw-2rem)]"
>
<MenuPopup {...composerFloatingLayerProps} side="top" align="end">
{moreOptions.map((option) => {
const item = (
<MenuItem
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/chat/ContextWindowMeter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export function ContextWindowMeter(props: {
side="top"
align="end"
viewportClassName="p-0"
className="w-64 max-w-none text-left whitespace-normal"
width="sm"
className="text-left whitespace-normal"
>
<div className="flex flex-col gap-2 p-[var(--floating-content-inset)]">
<div className="flex items-center justify-between gap-3">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/DraftHeroHeadline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function DraftHeroHeadline({
<TooltipPopup side="top">{activeProjectDisplayName}</TooltipPopup>
) : null}
</Tooltip>
<MenuPopup align="center" className="max-h-80 min-w-40! w-max max-w-64 overflow-y-auto">
<MenuPopup align="center" className="max-h-80 overflow-y-auto">
<MenuRadioGroup
value={activeProjectKey}
onValueChange={(value) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/chat/MessagesTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,8 @@ function BackgroundWorktreeSetupChip({ snapshot }: { snapshot: WorktreeSetupSnap
<PopoverPopup
side="bottom"
align="end"
className="surface-glass! w-[28rem] max-w-[calc(100vw-2rem)]"
width="lg"
className="surface-glass!"
viewportClassName="py-3 [--viewport-inline-padding:--spacing(3)]"
>
<WorktreeSetupCard
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/OpenInPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export const OpenInPicker = memo(function OpenInPicker({
<SquareArrowOutUpRightIcon className="size-4" />
<MenuItemLabel>Open in…</MenuItemLabel>
</MenuSubTrigger>
<MenuSubPopup className="min-w-32 max-w-[calc(100vw-2rem)]">{editorItems}</MenuSubPopup>
<MenuSubPopup>{editorItems}</MenuSubPopup>
</MenuSub>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/SnapShotAttachmentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function SnapShotContentsButton({
<PopoverPopup
side={side}
align="center"
className="w-[min(24rem,calc(100vw-2rem))]"
width="md"
viewportClassName="max-h-[min(28rem,70vh)]"
>
<div className="space-y-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function useAutoBalanceUpdateBanner(
>
{title}
</PopoverTrigger>
<PopoverPopup side="top" align="start" className="w-80 max-w-[calc(100vw-2rem)]">
<PopoverPopup side="top" align="start" width="md">
<div className="space-y-3 text-xs">
{machines.map((machine) => (
<div key={machine.environmentId} className="space-y-1">
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/contextChipParts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export function ContextChipPopover(props: {
</PopoverTrigger>
<PopoverPopup
side="top"
className={cn("w-[min(36rem,calc(100vw-2rem))]", props.popupClassName)}
width="lg"
className={props.popupClassName}
viewportClassName={cn("overflow-x-auto p-2", props.viewportClassName)}
>
<PopoverTitle className="sr-only">{props.accessibleLabel}</PopoverTitle>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/device/DeviceToolVersions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function DeviceToolVersions({
? "Versions unavailable"
: "Versions"}
</PopoverTrigger>
<PopoverPopup align="end" className="w-80">
<PopoverPopup align="end" width="md">
<PopoverTitle>{kind ? label : "Device tools"}</PopoverTitle>
{tools ? (
<div className="mt-4 divide-y divide-border/50">
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/components/files/FileBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ function BreadcrumbMenuContent(props: {
<MenuPopup
align="start"
side="bottom"
className="w-max min-w-32 max-w-[min(19rem,var(--available-width))]"
onKeyDown={(event) => {
if (event.key !== "ArrowLeft" || !canGoBack || parentPath === null) return;
event.preventDefault();
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/preview/PreviewMoreMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function PreviewMoreMenu({
</TooltipTrigger>
<TooltipPopup>More</TooltipPopup>
</Tooltip>
<MenuPopup align="end" sideOffset={6} className="min-w-56">
<MenuPopup align="end" sideOffset={6}>
<MenuItem onClick={callTab(bridge.hardReload)} disabled={tabDisabled}>
Hard reload
</MenuItem>
Expand All @@ -125,7 +125,7 @@ export function PreviewMoreMenu({
</MenuItem>
<MenuSub>
<MenuSubTrigger disabled={tabDisabled}>Appearance</MenuSubTrigger>
<MenuSubPopup className="min-w-32">
<MenuSubPopup>
<MenuRadioGroup
value={colorScheme}
onValueChange={(value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function PullRequestChecksPopover({
>
<presentation.Icon aria-hidden className={cn("size-3.5", presentation.toneClassName)} />
</PopoverTrigger>
<PopoverPopup align="start" className="w-80 max-w-full" side="bottom">
<PopoverPopup align="start" width="md" side="bottom">
<p className="mb-2 font-medium text-sm">{presentation.label}</p>
{summary === null ? null : <p className="mb-2 text-muted-foreground text-xs">{summary}</p>}
{stale ? (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ function PullRequestCodeTab({
<span className="truncate">{scopeLabel}</span>
<ChevronDownIcon className="size-3.5 shrink-0 opacity-70" />
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-80">
<DropdownMenuContent align="start">
<DropdownMenuRadioGroup
value={commit ?? "all"}
onValueChange={(value) => onSelectedCommitChange(value === "all" ? null : value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function PullRequestComposer({
side="top"
align="end"
sideOffset={8}
className="w-96 max-w-[calc(100vw-2rem)]"
width="lg"
initialFocus={mode === "review" ? reviewRef : commentRef}
aria-label="Pull request composer"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ export function PullRequestDetailPanel({
/>
<TooltipPopup>Check out this pull request</TooltipPopup>
</Tooltip>
<MenuPopup align="end" side="bottom" className="min-w-72">
<MenuPopup align="end" side="bottom">
<MenuItem onClick={() => startCheckout("worktree")}>
<GitBranchIcon className="mt-1 size-3.5 shrink-0 self-start" />
<span className="flex min-w-0 flex-col">
Expand Down Expand Up @@ -2020,7 +2020,7 @@ export function PullRequestDetailPanel({
{refreshing ? "Refreshing pull request" : "More pull request actions"}
</TooltipPopup>
</Tooltip>
<MenuPopup align="end" side="bottom" className="min-w-72">
<MenuPopup align="end" side="bottom">
<PullRequestThreadLinks
display="menu-item"
environmentId={environmentId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function PullRequestFilterRadioSubmenu<Value extends string>({
{current.label}
</span>
</MenuSubTrigger>
<MenuSubPopup className="min-w-56">
<MenuSubPopup>
<PullRequestFilterRadioGroup
label={label}
value={value}
Expand Down Expand Up @@ -277,7 +277,7 @@ function PullRequestAuthorFilter({
{value ?? "Anyone"}
</span>
</MenuSubTrigger>
<MenuSubPopup className="w-80">
<MenuSubPopup>
<div className="p-1 pb-2">
<InputGroup>
<InputGroupAddon>
Expand Down Expand Up @@ -346,7 +346,7 @@ function PullRequestLabelFilter({
{value.length === 0 ? "Any" : `${value.length} selected`}
</span>
</MenuSubTrigger>
<MenuSubPopup className="w-72">
<MenuSubPopup>
{visible.length === 0 ? (
<MenuItem disabled>No labels in this view</MenuItem>
) : (
Expand Down Expand Up @@ -509,7 +509,7 @@ export function PullRequestFiltersMenu({
</span>
) : null}
</MenuTrigger>
<MenuPopup align="end" side="bottom" className="w-56">
<MenuPopup align="end" side="bottom">
<PullRequestFilterRadioSubmenu
label="State"
value={state}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function PullRequestReactionBar({
>
<SmilePlusIcon aria-hidden className="size-3.5" />
</PopoverTrigger>
<PopoverPopup align="start" className="w-auto" side="top" viewportClassName="py-2">
<PopoverPopup align="start" side="top" viewportClassName="py-2">
<div className="flex items-center gap-0.5">
{PULL_REQUEST_REACTION_ORDER.map((content) => {
const reacted =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function PullRequestStackMenu({
{notice ? ` · ${notice}` : null}
</TooltipPopup>
</Tooltip>
<MenuPopup align="start" className="w-96 max-w-[calc(100vw-2rem)]">
<MenuPopup align="start">
<MenuGroup>
<PullRequestStackHeader number={stack.number} notice={notice} stale={!!onRetry} />
{onRetry ? <MenuItem onClick={onRetry}>Retry stack refresh</MenuItem> : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export function PullRequestStackPopover({
</Tooltip>
<MenuPopup
align="start"
className="w-96 max-w-[calc(100vw-2rem)]"
onClick={(event) => event.stopPropagation()}
onKeyDown={(event) => event.stopPropagation()}
>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/settings/ConnectionsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ function SavedBackendListRow({
>
<EllipsisIcon className="size-3.5" />
</MenuTrigger>
<MenuPopup align="end" className="min-w-52">
<MenuPopup align="end">
<EnvironmentIconMenu
environmentId={environmentId}
serverConfig={environment.serverConfig}
Expand Down Expand Up @@ -3295,7 +3295,7 @@ export function ConnectionsSettings() {
>
<EllipsisIcon className="size-3.5" />
</MenuTrigger>
<MenuPopup align="end" className="min-w-52">
<MenuPopup align="end">
<EnvironmentIconMenu
environmentId={primaryEnvironmentId}
serverConfig={primaryServerConfig}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/settings/EnvironmentIconPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function EnvironmentIconMenu({
<EnvironmentMachineIcon kind={resolved} />
Icon
</MenuSubTrigger>
<MenuSubPopup className="min-w-44">
<MenuSubPopup>
{lock !== null ? (
<>
<MenuItem disabled className="whitespace-normal text-xs">
Expand Down
Loading
Loading