+
+
Mine {mine.length}
{mine.map((item) => (
setShareId(item.id)} />
))}
- >
+
)}
{shared.length > 0 && (
- <>
-
- Shared with me
{shared.length}
+
+
+ Shared {shared.length}
{shared.map((item) => (
setShareId(item.id)}
/>
))}
- >
+
)}
)}
diff --git a/src/renderer/components/settings/SettingsManager.tsx b/src/renderer/components/settings/SettingsManager.tsx
index 8491ca0..37f0619 100644
--- a/src/renderer/components/settings/SettingsManager.tsx
+++ b/src/renderer/components/settings/SettingsManager.tsx
@@ -1,12 +1,21 @@
-import React, { useState, useEffect } from 'react'
-import { Check, Loader2, KeyRound, HardDrive, Trash2, Timer, ShieldCheck } from 'lucide-react'
+import React, { useEffect, useState } from 'react'
+import {
+ Check,
+ HardDrive,
+ KeyRound,
+ Loader2,
+ ScrollText,
+ Settings2,
+ Timer,
+ Trash2,
+} from 'lucide-react'
import { Button } from '@renderer/components/ui/button'
import { Input } from '@renderer/components/ui/input'
import { useAgentCredentialStatus, useSetAgentCredential } from '@renderer/hooks/useAgentCredentials'
import { useRunnerTimeouts, useSetRunnerTimeout } from '@renderer/hooks/useRunnerTimeouts'
import { useDataDirSweep } from '@renderer/hooks/useDataDirSweep'
import { useStorageUsage } from '@renderer/hooks/useStorageUsage'
-import { formatBytes } from '@renderer/lib/utils'
+import { cn, formatBytes } from '@renderer/lib/utils'
import type { RunnerType, SweepResult } from '@shared/types'
import { PromptComponentManager } from './PromptComponentManager'
import { ConfigHealthCard } from './ConfigHealthCard'
@@ -19,17 +28,74 @@ interface RunnerMeta {
}
const RUNNERS: RunnerMeta[] = [
- { runner: 'claude', label: 'Claude Code', envVar: 'ANTHROPIC_API_KEY', hint: 'Anthropic API key used to authenticate the Claude Code CLI.' },
- { runner: 'amp', label: 'Amp', envVar: 'AMP_API_KEY', hint: 'Sourcegraph Amp API key used to authenticate the Amp CLI.' },
- { runner: 'cursor', label: 'Cursor', envVar: 'CURSOR_API_KEY', hint: 'Cursor API key used to authenticate the cursor-agent CLI.' },
+ {
+ runner: 'claude',
+ label: 'Claude Code',
+ envVar: 'ANTHROPIC_API_KEY',
+ hint: 'Anthropic API key for the Claude Code CLI.',
+ },
+ {
+ runner: 'amp',
+ label: 'Amp',
+ envVar: 'AMP_API_KEY',
+ hint: 'Sourcegraph Amp API key for the Amp CLI.',
+ },
+ {
+ runner: 'cursor',
+ label: 'Cursor',
+ envVar: 'CURSOR_API_KEY',
+ hint: 'Cursor API key for the cursor-agent CLI.',
+ },
]
+const NAV_ITEMS = [
+ { id: 'status', label: 'Status', icon: Settings2 },
+ { id: 'agents', label: 'Agents', icon: KeyRound },
+ { id: 'defaults', label: 'Defaults', icon: ScrollText },
+ { id: 'storage', label: 'Storage', icon: HardDrive },
+] as const
+
+const NAV_IDS = NAV_ITEMS.map((n) => n.id)
+
+function scrollToSection(id: string) {
+ const el = document.getElementById(id)
+ if (!el) return
+ el.scrollIntoView({ behavior: 'smooth', block: 'start' })
+}
+
+function useActiveSection() {
+ const [active, setActive] = useState<(typeof NAV_IDS)[number]>(NAV_IDS[0])
+
+ useEffect(() => {
+ const elements = NAV_IDS
+ .map((id) => document.getElementById(id))
+ .filter((el): el is HTMLElement => Boolean(el))
+ if (elements.length === 0) return
+
+ const observer = new IntersectionObserver(
+ (entries) => {
+ const visible = entries
+ .filter((e) => e.isIntersecting)
+ .sort((a, b) => b.intersectionRatio - a.intersectionRatio)
+ const id = visible[0]?.target.id
+ if (id && (NAV_IDS as readonly string[]).includes(id)) {
+ setActive(id as (typeof NAV_IDS)[number])
+ }
+ },
+ { rootMargin: '-15% 0px -55% 0px', threshold: [0.1, 0.35, 0.6] }
+ )
+
+ for (const el of elements) observer.observe(el)
+ return () => observer.disconnect()
+ }, [])
+
+ return active
+}
+
/**
- * One card per agent harness, holding both its credential (API key) and its
- * background-task timeout — the two per-harness settings live together instead of
- * in separate screen sections.
+ * Dense row for one agent harness: credential + timeout in a single line group.
*/
-function RunnerSettingsCard({
+function RunnerSettingsRow({
meta,
configured,
seconds,
@@ -38,7 +104,6 @@ function RunnerSettingsCard({
configured: boolean
seconds: number
}) {
- // Credential (API key) state.
const [keyValue, setKeyValue] = useState('')
const setCredential = useSetAgentCredential()
const credBusy = setCredential.isPending
@@ -62,13 +127,11 @@ function RunnerSettingsCard({
}
}
- // Background-task timeout state.
const [timeoutValue, setTimeoutValue] = useState(String(seconds))
const saveTimeout = useSetRunnerTimeout()
const timeoutBusy = saveTimeout.isPending
const timeoutSupported = meta.runner === 'claude'
- // Keep the field in sync when the stored value changes (initial load / refetch).
useEffect(() => {
setTimeoutValue(String(seconds))
}, [seconds])
@@ -86,66 +149,77 @@ function RunnerSettingsCard({
}
return (
-
-
-
-
- {meta.label}
-
- {meta.envVar}
-
-
-
{meta.hint}
+
+
+
+ {meta.label}
+
+ {configured && }
+ {configured ? 'On' : 'Off'}
+
-
- {configured && }
- {configured ? 'Connected' : 'Not set'}
-
+
{meta.envVar}
+
{meta.hint}
-
-
-
setKeyValue(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === 'Enter') handleSaveKey()
- }}
- placeholder={configured ? 'Replace existing key…' : 'Paste API key…'}
- autoComplete="off"
- className="flex-1"
- />
-
+
+
+
+ setKeyValue(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') handleSaveKey()
+ }}
+ placeholder={configured ? 'Replace key…' : 'Paste key…'}
+ autoComplete="off"
+ className="h-8 flex-1 text-sm"
+ />
+
+
+ {configured && (
+
+ )}
- {configured && (
-
- )}
-
-
-
-
Background wait
+
+
+
+
{!timeoutSupported && (
-
- Not applied
+
+ N/A
)}
-
- {timeoutSupported ? 'How long to wait for background work. Use 0 for no limit.' : 'Saved for future CLI support.'}
-
-
@@ -185,74 +270,71 @@ function StorageUsageSummary() {
if (usage.isLoading) {
return (
-
+
- Calculating storage usage…
+ Calculating…
)
}
if (usage.isError || !usage.data) {
- return (
-
- Couldn't measure storage usage.
-
- )
+ return
Couldn't measure storage usage.
}
const { totalBytes, reclaimableBytes } = usage.data
return (
-
+
-
+
{formatBytes(totalBytes)}
- in use
+ in use
{usage.isFetching && }
{reclaimableBytes > 0 && (
-
- {formatBytes(reclaimableBytes)} reclaimable from finished runs
-
+
+ {formatBytes(reclaimableBytes)} reclaimable
+
)}
)
}
-function StorageMaintenanceCard() {
+function StorageMaintenancePanel() {
const sweep = useDataDirSweep()
return (
-
-
-
-
-
-
-
-
Conduit data
-
-
- Clean up worktrees, temporary workspaces, and MCP files left by finished runs.
- Active runs are never touched.
-
-
+
+
+
+
Data directory
+
+
+ Reclaim worktrees, temp workspaces, and MCP files from finished runs. Active runs are never
+ touched.
+
{sweep.data && !sweep.isPending && (
-
{sweepSummary(sweep.data)}
+
+ {sweepSummary(sweep.data)}
+
)}
{sweep.isError && (
-
+
Cleanup failed: {sweep.error instanceof Error ? sweep.error.message : String(sweep.error)}
)}
@@ -260,63 +342,125 @@ function StorageMaintenanceCard() {
)
}
+function SectionChrome({
+ id,
+ title,
+ description,
+ children,
+}: {
+ id: string
+ title: string
+ description: string
+ children: React.ReactNode
+}) {
+ return (
+
+
+
+ {title}
+
+ {description}
+
+ {children}
+
+ )
+}
+
export function SettingsManager() {
const { data: status } = useAgentCredentialStatus()
const { data: timeouts } = useRunnerTimeouts()
+ const active = useActiveSection()
return (
-
-
-
-
- Workspace administration
+
+
+
+
Settings
+
+ Control center · credentials, defaults, and instance health
+
-
Conduit settings
-
- Check readiness, connect agent runtimes, and manage defaults for every run.
-
+
+ Ops view
+
-
-
-
-
-
-
-
Agent connections
-
- Add credentials for the CLIs your agents use. Keys are encrypted and scoped to your account;
- settings on an individual agent take precedence.
-
-
-
- {RUNNERS.map((meta) => (
-
- ))}
-
-
-
-
-
-
-
-
Storage
-
- See how much space Conduit uses and safely reclaim files from completed runs.
-
-
-
-
-
+
+
+ {/* Sticky in-page section nav */}
+
+
+
+
+
+
+
+
+ Runtime
+ Credential
+ Background wait
+
+ {RUNNERS.map((meta) => (
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+
+
)