Skip to content

Commit f2bb943

Browse files
committed
fix(ui): keep import wizard within viewport
Constrain the import wizard height to the viewport, keep the agent selection actions visible, and make long agent lists scroll within the modal. Also scope a slimmer scrollbar to the sidebar navigation. Tests: bun run typecheck Codex: fixed the modal overflow and sidebar scrollbar styling
1 parent 2a37b94 commit f2bb943

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

src/mainview/components/ImportWizard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export default function ImportWizard({ mode, initialLocalPath, initialProjectPat
248248

249249
return (
250250
<div
251-
className="fixed inset-0 z-50 flex items-center justify-center bg-black/25 dark:bg-black/40 animate-backdrop-in"
251+
className="fixed inset-0 z-50 flex items-center justify-center bg-black/25 p-4 dark:bg-black/40 animate-backdrop-in"
252252
role="presentation"
253253
onClick={busy ? undefined : handleClose}
254254
>
@@ -257,7 +257,7 @@ export default function ImportWizard({ mode, initialLocalPath, initialProjectPat
257257
tabIndex={-1}
258258
role="dialog"
259259
aria-modal="true"
260-
className="w-full max-w-lg rounded-3xl p-6 space-y-4 outline-none animate-modal-in glass-elevated"
260+
className="flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col overflow-hidden rounded-3xl p-6 space-y-4 outline-none animate-modal-in glass-elevated"
261261
onClick={(e) => e.stopPropagation()}
262262
>
263263
{/* Header */}
@@ -530,7 +530,7 @@ export default function ImportWizard({ mode, initialLocalPath, initialProjectPat
530530

531531
{/* Step: Select Agents */}
532532
{step === "agents" && (
533-
<div className="space-y-3">
533+
<div className="flex min-h-0 flex-1 flex-col space-y-3">
534534
<p className="text-xs text-muted-foreground">
535535
{t("repos.selectAgents")}
536536
</p>
@@ -553,7 +553,7 @@ export default function ImportWizard({ mode, initialLocalPath, initialProjectPat
553553
: t("repos.selectAll")}
554554
</button>
555555
</div>
556-
<div className="space-y-0.5">
556+
<div className="-mx-1 min-h-0 flex-1 space-y-0.5 overflow-y-auto px-1">
557557
{detectedAgents.map((agent) => (
558558
<AgentCheckItem
559559
key={agent.slug}

src/mainview/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function LayoutInner({
220220
<InsetScrollArea scroll={false} className="flex-1">
221221
<nav
222222
aria-label="Main navigation"
223-
className="flex h-full min-h-0 flex-col gap-0.5 overflow-y-auto px-3 pb-2"
223+
className="sidebar-scrollbar flex h-full min-h-0 flex-col gap-0.5 overflow-y-auto px-3 pb-2"
224224
>
225225
<h2 className="mb-1 px-3 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/50">
226226
{t('sidebar.workspace')}

src/mainview/index.css

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,26 @@ html.skiller-macos-vibrancy.dark .glass-inset {
407407
background: rgba(255, 255, 255, 0.28);
408408
}
409409

410+
.sidebar-scrollbar::-webkit-scrollbar {
411+
width: 2px;
412+
}
413+
414+
.sidebar-scrollbar::-webkit-scrollbar-thumb {
415+
background: rgba(0, 0, 0, 0.1);
416+
}
417+
418+
.sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
419+
background: rgba(0, 0, 0, 0.18);
420+
}
421+
422+
.dark .sidebar-scrollbar::-webkit-scrollbar-thumb {
423+
background: rgba(255, 255, 255, 0.12);
424+
}
425+
426+
.dark .sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
427+
background: rgba(255, 255, 255, 0.22);
428+
}
429+
410430
/* Firefox — thinnest built-in track (no per-px width API) */
411431
html {
412432
scrollbar-width: thin;
@@ -886,4 +906,4 @@ html.skiller-macos-vibrancy.dark .glass-surface-tint.glass-stat {
886906
rgba(255, 255, 255, 0.18) 0%,
887907
rgba(255, 255, 255, 0.06) 40%,
888908
transparent 70%);
889-
}
909+
}

0 commit comments

Comments
 (0)