Skip to content
TypeScript

refactor(web): one vertical rhythm for dialog bodies (#13032)

Julius Marmingef3d3fe456927
diff --git a/apps/web/src/components/CustomSnoozeDialog.tsx b/apps/web/src/components/CustomSnoozeDialog.tsx
index 453efb1cbe5..729200c907b 100644
--- a/apps/web/src/components/CustomSnoozeDialog.tsx
+++ b/apps/web/src/components/CustomSnoozeDialog.tsx
@@ -94,7 +94,7 @@ function CustomSnoozeDialog() {
<DialogTitle>Custom snooze</DialogTitle>
<DialogDescription>Choose when snoozed threads return to your inbox.</DialogDescription>
</DialogHeader>
- <DialogPanel className="flex flex-col gap-4 text-base sm:text-sm">
+ <DialogPanel className="text-base sm:text-sm">
<Tabs.Root
value={mode}
onValueChange={(value) => {
diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx
index c849532dafd..841adf2fcbb 100644
--- a/apps/web/src/components/GitActionsControl.tsx
+++ b/apps/web/src/components/GitActionsControl.tsx
@@ -1882,7 +1882,7 @@ export default function GitActionsControl({
<DialogTitle>{COMMIT_DIALOG_TITLE}</DialogTitle>
<DialogDescription>{COMMIT_DIALOG_DESCRIPTION}</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<div className="space-y-3 rounded-xl bg-zinc-25 p-3 text-sm ring-1 ring-black/5 dark:bg-white/[0.035] dark:ring-white/5">
<div className="grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-1">
<span className="text-muted-foreground">Branch</span>
diff --git a/apps/web/src/components/LegacySidebar.tsx b/apps/web/src/components/LegacySidebar.tsx
index b98f3a30ed2..5e60b9b0df7 100644
--- a/apps/web/src/components/LegacySidebar.tsx
+++ b/apps/web/src/components/LegacySidebar.tsx
@@ -2514,7 +2514,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
: "Update the project title."}
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<div className="grid gap-1.5">
<span className="text-xs font-medium text-foreground">Project title</span>
<Input
@@ -2561,7 +2561,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
: "Choose how this project should be grouped in the sidebar."}
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<div className="grid gap-1.5">
<span className="text-xs font-medium text-foreground">Grouping rule</span>
<Select
diff --git a/apps/web/src/components/PullRequestThreadDialog.tsx b/apps/web/src/components/PullRequestThreadDialog.tsx
index 0cc1a84d784..1b4a73dcffd 100644
--- a/apps/web/src/components/PullRequestThreadDialog.tsx
+++ b/apps/web/src/components/PullRequestThreadDialog.tsx
@@ -205,7 +205,7 @@ export function PullRequestThreadDialog({
the draft thread in the main repo or in a dedicated worktree.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<label className="grid gap-1.5">
<span className="text-xs font-medium text-foreground capitalize">
{terminology.singular}
diff --git a/apps/web/src/components/chat/ProposedPlanCard.tsx b/apps/web/src/components/chat/ProposedPlanCard.tsx
index 9fcfaf4d174..6639729e7bd 100644
--- a/apps/web/src/components/chat/ProposedPlanCard.tsx
+++ b/apps/web/src/components/chat/ProposedPlanCard.tsx
@@ -223,7 +223,7 @@ export const ProposedPlanCard = memo(function ProposedPlanCard({
Enter a path relative to <code>{workspaceRoot ?? "the workspace"}</code>.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-3">
+ <DialogPanel>
<label htmlFor={savePathInputId} className="grid gap-1.5">
<span className="text-xs font-medium text-foreground">Workspace path</span>
<Input
diff --git a/apps/web/src/components/desktop/SshPasswordPromptDialog.tsx b/apps/web/src/components/desktop/SshPasswordPromptDialog.tsx
index a6ff9d8c4ec..d3727ae210b 100644
--- a/apps/web/src/components/desktop/SshPasswordPromptDialog.tsx
+++ b/apps/web/src/components/desktop/SshPasswordPromptDialog.tsx
@@ -164,7 +164,7 @@ function ActiveSshPasswordPrompt({
to the local SSH process for this connection attempt and is not saved by T3 Code.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-3" scrollFade={false}>
+ <DialogPanel scrollFade={false}>
<form
className="space-y-3"
id={formId}
diff --git a/apps/web/src/components/pullRequest/LinkPullRequestDialog.tsx b/apps/web/src/components/pullRequest/LinkPullRequestDialog.tsx
index 88e8144eed0..0b4a3a6e763 100644
--- a/apps/web/src/components/pullRequest/LinkPullRequestDialog.tsx
+++ b/apps/web/src/components/pullRequest/LinkPullRequestDialog.tsx
@@ -208,7 +208,7 @@ function LinkPullRequestDialog({
this environment has a project for.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-3">
+ <DialogPanel>
<Input
ref={inputRef}
placeholder="Pull request URL or #42"
diff --git a/apps/web/src/components/settings/BrowserImportWizard.tsx b/apps/web/src/components/settings/BrowserImportWizard.tsx
index 81d1f480d8d..afa9acd0c12 100644
--- a/apps/web/src/components/settings/BrowserImportWizard.tsx
+++ b/apps/web/src/components/settings/BrowserImportWizard.tsx
@@ -490,9 +490,11 @@ function ImportingStep() {
<DialogTitle>Importing cookies</DialogTitle>
<DialogDescription>This may take a moment.</DialogDescription>
</DialogHeader>
- <DialogPanel className="flex items-center gap-3 py-6">
- <Spinner size="md" tone="muted" />
- <span className="text-sm text-muted-foreground">Importing…</span>
+ <DialogPanel>
+ <div className="flex items-center gap-3 py-2">
+ <Spinner size="md" tone="muted" />
+ <span className="text-sm text-muted-foreground">Importing…</span>
+ </div>
</DialogPanel>
</>
);
@@ -515,11 +517,13 @@ function CheckingStep({
: "Checking whether the browser has closed."}
</DialogDescription>
</DialogHeader>
- <DialogPanel className="flex items-center gap-3 py-6">
- <Spinner size="md" tone="muted" />
- <span className="text-sm text-muted-foreground">
- {check === "fullDiskAccess" ? "Checking access…" : "Checking…"}
- </span>
+ <DialogPanel>
+ <div className="flex items-center gap-3 py-2">
+ <Spinner size="md" tone="muted" />
+ <span className="text-sm text-muted-foreground">
+ {check === "fullDiskAccess" ? "Checking access…" : "Checking…"}
+ </span>
+ </div>
</DialogPanel>
</>
);
diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx
index 0e2213039cc..81040f84c9e 100644
--- a/apps/web/src/components/settings/ConnectionsSettings.tsx
+++ b/apps/web/src/components/settings/ConnectionsSettings.tsx
@@ -828,7 +828,7 @@ const PairingLinkListRow = memo(function PairingLinkListRow({
: "Clipboard copy is unavailable here. Manually copy this code into another client."}
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<Textarea
readOnly
value={revealValue}
@@ -1133,7 +1133,7 @@ const AuthorizedClientsHeaderAction = memo(function AuthorizedClientsHeaderActio
authorized client.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-5">
+ <DialogPanel>
<label className="block">
<span className="mb-1.5 block text-xs font-medium text-foreground">
Client label (optional)
@@ -3602,7 +3602,7 @@ export function ConnectionsSettings() {
Tailscale to proxy HTTPS traffic to this backend.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<label className="block">
<span className="text-sm font-medium text-foreground">HTTPS port</span>
<Input
diff --git a/apps/web/src/components/settings/DeviceHostEditor.tsx b/apps/web/src/components/settings/DeviceHostEditor.tsx
index 926f404be2e..263ee1779ea 100644
--- a/apps/web/src/components/settings/DeviceHostEditor.tsx
+++ b/apps/web/src/components/settings/DeviceHostEditor.tsx
@@ -72,7 +72,7 @@ export function DeviceHostEditor({
Hosts on the same machine are skipped.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-4">
+ <DialogPanel>
<label className="block space-y-1.5 text-sm">
<span>Name</span>
<Input
diff --git a/apps/web/src/components/settings/ProjectIconPickerDialog.tsx b/apps/web/src/components/settings/ProjectIconPickerDialog.tsx
index f2474e531c0..d9c48c036ef 100644
--- a/apps/web/src/components/settings/ProjectIconPickerDialog.tsx
+++ b/apps/web/src/components/settings/ProjectIconPickerDialog.tsx
@@ -105,7 +105,7 @@ export function ProjectIconPickerDialog({
<DialogTitle>Choose project icon</DialogTitle>
<DialogDescription>Choose an icon, emoji, or monogram.</DialogDescription>
</DialogHeader>
- <DialogPanel className="flex min-h-0 flex-col gap-4">
+ <DialogPanel className="flex min-h-0 flex-col">
<ToggleGroup
aria-label="Icon type"
variant="segmented"
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 6ea08076ad8..6aeeb269f5a 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -899,7 +899,7 @@ function BackgroundActivityAdvancedDialog({
Tune the shared power policy and the background intervals that feed it.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="space-y-0 px-6 pb-5">
+ <DialogPanel>
<div className="overflow-hidden rounded-xl border bg-card text-card-foreground">
<div className="flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 space-y-1">
diff --git a/apps/web/src/components/settings/ThemeImportDialog.tsx b/apps/web/src/components/settings/ThemeImportDialog.tsx
index 89129496002..b17e19feaae 100644
--- a/apps/web/src/components/settings/ThemeImportDialog.tsx
+++ b/apps/web/src/components/settings/ThemeImportDialog.tsx
@@ -427,7 +427,7 @@ export function ThemeImportDialog({
<DialogHeader>
<DialogTitle>Add a theme</DialogTitle>
</DialogHeader>
- <DialogPanel className="space-y-5">
+ <DialogPanel>
<ThemeSearchSection
onInstalled={(themes, context) => {
onImportedMany(themes, context);
diff --git a/apps/web/src/components/ui/dialog.tsx b/apps/web/src/components/ui/dialog.tsx
index db1b6e35b80..1724d843c56 100644
--- a/apps/web/src/components/ui/dialog.tsx
+++ b/apps/web/src/components/ui/dialog.tsx
@@ -171,7 +171,7 @@ function DialogPanel({
<ScrollArea scrollFade={scrollFade}>
<div
className={cn(
- "p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1",
+ "space-y-4 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1",
className,
)}
data-slot="dialog-panel"
diff --git a/apps/web/src/components/usage/UsagePriceOverrides.tsx b/apps/web/src/components/usage/UsagePriceOverrides.tsx
index 6007de4c2fe..1fdeb67ae9b 100644
--- a/apps/web/src/components/usage/UsagePriceOverrides.tsx
+++ b/apps/web/src/components/usage/UsagePriceOverrides.tsx
@@ -252,7 +252,7 @@ export function UsagePriceOverrides({
Prices apply to all past and future usage on the environments you select.
</DialogDescription>
</DialogHeader>
- <DialogPanel className="grid gap-4">
+ <DialogPanel>
<div className="flex flex-wrap items-center justify-between gap-2">
<div className="flex min-w-0 items-center gap-2">
<Label id="usage-prices-apply-label" className="shrink-0">
diff --git a/scripts/lint-restyle-ceiling.ts b/scripts/lint-restyle-ceiling.ts
index a0743a16763..8940a53e589 100644
--- a/scripts/lint-restyle-ceiling.ts
+++ b/scripts/lint-restyle-ceiling.ts
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
// migrate a file, and delete this script when the rule becomes an error.
-export const RESTYLE_CEILING = 921;
+export const RESTYLE_CEILING = 899;
const RULE = "shadcn(no-restyle)";