Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

fix(desktop): keep the plugin setup's Back / Continue bar on screen

Salman Qureshi7f3b5e442d80
diff --git a/apps/desktop/src/views/plugins/PluginsView.tsx b/apps/desktop/src/views/plugins/PluginsView.tsx
index 0d3ee2d5..576971a4 100644
--- a/apps/desktop/src/views/plugins/PluginsView.tsx
+++ b/apps/desktop/src/views/plugins/PluginsView.tsx
@@ -183,14 +183,16 @@ export function PluginsView() {
)}
</aside>
- <main className="min-w-0 flex-1 overflow-y-auto">
+ {/* The setup flow keeps its own scrolling: its Back / Continue bar must stay on screen,
+ so the page around it never scrolls (a note above it would push the bar out of view). */}
+ <main className={cx("min-w-0 flex-1", pane?.kind === "setup" ? "flex flex-col overflow-hidden" : "overflow-y-auto")}>
{note && (
- <div className={cx("mx-6 mt-4 rounded-lg border px-3 py-2 text-sm", note.ok ? "border-accent/30 bg-accent/[0.05] text-ink2" : "border-red/30 bg-red/[0.05] text-red")}>
+ <div className={cx("mx-6 mt-4 shrink-0 rounded-lg border px-3 py-2 text-sm", note.ok ? "border-accent/30 bg-accent/[0.05] text-ink2" : "border-red/30 bg-red/[0.05] text-red")}>
{note.text}{!note.ok && /from this machine|loopback/i.test(note.text) ? " Plugins can only be changed on the computer Mercury runs on." : ""}
</div>
)}
{pane?.kind === "plugin" && <PluginDetail key={pane.id} id={pane.id} onSetup={() => setPane({ kind: "setup", id: pane.id })} onChanged={() => void load()} onRemoved={() => { setNote({ text: "Removed.", ok: true }); setPane(null); void load(); }} />}
- {pane?.kind === "setup" && <div className="h-full"><SetupFlow key={pane.id} id={pane.id} onClose={() => setPane({ kind: "plugin", id: pane.id })} onChanged={() => void load()} /></div>}
+ {pane?.kind === "setup" && <div className="min-h-0 flex-1"><SetupFlow key={pane.id} id={pane.id} onClose={() => setPane({ kind: "plugin", id: pane.id })} onChanged={() => void load()} /></div>}
{pane?.kind === "catalog" && (() => {
const p = items.find((x) => x.id === pane.id);
return p ? <CatalogDetail p={p} installing={installing === p.id} onInstall={() => void install(p.id, { fromCatalog: true })} /> : null;
diff --git a/apps/desktop/src/views/plugins/SetupFlow.tsx b/apps/desktop/src/views/plugins/SetupFlow.tsx
index 04fe4d6f..7f7f1d07 100644
--- a/apps/desktop/src/views/plugins/SetupFlow.tsx
+++ b/apps/desktop/src/views/plugins/SetupFlow.tsx
@@ -94,14 +94,14 @@ export function SetupFlow({ id, onClose, onChanged }: { id: string; onClose: ()
return (
<div className="flex h-full min-h-0 flex-col">
- <div className="flex items-center gap-3 border-b border-line px-6 py-4">
+ <div className="flex shrink-0 items-center gap-3 border-b border-line px-6 py-4">
<div className="min-w-0 flex-1">
<div className="text-base font-medium text-ink">Set up {p.name}</div>
<div className="text-xs text-ink3">{at.kind === "done" ? "All set" : `Step ${position} of ${total}`}</div>
</div>
<Button size="sm" variant="ghost" onClick={onClose}>{at.kind === "done" ? "Close" : "Finish later"}</Button>
</div>
- <div className="h-1 bg-ink/[0.06]"><div className="h-full bg-accent transition-[width] duration-300" style={{ width: `${total ? (Math.min(index, total) / total) * 100 : 100}%` }} /></div>
+ <div className="h-1 shrink-0 bg-ink/[0.06]"><div className="h-full bg-accent transition-[width] duration-300" style={{ width: `${total ? (Math.min(index, total) / total) * 100 : 100}%` }} /></div>
<div className="min-h-0 flex-1 overflow-y-auto px-6 py-6">
<div className="mx-auto flex max-w-[520px] flex-col gap-4">
@@ -138,7 +138,8 @@ export function SetupFlow({ id, onClose, onChanged }: { id: string; onClose: ()
</div>
</div>
- <div className="flex items-center gap-2 border-t border-line px-6 py-3">
+ {/* Always on screen: only the step above scrolls. */}
+ <div className="flex shrink-0 items-center gap-2 border-t border-line bg-surface px-6 py-3">
<Button size="md" variant="ghost" disabled={history.length === 0} onClick={back}><ArrowLeft size={14} /> Back</Button>
<span className="flex-1" />
{at.kind === "done"