Skip to content
TypeScript

refactor(web): settings group by concern, with General split into focused pages (#25651)

Julius Marminge9db433f4bab5
diff --git a/apps/desktop/src/backend/DesktopBackendPool.ts b/apps/desktop/src/backend/DesktopBackendPool.ts
index 4292b92a3d0..094e1d211be 100644
--- a/apps/desktop/src/backend/DesktopBackendPool.ts
+++ b/apps/desktop/src/backend/DesktopBackendPool.ts
@@ -132,7 +132,7 @@ export const layer = Layer.effect(
});
yield* electronDialog.showErrorBox(
"WSL backend couldn't start",
- `${reason}\n\nFalling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Connections once the WSL distro is fixed.`,
+ `${reason}\n\nFalling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Sharing & access once the WSL distro is fixed.`,
);
// Clear wslOnly too so enabling WSL cannot restore a failed mode.
// Keep the in-memory fallback if persistence fails.
diff --git a/apps/server/src/vcs/GitVcsDriverCore.ts b/apps/server/src/vcs/GitVcsDriverCore.ts
index e151e22782b..753ba03fca9 100644
--- a/apps/server/src/vcs/GitVcsDriverCore.ts
+++ b/apps/server/src/vcs/GitVcsDriverCore.ts
@@ -3695,7 +3695,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
operation: "GitVcsDriver.createWorktree",
command: "git worktree add",
cwd: input.cwd,
- detail: `The worktree location "${options?.worktreesDirectory}" must be an absolute folder on this machine, not a drive root. Change it in Settings → Storage.`,
+ detail: `The worktree location "${options?.worktreesDirectory}" must be an absolute folder on this machine, not a drive root. Change it in Settings → Worktrees.`,
});
}
worktreePath = path.join(parentDir, repoName, sanitizedBranch);
diff --git a/apps/web/src/components/HostedEmptyState.tsx b/apps/web/src/components/HostedEmptyState.tsx
index 4bf8195a5ea..d7fbb02a280 100644
--- a/apps/web/src/components/HostedEmptyState.tsx
+++ b/apps/web/src/components/HostedEmptyState.tsx
@@ -49,7 +49,7 @@ export function HostedEmptyState() {
<EmptyContent>
{localEnvironmentOff ? (
<Button render={<Link to="/settings/connections" />} size="sm">
- Open Connections
+ Open Environments
</Button>
) : (
<ol className="w-full space-y-4 text-left">
diff --git a/apps/web/src/components/PermissionUpdateNotice.ts b/apps/web/src/components/PermissionUpdateNotice.ts
index a682adf7fff..86dc907da7a 100644
--- a/apps/web/src/components/PermissionUpdateNotice.ts
+++ b/apps/web/src/components/PermissionUpdateNotice.ts
@@ -48,10 +48,10 @@ function showPermissionNotice(
timeout: 0,
onClose: persistDismissal,
actionProps: {
- children: "Open Connections",
+ children: "Open Sharing & access",
onClick: () => {
dismiss();
- void router.navigate({ to: "/settings/connections" });
+ void router.navigate({ to: "/settings/access" });
},
},
data: {
diff --git a/apps/web/src/components/auth/ConnectAgentSurface.tsx b/apps/web/src/components/auth/ConnectAgentSurface.tsx
index d0735a5ae43..f70b4454873 100644
--- a/apps/web/src/components/auth/ConnectAgentSurface.tsx
+++ b/apps/web/src/components/auth/ConnectAgentSurface.tsx
@@ -233,8 +233,8 @@ export function ConnectAgentSurface() {
value={pairingCode}
/>
<p className="text-xs text-muted-foreground">
- Create one in Settings → Connections, or run <code>t3 auth pairing create</code> on
- this machine.
+ Create one in Settings → Sharing & access, or run <code>t3 auth pairing create</code>{" "}
+ on this machine.
</p>
</div>
)}
diff --git a/apps/web/src/components/chat/guestShareAvailability.ts b/apps/web/src/components/chat/guestShareAvailability.ts
index 618b8f042e4..e49d2e57e02 100644
--- a/apps/web/src/components/chat/guestShareAvailability.ts
+++ b/apps/web/src/components/chat/guestShareAvailability.ts
@@ -6,7 +6,7 @@ import { serverEnvironment } from "~/state/server";
/**
* Whether this environment offers "Share with guest": the user may create links there, and its
- * Guest links beta is on (Settings > Beta). The server refuses links while the beta is off.
+ * Guest links beta is on (Settings > Labs). The server refuses links while the beta is off.
*/
export const canShareWithGuestAtom = Atom.family((environmentId: EnvironmentId) =>
Atom.make(
diff --git a/apps/web/src/components/chat/useSystemComposerBanners.tsx b/apps/web/src/components/chat/useSystemComposerBanners.tsx
index 3e043bd9553..1b6a66aca90 100644
--- a/apps/web/src/components/chat/useSystemComposerBanners.tsx
+++ b/apps/web/src/components/chat/useSystemComposerBanners.tsx
@@ -178,7 +178,7 @@ export function useSystemComposerBanners(input: SystemComposerBannersInput) {
size="xs"
variant="ghost"
disabled={disconnectingEnvironment}
- title="Hide this server's threads. Switch it on again in Connections."
+ title="Hide this server's threads. Switch it on again in Environments."
onClick={() =>
void handleDisconnectActiveEnvironmentStable(
activeEnvironmentUnavailableState.environmentId,
diff --git a/apps/web/src/components/settings/AdvancedSettings.tsx b/apps/web/src/components/settings/AdvancedSettings.tsx
new file mode 100644
index 00000000000..e163a9d6485
--- /dev/null
+++ b/apps/web/src/components/settings/AdvancedSettings.tsx
@@ -0,0 +1,42 @@
+import { ChevronRightIcon } from "lucide-react";
+import { type ReactNode, useState } from "react";
+
+import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
+import { useSettingsSearchTargetId } from "./settingsLayout";
+
+/**
+ * Folds power-user rows at the end of a section. `targetIds` names the search targets inside, so a
+ * search jump opens the fold before its row mounts.
+ */
+export function AdvancedSettings({
+ targetIds,
+ children,
+}: {
+ readonly targetIds: ReadonlyArray<string>;
+ readonly children: ReactNode;
+}) {
+ const [open, setOpen] = useState(false);
+ const searchTargetId = useSettingsSearchTargetId();
+ const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
+ if (seenSearchTargetId !== searchTargetId) {
+ setSeenSearchTargetId(searchTargetId);
+ if (searchTargetId !== null && targetIds.includes(searchTargetId)) setOpen(true);
+ }
+
+ return (
+ <Collapsible open={open} onOpenChange={setOpen}>
+ <CollapsibleTrigger className="group flex min-h-10 w-full items-center gap-1.5 rounded-b-xl px-3 text-left text-xs font-medium text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-panel-open:rounded-none sm:px-4">
+ <ChevronRightIcon
+ aria-hidden
+ className="size-3.5 shrink-0 transition-transform duration-150 group-data-panel-open:rotate-90 motion-reduce:transition-none"
+ />
+ Advanced
+ </CollapsibleTrigger>
+ <CollapsiblePanel>
+ <div className="border-t border-border/50 [&>*+*]:border-t [&>*+*]:border-border/50">
+ {children}
+ </div>
+ </CollapsiblePanel>
+ </Collapsible>
+ );
+}
diff --git a/apps/web/src/components/settings/AppearanceSettingsPanel.tsx b/apps/web/src/components/settings/AppearanceSettingsPanel.tsx
index a13bc93bb9c..fce3885d425 100644
--- a/apps/web/src/components/settings/AppearanceSettingsPanel.tsx
+++ b/apps/web/src/components/settings/AppearanceSettingsPanel.tsx
@@ -29,6 +29,7 @@ import {
SettingsSection,
} from "./settingsLayout";
import { searchableSetting } from "./settingsSearch";
+import { AdvancedSettings } from "./AdvancedSettings";
import { PanelAnimationsPreview } from "./PanelAnimationsPreview";
import { TypographySection } from "./TypographySettings";
@@ -104,6 +105,27 @@ export function AppearanceSettingsPanel() {
</SettingsSection>
<SettingsSection id="appearance-interface" title="Interface">
+ <SettingsRow
+ {...searchableSetting("new-design")}
+ description="A true black dark mode, dimmer read threads, and simpler composer controls. Turn it off for the classic look."
+ resetAction={
+ settings.redesignEnabled !== DEFAULT_UNIFIED_SETTINGS.redesignEnabled ? (
+ <SettingResetButton
+ label="new design"
+ onClick={() =>
+ updateSettings({ redesignEnabled: DEFAULT_UNIFIED_SETTINGS.redesignEnabled })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Switch
+ checked={settings.redesignEnabled}
+ onCheckedChange={(checked) => updateSettings({ redesignEnabled: Boolean(checked) })}
+ aria-label="New design"
+ />
+ }
+ />
<SettingsRow
{...searchableSetting("setting-appearance-contrast")}
description="Adjust the contrast of colors and borders across the interface."
@@ -198,127 +220,6 @@ export function AppearanceSettingsPanel() {
}
/>
- {showEnvironmentIdentification ? (
- <SettingsRow
- {...searchableSetting("environment-identification")}
- description="Choose how Dev and Nightly environments are identified."
- resetAction={
- settings.environmentIdentificationMode !== DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
- <SettingResetButton
- label="environment identification"
- onClick={() =>
- updateSettings({
- environmentIdentificationMode: DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE,
- })
- }
- />
- ) : null
- }
- control={
- <Select
- value={settings.environmentIdentificationMode}
- onValueChange={(value) => {
- if (value === "artwork" || value === "pill" || value === "none") {
- updateSettings({ environmentIdentificationMode: value });
- }
- }}
- >
- <SelectTrigger
- size="sm"
- className="w-full sm:w-40"
- aria-label="Environment identification"
- >
- <SelectValue>
- {ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode]}
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- {Object.entries(ENVIRONMENT_IDENTIFICATION_LABELS).map(([value, label]) => (
- <SelectItem hideIndicator key={value} value={value}>
- {label}
- </SelectItem>
- ))}
- </SelectPopup>
- </Select>
- }
- />
- ) : null}
-
- <SettingsRow
- {...searchableSetting("diff-color-scheme")}
- description="Choose colors for additions and deletions, including change counts."
- resetAction={
- settings.diffColorScheme !== DEFAULT_UNIFIED_SETTINGS.diffColorScheme ? (
- <SettingResetButton
- label="diff colors"
- onClick={() =>
- updateSettings({ diffColorScheme: DEFAULT_UNIFIED_SETTINGS.diffColorScheme })
- }
- />
- ) : null
- }
- control={
- <div className="w-full sm:w-40">
- <Select
- value={settings.diffColorScheme}
- onValueChange={(value) => {
- if (value === "red-green" || value === "blue-orange")
- updateSettings({ diffColorScheme: value });
- }}
- >
- <SelectTrigger size="sm" className="w-full min-w-0" aria-label="Diff colors">
- <span
- aria-hidden="true"
- className={
- settings.diffColorScheme === "blue-orange"
- ? "flex shrink-0 flex-row-reverse gap-1"
- : "flex shrink-0 gap-1"
- }
- >
- <span className="size-2 rounded-full bg-diff-deletion" />
- <span className="size-2 rounded-full bg-diff-addition" />
- </span>
- <SelectValue>
- {settings.diffColorScheme === "blue-orange" ? "Blue & orange" : "Red & green"}
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem value="red-green">Red & green (default)</SelectItem>
- <SelectItem value="blue-orange">Blue & orange</SelectItem>
- </SelectPopup>
- </Select>
- </div>
- }
- />
-
- <SettingsRow
- {...searchableSetting("composer-context")}
- description="Keep branch and worktree controls below the composer after a thread starts."
- resetAction={
- settings.persistComposerContextStrip !==
- DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip ? (
- <SettingResetButton
- label="composer context"
- onClick={() =>
- updateSettings({
- persistComposerContextStrip:
- DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.persistComposerContextStrip}
- onCheckedChange={(checked) =>
- updateSettings({ persistComposerContextStrip: Boolean(checked) })
- }
- aria-label="Keep composer context visible in active threads"
- />
- }
- />
-
<SettingsRow
{...searchableSetting("chat-width")}
description="Set how wide messages and the composer can grow on large screens."
@@ -376,60 +277,140 @@ export function AppearanceSettingsPanel() {
/>
}
/>
- </SettingsSection>
-
- <SettingsSection id="motion" title="Motion">
- <SettingsRow
- {...searchableSetting("panel-animations")}
- description="Set how fast panels open and close."
- control={
- <div className="grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4">
- <PanelAnimationsPreview durationMs={settings.panelAnimationDurationMs} />
- <div className="flex w-full items-center gap-3">
- <output
- className="min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground"
- htmlFor="panel-animation-duration"
- >
- {settings.panelAnimationDurationMs} ms
- </output>
- <input
- aria-label="Panel animation duration"
- className="settings-slider min-w-0 flex-1"
- id="panel-animation-duration"
- max={MAX_PANEL_ANIMATION_DURATION_MS}
- min={MIN_PANEL_ANIMATION_DURATION_MS}
- onChange={(event) => {
- const panelAnimationDurationMs = Number(event.currentTarget.value);
- if (
- Number.isInteger(panelAnimationDurationMs) &&
- panelAnimationDurationMs >= MIN_PANEL_ANIMATION_DURATION_MS &&
- panelAnimationDurationMs <= MAX_PANEL_ANIMATION_DURATION_MS
- ) {
- updateSettings({ panelAnimationDurationMs });
+ <AdvancedSettings
+ targetIds={[
+ searchableSetting("panel-animations").id,
+ searchableSetting("environment-identification").id,
+ // Environment identification's search result lands on this section.
+ "appearance-interface",
+ searchableSetting("composer-context").id,
+ ]}
+ >
+ <SettingsRow
+ {...searchableSetting("panel-animations")}
+ description="Set how fast panels open and close."
+ control={
+ <div className="grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4">
+ <PanelAnimationsPreview durationMs={settings.panelAnimationDurationMs} />
+ <div className="flex w-full items-center gap-3">
+ <output
+ className="min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground"
+ htmlFor="panel-animation-duration"
+ >
+ {settings.panelAnimationDurationMs} ms
+ </output>
+ <input
+ aria-label="Panel animation duration"
+ className="settings-slider min-w-0 flex-1"
+ id="panel-animation-duration"
+ max={MAX_PANEL_ANIMATION_DURATION_MS}
+ min={MIN_PANEL_ANIMATION_DURATION_MS}
+ onChange={(event) => {
+ const panelAnimationDurationMs = Number(event.currentTarget.value);
+ if (
+ Number.isInteger(panelAnimationDurationMs) &&
+ panelAnimationDurationMs >= MIN_PANEL_ANIMATION_DURATION_MS &&
+ panelAnimationDurationMs <= MAX_PANEL_ANIMATION_DURATION_MS
+ ) {
+ updateSettings({ panelAnimationDurationMs });
+ }
+ }}
+ step={25}
+ style={panelAnimationDurationSliderStyle}
+ type="range"
+ value={settings.panelAnimationDurationMs}
+ />
+ </div>
+ </div>
+ }
+ resetAction={
+ settings.panelAnimationDurationMs !==
+ DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs ? (
+ <SettingResetButton
+ label="panel animations"
+ onClick={() =>
+ updateSettings({
+ panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,
+ })
+ }
+ />
+ ) : null
+ }
+ />
+ {showEnvironmentIdentification ? (
+ <SettingsRow
+ {...searchableSetting("environment-identification")}
+ description="Choose how Dev and Nightly environments are identified."
+ resetAction={
+ settings.environmentIdentificationMode !==
+ DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
+ <SettingResetButton
+ label="environment identification"
+ onClick={() =>
+ updateSettings({
+ environmentIdentificationMode: DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={settings.environmentIdentificationMode}
+ onValueChange={(value) => {
+ if (value === "artwork" || value === "pill" || value === "none") {
+ updateSettings({ environmentIdentificationMode: value });
}
}}
- step={25}
- style={panelAnimationDurationSliderStyle}
- type="range"
- value={settings.panelAnimationDurationMs}
+ >
+ <SelectTrigger
+ size="sm"
+ className="w-full sm:w-40"
+ aria-label="Environment identification"
+ >
+ <SelectValue>
+ {ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode]}
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ {Object.entries(ENVIRONMENT_IDENTIFICATION_LABELS).map(([value, label]) => (
+ <SelectItem hideIndicator key={value} value={value}>
+ {label}
+ </SelectItem>
+ ))}
+ </SelectPopup>
+ </Select>
+ }
+ />
+ ) : null}
+ <SettingsRow
+ {...searchableSetting("composer-context")}
+ description="Keep branch and worktree controls below the composer after a thread starts."
+ resetAction={
+ settings.persistComposerContextStrip !==
+ DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip ? (
+ <SettingResetButton
+ label="composer context"
+ onClick={() =>
+ updateSettings({
+ persistComposerContextStrip:
+ DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip,
+ })
+ }
/>
- </div>
- </div>
- }
- resetAction={
- settings.panelAnimationDurationMs !==
- DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs ? (
- <SettingResetButton
- label="panel animations"
- onClick={() =>
- updateSettings({
- panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,
- })
+ ) : null
+ }
+ control={
+ <Switch
+ checked={settings.persistComposerContextStrip}
+ onCheckedChange={(checked) =>
+ updateSettings({ persistComposerContextStrip: Boolean(checked) })
}
+ aria-label="Keep composer context visible in active threads"
/>
- ) : null
- }
- />
+ }
+ />
+ </AdvancedSettings>
</SettingsSection>
<TypographySection />
diff --git a/apps/web/src/components/settings/BetaSettingsPanel.tsx b/apps/web/src/components/settings/BetaSettingsPanel.tsx
deleted file mode 100644
index 5724bd61466..00000000000
--- a/apps/web/src/components/settings/BetaSettingsPanel.tsx
+++ /dev/null
@@ -1,127 +0,0 @@
-import { useAuth } from "@clerk/react";
-import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
-import { Link } from "@tanstack/react-router";
-
-import { hasCloudPublicConfig } from "~/cloud/publicConfig";
-import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
-import { Button } from "../ui/button";
-import { Switch } from "../ui/switch";
-import { ScopedSwitch } from "./ScopedSwitch";
-import {
- SettingResetButton,
- SettingsPageContainer,
- SettingsRow,
- SettingsSection,
-} from "./settingsLayout";
-import { searchableSetting } from "./settingsSearch";
-import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
-
-/** Features that are still settling in. Some are on by default; each can be turned off here. */
-export function BetaSettingsPanel() {
- const settings = useScopedSettings();
- const updateSettings = useUpdateScopedSettings();
- return (
- <SettingsPageContainer>
- <SettingsSection id="beta" title="Beta">
- <SettingsRow
- {...searchableSetting("new-design")}
- description="A true black dark mode, dimmer read threads, and simpler composer controls. Turn it off for the classic look."
- resetAction={
- settings.redesignEnabled !== DEFAULT_UNIFIED_SETTINGS.redesignEnabled ? (
- <SettingResetButton
- label="new design"
- onClick={() =>
- updateSettings({ redesignEnabled: DEFAULT_UNIFIED_SETTINGS.redesignEnabled })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.redesignEnabled}
- onCheckedChange={(checked) => updateSettings({ redesignEnabled: Boolean(checked) })}
- aria-label="New design"
- />
- }
- />
- <SettingsRow
- {...searchableSetting("working-shelf")}
- description="Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you."
- resetAction={
- settings.sidebarWorkingShelfEnabled !==
- DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled ? (
- <SettingResetButton
- label="working section"
- onClick={() =>
- updateSettings({
- sidebarWorkingShelfEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.sidebarWorkingShelfEnabled}
- onCheckedChange={(checked) =>
- updateSettings({ sidebarWorkingShelfEnabled: Boolean(checked) })
- }
- aria-label="Working section"
- />
- }
- />
- {/* Clerk is only mounted when this build has T3 Connect. */}
- {hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
- </SettingsSection>
- </SettingsPageContainer>
- );
-}
-
-/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
-function GuestLinksRowWithSignIn() {
- const { isSignedIn } = useAuth();
- const { openAuthPrompt } = useT3ConnectAuthPrompt();
- // `isSignedIn` is undefined until Clerk loads.
- if (isSignedIn !== false) return <GuestLinksRow />;
- return (
- <SettingsRow
- {...searchableSetting("guest-links")}
- description="Share a thread with a guest who watches it live in their browser and sends messages you approve. Sign in to T3 Connect to use guest links."
- control={
- <Button size="sm" variant="outline" onClick={openAuthPrompt}>
- Sign in
- </Button>
- }
- />
- );
-}
-
-function GuestLinksRow() {
- const settings = useScopedSettings();
- const updateSettings = useUpdateScopedSettings();
- return (
- <SettingsRow
- serverScoped
- {...searchableSetting("guest-links")}
- settingKeys={["guestSharingEnabled"]}
- description={
- <>
- Share a thread with a guest who watches it live in their browser and sends messages you
- approve. Needs T3 Connect: sign in and link this machine in{" "}
- <Link to="/settings/connections" className="underline underline-offset-2">
- Connections
- </Link>
- . While it is off, every guest link stops working.
- </>
- }
- control={
- <ScopedSwitch
- settingKeys={["guestSharingEnabled"]}
- checked={settings.guestSharingEnabled}
- onCheckedChange={(checked) => updateSettings({ guestSharingEnabled: Boolean(checked) })}
- aria-label="Guest links"
- />
- }
- />
- );
-}
diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx
index 3aa4a150a4d..daa240cbf68 100644
--- a/apps/web/src/components/settings/ConnectionsSettings.tsx
+++ b/apps/web/src/components/settings/ConnectionsSettings.tsx
@@ -151,7 +151,8 @@ function LocalVersionStatusLabel() {
);
}
-export function ConnectionsSettings() {
+/** Environments lists the machines this app connects to; access covers who may reach this one. */
+export function ConnectionsSettings({ view }: { readonly view: "environments" | "access" }) {
const desktopBridge = window.desktopBridge;
const { environments } = useEnvironments();
const primaryEnvironment = usePrimaryEnvironment();
@@ -285,8 +286,9 @@ export function ConnectionsSettings() {
const canMaintain = useEnvironmentScope(primaryEnvironmentId, AuthEnvironmentMaintainScope);
const canManageRelay = useEnvironmentScope(primaryEnvironmentId, AuthRelayWriteScope);
const canManageLocalBackend = !isLocalEnvironmentDisabled() && canMaintain;
+ const showsAccess = view === "access";
const authAccessChanges = useEnvironmentQuery(
- canReadAccess && primaryEnvironmentId !== null
+ showsAccess && canReadAccess && primaryEnvironmentId !== null
? authEnvironment.accessChanges({
environmentId: primaryEnvironmentId,
input: null,
@@ -294,10 +296,10 @@ export function ConnectionsSettings() {
: null,
);
const desktopNetworkAccess = useEnvironmentQuery(
- canManageLocalBackend && desktopBridge ? desktopNetworkAccessStateAtom : null,
+ showsAccess && canManageLocalBackend && desktopBridge ? desktopNetworkAccessStateAtom : null,
);
const desktopWsl = useEnvironmentQuery(
- canManageLocalBackend && desktopBridge ? desktopWslStateAtom : null,
+ showsAccess && canManageLocalBackend && desktopBridge ? desktopWslStateAtom : null,
);
const desktopWslState = desktopWsl.data;
const desktopWslError = desktopWslMutationError ?? desktopWsl.error;
@@ -1069,7 +1071,6 @@ export function ConnectionsSettings() {
) : null
}
>
- <LocalEnvironmentSetting />
{canManageLocalBackend ? (
<SettingsRow
title="Version"
@@ -1466,7 +1467,6 @@ export function ConnectionsSettings() {
title="No environment selected"
description="Connect an environment to view its settings and access."
/>
- <LocalEnvironmentSetting />
{canReadRelay || canManageRelay ? (
<CloudLinkRow canReadRelay={canReadRelay} canManageRelay={canManageRelay} />
) : null}
@@ -1475,9 +1475,15 @@ export function ConnectionsSettings() {
</>
);
+ if (showsAccess) return <SettingsPageContainer>{primarySettings}</SettingsPageContainer>;
+
return (
<SettingsPageContainer>
- {primarySettings}
+ {desktopBridge?.setLocalEnvironmentEnabled ? (
+ <SettingsSection id="this-app" title="This app">
+ <LocalEnvironmentSetting />
+ </SettingsSection>
+ ) : null}
<SettingsSection
{...searchableSetting("remote-environments")}
title="Environments"
diff --git a/apps/web/src/components/settings/IntegrationsSettings.tsx b/apps/web/src/components/settings/IntegrationsSettings.tsx
index 884ab02907f..61384569d9f 100644
--- a/apps/web/src/components/settings/IntegrationsSettings.tsx
+++ b/apps/web/src/components/settings/IntegrationsSettings.tsx
@@ -118,6 +118,7 @@ import {
SettingsSection,
} from "./settingsLayout";
import { searchableSetting } from "./settingsSearch";
+import { AdvancedSettings } from "./AdvancedSettings";
import { useSettingsScope } from "./SettingsScopeContext";
import { BrowserImportWizard, type WizardTarget } from "./BrowserImportWizard";
import type { ImportOutcome } from "./browserImportWizard.logic";
@@ -761,7 +762,7 @@ function BrowserSearchEngineSetting() {
);
}
-function PullRequestLinksOpenInAppSetting() {
+export function PullRequestLinksOpenInAppSetting() {
const openInApp = useClientSettings((settings) => settings.pullRequestLinksOpenInApp);
const updateSettings = useUpdatePrimarySettings();
@@ -1598,36 +1599,50 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
);
}
-export function IntegrationsSettingsPanel() {
- const previewDefaultsDisabled = !isElectron;
- const previewDefaults = (
- <>
- <BrowserProfilesSetting disabled={previewDefaultsDisabled} />
- <BrowserViewportSetting disabled={previewDefaultsDisabled} />
- <BrowserZoomSetting disabled={previewDefaultsDisabled} />
- <BrowserAppearanceSetting disabled={previewDefaultsDisabled} />
- <BrowserRecordingFrameRateSetting disabled={previewDefaultsDisabled} />
- <BrowserRecordingInputSettings disabled={previewDefaultsDisabled} />
- <BrowserLinkTargetSetting disabled={previewDefaultsDisabled} />
- <BrowserAutoShowFloatingPreviewSetting disabled={previewDefaultsDisabled} />
- </>
- );
+export function BrowserSettingsPanel() {
+ const desktopOnly = !isElectron;
+ const desktopOnlyMessage = desktopOnly ? "Only available in the desktop app." : undefined;
return (
<SettingsPageContainer>
- <SettingsSection id="browser" title="Browser">
+ <SettingsSection id="browser-agent-access" title="Agent access">
<AgentBrowserAccessSetting />
- {previewDefaultsDisabled ? (
- <SettingsUnavailableGroup message="Only available in the desktop app.">
- {previewDefaults}
- </SettingsUnavailableGroup>
- ) : (
- previewDefaults
- )}
+ </SettingsSection>
+ <SettingsSection id="browser" title="Browsing">
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
+ <BrowserProfilesSetting disabled={desktopOnly} />
+ <BrowserLinkTargetSetting disabled={desktopOnly} />
+ <BrowserAutoShowFloatingPreviewSetting disabled={desktopOnly} />
+ </SettingsUnavailableGroup>
{/* Not desktop-only: web clients search from server-run browser tabs too. */}
<BrowserSearchEngineSetting />
- <PullRequestLinksOpenInAppSetting />
+ <AdvancedSettings
+ targetIds={[
+ searchableSetting("browser-default-viewport").id,
+ searchableSetting("browser-default-zoom").id,
+ searchableSetting("browser-default-appearance").id,
+ ]}
+ >
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
+ <BrowserViewportSetting disabled={desktopOnly} />
+ <BrowserZoomSetting disabled={desktopOnly} />
+ <BrowserAppearanceSetting disabled={desktopOnly} />
+ </SettingsUnavailableGroup>
+ </AdvancedSettings>
</SettingsSection>
+ <SettingsSection id="browser-recordings" title="Recordings">
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
+ <BrowserRecordingFrameRateSetting disabled={desktopOnly} />
+ <BrowserRecordingInputSettings disabled={desktopOnly} />
+ </SettingsUnavailableGroup>
+ </SettingsSection>
+ </SettingsPageContainer>
+ );
+}
+
+export function DevicesSettingsPanel() {
+ return (
+ <SettingsPageContainer>
<DeviceIntegrationSettings />
</SettingsPageContainer>
);
diff --git a/apps/web/src/components/settings/LabsSettingsPanel.tsx b/apps/web/src/components/settings/LabsSettingsPanel.tsx
new file mode 100644
index 00000000000..7e3833de2b9
--- /dev/null
+++ b/apps/web/src/components/settings/LabsSettingsPanel.tsx
@@ -0,0 +1,73 @@
+import { useAuth } from "@clerk/react";
+import { Link } from "@tanstack/react-router";
+
+import { hasCloudPublicConfig } from "~/cloud/publicConfig";
+import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
+import { Button } from "../ui/button";
+import { ScopedSwitch } from "./ScopedSwitch";
+import { SettingsPageContainer, SettingsRow, SettingsSection } from "./settingsLayout";
+import { searchableSetting } from "./settingsSearch";
+import { LegacyFeaturesSection } from "./SettingsPanels";
+import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
+
+/** Features still settling in, and legacy behavior kept for people who rely on it. */
+export function LabsSettingsPanel() {
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="beta" title="Beta">
+ {/* Clerk is only mounted when this build has T3 Connect. */}
+ {hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
+ </SettingsSection>
+ <LegacyFeaturesSection />
+ </SettingsPageContainer>
+ );
+}
+
+/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
+function GuestLinksRowWithSignIn() {
+ const { isSignedIn } = useAuth();
+ const { openAuthPrompt } = useT3ConnectAuthPrompt();
+ // `isSignedIn` is undefined until Clerk loads.
+ if (isSignedIn !== false) return <GuestLinksRow />;
+ return (
+ <SettingsRow
+ {...searchableSetting("guest-links")}
+ description="Share a thread with a guest who watches it live in their browser and sends messages you approve. Sign in to T3 Connect to use guest links."
+ control={
+ <Button size="sm" variant="outline" onClick={openAuthPrompt}>
+ Sign in
+ </Button>
+ }
+ />
+ );
+}
+
+function GuestLinksRow() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ return (
+ <SettingsRow
+ serverScoped
+ {...searchableSetting("guest-links")}
+ settingKeys={["guestSharingEnabled"]}
+ description={
+ <>
+ Share a thread with a guest who watches it live in their browser and sends messages you
+ approve. Needs T3 Connect: sign in and link this machine in{" "}
+ <Link to="/settings/access" className="underline underline-offset-2">
+ Sharing & access
+ </Link>
+ . While it is off, every guest link stops working.
+ </>
+ }
+ control={
+ <ScopedSwitch
+ settingKeys={["guestSharingEnabled"]}
+ checked={settings.guestSharingEnabled}
+ onCheckedChange={(checked) => updateSettings({ guestSharingEnabled: Boolean(checked) })}
+ aria-label="Guest links"
+ />
+ }
+ />
+ );
+}
diff --git a/apps/web/src/components/settings/ProjectDefaultsSettings.tsx b/apps/web/src/components/settings/ProjectDefaultsSettings.tsx
index 89df79882ff..b03ec8678b8 100644
--- a/apps/web/src/components/settings/ProjectDefaultsSettings.tsx
+++ b/apps/web/src/components/settings/ProjectDefaultsSettings.tsx
@@ -89,7 +89,6 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
const mixedPermissions = useScopedSettingsMixed(["defaultRuntimeMode"]);
const PermissionIcon = runtimeModeConfig[settings.defaultRuntimeMode].icon;
const mixedWorkspace = useScopedSettingsMixed(["defaultThreadEnvMode"]);
- const mixedSubmodules = useScopedSettingsMixed(["worktreeSubmodules"]);
const mixedAutoPull = useScopedSettingsMixed(["defaultAutoPull"]);
const mixedAgentCredits = useScopedSettingsMixed(["removeAgentCreditsOnMerge"]);
const mixedMergeMethod = useScopedSettingsMixed(["pullRequestMergeMethod"]);
@@ -328,52 +327,6 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
}
/>
{workspaceRow}
- <SettingsRow
- serverScoped
- settingKeys={["worktreeSubmodules"]}
- mixed={mixedSubmodules}
- {...searchableSetting("worktree-submodules")}
- description={
- isProjectScope
- ? "How new worktrees in this project populate git submodules."
- : "How new worktrees populate git submodules. Projects and their t3.json can override it."
- }
- resetAction={
- !isProjectScope && settings.worktreeSubmodules !== null ? (
- <SettingResetButton
- label="worktree submodules"
- onClick={() => updateSettings({ worktreeSubmodules: null })}
- />
- ) : null
- }
- control={
- <Select
- value={mixedSubmodules ? null : (effective?.worktreeSubmodules ?? null)}
- onValueChange={(value) => {
- if (isWorktreeSubmodules(value)) updateSettings({ worktreeSubmodules: value });
- }}
- >
- <SelectTrigger size="sm" aria-label="Worktree submodules">
- <SelectValue>
- {(value: string | null) =>
- isWorktreeSubmodules(value)
- ? WORKTREE_SUBMODULES_LABELS[value]
- : unavailable
- ? "Unavailable"
- : "Mixed"
- }
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- {WORKTREE_SUBMODULES_OPTIONS.map((option) => (
- <SelectItem key={option} value={option}>
- {WORKTREE_SUBMODULES_LABELS[option]}
- </SelectItem>
- ))}
- </SelectPopup>
- </Select>
- }
- />
</>
) : (
<>
@@ -485,3 +438,64 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
</SettingsSection>
);
}
+
+export function WorktreeSubmodulesRow() {
+ const { scope, target, connectedEnvironments } = useSettingsScope();
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ const mixedSubmodules = useScopedSettingsMixed(["worktreeSubmodules"]);
+ const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
+ const unavailable = connectedEnvironments.length === 0;
+ const effective = target
+ ? resolveProjectSettings(target.settings, null, null, null).settings
+ : null;
+
+ return (
+ <SettingsRow
+ serverScoped
+ settingKeys={["worktreeSubmodules"]}
+ mixed={mixedSubmodules}
+ {...searchableSetting("worktree-submodules")}
+ description={
+ isProjectScope
+ ? "How new worktrees in this project populate git submodules."
+ : "How new worktrees populate git submodules. Projects and their t3.json can override it."
+ }
+ resetAction={
+ !isProjectScope && settings.worktreeSubmodules !== null ? (
+ <SettingResetButton
+ label="worktree submodules"
+ onClick={() => updateSettings({ worktreeSubmodules: null })}
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={mixedSubmodules ? null : (effective?.worktreeSubmodules ?? null)}
+ onValueChange={(value) => {
+ if (isWorktreeSubmodules(value)) updateSettings({ worktreeSubmodules: value });
+ }}
+ >
+ <SelectTrigger size="sm" aria-label="Worktree submodules">
+ <SelectValue>
+ {(value: string | null) =>
+ isWorktreeSubmodules(value)
+ ? WORKTREE_SUBMODULES_LABELS[value]
+ : unavailable
+ ? "Unavailable"
+ : "Mixed"
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ {WORKTREE_SUBMODULES_OPTIONS.map((option) => (
+ <SelectItem key={option} value={option}>
+ {WORKTREE_SUBMODULES_LABELS[option]}
+ </SelectItem>
+ ))}
+ </SelectPopup>
+ </Select>
+ }
+ />
+ );
+}
diff --git a/apps/web/src/components/settings/ProviderSettingsPanel.tsx b/apps/web/src/components/settings/ProviderSettingsPanel.tsx
index 326dfb4742e..327e345fffa 100644
--- a/apps/web/src/components/settings/ProviderSettingsPanel.tsx
+++ b/apps/web/src/components/settings/ProviderSettingsPanel.tsx
@@ -105,6 +105,7 @@ import { CodexSetupSection, CodexManagedRuntimeFields } from "./CodexSetupSectio
import { readCodexSetupMode } from "./CodexSetupSection.logic";
import { providerClients } from "./providerDriverMeta";
import { searchableSetting } from "./settingsSearch";
+import { CompactIdleThreadsRow } from "./SettingsPanels";
import {
backgroundActivityOverrideSettings,
buildProviderInstanceUpdatePatch,
@@ -1107,7 +1108,7 @@ export function EnvironmentProviderSettings({
<PolicyTooltip>
This interval is configured here, then the shared Background activity policy decides
whether provider probes may run when the timer fires. Custom intervals appear as
- Advanced in General settings.
+ Advanced in Maintenance settings.
</PolicyTooltip>
</span>
}
@@ -1172,6 +1173,7 @@ export function EnvironmentProviderSettings({
</div>
}
/>
+ <CompactIdleThreadsRow />
</SettingsSection>
{isAddInstanceDialogOpen && !readOnly ? (
diff --git a/apps/web/src/components/settings/ScheduledTasksSettings.tsx b/apps/web/src/components/settings/ScheduledTasksSettings.tsx
index 3b842367ab4..d440a4fde05 100644
--- a/apps/web/src/components/settings/ScheduledTasksSettings.tsx
+++ b/apps/web/src/components/settings/ScheduledTasksSettings.tsx
@@ -1064,8 +1064,8 @@ function WebhookDeliveryMode({ environmentId }: { readonly environmentId: Enviro
{cloudLink.data.holdWebhooksWhileOffline
? "Held for up to 24 hours while this environment is offline. "
: "Forwarded live. Requests fail while this environment is offline. "}
- <Link to="/settings/connections" className="underline underline-offset-2">
- Change in Connections
+ <Link to="/settings/access" className="underline underline-offset-2">
+ Change in Sharing & access
</Link>
</p>
);
diff --git a/apps/web/src/components/settings/SettingsFontPreviews.tsx b/apps/web/src/components/settings/SettingsFontPreviews.tsx
index d02f5350314..ceb5d15053d 100644
--- a/apps/web/src/components/settings/SettingsFontPreviews.tsx
+++ b/apps/web/src/components/settings/SettingsFontPreviews.tsx
@@ -142,6 +142,7 @@ const TERMINAL_PREVIEW_TRANSCRIPT =
" \x1b[42;30m READY \x1b[0m \x1b[2mwatching for changes, press\x1b[0m \x1b[1mq\x1b[0m \x1b[2mto quit\x1b[0m\r\n" +
"\r\n" +
TERMINAL_PROMPT;
+const TERMINAL_PREVIEW_ROWS = TERMINAL_PREVIEW_TRANSCRIPT.split("\r\n").length;
function previewTerminalFont(family: string, size: number): { family?: string; size: number } {
const trimmed = family.trim();
@@ -154,8 +155,17 @@ export function TerminalFontPreview({ family, size }: { family: string; size: nu
const [initialFont] = useState(() => previewTerminalFont(family, size));
const { theme, resolvedTheme } = useTheme();
+ // The box grows with the font so the whole transcript shows without scrolling.
useEffect(() => {
- void surface?.setFont(previewTerminalFont(family, size));
+ if (!surface) return;
+ void surface.setFont(previewTerminalFont(family, size)).then(() => {
+ const mount = mountRef.current;
+ if (!mount) return;
+ // The border sits inside the box's height and is not part of the terminal's grid.
+ const border = mount.offsetHeight - mount.clientHeight;
+ mount.style.height = `${surface.heightForRows(TERMINAL_PREVIEW_ROWS) + border}px`;
+ surface.fit();
+ });
}, [surface, family, size]);
// Palette changes may preserve light/dark mode; re-read terminal tokens for every theme change.
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 246df2723a7..f8bb4138492 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -1,7 +1,6 @@
-import { SettingsGroup } from "./SettingsGroup";
import { NotificationSettings } from "./NotificationSettings";
import { PRIVACY_POLICY_URL } from "../../legalLinks";
-import { CheckIcon, ChevronRightIcon } from "lucide-react";
+import { CheckIcon } from "lucide-react";
import { Link, useNavigate } from "@tanstack/react-router";
import { useRef, useState } from "react";
import {
@@ -51,7 +50,7 @@ import {
useUpdateScopedSettings,
} from "./useScopedSettings";
import { useScopedModelDisabledReason } from "./useScopedModelAvailability";
-import { useSettingsScope } from "./SettingsScopeContext";
+import { useOptionalSettingsScope, useSettingsScope } from "./SettingsScopeContext";
import { scopedIdleCompaction } from "./scopedSettings";
import { ProjectDefaultsSettings } from "./ProjectDefaultsSettings";
import { ThreadTitleInstructionsSettings } from "./ThreadTitleInstructionsSettings";
@@ -71,7 +70,6 @@ import { isMacPlatform } from "../../lib/utils";
import { useEnvironmentProviders } from "../../state/environments";
import { EMPTY_SERVER_PROVIDERS } from "../../state/server";
import { Button } from "../ui/button";
-import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
import { DraftInput } from "../ui/draft-input";
import { Input } from "../ui/input";
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -94,11 +92,12 @@ import {
SettingsPageContainer,
SettingsRow,
SettingsSection,
- useSettingsSearchTarget,
- useSettingsSearchTargetId,
} from "./settingsLayout";
import { searchableSetting } from "./settingsSearch";
import { BackgroundActivitySettingsRow } from "./BackgroundActivitySettings";
+import { AdvancedSettings } from "./AdvancedSettings";
+import { PullRequestLinksOpenInAppSetting } from "./IntegrationsSettings";
+import { StorageCleanupSections } from "./StorageSettings";
const RESPONSE_STREAMING_MODE_LABELS: Record<ResponseStreamingMode, string> = {
turn: "Wait for the full response",
@@ -700,166 +699,80 @@ function AutoSettleDaysInput({
);
}
-const LEGACY_FEATURE_TARGET_IDS: ReadonlySet<string> = new Set([
- "legacy-plan-mode",
- "legacy-context-window-indicator",
- "legacy-sidebar",
-]);
-
-function LegacyFeaturesSection() {
+export function LegacyFeaturesSection() {
const settings = useScopedSettings();
const updateSettings = useUpdateScopedSettings();
- const [open, setOpen] = useState(false);
- const searchTargetId = useSettingsSearchTargetId();
- const targetRef = useSettingsSearchTarget<HTMLElement>("legacy-features");
- // A search jump to a legacy setting opens the fold before its row mounts.
- const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
- if (seenSearchTargetId !== searchTargetId) {
- setSeenSearchTargetId(searchTargetId);
- if (searchTargetId !== null && LEGACY_FEATURE_TARGET_IDS.has(searchTargetId)) setOpen(true);
- }
return (
- <section id="legacy-features" ref={targetRef} tabIndex={-1} className="space-y-2.5">
- <Collapsible open={open} onOpenChange={setOpen}>
- <CollapsibleTrigger className="group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4">
- <h2 className="text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground">
- Legacy features
- </h2>
- <ChevronRightIcon className="size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90" />
- </CollapsibleTrigger>
- <CollapsiblePanel>
- <SettingsGroup>
- <SettingsRow
- {...searchableSetting("legacy-plan-mode")}
- description="Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode."
- control={
- <Switch
- checked={settings.planModeEnabled}
- onCheckedChange={(checked) => {
- updateSettings({ planModeEnabled: Boolean(checked) });
- }}
- aria-label="Plan mode (legacy)"
- />
- }
- />
- <SettingsRow
- {...searchableSetting("legacy-context-window-indicator")}
- description="Shows context window usage as a circular indicator in the composer."
- control={
- <Switch
- checked={settings.contextWindowMeterEnabled}
- onCheckedChange={(checked) =>
- updateSettings({ contextWindowMeterEnabled: Boolean(checked) })
- }
- aria-label="Context window indicator (legacy)"
- />
- }
- />
- <SettingsRow
- {...searchableSetting("legacy-sidebar")}
- description="Restore per-project thread trees instead of the default flat sidebar."
- control={
- <Switch
- checked={settings.legacySidebarEnabled}
- onCheckedChange={(checked) =>
- updateSettings({ legacySidebarEnabled: Boolean(checked) })
- }
- aria-label="Sidebar (legacy)"
- />
- }
- />
- </SettingsGroup>
- </CollapsiblePanel>
- </Collapsible>
- </section>
+ <SettingsSection id="legacy-features" title="Legacy">
+ <SettingsRow
+ {...searchableSetting("legacy-plan-mode")}
+ description="Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode."
+ control={
+ <Switch
+ checked={settings.planModeEnabled}
+ onCheckedChange={(checked) => {
+ updateSettings({ planModeEnabled: Boolean(checked) });
+ }}
+ aria-label="Plan mode (legacy)"
+ />
+ }
+ />
+ <SettingsRow
+ {...searchableSetting("legacy-context-window-indicator")}
+ description="Shows context window usage as a circular indicator in the composer."
+ control={
+ <Switch
+ checked={settings.contextWindowMeterEnabled}
+ onCheckedChange={(checked) =>
+ updateSettings({ contextWindowMeterEnabled: Boolean(checked) })
+ }
+ aria-label="Context window indicator (legacy)"
+ />
+ }
+ />
+ <SettingsRow
+ {...searchableSetting("legacy-sidebar")}
+ description="Restore per-project thread trees instead of the default flat sidebar."
+ control={
+ <Switch
+ checked={settings.legacySidebarEnabled}
+ onCheckedChange={(checked) =>
+ updateSettings({ legacySidebarEnabled: Boolean(checked) })
+ }
+ aria-label="Sidebar (legacy)"
+ />
+ }
+ />
+ </SettingsSection>
);
}
export function GeneralSettingsPanel() {
- const modifierLabel = isMacPlatform(navigator.platform) ? "⌘" : "Ctrl";
- const sendShortcutOptions = [
- { value: "enter", label: "Enter" },
- { value: "mod-enter-multiline", label: `${modifierLabel} + Enter for multiline prompts` },
- { value: "mod-enter", label: `${modifierLabel} + Enter always` },
- ] as const;
const settings = useScopedSettings();
const updateSettings = useUpdateScopedSettings();
- const navigate = useNavigate();
- const { scope, environment, connectedEnvironments, target, targets } = useSettingsScope();
- const idleCompaction = scopedIdleCompaction(targets.length > 0 ? targets : [{ settings }]);
- const environmentId = environment?.environmentId ?? null;
- const isEnvironmentScope = scope.environmentIds.length === 1 && environmentId !== null;
- const hasServerTargets = connectedEnvironments.length > 0;
- const mixedResponseStreamingMode = useScopedSettingsMixed(["responseStreamingMode"]);
const lastEnabledProjectGroupingMode = useRef<SidebarProjectGroupingMode>(
readLastEnabledProjectGroupingMode(),
);
- const providersByEnvironment = useEnvironmentProviders();
- const serverProviders =
- (environment?.serverConfig
- ? providersByEnvironment.get(environment.environmentId)
- : undefined) ?? EMPTY_SERVER_PROVIDERS;
- const supportsAutoSettlement =
- connectedEnvironments.length > 0 &&
- connectedEnvironments.every(
- (target) => target.serverConfig?.environment.capabilities.threadAutoSettlement === true,
- );
- const supportsAutoSettlementScope = connectedEnvironments.every(
- (target) => target.serverConfig?.environment.capabilities.threadAutoSettlementScope === true,
- );
- const supportsRestartContinuation =
- connectedEnvironments.length > 0 &&
- connectedEnvironments.every(
- (target) => target.serverConfig?.environment.capabilities.threadRestartContinuation === true,
- );
-
- const textGenerationProviders = serverProviders.filter(
- (provider) => provider.supportsTextGeneration !== false,
- );
- const textGenerationModelSelection = resolveAppModelSelectionState(
- settings,
- textGenerationProviders,
- );
- const textGenInstanceId = textGenerationModelSelection.instanceId;
- const textGenModel = textGenerationModelSelection.model;
- const textGenModelOptions = textGenerationModelSelection.options;
- const textGenerationModelInstanceEntries = sortProviderInstanceEntries(
- applyProviderInstanceSettings(
- deriveProviderInstanceEntries(textGenerationProviders),
- settings,
- target?.projectId ?? null,
- ),
- );
- const hasTextGenerationProvider = textGenerationModelInstanceEntries.some(
- (entry) => entry.enabled && entry.isAvailable,
- );
- const textGenInstanceEntry = textGenerationModelInstanceEntries.find(
- (entry) => entry.instanceId === textGenInstanceId,
- );
- const textGenProvider: ProviderDriverKind =
- textGenInstanceEntry?.driverKind ?? DEFAULT_DRIVER_KIND;
- const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance(
- settings,
- textGenerationProviders,
- textGenInstanceId,
- textGenModel,
- );
- const isTextGenerationModelDirty = !Equal.equals(
- settings.textGenerationModelSelection ?? null,
- DEFAULT_UNIFIED_SETTINGS.textGenerationModelSelection ?? null,
- );
- const textGenerationModelDisabledReason = useScopedModelDisabledReason(
- settings,
- textGenerationModelInstanceEntries,
- );
- const mixedAddProjectBaseDirectory = useScopedSettingsMixed(["addProjectBaseDirectory"]);
- const mixedTextGenerationModel = useScopedSettingsMixed(["textGenerationModelSelection"]);
return (
<SettingsPageContainer>
- <ProjectDefaultsSettings category="general" />
- <SettingsSection id="organization" title="Organization">
+ <SettingsSection id="notifications" title="Notifications">
+ <NotificationSettings />
+ <SettingsRow
+ {...searchableSetting("in-app-notifications")}
+ description="Show a toast when another thread finishes, fails, or needs input or approval while this app has focus."
+ control={
+ <Switch
+ checked={settings.inAppNotificationsEnabled}
+ onCheckedChange={(checked) => updateSettings({ inAppNotificationsEnabled: checked })}
+ aria-label="In-app notifications"
+ />
+ }
+ />
+ </SettingsSection>
+
+ <SettingsSection id="sidebar" title="Sidebar">
<SettingsRow
{...searchableSetting("project-grouping")}
description="Combine matching repositories across environments."
@@ -935,302 +848,95 @@ export function GeneralSettingsPanel() {
</Select>
}
/>
-
<SettingsRow
- serverScoped
- {...searchableSetting("auto-resume-limited-threads")}
- description="Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation."
- settingKeys={["autoResumeLimitedThreads"]}
- control={
- <ScopedSwitch
- settingKeys={["autoResumeLimitedThreads"]}
- checked={settings.autoResumeLimitedThreads}
- onCheckedChange={(checked) =>
- updateSettings({ autoResumeLimitedThreads: Boolean(checked) })
- }
- aria-label="Resume after usage limits"
- />
+ {...searchableSetting("working-shelf")}
+ description="Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you."
+ resetAction={
+ settings.sidebarWorkingShelfEnabled !==
+ DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled ? (
+ <SettingResetButton
+ label="working section"
+ onClick={() =>
+ updateSettings({
+ sidebarWorkingShelfEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled,
+ })
+ }
+ />
+ ) : null
}
- />
- <SettingsRow
- serverScoped
- {...searchableSetting("snooze-limited-threads")}
- description="Snooze usage-limit stops until reset. Pair with resume to continue on wake."
- settingKeys={["snoozeLimitedThreads"]}
control={
- <ScopedSwitch
- settingKeys={["snoozeLimitedThreads"]}
- checked={settings.snoozeLimitedThreads}
+ <Switch
+ checked={settings.sidebarWorkingShelfEnabled}
onCheckedChange={(checked) =>
- updateSettings({ snoozeLimitedThreads: Boolean(checked) })
+ updateSettings({ sidebarWorkingShelfEnabled: Boolean(checked) })
}
- aria-label="Snooze until limits reset"
+ aria-label="Working section"
/>
}
/>
+ </SettingsSection>
+ <SettingsSection id="confirmations" title="Confirmations">
<SettingsRow
- serverScoped
- settingKeys={["idleCompaction", "compactIdleThreads"]}
- mixed={idleCompaction.mixed}
- {...searchableSetting("compact-idle-threads")}
- description="When to compact an idle Claude thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Each Claude provider can override this."
+ {...searchableSetting("unpin-confirmation")}
+ description="Ask before unpinning a thread from the pinned section."
resetAction={
- globalIdleCompaction(settings) !== globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) ? (
+ settings.confirmThreadUnpin !== DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin ? (
<SettingResetButton
- label="compact idle threads"
+ label="unpin confirmation"
onClick={() =>
- updateSettings({ idleCompaction: globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) })
+ updateSettings({
+ confirmThreadUnpin: DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin,
+ })
}
/>
) : null
}
- control={
- <Select
- value={idleCompaction.mixed ? null : globalIdleCompaction(settings)}
- onValueChange={(value) => {
- const mode = IDLE_COMPACTION_MODES.find((candidate) => candidate.value === value);
- if (mode) updateSettings({ idleCompaction: mode.value });
- }}
- >
- <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Compact idle threads">
- <SelectValue>
- {(value: string | null) =>
- value === null
- ? "Mixed"
- : IDLE_COMPACTION_MODES.find((mode) => mode.value === value)?.label
- }
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- {IDLE_COMPACTION_MODES.map((mode) => (
- <SelectItem
- hideIndicator
- key={mode.value}
- value={mode.value}
- // A server from before modes has only the on/off switch, so it cannot store "Never".
- disabled={mode.value === "off" && !idleCompaction.neverAvailable}
- >
- {mode.label}
- </SelectItem>
- ))}
- </SelectPopup>
- </Select>
- }
- />
-
- {supportsAutoSettlement ? (
- <>
- <SettingsRow
- serverScoped
- settingKeys={["sidebarAutoSettleOnMerge"]}
- {...searchableSetting("auto-settle-merged-threads")}
- description="Settle a thread when its pull request merges. Closed pull requests still settle automatically."
- resetAction={
- settings.sidebarAutoSettleOnMerge !==
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge ? (
- <SettingResetButton
- label="auto-settle on merge"
- onClick={() =>
- updateSettings({
- sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge,
- })
- }
- />
- ) : null
- }
- control={
- <ScopedSwitch
- settingKeys={["sidebarAutoSettleOnMerge"]}
- checked={settings.sidebarAutoSettleOnMerge}
- onCheckedChange={(checked) =>
- updateSettings({ sidebarAutoSettleOnMerge: Boolean(checked) })
- }
- aria-label="Auto-settle merged threads"
- />
- }
- />
-
- <SettingsRow
- serverScoped
- settingKeys={["sidebarAutoSettleAfterDays"]}
- {...searchableSetting("auto-settle-inactive-threads")}
- description="Sidebar threads with no activity for this long settle automatically."
- resetAction={
- settings.sidebarAutoSettleAfterDays !==
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays ? (
- <SettingResetButton
- label="auto-settle"
- onClick={() =>
- updateSettings({
- sidebarAutoSettleAfterDays:
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays,
- })
- }
- />
- ) : null
- }
- control={
- <ScopedSwitch
- settingKeys={["sidebarAutoSettleAfterDays"]}
- checked={settings.sidebarAutoSettleAfterDays !== null}
- onCheckedChange={(checked) =>
- updateSettings({
- sidebarAutoSettleAfterDays: checked ? AUTO_SETTLE_DEFAULT_DAYS : null,
- })
- }
- aria-label="Auto-settle inactive threads"
- />
- }
- />
- {settings.sidebarAutoSettleAfterDays !== null ? (
- <SettingsRow
- serverScoped
- settingKeys={["sidebarAutoSettleAfterDays"]}
- title={searchableSetting("days-before-auto-settle").title}
- description="Any new activity un-settles a thread automatically."
- control={
- <AutoSettleDaysInput
- value={settings.sidebarAutoSettleAfterDays}
- onCommit={(days) => updateSettings({ sidebarAutoSettleAfterDays: days })}
- />
- }
- />
- ) : null}
- {settings.sidebarAutoSettleAfterDays !== null && supportsAutoSettlementScope ? (
- <SettingsRow
- serverScoped
- settingKeys={["sidebarAutoSettleKeepPullRequests"]}
- title="Keep threads with a PR"
- description="Inactivity does not settle threads with a pull request. Merge and close still do."
- control={
- <ScopedSwitch
- settingKeys={["sidebarAutoSettleKeepPullRequests"]}
- checked={settings.sidebarAutoSettleKeepPullRequests}
- onCheckedChange={(checked) =>
- updateSettings({ sidebarAutoSettleKeepPullRequests: checked })
- }
- aria-label="Keep threads with a PR"
- />
- }
- />
- ) : null}
- </>
- ) : null}
- </SettingsSection>
-
- <SettingsSection id="behavior" title="Behavior">
- <NotificationSettings />
- <SettingsRow
- {...searchableSetting("in-app-notifications")}
- description="Show a toast when another thread finishes, fails, or needs input or approval while this app has focus."
control={
<Switch
- checked={settings.inAppNotificationsEnabled}
- onCheckedChange={(checked) => updateSettings({ inAppNotificationsEnabled: checked })}
- aria-label="In-app notifications"
+ checked={settings.confirmThreadUnpin}
+ onCheckedChange={(checked) =>
+ updateSettings({ confirmThreadUnpin: Boolean(checked) })
+ }
+ aria-label="Confirm thread unpinning"
/>
}
/>
<SettingsRow
- {...searchableSetting("time-format")}
- description="System default follows your browser or OS clock preference."
+ {...searchableSetting("archive-confirmation")}
+ description="Require a second click on the inline archive action before a thread is archived."
resetAction={
- settings.timestampFormat !== DEFAULT_UNIFIED_SETTINGS.timestampFormat ? (
+ settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? (
<SettingResetButton
- label="time format"
+ label="archive confirmation"
onClick={() =>
updateSettings({
- timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,
+ confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive,
})
}
/>
) : null
}
control={
- <Select
- value={settings.timestampFormat}
- onValueChange={(value) => {
- if (value === "locale" || value === "12-hour" || value === "24-hour") {
- updateSettings({ timestampFormat: value });
- }
- }}
- >
- <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Timestamp format">
- <SelectValue>{TIMESTAMP_FORMAT_LABELS[settings.timestampFormat]}</SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="locale">
- {TIMESTAMP_FORMAT_LABELS.locale}
- </SelectItem>
- <SelectItem hideIndicator value="12-hour">
- {TIMESTAMP_FORMAT_LABELS["12-hour"]}
- </SelectItem>
- <SelectItem hideIndicator value="24-hour">
- {TIMESTAMP_FORMAT_LABELS["24-hour"]}
- </SelectItem>
- </SelectPopup>
- </Select>
- }
- />
- <SettingsRow
- serverScoped
- settingKeys={["responseStreamingMode"]}
- {...searchableSetting("response-streaming")}
- description={
- mixedResponseStreamingMode
- ? "The selected targets use different streaming modes."
- : RESPONSE_STREAMING_MODE_DESCRIPTIONS[settings.responseStreamingMode]
- }
- resetAction={
- settings.responseStreamingMode !== DEFAULT_UNIFIED_SETTINGS.responseStreamingMode ? (
- <SettingResetButton
- label="response streaming"
- onClick={() =>
- updateSettings({
- responseStreamingMode: DEFAULT_UNIFIED_SETTINGS.responseStreamingMode,
- })
- }
- />
- ) : null
- }
- control={
- <Select
- value={mixedResponseStreamingMode ? null : settings.responseStreamingMode}
- onValueChange={(value) => {
- if (value === "turn" || value === "paragraph") {
- updateSettings({ responseStreamingMode: value });
- }
- }}
- >
- <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Response streaming">
- <SelectValue>
- {(value: ResponseStreamingMode | null) =>
- value === null ? "Mixed" : RESPONSE_STREAMING_MODE_LABELS[value]
- }
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="turn">
- {RESPONSE_STREAMING_MODE_LABELS.turn}
- </SelectItem>
- <SelectItem hideIndicator value="paragraph">
- {RESPONSE_STREAMING_MODE_LABELS.paragraph}
- </SelectItem>
- </SelectPopup>
- </Select>
+ <Switch
+ checked={settings.confirmThreadArchive}
+ onCheckedChange={(checked) =>
+ updateSettings({ confirmThreadArchive: Boolean(checked) })
+ }
+ aria-label="Confirm thread archiving"
+ />
}
/>
<SettingsRow
- {...searchableSetting("hide-whitespace-changes")}
- description="Set whether the diff panel ignores whitespace-only edits by default."
+ {...searchableSetting("delete-confirmation")}
+ description="Ask before deleting a thread and its chat history."
resetAction={
- settings.diffIgnoreWhitespace !== DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace ? (
+ settings.confirmThreadDelete !== DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete ? (
<SettingResetButton
- label="diff whitespace changes"
+ label="delete confirmation"
onClick={() =>
updateSettings({
- diffIgnoreWhitespace: DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace,
+ confirmThreadDelete: DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete,
})
}
/>
@@ -1238,24 +944,68 @@ export function GeneralSettingsPanel() {
}
control={
<Switch
- checked={settings.diffIgnoreWhitespace}
+ checked={settings.confirmThreadDelete}
onCheckedChange={(checked) =>
- updateSettings({ diffIgnoreWhitespace: Boolean(checked) })
+ updateSettings({ confirmThreadDelete: Boolean(checked) })
}
- aria-label="Hide whitespace changes by default"
+ aria-label="Confirm thread deletion"
/>
}
/>
+ {isElectron ? (
+ <SettingsRow
+ {...searchableSetting("quit-confirmation")}
+ description="Hold mode also quits on two quick presses."
+ resetAction={
+ settings.confirmQuit !== DEFAULT_UNIFIED_SETTINGS.confirmQuit ? (
+ <SettingResetButton
+ label="quit shortcut behavior"
+ onClick={() =>
+ updateSettings({ confirmQuit: DEFAULT_UNIFIED_SETTINGS.confirmQuit })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={settings.confirmQuit}
+ onValueChange={(value) => {
+ if (value === "direct" || value === "hold" || value === "double-click") {
+ updateSettings({ confirmQuit: value });
+ }
+ }}
+ >
+ <SelectTrigger
+ size="sm"
+ className="w-full sm:w-40"
+ aria-label="Quit shortcut behavior"
+ >
+ <SelectValue>{QUIT_CONFIRMATION_MODE_LABELS[settings.confirmQuit]}</SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ {Object.entries(QUIT_CONFIRMATION_MODE_LABELS).map(([value, label]) => (
+ <SelectItem hideIndicator key={value} value={value}>
+ {label}
+ </SelectItem>
+ ))}
+ </SelectPopup>
+ </Select>
+ }
+ />
+ ) : null}
+ </SettingsSection>
+
+ <SettingsSection id="display" title="Display">
<SettingsRow
- {...searchableSetting("default-diff-file-state")}
- description="Start with files expanded or collapsed when opening diffs or a pull request's Code tab."
+ {...searchableSetting("time-format")}
+ description="System default follows your browser or OS clock preference."
resetAction={
- settings.diffFilesCollapsed !== DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed ? (
+ settings.timestampFormat !== DEFAULT_UNIFIED_SETTINGS.timestampFormat ? (
<SettingResetButton
- label="default diff file state"
+ label="time format"
onClick={() =>
updateSettings({
- diffFilesCollapsed: DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed,
+ timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,
})
}
/>
@@ -1263,118 +1013,48 @@ export function GeneralSettingsPanel() {
}
control={
<Select
- value={settings.diffFilesCollapsed ? "collapsed" : "expanded"}
+ value={settings.timestampFormat}
onValueChange={(value) => {
- if (value === "expanded" || value === "collapsed") {
- updateSettings({ diffFilesCollapsed: value === "collapsed" });
+ if (value === "locale" || value === "12-hour" || value === "24-hour") {
+ updateSettings({ timestampFormat: value });
}
}}
>
- <SelectTrigger
- size="sm"
- className="w-full sm:w-40"
- aria-label="Default diff file state"
- >
- <SelectValue>{settings.diffFilesCollapsed ? "Collapsed" : "Expanded"}</SelectValue>
+ <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Timestamp format">
+ <SelectValue>{TIMESTAMP_FORMAT_LABELS[settings.timestampFormat]}</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="expanded">
- Expanded
- </SelectItem>
- <SelectItem hideIndicator value="collapsed">
- Collapsed
+ <SelectItem hideIndicator value="locale">
+ {TIMESTAMP_FORMAT_LABELS.locale}
</SelectItem>
- </SelectPopup>
- </Select>
- }
- />
- <SettingsRow
- {...searchableSetting("diff-layout")}
- description="Show diffs stacked or side by side. The toggle in the diff toolbar changes this too."
- resetAction={
- settings.diffLayout !== DEFAULT_UNIFIED_SETTINGS.diffLayout ? (
- <SettingResetButton
- label="diff layout"
- onClick={() => updateSettings({ diffLayout: DEFAULT_UNIFIED_SETTINGS.diffLayout })}
- />
- ) : null
- }
- control={
- <Select
- value={settings.diffLayout}
- onValueChange={(value) => {
- if (value === "stacked" || value === "split") {
- updateSettings({ diffLayout: value });
- }
- }}
- >
- <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Diff layout">
- <SelectValue>{DIFF_LAYOUT_LABELS[settings.diffLayout]}</SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="stacked">
- {DIFF_LAYOUT_LABELS.stacked}
+ <SelectItem hideIndicator value="12-hour">
+ {TIMESTAMP_FORMAT_LABELS["12-hour"]}
</SelectItem>
- <SelectItem hideIndicator value="split">
- {DIFF_LAYOUT_LABELS.split}
+ <SelectItem hideIndicator value="24-hour">
+ {TIMESTAMP_FORMAT_LABELS["24-hour"]}
</SelectItem>
</SelectPopup>
</Select>
}
/>
+ </SettingsSection>
+ </SettingsPageContainer>
+ );
+}
- <SettingsRow
- {...searchableSetting("proactive-panels")}
- description="Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines."
- resetAction={
- settings.proactivePanelsEnabled !== DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled ? (
- <SettingResetButton
- label="proactive panels"
- onClick={() =>
- updateSettings({
- proactivePanelsEnabled: DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.proactivePanelsEnabled}
- onCheckedChange={(checked) =>
- updateSettings({ proactivePanelsEnabled: Boolean(checked) })
- }
- aria-label="Proactive panels"
- />
- }
- />
-
- <SettingsRow
- {...searchableSetting("skills-in-slash-menu")}
- description="Also include skills in the / command menu. Skills always appear when you type $."
- resetAction={
- settings.showSkillsInSlashMenu !== DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu ? (
- <SettingResetButton
- label="skills in slash menu"
- onClick={() =>
- updateSettings({
- showSkillsInSlashMenu: DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.showSkillsInSlashMenu}
- onCheckedChange={(checked) =>
- updateSettings({ showSkillsInSlashMenu: Boolean(checked) })
- }
- aria-label="Show skills in slash menu"
- />
- }
- />
+export function ChatSettingsPanel() {
+ const modifierLabel = isMacPlatform(navigator.platform) ? "⌘" : "Ctrl";
+ const sendShortcutOptions = [
+ { value: "enter", label: "Enter" },
+ { value: "mod-enter-multiline", label: `${modifierLabel} + Enter for multiline prompts` },
+ { value: "mod-enter", label: `${modifierLabel} + Enter always` },
+ ] as const;
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="composer" title="Composer">
<SettingsRow
{...searchableSetting("composer-rich-text")}
description="Show formatted Markdown as you type."
@@ -1401,34 +1081,6 @@ export function GeneralSettingsPanel() {
/>
}
/>
-
- <SettingsRow
- {...searchableSetting("composer-collapse")}
- description="Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again."
- resetAction={
- settings.composerCollapseOnScroll !==
- DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll ? (
- <SettingResetButton
- label="collapse composer on scroll"
- onClick={() =>
- updateSettings({
- composerCollapseOnScroll: DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.composerCollapseOnScroll}
- onCheckedChange={(checked) =>
- updateSettings({ composerCollapseOnScroll: Boolean(checked) })
- }
- aria-label="Collapse composer on scroll"
- />
- }
- />
-
<SettingsRow
{...searchableSetting("send-shortcut")}
description="Choose when Enter sends a prompt or inserts a new line"
@@ -1475,7 +1127,62 @@ export function GeneralSettingsPanel() {
</Select>
}
/>
+ <SettingsRow
+ {...searchableSetting("composer-collapse")}
+ description="Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again."
+ resetAction={
+ settings.composerCollapseOnScroll !==
+ DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll ? (
+ <SettingResetButton
+ label="collapse composer on scroll"
+ onClick={() =>
+ updateSettings({
+ composerCollapseOnScroll: DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Switch
+ checked={settings.composerCollapseOnScroll}
+ onCheckedChange={(checked) =>
+ updateSettings({ composerCollapseOnScroll: Boolean(checked) })
+ }
+ aria-label="Collapse composer on scroll"
+ />
+ }
+ />
+ <AdvancedSettings targetIds={[searchableSetting("skills-in-slash-menu").id]}>
+ <SettingsRow
+ {...searchableSetting("skills-in-slash-menu")}
+ description="Also include skills in the / command menu. Skills always appear when you type $."
+ resetAction={
+ settings.showSkillsInSlashMenu !== DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu ? (
+ <SettingResetButton
+ label="skills in slash menu"
+ onClick={() =>
+ updateSettings({
+ showSkillsInSlashMenu: DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Switch
+ checked={settings.showSkillsInSlashMenu}
+ onCheckedChange={(checked) =>
+ updateSettings({ showSkillsInSlashMenu: Boolean(checked) })
+ }
+ aria-label="Show skills in slash menu"
+ />
+ }
+ />
+ </AdvancedSettings>
+ </SettingsSection>
+ <SettingsSection id="follow-ups" title="Follow-ups">
<SettingsRow
{...searchableSetting("follow-up-behavior")}
description={
@@ -1511,115 +1218,344 @@ export function GeneralSettingsPanel() {
</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem value="queue">Queue</SelectItem>
- <SelectItem value="steer">Steer</SelectItem>
+ <SelectItem value="queue">Queue</SelectItem>
+ <SelectItem value="steer">Steer</SelectItem>
+ </SelectPopup>
+ </Select>
+ }
+ />
+ </SettingsSection>
+ </SettingsPageContainer>
+ );
+}
+
+function DiffColorsSettingsRow() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ return (
+ <SettingsRow
+ {...searchableSetting("diff-color-scheme")}
+ description="Choose colors for additions and deletions, including change counts."
+ resetAction={
+ settings.diffColorScheme !== DEFAULT_UNIFIED_SETTINGS.diffColorScheme ? (
+ <SettingResetButton
+ label="diff colors"
+ onClick={() =>
+ updateSettings({ diffColorScheme: DEFAULT_UNIFIED_SETTINGS.diffColorScheme })
+ }
+ />
+ ) : null
+ }
+ control={
+ <div className="w-full sm:w-40">
+ <Select
+ value={settings.diffColorScheme}
+ onValueChange={(value) => {
+ if (value === "red-green" || value === "blue-orange")
+ updateSettings({ diffColorScheme: value });
+ }}
+ >
+ <SelectTrigger size="sm" className="w-full min-w-0" aria-label="Diff colors">
+ <span
+ aria-hidden="true"
+ className={
+ settings.diffColorScheme === "blue-orange"
+ ? "flex shrink-0 flex-row-reverse gap-1"
+ : "flex shrink-0 gap-1"
+ }
+ >
+ <span className="size-2 rounded-full bg-diff-deletion" />
+ <span className="size-2 rounded-full bg-diff-addition" />
+ </span>
+ <SelectValue>
+ {settings.diffColorScheme === "blue-orange" ? "Blue & orange" : "Red & green"}
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem value="red-green">Red & green (default)</SelectItem>
+ <SelectItem value="blue-orange">Blue & orange</SelectItem>
+ </SelectPopup>
+ </Select>
+ </div>
+ }
+ />
+ );
+}
+
+export function DiffsSettingsPanel() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="diffs" title="Diffs">
+ <SettingsRow
+ {...searchableSetting("diff-layout")}
+ description="Show diffs stacked or side by side. The toggle in the diff toolbar changes this too."
+ resetAction={
+ settings.diffLayout !== DEFAULT_UNIFIED_SETTINGS.diffLayout ? (
+ <SettingResetButton
+ label="diff layout"
+ onClick={() => updateSettings({ diffLayout: DEFAULT_UNIFIED_SETTINGS.diffLayout })}
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={settings.diffLayout}
+ onValueChange={(value) => {
+ if (value === "stacked" || value === "split") {
+ updateSettings({ diffLayout: value });
+ }
+ }}
+ >
+ <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Diff layout">
+ <SelectValue>{DIFF_LAYOUT_LABELS[settings.diffLayout]}</SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem hideIndicator value="stacked">
+ {DIFF_LAYOUT_LABELS.stacked}
+ </SelectItem>
+ <SelectItem hideIndicator value="split">
+ {DIFF_LAYOUT_LABELS.split}
+ </SelectItem>
</SelectPopup>
</Select>
}
/>
-
<SettingsRow
- serverScoped
- settingKeys={["enableProviderUpdateChecks"]}
- {...searchableSetting("provider-update-checks")}
- description="Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear."
+ {...searchableSetting("hide-whitespace-changes")}
+ description="Set whether the diff panel ignores whitespace-only edits by default."
resetAction={
- settings.enableProviderUpdateChecks !==
- DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks ? (
+ settings.diffIgnoreWhitespace !== DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace ? (
<SettingResetButton
- label="provider update checks"
+ label="diff whitespace changes"
onClick={() =>
updateSettings({
- enableProviderUpdateChecks: DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks,
+ diffIgnoreWhitespace: DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace,
})
}
/>
) : null
}
control={
- <ScopedSwitch
- settingKeys={["enableProviderUpdateChecks"]}
- checked={settings.enableProviderUpdateChecks}
+ <Switch
+ checked={settings.diffIgnoreWhitespace}
onCheckedChange={(checked) =>
- updateSettings({ enableProviderUpdateChecks: Boolean(checked) })
+ updateSettings({ diffIgnoreWhitespace: Boolean(checked) })
}
- aria-label="Check provider versions"
+ aria-label="Hide whitespace changes by default"
/>
}
/>
-
<SettingsRow
- {...searchableSetting("continue-threads-after-server-update")}
- serverScoped
- settingKeys={["continueThreadsAfterServerUpdate"]}
- description="Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments."
- status={
- !supportsRestartContinuation
- ? "All selected connected environments must support restart continuation."
- : undefined
- }
+ {...searchableSetting("default-diff-file-state")}
+ description="Start with files expanded or collapsed when opening diffs or a pull request's Code tab."
resetAction={
- supportsRestartContinuation &&
- settings.continueThreadsAfterServerUpdate !==
- DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate ? (
+ settings.diffFilesCollapsed !== DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed ? (
<SettingResetButton
- label="continue threads after restarts"
+ label="default diff file state"
onClick={() =>
updateSettings({
- continueThreadsAfterServerUpdate:
- DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate,
+ diffFilesCollapsed: DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed,
})
}
/>
) : null
}
control={
- <ScopedSwitch
- settingKeys={["continueThreadsAfterServerUpdate"]}
- checked={settings.continueThreadsAfterServerUpdate}
- disabled={!supportsRestartContinuation}
- onCheckedChange={(checked) =>
- updateSettings({ continueThreadsAfterServerUpdate: Boolean(checked) })
- }
- aria-label="Continue threads after restarts"
- />
+ <Select
+ value={settings.diffFilesCollapsed ? "collapsed" : "expanded"}
+ onValueChange={(value) => {
+ if (value === "expanded" || value === "collapsed") {
+ updateSettings({ diffFilesCollapsed: value === "collapsed" });
+ }
+ }}
+ >
+ <SelectTrigger
+ size="sm"
+ className="w-full sm:w-40"
+ aria-label="Default diff file state"
+ >
+ <SelectValue>{settings.diffFilesCollapsed ? "Collapsed" : "Expanded"}</SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem hideIndicator value="expanded">
+ Expanded
+ </SelectItem>
+ <SelectItem hideIndicator value="collapsed">
+ Collapsed
+ </SelectItem>
+ </SelectPopup>
+ </Select>
}
/>
-
- <BackgroundActivitySettingsRow />
+ <DiffColorsSettingsRow />
</SettingsSection>
- <SettingsSection id="projects-and-threads" title="Projects & threads">
+ <SettingsSection id="pull-requests" title="Pull requests">
<SettingsRow
- serverScoped
- settingKeys={["newWorktreesStartFromOrigin"]}
- {...searchableSetting("start-from-origin")}
- description="Uses the latest commit of the base branch’s tracked remote branch, even if its name differs. Otherwise uses the same-named branch on origin. Uses your local branch if that remote branch is missing."
+ {...searchableSetting("proactive-panels")}
+ description="Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines."
resetAction={
- settings.newWorktreesStartFromOrigin !==
- DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin ? (
+ settings.proactivePanelsEnabled !== DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled ? (
<SettingResetButton
- label="new worktrees start from remote"
+ label="proactive panels"
onClick={() =>
updateSettings({
- newWorktreesStartFromOrigin:
- DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin,
+ proactivePanelsEnabled: DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled,
})
}
/>
) : null
}
control={
- <ScopedSwitch
- settingKeys={["newWorktreesStartFromOrigin"]}
- checked={settings.newWorktreesStartFromOrigin}
+ <Switch
+ checked={settings.proactivePanelsEnabled}
onCheckedChange={(checked) =>
- updateSettings({ newWorktreesStartFromOrigin: Boolean(checked) })
+ updateSettings({ proactivePanelsEnabled: Boolean(checked) })
}
- aria-label="Start new worktrees from remote by default"
+ aria-label="Proactive panels"
/>
}
/>
+ <PullRequestLinksOpenInAppSetting />
+ </SettingsSection>
+ </SettingsPageContainer>
+ );
+}
+
+/** The Providers panel can render without a settings scope, as its tests do; this row needs one. */
+export function CompactIdleThreadsRow() {
+ return useOptionalSettingsScope() === null ? null : <ScopedCompactIdleThreadsRow />;
+}
+
+function ScopedCompactIdleThreadsRow() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ const { targets } = useSettingsScope();
+ const idleCompaction = scopedIdleCompaction(targets.length > 0 ? targets : [{ settings }]);
+
+ return (
+ <SettingsRow
+ serverScoped
+ settingKeys={["idleCompaction", "compactIdleThreads"]}
+ mixed={idleCompaction.mixed}
+ {...searchableSetting("compact-idle-threads")}
+ description="When to compact an idle Claude thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Each Claude provider can override this."
+ resetAction={
+ globalIdleCompaction(settings) !== globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) ? (
+ <SettingResetButton
+ label="compact idle threads"
+ onClick={() =>
+ updateSettings({ idleCompaction: globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={idleCompaction.mixed ? null : globalIdleCompaction(settings)}
+ onValueChange={(value) => {
+ const mode = IDLE_COMPACTION_MODES.find((candidate) => candidate.value === value);
+ if (mode) updateSettings({ idleCompaction: mode.value });
+ }}
+ >
+ <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Compact idle threads">
+ <SelectValue>
+ {(value: string | null) =>
+ value === null
+ ? "Mixed"
+ : IDLE_COMPACTION_MODES.find((mode) => mode.value === value)?.label
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ {IDLE_COMPACTION_MODES.map((mode) => (
+ <SelectItem
+ hideIndicator
+ key={mode.value}
+ value={mode.value}
+ // A server from before modes has only the on/off switch, so it cannot store "Never".
+ disabled={mode.value === "off" && !idleCompaction.neverAvailable}
+ >
+ {mode.label}
+ </SelectItem>
+ ))}
+ </SelectPopup>
+ </Select>
+ }
+ />
+ );
+}
+
+export function ThreadsSettingsPanel() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ const navigate = useNavigate();
+ const { environment, connectedEnvironments, target } = useSettingsScope();
+ const environmentId = environment?.environmentId ?? null;
+ const hasServerTargets = connectedEnvironments.length > 0;
+ const mixedResponseStreamingMode = useScopedSettingsMixed(["responseStreamingMode"]);
+ const providersByEnvironment = useEnvironmentProviders();
+ const serverProviders =
+ (environment?.serverConfig
+ ? providersByEnvironment.get(environment.environmentId)
+ : undefined) ?? EMPTY_SERVER_PROVIDERS;
+ const supportsAutoSettlement =
+ connectedEnvironments.length > 0 &&
+ connectedEnvironments.every(
+ (target) => target.serverConfig?.environment.capabilities.threadAutoSettlement === true,
+ );
+ const supportsAutoSettlementScope = connectedEnvironments.every(
+ (target) => target.serverConfig?.environment.capabilities.threadAutoSettlementScope === true,
+ );
+
+ const textGenerationProviders = serverProviders.filter(
+ (provider) => provider.supportsTextGeneration !== false,
+ );
+ const textGenerationModelSelection = resolveAppModelSelectionState(
+ settings,
+ textGenerationProviders,
+ );
+ const textGenInstanceId = textGenerationModelSelection.instanceId;
+ const textGenModel = textGenerationModelSelection.model;
+ const textGenModelOptions = textGenerationModelSelection.options;
+ const textGenerationModelInstanceEntries = sortProviderInstanceEntries(
+ applyProviderInstanceSettings(
+ deriveProviderInstanceEntries(textGenerationProviders),
+ settings,
+ target?.projectId ?? null,
+ ),
+ );
+ const hasTextGenerationProvider = textGenerationModelInstanceEntries.some(
+ (entry) => entry.enabled && entry.isAvailable,
+ );
+ const textGenInstanceEntry = textGenerationModelInstanceEntries.find(
+ (entry) => entry.instanceId === textGenInstanceId,
+ );
+ const textGenProvider: ProviderDriverKind =
+ textGenInstanceEntry?.driverKind ?? DEFAULT_DRIVER_KIND;
+ const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance(
+ settings,
+ textGenerationProviders,
+ textGenInstanceId,
+ textGenModel,
+ );
+ const isTextGenerationModelDirty = !Equal.equals(
+ settings.textGenerationModelSelection ?? null,
+ DEFAULT_UNIFIED_SETTINGS.textGenerationModelSelection ?? null,
+ );
+ const textGenerationModelDisabledReason = useScopedModelDisabledReason(
+ settings,
+ textGenerationModelInstanceEntries,
+ );
+ const mixedAddProjectBaseDirectory = useScopedSettingsMixed(["addProjectBaseDirectory"]);
+ const mixedTextGenerationModel = useScopedSettingsMixed(["textGenerationModelSelection"]);
+
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="new-projects" title="New projects">
<SettingsRow
serverScoped
settingKeys={["addProjectBaseDirectory"]}
@@ -1652,127 +1588,141 @@ export function GeneralSettingsPanel() {
/>
</SettingsSection>
- <SettingsSection id="confirmations" title="Confirmations">
- <SettingsRow
- {...searchableSetting("unpin-confirmation")}
- description="Ask before unpinning a thread from the pinned section."
- resetAction={
- settings.confirmThreadUnpin !== DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin ? (
- <SettingResetButton
- label="unpin confirmation"
- onClick={() =>
- updateSettings({
- confirmThreadUnpin: DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.confirmThreadUnpin}
- onCheckedChange={(checked) =>
- updateSettings({ confirmThreadUnpin: Boolean(checked) })
- }
- aria-label="Confirm thread unpinning"
- />
- }
- />
-
- <SettingsRow
- {...searchableSetting("archive-confirmation")}
- description="Require a second click on the inline archive action before a thread is archived."
- resetAction={
- settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? (
- <SettingResetButton
- label="archive confirmation"
- onClick={() =>
- updateSettings({
- confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive,
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- checked={settings.confirmThreadArchive}
- onCheckedChange={(checked) =>
- updateSettings({ confirmThreadArchive: Boolean(checked) })
- }
- aria-label="Confirm thread archiving"
- />
- }
- />
+ <ProjectDefaultsSettings category="general" />
+ <SettingsSection id="usage-limits" title="Usage limits">
<SettingsRow
- {...searchableSetting("delete-confirmation")}
- description="Ask before deleting a thread and its chat history."
- resetAction={
- settings.confirmThreadDelete !== DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete ? (
- <SettingResetButton
- label="delete confirmation"
- onClick={() =>
- updateSettings({
- confirmThreadDelete: DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete,
- })
- }
- />
- ) : null
+ serverScoped
+ {...searchableSetting("auto-resume-limited-threads")}
+ description="Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation."
+ settingKeys={["autoResumeLimitedThreads"]}
+ control={
+ <ScopedSwitch
+ settingKeys={["autoResumeLimitedThreads"]}
+ checked={settings.autoResumeLimitedThreads}
+ onCheckedChange={(checked) =>
+ updateSettings({ autoResumeLimitedThreads: Boolean(checked) })
+ }
+ aria-label="Resume after usage limits"
+ />
}
+ />
+ <SettingsRow
+ serverScoped
+ {...searchableSetting("snooze-limited-threads")}
+ description="Snooze usage-limit stops until reset. Pair with resume to continue on wake."
+ settingKeys={["snoozeLimitedThreads"]}
control={
- <Switch
- checked={settings.confirmThreadDelete}
+ <ScopedSwitch
+ settingKeys={["snoozeLimitedThreads"]}
+ checked={settings.snoozeLimitedThreads}
onCheckedChange={(checked) =>
- updateSettings({ confirmThreadDelete: Boolean(checked) })
+ updateSettings({ snoozeLimitedThreads: Boolean(checked) })
}
- aria-label="Confirm thread deletion"
+ aria-label="Snooze until limits reset"
/>
}
/>
+ </SettingsSection>
- {isElectron ? (
+ {supportsAutoSettlement ? (
+ <SettingsSection id="auto-settle" title="Auto-settle">
<SettingsRow
- {...searchableSetting("quit-confirmation")}
- description="Hold mode also quits on two quick presses."
+ serverScoped
+ settingKeys={["sidebarAutoSettleOnMerge"]}
+ {...searchableSetting("auto-settle-merged-threads")}
+ description="Settle a thread when its pull request merges. Closed pull requests still settle automatically."
resetAction={
- settings.confirmQuit !== DEFAULT_UNIFIED_SETTINGS.confirmQuit ? (
+ settings.sidebarAutoSettleOnMerge !==
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge ? (
<SettingResetButton
- label="quit shortcut behavior"
+ label="auto-settle on merge"
onClick={() =>
- updateSettings({ confirmQuit: DEFAULT_UNIFIED_SETTINGS.confirmQuit })
+ updateSettings({
+ sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge,
+ })
}
/>
) : null
}
control={
- <Select
- value={settings.confirmQuit}
- onValueChange={(value) => {
- if (value === "direct" || value === "hold" || value === "double-click") {
- updateSettings({ confirmQuit: value });
+ <ScopedSwitch
+ settingKeys={["sidebarAutoSettleOnMerge"]}
+ checked={settings.sidebarAutoSettleOnMerge}
+ onCheckedChange={(checked) =>
+ updateSettings({ sidebarAutoSettleOnMerge: Boolean(checked) })
+ }
+ aria-label="Auto-settle merged threads"
+ />
+ }
+ />
+
+ <SettingsRow
+ serverScoped
+ settingKeys={["sidebarAutoSettleAfterDays"]}
+ {...searchableSetting("auto-settle-inactive-threads")}
+ description="Sidebar threads with no activity for this long settle automatically."
+ resetAction={
+ settings.sidebarAutoSettleAfterDays !==
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays ? (
+ <SettingResetButton
+ label="auto-settle"
+ onClick={() =>
+ updateSettings({
+ sidebarAutoSettleAfterDays:
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays,
+ })
}
- }}
- >
- <SelectTrigger
- size="sm"
- className="w-full sm:w-40"
- aria-label="Quit shortcut behavior"
- >
- <SelectValue>{QUIT_CONFIRMATION_MODE_LABELS[settings.confirmQuit]}</SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- {Object.entries(QUIT_CONFIRMATION_MODE_LABELS).map(([value, label]) => (
- <SelectItem hideIndicator key={value} value={value}>
- {label}
- </SelectItem>
- ))}
- </SelectPopup>
- </Select>
+ />
+ ) : null
+ }
+ control={
+ <ScopedSwitch
+ settingKeys={["sidebarAutoSettleAfterDays"]}
+ checked={settings.sidebarAutoSettleAfterDays !== null}
+ onCheckedChange={(checked) =>
+ updateSettings({
+ sidebarAutoSettleAfterDays: checked ? AUTO_SETTLE_DEFAULT_DAYS : null,
+ })
+ }
+ aria-label="Auto-settle inactive threads"
+ />
}
/>
- ) : null}
- </SettingsSection>
+ {settings.sidebarAutoSettleAfterDays !== null ? (
+ <SettingsRow
+ serverScoped
+ settingKeys={["sidebarAutoSettleAfterDays"]}
+ title={searchableSetting("days-before-auto-settle").title}
+ description="Any new activity un-settles a thread automatically."
+ control={
+ <AutoSettleDaysInput
+ value={settings.sidebarAutoSettleAfterDays}
+ onCommit={(days) => updateSettings({ sidebarAutoSettleAfterDays: days })}
+ />
+ }
+ />
+ ) : null}
+ {settings.sidebarAutoSettleAfterDays !== null && supportsAutoSettlementScope ? (
+ <SettingsRow
+ serverScoped
+ settingKeys={["sidebarAutoSettleKeepPullRequests"]}
+ title="Keep threads with a PR"
+ description="Inactivity does not settle threads with a pull request. Merge and close still do."
+ control={
+ <ScopedSwitch
+ settingKeys={["sidebarAutoSettleKeepPullRequests"]}
+ checked={settings.sidebarAutoSettleKeepPullRequests}
+ onCheckedChange={(checked) =>
+ updateSettings({ sidebarAutoSettleKeepPullRequests: checked })
+ }
+ aria-label="Keep threads with a PR"
+ />
+ }
+ />
+ ) : null}
+ </SettingsSection>
+ ) : null}
<SettingsSection id="text-generation" title="Text generation">
<SettingsRow
@@ -1877,37 +1827,157 @@ export function GeneralSettingsPanel() {
)
}
/>
- <ThreadTitleInstructionsSettings />
+ <AdvancedSettings
+ targetIds={[
+ searchableSetting("thread-title-instructions").id,
+ searchableSetting("response-streaming").id,
+ ]}
+ >
+ <ThreadTitleInstructionsSettings />
+ <SettingsRow
+ serverScoped
+ settingKeys={["responseStreamingMode"]}
+ {...searchableSetting("response-streaming")}
+ description={
+ mixedResponseStreamingMode
+ ? "The selected targets use different streaming modes."
+ : RESPONSE_STREAMING_MODE_DESCRIPTIONS[settings.responseStreamingMode]
+ }
+ resetAction={
+ settings.responseStreamingMode !== DEFAULT_UNIFIED_SETTINGS.responseStreamingMode ? (
+ <SettingResetButton
+ label="response streaming"
+ onClick={() =>
+ updateSettings({
+ responseStreamingMode: DEFAULT_UNIFIED_SETTINGS.responseStreamingMode,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Select
+ value={mixedResponseStreamingMode ? null : settings.responseStreamingMode}
+ onValueChange={(value) => {
+ if (value === "turn" || value === "paragraph") {
+ updateSettings({ responseStreamingMode: value });
+ }
+ }}
+ >
+ <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Response streaming">
+ <SelectValue>
+ {(value: ResponseStreamingMode | null) =>
+ value === null ? "Mixed" : RESPONSE_STREAMING_MODE_LABELS[value]
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem hideIndicator value="turn">
+ {RESPONSE_STREAMING_MODE_LABELS.turn}
+ </SelectItem>
+ <SelectItem hideIndicator value="paragraph">
+ {RESPONSE_STREAMING_MODE_LABELS.paragraph}
+ </SelectItem>
+ </SelectPopup>
+ </Select>
+ }
+ />
+ </AdvancedSettings>
</SettingsSection>
+ </SettingsPageContainer>
+ );
+}
- <SettingsSection id="about" title="About">
- {isElectron || HOSTED_APP_CHANNEL ? (
- <AboutVersionSection />
- ) : (
- <>
- <SettingsRow
- id={searchableSetting("app-version").id}
- title={<AboutVersionTitle />}
- description="Current version of the application."
+export function MaintenanceSettingsPanel() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ const { scope, environment, connectedEnvironments } = useSettingsScope();
+ const environmentId = environment?.environmentId ?? null;
+ const isEnvironmentScope = scope.environmentIds.length === 1 && environmentId !== null;
+ const supportsRestartContinuation =
+ connectedEnvironments.length > 0 &&
+ connectedEnvironments.every(
+ (target) => target.serverConfig?.environment.capabilities.threadRestartContinuation === true,
+ );
+
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="updates" title="Updates">
+ <SettingsRow
+ serverScoped
+ settingKeys={["enableProviderUpdateChecks"]}
+ {...searchableSetting("provider-update-checks")}
+ description="Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear."
+ resetAction={
+ settings.enableProviderUpdateChecks !==
+ DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks ? (
+ <SettingResetButton
+ label="provider update checks"
+ onClick={() =>
+ updateSettings({
+ enableProviderUpdateChecks: DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <ScopedSwitch
+ settingKeys={["enableProviderUpdateChecks"]}
+ checked={settings.enableProviderUpdateChecks}
+ onCheckedChange={(checked) =>
+ updateSettings({ enableProviderUpdateChecks: Boolean(checked) })
+ }
+ aria-label="Check provider versions"
/>
- </>
- )}
- <MobileAppSettingsRow />
+ }
+ />
<SettingsRow
- {...searchableSetting("privacy-policy")}
- description="How we handle your data, including the anonymous usage data T3 Code collects."
+ {...searchableSetting("continue-threads-after-server-update")}
+ serverScoped
+ settingKeys={["continueThreadsAfterServerUpdate"]}
+ description="Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments."
+ status={
+ !supportsRestartContinuation
+ ? "All selected connected environments must support restart continuation."
+ : undefined
+ }
+ resetAction={
+ supportsRestartContinuation &&
+ settings.continueThreadsAfterServerUpdate !==
+ DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate ? (
+ <SettingResetButton
+ label="continue threads after restarts"
+ onClick={() =>
+ updateSettings({
+ continueThreadsAfterServerUpdate:
+ DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate,
+ })
+ }
+ />
+ ) : null
+ }
control={
- <Button
- render={<a href={PRIVACY_POLICY_URL} target="_blank" rel="noreferrer noopener" />}
- size="sm"
- variant="outline"
- >
- View policy
- </Button>
+ <ScopedSwitch
+ settingKeys={["continueThreadsAfterServerUpdate"]}
+ checked={settings.continueThreadsAfterServerUpdate}
+ disabled={!supportsRestartContinuation}
+ onCheckedChange={(checked) =>
+ updateSettings({ continueThreadsAfterServerUpdate: Boolean(checked) })
+ }
+ aria-label="Continue threads after restarts"
+ />
}
/>
</SettingsSection>
- <SettingsSection title="Diagnostics">
+
+ <SettingsSection id="background" title="Background activity">
+ <BackgroundActivitySettingsRow />
+ </SettingsSection>
+
+ <StorageCleanupSections />
+
+ <SettingsSection id="diagnostics-section" title="Diagnostics">
<SettingsRow
{...searchableSetting("diagnostics")}
description={
@@ -1927,6 +1997,43 @@ export function GeneralSettingsPanel() {
</Button>
}
/>
+ </SettingsSection>
+ </SettingsPageContainer>
+ );
+}
+
+export function AboutSettingsPanel() {
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="about" title="App">
+ {isElectron || HOSTED_APP_CHANNEL ? (
+ <AboutVersionSection />
+ ) : (
+ <>
+ <SettingsRow
+ id={searchableSetting("app-version").id}
+ title={<AboutVersionTitle />}
+ description="Current version of the application."
+ />
+ </>
+ )}
+ <MobileAppSettingsRow />
+ </SettingsSection>
+
+ <SettingsSection id="legal" title="Legal">
+ <SettingsRow
+ {...searchableSetting("privacy-policy")}
+ description="How we handle your data, including the anonymous usage data T3 Code collects."
+ control={
+ <Button
+ render={<a href={PRIVACY_POLICY_URL} target="_blank" rel="noreferrer noopener" />}
+ size="sm"
+ variant="outline"
+ >
+ View policy
+ </Button>
+ }
+ />
<SettingsRow
{...searchableSetting("open-source-licenses")}
description="Notices for dependencies, assets, and optional tools used by T3 Code."
@@ -1941,8 +2048,6 @@ export function GeneralSettingsPanel() {
}
/>
</SettingsSection>
-
- <LegacyFeaturesSection />
</SettingsPageContainer>
);
}
diff --git a/apps/web/src/components/settings/SettingsScopeNotice.tsx b/apps/web/src/components/settings/SettingsScopeNotice.tsx
index 14d0efdea8e..6646f4fe3f6 100644
--- a/apps/web/src/components/settings/SettingsScopeNotice.tsx
+++ b/apps/web/src/components/settings/SettingsScopeNotice.tsx
@@ -32,8 +32,11 @@ export function SettingsScopeNotice({
target,
targetId,
eligibleEnvironmentIds,
+ inline = false,
}: {
children: string;
+ /** Renders inside a section instead of as its own page. */
+ inline?: boolean;
target: "environment" | "all" | "project" | "checkout";
targetId?: string;
eligibleEnvironmentIds?: readonly EnvironmentId[];
@@ -147,26 +150,23 @@ export function SettingsScopeNotice({
</button>
));
};
- return (
- <SettingsPageContainer>
- <div className="space-y-3">
- <p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
- {children}
- </p>
- <div className="space-y-4">
- {choiceGroups.map((group) =>
- group?.displayName ? (
- <SettingsSection key={group.projectKey} title={group.displayName}>
- {renderChoices(group)}
- </SettingsSection>
- ) : (
- <SettingsGroup key={group?.projectKey ?? target}>
- {renderChoices(group)}
- </SettingsGroup>
- ),
- )}
- </div>
+ const notice = (
+ <div className="space-y-3">
+ <p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
+ {children}
+ </p>
+ <div className="space-y-4">
+ {choiceGroups.map((group) =>
+ group?.displayName ? (
+ <SettingsSection key={group.projectKey} title={group.displayName}>
+ {renderChoices(group)}
+ </SettingsSection>
+ ) : (
+ <SettingsGroup key={group?.projectKey ?? target}>{renderChoices(group)}</SettingsGroup>
+ ),
+ )}
</div>
- </SettingsPageContainer>
+ </div>
);
+ return inline ? notice : <SettingsPageContainer>{notice}</SettingsPageContainer>;
}
diff --git a/apps/web/src/components/settings/SettingsScopeSentence.tsx b/apps/web/src/components/settings/SettingsScopeSentence.tsx
index 76bf9b106c6..dfefa375bb9 100644
--- a/apps/web/src/components/settings/SettingsScopeSentence.tsx
+++ b/apps/web/src/components/settings/SettingsScopeSentence.tsx
@@ -43,9 +43,15 @@ import {
} from "./settingsScopeAxis";
export const SETTINGS_DEVICE_ONLY_PATHS: ReadonlySet<string> = new Set([
+ "/settings/general",
"/settings/appearance",
+ "/settings/chat",
+ "/settings/diffs",
"/settings/snap-shot",
"/settings/connections",
+ // Network access and authorized clients belong to the environment serving this app.
+ "/settings/access",
+ "/settings/about",
]);
interface SettingsScopeMenuProps {
diff --git a/apps/web/src/components/settings/SettingsSidebarNav.tsx b/apps/web/src/components/settings/SettingsSidebarNav.tsx
index d4af916e5d0..1d2bdc46708 100644
--- a/apps/web/src/components/settings/SettingsSidebarNav.tsx
+++ b/apps/web/src/components/settings/SettingsSidebarNav.tsx
@@ -10,18 +10,25 @@ import {
import {
ArchiveIcon,
FlaskConicalIcon,
- BlocksIcon,
BotIcon,
createLucideIcon,
CalendarClockIcon,
+ FileDiffIcon,
+ FolderTreeIcon,
GitBranchIcon,
- HardDriveIcon,
+ GlobeIcon,
+ InfoIcon,
+ MessageSquareTextIcon,
+ MessagesSquareIcon,
PanelsTopLeftIcon,
KeyboardIcon,
- Link2Icon,
PaletteIcon,
SearchIcon,
+ ServerIcon,
Settings2Icon,
+ ShieldCheckIcon,
+ SmartphoneIcon,
+ WrenchIcon,
XIcon,
} from "lucide-react";
import { useLocation, useNavigate } from "@tanstack/react-router";
@@ -41,8 +48,8 @@ import {
import { scrollToSettingsTarget } from "./settingsLayout";
import {
searchSettings,
- isSettingsOverviewVisible,
revealSettingsSearchTarget,
+ SETTINGS_NAV_GROUPS,
SETTINGS_SECTION_LABELS,
type SettingsPath,
type SettingsSearchItem,
@@ -77,32 +84,33 @@ const SETTINGS_SECTION_ICONS: Readonly<
Record<SettingsPath, ComponentType<{ className?: string }>>
> = {
"/settings/general": Settings2Icon,
- "/settings/diagnostics": Settings2Icon,
+ "/settings/diagnostics": WrenchIcon,
"/settings/appearance": PaletteIcon,
+ "/settings/chat": MessageSquareTextIcon,
+ "/settings/diffs": FileDiffIcon,
"/settings/projects": PanelsTopLeftIcon,
"/settings/keybindings": KeyboardIcon,
"/settings/snap-shot": SnapShotIcon,
"/settings/providers": BotIcon,
- "/settings/integrations": BlocksIcon,
+ "/settings/threads": MessagesSquareIcon,
+ "/settings/browser": GlobeIcon,
+ "/settings/devices": SmartphoneIcon,
"/settings/scheduled-tasks": CalendarClockIcon,
"/settings/source-control": GitBranchIcon,
- "/settings/storage": HardDriveIcon,
- "/settings/connections": Link2Icon,
- "/settings/beta": FlaskConicalIcon,
+ "/settings/worktrees": FolderTreeIcon,
+ "/settings/connections": ServerIcon,
+ "/settings/access": ShieldCheckIcon,
+ "/settings/maintenance": WrenchIcon,
+ "/settings/labs": FlaskConicalIcon,
+ "/settings/about": InfoIcon,
"/settings/archived": ArchiveIcon,
};
-const SETTINGS_NAV_ITEMS: ReadonlyArray<{
- label: string;
- to: SettingsPath;
- icon: ComponentType<{ className?: string }>;
-}> = (Object.keys(SETTINGS_SECTION_LABELS) as SettingsPath[])
- .filter((to) => to !== "/settings/diagnostics")
- .map((to) => ({
- to,
- label: SETTINGS_SECTION_LABELS[to],
- icon: SETTINGS_SECTION_ICONS[to],
- }));
+// Detail pages without a nav entry highlight the page that links to them.
+const SETTINGS_DETAIL_PAGE_PARENTS: Readonly<Record<string, SettingsPath>> = {
+ "/settings/diagnostics": "/settings/maintenance",
+ "/settings/open-source-licenses": "/settings/about",
+};
// Attached only to the highlighted result, so it runs whenever the highlight lands on a row.
function scrollResultIntoView(row: HTMLElement | null) {
@@ -119,9 +127,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
const currentHash = useLocation({ select: (location) => location.hash });
const currentSearch = useLocation({ select: (location) => location.search });
const scopeSearch = validateSettingsScopeSearch(currentSearch);
- const navItems = SETTINGS_NAV_ITEMS.filter(
- (item) => item.to !== "/settings/projects" || isSettingsOverviewVisible(scopeSearch),
- );
+ const activePath = SETTINGS_DETAIL_PAGE_PARENTS[pathname] ?? pathname;
const searchInputRef = useRef<HTMLInputElement>(null);
const [query, setQuery] = useState("");
// Below md the nav is an icon rail; searching expands it over the page.
@@ -341,41 +347,60 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
))}
</SidebarMenu>
) : (
- <SidebarMenu>
+ <div className="flex flex-col gap-4">
{compactSearchOpen ? null : (
- <SidebarMenuItem className="md:hidden">
- <SidebarMenuButton
- aria-label="Search settings"
- onClick={() => setCompactSearchOpen(true)}
- >
- <SearchIcon />
- </SidebarMenuButton>
- </SidebarMenuItem>
- )}
- {navItems.map((item) => {
- const Icon = item.icon;
- const isGeneralDetailPage =
- item.to === "/settings/general" &&
- pathname === "/settings/open-source-licenses";
- const isActive =
- isGeneralDetailPage ||
- pathname === item.to ||
- pathname.startsWith(`${item.to}/`);
- return (
- <SidebarMenuItem key={item.to}>
+ <SidebarMenu className="md:hidden">
+ <SidebarMenuItem>
<SidebarMenuButton
- isActive={isActive}
- onClick={() => handleSectionClick(item.to)}
+ aria-label="Search settings"
+ onClick={() => setCompactSearchOpen(true)}
>
- <Icon />
- <span className={cn("truncate", !compactSearchOpen && "max-md:sr-only")}>
- {item.label}
- </span>
+ <SearchIcon />
</SidebarMenuButton>
</SidebarMenuItem>
- );
- })}
- </SidebarMenu>
+ </SidebarMenu>
+ )}
+ {SETTINGS_NAV_GROUPS.map((group, index) => (
+ <div
+ key={group.heading ?? index}
+ role="group"
+ aria-label={group.heading ?? undefined}
+ className="flex flex-col gap-1 max-md:border-t max-md:border-sidebar-border max-md:pt-4 max-md:first:border-t-0 max-md:first:pt-0"
+ >
+ {group.heading ? (
+ <h3
+ className={cn(
+ "px-2 text-xs font-medium text-sidebar-muted-foreground/80",
+ !compactSearchOpen && "max-md:hidden",
+ )}
+ >
+ {group.heading}
+ </h3>
+ ) : null}
+ <SidebarMenu>
+ {group.paths.map((to) => {
+ const Icon = SETTINGS_SECTION_ICONS[to];
+ const isActive = activePath === to || activePath.startsWith(`${to}/`);
+ return (
+ <SidebarMenuItem key={to}>
+ <SidebarMenuButton
+ isActive={isActive}
+ onClick={() => handleSectionClick(to)}
+ >
+ <Icon />
+ <span
+ className={cn("truncate", !compactSearchOpen && "max-md:sr-only")}
+ >
+ {SETTINGS_SECTION_LABELS[to]}
+ </span>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ );
+ })}
+ </SidebarMenu>
+ </div>
+ ))}
+ </div>
)}
</div>
</SidebarGroup>
diff --git a/apps/web/src/components/settings/SourceControlSettings.tsx b/apps/web/src/components/settings/SourceControlSettings.tsx
index e2ab00396a0..cdf31a835ec 100644
--- a/apps/web/src/components/settings/SourceControlSettings.tsx
+++ b/apps/web/src/components/settings/SourceControlSettings.tsx
@@ -1,23 +1,14 @@
import { RefreshIcon } from "~/components/ui/refresh-icon";
import { ChevronDownIcon } from "lucide-react";
-import * as Duration from "effect/Duration";
import * as Option from "effect/Option";
import { useState, type ReactNode } from "react";
import type {
- BackgroundActivitySettings,
SourceControlDiscoveryResult,
SourceControlProviderAuth,
SourceControlProviderDiscoveryItem,
VcsDriverKind,
VcsDiscoveryItem,
} from "@t3tools/contracts";
-import {
- getBackgroundActivityBaseProfile,
- getBackgroundActivityPresetSettings,
- resolveServerBackgroundActivitySettings,
-} from "@t3tools/shared/backgroundActivitySettings";
-
-import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
import { useSettingsScope } from "./SettingsScopeContext";
import { ProjectDefaultsSettings } from "./ProjectDefaultsSettings";
import { cn } from "../../lib/utils";
@@ -35,13 +26,6 @@ import {
EmptyTitle,
} from "../ui/empty";
import { Skeleton } from "../ui/skeleton";
-import {
- NumberField,
- NumberFieldDecrement,
- NumberFieldGroup,
- NumberFieldIncrement,
- NumberFieldInput,
-} from "../ui/number-field";
import { Switch } from "../ui/switch";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
@@ -52,8 +36,6 @@ import { SourceControlTokenSettings } from "./SourceControlTokenSettings";
import { RedactedSensitiveText } from "./RedactedSensitiveText";
import { SourceControlWritingSettingsSection } from "./SourceControlWritingSettings";
import {
- PolicyTooltip,
- SettingResetButton,
SettingsPageContainer,
SettingsSearchTarget,
SettingsSection,
@@ -75,47 +57,6 @@ const VCS_ICONS: Partial<Record<VcsDriverKind, Icon>> = {
};
const SOURCE_CONTROL_SKELETON_ROWS = ["primary", "secondary"] as const;
-const GIT_FETCH_INTERVAL_STEP_SECONDS = 5;
-type BackgroundActivityOverridePatch = Partial<{
- [K in keyof BackgroundActivitySettings["overrides"]]:
- | BackgroundActivitySettings["overrides"][K]
- | undefined;
-}>;
-
-function durationToSeconds(duration: Duration.Duration): number {
- return Math.round(Duration.toMillis(duration) / 1_000);
-}
-
-function normalizeFetchIntervalSeconds(value: number | null): number {
- if (value === null || !Number.isFinite(value)) {
- return 0;
- }
- return Math.max(0, Math.round(value));
-}
-
-function backgroundActivityOverrideSettings(
- current: BackgroundActivitySettings,
- overrides: BackgroundActivityOverridePatch,
-) {
- const nextOverrides: BackgroundActivityOverridePatch = {
- ...current.overrides,
- ...overrides,
- };
- for (const [key, value] of Object.entries(nextOverrides)) {
- if (value === undefined) {
- delete nextOverrides[key as keyof typeof nextOverrides];
- }
- }
- return {
- backgroundActivity: {
- schemaVersion: 1 as const,
- profile: "custom" as const,
- baseProfile: getBackgroundActivityBaseProfile(current),
- overrides: nextOverrides as BackgroundActivitySettings["overrides"],
- },
- };
-}
-
function optionLabel(value: Option.Option<string>): string | null {
return Option.getOrNull(value);
}
@@ -277,9 +218,7 @@ function DiscoveryItemRow({
const hasDetails = children !== undefined;
const searchTargetId = useSettingsSearchTargetId();
const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
- const targetsThisRow =
- (item.kind === "git" && searchTargetId === searchableSetting("git-fetch-interval").id) ||
- searchTargetId === sourceControlHostSettingsSearchId(item.kind);
+ const targetsThisRow = searchTargetId === sourceControlHostSettingsSearchId(item.kind);
if (targetsThisRow && !isExpanded && seenSearchTargetId !== searchTargetId) {
setIsExpanded(true);
}
@@ -346,86 +285,6 @@ function DiscoveryItemRow({
);
}
-function GitFetchIntervalSettings() {
- const settings = useScopedSettings();
- const updateSettings = useUpdateScopedSettings();
- const resolvedBackgroundActivity = resolveServerBackgroundActivitySettings(settings);
- const automaticGitFetchIntervalSeconds = durationToSeconds(
- resolvedBackgroundActivity.automaticGitFetchInterval,
- );
- const defaultAutomaticGitFetchIntervalSeconds = durationToSeconds(
- getBackgroundActivityPresetSettings(
- getBackgroundActivityBaseProfile(settings.backgroundActivity),
- ).automaticGitFetchInterval,
- );
- const canResetFetchInterval =
- automaticGitFetchIntervalSeconds !== defaultAutomaticGitFetchIntervalSeconds;
- const setting = searchableSetting("git-fetch-interval");
-
- return (
- <SettingsSearchTarget id={setting.id} className="grid gap-3">
- <div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
- <div className="min-w-0 space-y-1">
- <div className="flex min-w-0 items-center gap-1">
- <span className="text-xs font-medium text-foreground">{setting.title}</span>
- <PolicyTooltip>
- This interval is configured for Git only. The shared Background activity policy still
- decides whether Git refreshes may run when the timer fires. Custom intervals appear as
- Advanced in General settings.
- </PolicyTooltip>
- <span
- className={cn(
- "inline-flex size-5 shrink-0 items-center justify-center transition-opacity",
- canResetFetchInterval ? "opacity-100" : "pointer-events-none opacity-0",
- )}
- aria-hidden={!canResetFetchInterval}
- >
- {canResetFetchInterval ? (
- <SettingResetButton
- label="fetch interval"
- onClick={() =>
- updateSettings(
- backgroundActivityOverrideSettings(settings.backgroundActivity, {
- automaticGitFetchInterval: undefined,
- }),
- )
- }
- />
- ) : null}
- </span>
- </div>
- <p className="max-w-2xl text-xs leading-relaxed text-muted-foreground">
- Refresh remote branches in the background. Set to 0 to avoid automatic Git prompts.
- </p>
- </div>
- <div className="flex shrink-0 items-center gap-2">
- <NumberField
- value={automaticGitFetchIntervalSeconds}
- min={0}
- step={GIT_FETCH_INTERVAL_STEP_SECONDS}
- size="sm"
- className="w-32"
- onValueChange={(value) =>
- updateSettings(
- backgroundActivityOverrideSettings(settings.backgroundActivity, {
- automaticGitFetchInterval: Duration.seconds(normalizeFetchIntervalSeconds(value)),
- }),
- )
- }
- >
- <NumberFieldGroup>
- <NumberFieldDecrement aria-label="Decrease fetch interval" />
- <NumberFieldInput aria-label="Automatic Git fetch interval in seconds" />
- <NumberFieldIncrement aria-label="Increase fetch interval" />
- </NumberFieldGroup>
- </NumberField>
- <span className="text-xs text-muted-foreground">seconds</span>
- </div>
- </div>
- </SettingsSearchTarget>
- );
-}
-
function SourceControlSectionSkeleton({
title,
headerAction,
@@ -609,9 +468,7 @@ export function SourceControlSettingsPanel() {
headerAction={scanButton}
>
{result.versionControlSystems.map((item) => (
- <DiscoveryItemRow key={`vcs:${item.kind}`} item={item}>
- {item.kind === "git" ? <GitFetchIntervalSettings /> : undefined}
- </DiscoveryItemRow>
+ <DiscoveryItemRow key={`vcs:${item.kind}`} item={item} />
))}
</SettingsSection>
) : null}
diff --git a/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx b/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
index 850b7ea016c..5a44beb50ac 100644
--- a/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
+++ b/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
@@ -99,6 +99,7 @@ describe("mixed source control instructions", () => {
customInstructions,
}));
+ await userEvent.click(page.getByRole("button", { name: "Advanced" }));
await userEvent.click(resetButton("change request templates"));
expect(state.updateSettings).toHaveBeenCalledTimes(1);
diff --git a/apps/web/src/components/settings/SourceControlWritingSettings.tsx b/apps/web/src/components/settings/SourceControlWritingSettings.tsx
index 99db9a118db..2b54bd04d0f 100644
--- a/apps/web/src/components/settings/SourceControlWritingSettings.tsx
+++ b/apps/web/src/components/settings/SourceControlWritingSettings.tsx
@@ -44,7 +44,7 @@ import {
SettingsRow,
SettingsSection,
} from "./settingsLayout";
-import { BranchNamingSettings } from "./BranchNamingSettings";
+import { AdvancedSettings } from "./AdvancedSettings";
import { searchableSetting } from "./settingsSearch";
const MODE_OPTIONS: Record<SourceControlWritingStyleMode, { label: string; description: string }> =
@@ -178,8 +178,7 @@ export function SourceControlWritingSettingsSection() {
);
return (
- <SettingsSection id="source-control-text-generation" title="Text generation">
- <BranchNamingSettings />
+ <SettingsSection id="source-control-text-generation" title="Writing & review">
<SettingsRow
serverScoped
settingKeys={["sourceControlWritingStyle"]}
@@ -297,144 +296,6 @@ export function SourceControlWritingSettingsSection() {
) : null}
</SettingsRow>
- <SettingsRow
- serverScoped
- settingKeys={["sourceControlWritingStyle"]}
- mixed={templatesMixed}
- {...searchableSetting("follow-change-request-templates")}
- description="Use the repository's template for change request descriptions when available."
- resetAction={
- templatesMixed ||
- style.followChangeRequestTemplates !== defaults.followChangeRequestTemplates ? (
- <SettingResetButton
- label="change request templates"
- onClick={() =>
- updateSettings({
- sourceControlWritingStyle: {
- followChangeRequestTemplates: defaults.followChangeRequestTemplates,
- },
- })
- }
- />
- ) : null
- }
- control={
- <Switch
- mixed={templatesMixed}
- checked={templatesMixed ? false : style.followChangeRequestTemplates}
- onCheckedChange={(checked) =>
- updateSettings({
- sourceControlWritingStyle: {
- followChangeRequestTemplates: Boolean(checked),
- },
- })
- }
- aria-label="Follow change request templates"
- />
- }
- />
-
- <SettingsRow
- serverScoped
- settingKeys={["sourceControlWriterModelSelection"]}
- {...searchableSetting("source-control-writer-model")}
- description="Model for source control text and branch or bookmark names. Off uses the environment's text generation model."
- control={
- !hasServerTargets ? (
- <span className="text-sm text-muted-foreground">
- Connect an environment to choose its source control writer model.
- </span>
- ) : (
- <div className="flex flex-wrap items-center justify-end gap-2">
- {usesDedicatedModel && !canEnableDedicatedModel ? (
- <span className="text-sm text-muted-foreground">
- No text generation providers available.
- </span>
- ) : null}
- {usesDedicatedModel && canEnableDedicatedModel ? (
- <ProviderModelPicker
- environmentId={environmentId}
- activeInstanceId={activeSelection.instanceId}
- model={activeSelection.model}
- lockedProvider={null}
- instanceEntries={instanceEntries}
- modelOptionsByInstance={modelOptionsByInstance}
- triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
- triggerAriaLabel="Source control writer model"
- {...(mixedWriterModel ? { triggerLabel: "Mixed" } : {})}
- {...(environmentId
- ? {
- onOpenProviderSetup: (instanceId: ProviderInstanceId) => {
- void navigate({
- to: "/settings/providers",
- search: { environmentId, instanceId },
- });
- },
- }
- : {})}
- getModelDisabledReason={writerModelDisabledReason}
- onInstanceModelChange={(instanceId, model) => {
- const reason = writerModelDisabledReason(instanceId, model);
- if (reason) {
- toastManager.add({
- type: "error",
- title: "Source control writer model not saved",
- description: reason,
- });
- return;
- }
- updateSettings({
- sourceControlWriterModelSelection: createModelSelection(instanceId, model),
- });
- }}
- />
- ) : null}
- {usesDedicatedModel &&
- canEnableDedicatedModel &&
- !mixedWriterModel &&
- writerInstanceEntry ? (
- <TraitsPicker
- provider={writerInstanceEntry.driverKind}
- models={writerInstanceEntry.models}
- model={activeSelection.model}
- modelOptions={activeSelection.options ?? []}
- allowPromptInjectedEffort={false}
- planModeEnabled={
- settings.planModeEnabled || selectsPlanAgent(activeSelection.options)
- }
- triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
- onModelOptionsChange={(options) =>
- updateSettings({
- sourceControlWriterModelSelection: createModelSelection(
- activeSelection.instanceId,
- activeSelection.model,
- options,
- ),
- })
- }
- />
- ) : null}
- <Switch
- checked={usesDedicatedModel}
- disabled={!usesDedicatedModel && !canEnableDedicatedModel}
- onCheckedChange={(checked) =>
- updateSettings({
- sourceControlWriterModelSelection: checked
- ? createModelSelection(
- defaultModelSelection.instanceId,
- defaultModelSelection.model,
- defaultModelSelection.options,
- )
- : null,
- })
- }
- aria-label="Use a separate source control writer model"
- />
- </div>
- )
- }
- />
-
<SettingsRow
serverScoped
settingKeys={["reviewGuidesEnabled"]}
@@ -596,6 +457,150 @@ export function SourceControlWritingSettingsSection() {
</SettingsRow>
</>
) : null}
+ <AdvancedSettings
+ targetIds={[
+ searchableSetting("follow-change-request-templates").id,
+ searchableSetting("source-control-writer-model").id,
+ ]}
+ >
+ <SettingsRow
+ serverScoped
+ settingKeys={["sourceControlWritingStyle"]}
+ mixed={templatesMixed}
+ {...searchableSetting("follow-change-request-templates")}
+ description="Use the repository's template for change request descriptions when available."
+ resetAction={
+ templatesMixed ||
+ style.followChangeRequestTemplates !== defaults.followChangeRequestTemplates ? (
+ <SettingResetButton
+ label="change request templates"
+ onClick={() =>
+ updateSettings({
+ sourceControlWritingStyle: {
+ followChangeRequestTemplates: defaults.followChangeRequestTemplates,
+ },
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <Switch
+ mixed={templatesMixed}
+ checked={templatesMixed ? false : style.followChangeRequestTemplates}
+ onCheckedChange={(checked) =>
+ updateSettings({
+ sourceControlWritingStyle: {
+ followChangeRequestTemplates: Boolean(checked),
+ },
+ })
+ }
+ aria-label="Follow change request templates"
+ />
+ }
+ />
+
+ <SettingsRow
+ serverScoped
+ settingKeys={["sourceControlWriterModelSelection"]}
+ {...searchableSetting("source-control-writer-model")}
+ description="Model for source control text and branch or bookmark names. Off uses the environment's text generation model."
+ control={
+ !hasServerTargets ? (
+ <span className="text-sm text-muted-foreground">
+ Connect an environment to choose its source control writer model.
+ </span>
+ ) : (
+ <div className="flex flex-wrap items-center justify-end gap-2">
+ {usesDedicatedModel && !canEnableDedicatedModel ? (
+ <span className="text-sm text-muted-foreground">
+ No text generation providers available.
+ </span>
+ ) : null}
+ {usesDedicatedModel && canEnableDedicatedModel ? (
+ <ProviderModelPicker
+ environmentId={environmentId}
+ activeInstanceId={activeSelection.instanceId}
+ model={activeSelection.model}
+ lockedProvider={null}
+ instanceEntries={instanceEntries}
+ modelOptionsByInstance={modelOptionsByInstance}
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
+ triggerAriaLabel="Source control writer model"
+ {...(mixedWriterModel ? { triggerLabel: "Mixed" } : {})}
+ {...(environmentId
+ ? {
+ onOpenProviderSetup: (instanceId: ProviderInstanceId) => {
+ void navigate({
+ to: "/settings/providers",
+ search: { environmentId, instanceId },
+ });
+ },
+ }
+ : {})}
+ getModelDisabledReason={writerModelDisabledReason}
+ onInstanceModelChange={(instanceId, model) => {
+ const reason = writerModelDisabledReason(instanceId, model);
+ if (reason) {
+ toastManager.add({
+ type: "error",
+ title: "Source control writer model not saved",
+ description: reason,
+ });
+ return;
+ }
+ updateSettings({
+ sourceControlWriterModelSelection: createModelSelection(instanceId, model),
+ });
+ }}
+ />
+ ) : null}
+ {usesDedicatedModel &&
+ canEnableDedicatedModel &&
+ !mixedWriterModel &&
+ writerInstanceEntry ? (
+ <TraitsPicker
+ provider={writerInstanceEntry.driverKind}
+ models={writerInstanceEntry.models}
+ model={activeSelection.model}
+ modelOptions={activeSelection.options ?? []}
+ allowPromptInjectedEffort={false}
+ planModeEnabled={
+ settings.planModeEnabled || selectsPlanAgent(activeSelection.options)
+ }
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
+ onModelOptionsChange={(options) =>
+ updateSettings({
+ sourceControlWriterModelSelection: createModelSelection(
+ activeSelection.instanceId,
+ activeSelection.model,
+ options,
+ ),
+ })
+ }
+ />
+ ) : null}
+ <Switch
+ checked={usesDedicatedModel}
+ disabled={!usesDedicatedModel && !canEnableDedicatedModel}
+ onCheckedChange={(checked) =>
+ updateSettings({
+ sourceControlWriterModelSelection: checked
+ ? createModelSelection(
+ defaultModelSelection.instanceId,
+ defaultModelSelection.model,
+ defaultModelSelection.options,
+ )
+ : null,
+ })
+ }
+ aria-label="Use a separate source control writer model"
+ />
+ </div>
+ )
+ }
+ />
+ </AdvancedSettings>
</SettingsSection>
);
}
diff --git a/apps/web/src/components/settings/StorageSettings.browser.test.tsx b/apps/web/src/components/settings/StorageSettings.browser.test.tsx
index 923f2ee2e8d..877341c4b8a 100644
--- a/apps/web/src/components/settings/StorageSettings.browser.test.tsx
+++ b/apps/web/src/components/settings/StorageSettings.browser.test.tsx
@@ -82,7 +82,7 @@ vi.mock(import("../ui/toast"), async (original) => {
return { ...actual, toastManager: { ...actual.toastManager, add: vi.fn() } };
});
-import { StorageSettingsPanel } from "./StorageSettings";
+import { StorageCleanupSections } from "./StorageSettings";
function setup() {
state.settings = {
@@ -105,7 +105,7 @@ function setup() {
const panel = () => (
<RegistryProvider>
- <StorageSettingsPanel />
+ <StorageCleanupSections />
</RegistryProvider>
);
const deleteButton = (container: HTMLElement) =>
diff --git a/apps/web/src/components/settings/StorageSettings.tsx b/apps/web/src/components/settings/StorageSettings.tsx
index 722285a532a..2353ef5206b 100644
--- a/apps/web/src/components/settings/StorageSettings.tsx
+++ b/apps/web/src/components/settings/StorageSettings.tsx
@@ -29,15 +29,11 @@ import {
NumberFieldIncrement,
NumberFieldInput,
} from "../ui/number-field";
-import {
- SettingResetButton,
- SettingsPageContainer,
- SettingsRow,
- SettingsSection,
-} from "./settingsLayout";
+import { SettingResetButton, SettingsRow, SettingsSection } from "./settingsLayout";
import { DatabaseStorageNotice } from "./DatabaseStorageNotice";
-import { SettingsScopeNotice } from "./SettingsScopeNotice";
+import { AdvancedSettings } from "./AdvancedSettings";
import { FoldedSettingsSection } from "./FoldedSettingsSection";
+import { SettingsScopeNotice } from "./SettingsScopeNotice";
import { SettingsGroup } from "./SettingsGroup";
import type { ScopedSettingsTarget } from "./scopedSettings";
import { useSettingsScope } from "./SettingsScopeContext";
@@ -50,7 +46,7 @@ import {
} from "./useScopedSettings";
import { settingsScopeEnvironmentLabel } from "./settingsScopeAxis";
-function WorktreesDirectoryRow() {
+export function WorktreesDirectoryRow() {
const { connectedEnvironments, targets } = useSettingsScope();
const settings = useScopedSettings();
const updateSettings = useUpdateScopedSettings();
@@ -422,7 +418,38 @@ function CleanupSection() {
);
}
-export function StorageSettingsPanel() {
+function supportsStorageCleanup(
+ environments: ReadonlyArray<{
+ readonly serverConfig: {
+ readonly environment: { readonly capabilities: { readonly storageCleanup?: boolean } };
+ } | null;
+ }>,
+) {
+ return environments.every(
+ (environment) => environment.serverConfig?.environment.capabilities.storageCleanup === true,
+ );
+}
+
+/** Narrows a mixed selection to the machines that support cleanup. */
+function StorageCleanupScopeNotice() {
+ const { connectedEnvironments } = useSettingsScope();
+ return (
+ <SettingsScopeNotice
+ inline
+ target="environment"
+ eligibleEnvironmentIds={connectedEnvironments
+ .filter(
+ (environment) =>
+ environment.serverConfig?.environment.capabilities.storageCleanup === true,
+ )
+ .map((environment) => environment.environmentId)}
+ >
+ Update the selected environments to use storage cleanup, or choose a machine that supports it.
+ </SettingsScopeNotice>
+ );
+}
+
+export function WorktreeCleanupSection() {
const { scope, environments, connectedEnvironments, targets, target } = useSettingsScope();
const scopedSettings = useScopedSettings();
const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
@@ -462,45 +489,24 @@ export function StorageSettingsPanel() {
)
) {
return (
- <SettingsScopeNotice target="all">
- Update the selected machines to configure project worktree cleanup.
- </SettingsScopeNotice>
+ <SettingsSection id="storage-worktrees" title="Cleanup" variant="plain">
+ <SettingsScopeNotice inline target="all">
+ Update the selected machines to configure project worktree cleanup.
+ </SettingsScopeNotice>
+ </SettingsSection>
);
}
-
- if (
- connectedEnvironments.some(
- (environment) => environment.serverConfig?.environment.capabilities.storageCleanup !== true,
- )
- ) {
+ if (!supportsStorageCleanup(connectedEnvironments)) {
return (
- <SettingsScopeNotice
- target="environment"
- eligibleEnvironmentIds={connectedEnvironments
- .filter(
- (environment) =>
- environment.serverConfig?.environment.capabilities.storageCleanup === true,
- )
- .map((environment) => environment.environmentId)}
- >
- Update the selected environments to use storage cleanup, or choose a machine that supports
- it.
- </SettingsScopeNotice>
+ <SettingsSection id="storage-worktrees" title="Cleanup" variant="plain">
+ <StorageCleanupScopeNotice />
+ </SettingsSection>
);
}
return (
- <SettingsPageContainer>
- {!isProjectScope && (
- <DatabaseStorageNotice
- environments={connectedEnvironments.filter(
- (environment) =>
- environment.serverConfig?.environment.capabilities.databaseStorage === true,
- )}
- />
- )}
- <SettingsSection id="storage-worktrees" title="Worktrees">
- {!isProjectScope && <WorktreesDirectoryRow />}
+ <SettingsSection id="storage-worktrees" title="Cleanup">
+ <>
{isProjectScope && (
<SettingsRow
title="Automatic worktree cleanup"
@@ -559,49 +565,6 @@ export function StorageSettingsPanel() {
/>
}
/>
- <SettingsRow
- title="Delete inactive worktrees"
- status={ruleStatus("worktreeAfterDays")}
- description="Remove worktrees after their threads have been inactive for this many days. Branches and thread history are kept."
- serverScoped={!isProjectScope}
- control={
- <RetentionControl
- label="Delete inactive worktrees"
- value={settings.worktreeAfterDays}
- onChange={(worktreeAfterDays) => updateWorktree({ worktreeAfterDays })}
- />
- }
- />
- {connectedEnvironments.length > 0 &&
- connectedEnvironments.every(
- (environment) =>
- environment.serverConfig?.environment.capabilities.settledWorktreeCleanup ===
- true,
- ) && (
- <SettingsRow
- title="Delete settled worktrees"
- status={[
- ruleStatus("worktreeSettledAfterDays"),
- environments.length > connectedEnvironments.length
- ? "Offline machines will not get this setting"
- : undefined,
- ]
- .filter(Boolean)
- .join(". ")}
- description="Remove worktrees this many days after their thread settles. Set 0 days to remove them at the next cleanup. Branches and thread history are kept."
- serverScoped={!isProjectScope}
- control={
- <RetentionControl
- label="Delete settled worktrees"
- value={settings.worktreeSettledAfterDays}
- minimum={0}
- onChange={(worktreeSettledAfterDays) =>
- updateWorktree({ worktreeSettledAfterDays })
- }
- />
- }
- />
- )}
<SettingsRow
title="Delete merged worktrees"
status={ruleStatus("worktreeOnMerge")}
@@ -616,96 +579,180 @@ export function StorageSettingsPanel() {
}
/>
<SettingsRow
- title="Delete unchanged worktrees"
- status={ruleStatus("worktreeUnchanged")}
- description="Remove worktrees with no commits beyond the default branch."
+ title="Delete inactive worktrees"
+ status={ruleStatus("worktreeAfterDays")}
+ description="Remove worktrees after their threads have been inactive for this many days. Branches and thread history are kept."
serverScoped={!isProjectScope}
control={
- <Switch
- aria-label="Delete unchanged worktrees"
- checked={settings.worktreeUnchanged}
- onCheckedChange={(worktreeUnchanged) => updateWorktree({ worktreeUnchanged })}
+ <RetentionControl
+ label="Delete inactive worktrees"
+ value={settings.worktreeAfterDays}
+ onChange={(worktreeAfterDays) => updateWorktree({ worktreeAfterDays })}
/>
}
/>
- {connectedEnvironments.every(
- (environment) =>
- environment.serverConfig?.environment.capabilities.storageCleanupRun === true,
- ) && (
+ <AdvancedSettings
+ // The keep-when search result lands on this section, not its row.
+ targetIds={["storage-worktrees", searchableSetting("storage-worktree-keep-when").id]}
+ >
+ {connectedEnvironments.length > 0 &&
+ connectedEnvironments.every(
+ (environment) =>
+ environment.serverConfig?.environment.capabilities.settledWorktreeCleanup ===
+ true,
+ ) && (
+ <SettingsRow
+ title="Delete settled worktrees"
+ status={[
+ ruleStatus("worktreeSettledAfterDays"),
+ environments.length > connectedEnvironments.length
+ ? "Offline machines will not get this setting"
+ : undefined,
+ ]
+ .filter(Boolean)
+ .join(". ")}
+ description="Remove worktrees this many days after their thread settles. Set 0 days to remove them at the next cleanup. Branches and thread history are kept."
+ serverScoped={!isProjectScope}
+ control={
+ <RetentionControl
+ label="Delete settled worktrees"
+ value={settings.worktreeSettledAfterDays}
+ minimum={0}
+ onChange={(worktreeSettledAfterDays) =>
+ updateWorktree({ worktreeSettledAfterDays })
+ }
+ />
+ }
+ />
+ )}
<SettingsRow
- {...searchableSetting("storage-worktree-keep-when")}
- status={ruleStatus("worktreeKeepWhen")}
- description={
- settings.worktreeKeepWhen === "any-local-files"
- ? "Includes ignored files, except node_modules."
- : settings.worktreeKeepWhen === "tracked-changes"
- ? "Deletes untracked and ignored files, including .env."
- : "Keeps edits and untracked files. Deletes ignored files, including .env."
- }
+ title="Delete unchanged worktrees"
+ status={ruleStatus("worktreeUnchanged")}
+ description="Remove worktrees with no commits beyond the default branch."
serverScoped={!isProjectScope}
control={
- <Select
- value={ruleStatus("worktreeKeepWhen") ? null : settings.worktreeKeepWhen}
- onValueChange={(next) => {
- if (
- next === "any-local-files" ||
- next === "uncommitted-changes" ||
- next === "tracked-changes"
- )
- updateWorktree({ worktreeKeepWhen: next });
- }}
- >
- <SelectTrigger size="sm" aria-label="Keep worktrees with local changes">
- <SelectValue>
- {ruleStatus("worktreeKeepWhen")
- ? "Mixed"
- : KEEP_WHEN_LABELS[settings.worktreeKeepWhen]}
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem value="any-local-files">Any local files</SelectItem>
- <SelectItem value="uncommitted-changes">Uncommitted changes</SelectItem>
- <SelectItem value="tracked-changes">Edited tracked files</SelectItem>
- </SelectPopup>
- </Select>
+ <Switch
+ aria-label="Delete unchanged worktrees"
+ checked={settings.worktreeUnchanged}
+ onCheckedChange={(worktreeUnchanged) => updateWorktree({ worktreeUnchanged })}
+ />
}
/>
- )}
+ {connectedEnvironments.every(
+ (environment) =>
+ environment.serverConfig?.environment.capabilities.storageCleanupRun === true,
+ ) && (
+ <SettingsRow
+ {...searchableSetting("storage-worktree-keep-when")}
+ status={ruleStatus("worktreeKeepWhen")}
+ description={
+ settings.worktreeKeepWhen === "any-local-files"
+ ? "Includes ignored files, except node_modules."
+ : settings.worktreeKeepWhen === "tracked-changes"
+ ? "Deletes untracked and ignored files, including .env."
+ : "Keeps edits and untracked files. Deletes ignored files, including .env."
+ }
+ serverScoped={!isProjectScope}
+ control={
+ <Select
+ value={ruleStatus("worktreeKeepWhen") ? null : settings.worktreeKeepWhen}
+ onValueChange={(next) => {
+ if (
+ next === "any-local-files" ||
+ next === "uncommitted-changes" ||
+ next === "tracked-changes"
+ )
+ updateWorktree({ worktreeKeepWhen: next });
+ }}
+ >
+ <SelectTrigger size="sm" aria-label="Keep worktrees with local changes">
+ <SelectValue>
+ {ruleStatus("worktreeKeepWhen")
+ ? "Mixed"
+ : KEEP_WHEN_LABELS[settings.worktreeKeepWhen]}
+ </SelectValue>
+ </SelectTrigger>
+ <SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem value="any-local-files">Any local files</SelectItem>
+ <SelectItem value="uncommitted-changes">Uncommitted changes</SelectItem>
+ <SelectItem value="tracked-changes">Edited tracked files</SelectItem>
+ </SelectPopup>
+ </Select>
+ }
+ />
+ )}
+ </AdvancedSettings>
</>
)}
- </SettingsSection>
+ </>
+ </SettingsSection>
+ );
+}
- {!isProjectScope && (
- <SettingsSection id="storage-artifacts" title="Artifacts and logs">
- <SettingsRow
- title="Delete old browser artifacts"
- status={ruleStatus("browserArtifactsAfterDays")}
- description="Delete saved browser captures after this many days. Older capture links will no longer open."
- serverScoped
- control={
- <RetentionControl
- label="Delete old browser artifacts"
- value={settings.browserArtifactsAfterDays}
- onChange={(browserArtifactsAfterDays) => update({ browserArtifactsAfterDays })}
- />
- }
- />
- <SettingsRow
- title="Delete old rotated logs"
- status={ruleStatus("logsAfterDays")}
- description="Delete inactive rotated log files after this many days. Current logs are kept."
- serverScoped
- control={
- <RetentionControl
- label="Delete old rotated logs"
- value={settings.logsAfterDays}
- onChange={(logsAfterDays) => update({ logsAfterDays })}
- />
- }
- />
- </SettingsSection>
+/** Retention for logs and captures, and the manual cleanup run, which covers worktrees too. */
+export function StorageCleanupSections() {
+ const { scope, connectedEnvironments, targets } = useSettingsScope();
+ const scopedSettings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ if (scope.kind === "project" || scope.kind === "checkout") return null;
+ const settings = scopedSettings.storageCleanup;
+ const ruleStatus = (key: "browserArtifactsAfterDays" | "logsAfterDays") =>
+ targets.some((target) => target.settings.storageCleanup[key] !== settings[key])
+ ? "Mixed across selected machines"
+ : undefined;
+ const update = (patch: Partial<StorageCleanupSettings>) =>
+ updateSettings({ storageCleanup: patch });
+ const databaseStorageNotice = (
+ <DatabaseStorageNotice
+ environments={connectedEnvironments.filter(
+ (environment) =>
+ environment.serverConfig?.environment.capabilities.databaseStorage === true,
)}
- {!isProjectScope && <CleanupSection />}
- </SettingsPageContainer>
+ />
+ );
+ if (!supportsStorageCleanup(connectedEnvironments)) {
+ return (
+ <>
+ {databaseStorageNotice}
+ <SettingsSection id="storage-artifacts" title="Artifacts and logs" variant="plain">
+ <StorageCleanupScopeNotice />
+ </SettingsSection>
+ </>
+ );
+ }
+
+ return (
+ <>
+ {databaseStorageNotice}
+ <SettingsSection id="storage-artifacts" title="Artifacts and logs">
+ <SettingsRow
+ title="Delete old browser artifacts"
+ status={ruleStatus("browserArtifactsAfterDays")}
+ description="Delete saved browser captures after this many days. Older capture links will no longer open."
+ serverScoped
+ control={
+ <RetentionControl
+ label="Delete old browser artifacts"
+ value={settings.browserArtifactsAfterDays}
+ onChange={(browserArtifactsAfterDays) => update({ browserArtifactsAfterDays })}
+ />
+ }
+ />
+ <SettingsRow
+ title="Delete old rotated logs"
+ status={ruleStatus("logsAfterDays")}
+ description="Delete inactive rotated log files after this many days. Current logs are kept."
+ serverScoped
+ control={
+ <RetentionControl
+ label="Delete old rotated logs"
+ value={settings.logsAfterDays}
+ onChange={(logsAfterDays) => update({ logsAfterDays })}
+ />
+ }
+ />
+ </SettingsSection>
+ <CleanupSection />
+ </>
);
}
diff --git a/apps/web/src/components/settings/ThemeSettings.tsx b/apps/web/src/components/settings/ThemeSettings.tsx
index 504e7eb3eee..e52589bb5ef 100644
--- a/apps/web/src/components/settings/ThemeSettings.tsx
+++ b/apps/web/src/components/settings/ThemeSettings.tsx
@@ -827,7 +827,7 @@ export function ThemeLibrary({
return (
<div className="space-y-3">
- <h3 className="px-3 text-sm font-normal text-foreground/70 sm:px-4 redesign:text-base redesign:font-semibold redesign:text-foreground">
+ <h3 className="flex min-h-7 items-center px-3 text-sm font-normal text-foreground/70 sm:px-4 redesign:text-base redesign:font-semibold redesign:text-foreground">
{searchableSetting("color-scheme").title}
</h3>
{renderModeTiles()}
diff --git a/apps/web/src/components/settings/TypographySettings.tsx b/apps/web/src/components/settings/TypographySettings.tsx
index 067fca68b8e..1f813beedea 100644
--- a/apps/web/src/components/settings/TypographySettings.tsx
+++ b/apps/web/src/components/settings/TypographySettings.tsx
@@ -26,6 +26,7 @@ import {
resolveTerminalFontSizePreference,
TYPOGRAPHY_ADVANCED_STORAGE_KEY,
} from "../../appearanceFonts";
+import { AdvancedSettings } from "./AdvancedSettings";
import { CodeFontPreview, PromptFontPreview, TerminalFontPreview } from "./SettingsFontPreviews";
import { discoverInstalledFonts, FontFamilyPicker, useFontEnumeration } from "./FontFamilyPicker";
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -261,11 +262,32 @@ function FontSettingsGroup() {
<PromptFontRow />
<CodeFontRow />
<TerminalFontRow />
- <FontSmoothingRow />
</>
);
}
+function SeparateFontsRow({
+ checked,
+ onCheckedChange,
+}: {
+ readonly checked: boolean;
+ readonly onCheckedChange: (checked: boolean) => void;
+}) {
+ return (
+ <SettingsRow
+ {...searchableSetting("separate-fonts")}
+ description="Set the prompt, code, and terminal fonts separately instead of one monospace font."
+ control={
+ <Switch
+ checked={checked}
+ onCheckedChange={(next) => onCheckedChange(Boolean(next))}
+ aria-label="Separate fonts"
+ />
+ }
+ />
+ );
+}
+
function SimpleFontRows() {
const settings = useScopedSettings();
return (
@@ -312,22 +334,15 @@ export function TypographySection() {
const showAdvanced =
advanced || (searchTargetId !== null && isAdvancedTypographyTarget(searchTargetId));
return (
- <SettingsSection
- id="typography"
- title="Typography"
- headerAction={
- <label className="flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground">
- Advanced
- <Switch
- checked={showAdvanced}
- onCheckedChange={(checked) => setAdvanced(Boolean(checked))}
- aria-label="Show advanced typography settings"
- />
- </label>
- }
- >
+ <SettingsSection id="typography" title="Typography">
{showAdvanced ? <FontSettingsGroup /> : <SimpleFontRows />}
<WordWrapRow />
+ <AdvancedSettings
+ targetIds={[searchableSetting("separate-fonts").id, searchableSetting("font-smoothing").id]}
+ >
+ <SeparateFontsRow checked={showAdvanced} onCheckedChange={setAdvanced} />
+ <FontSmoothingRow />
+ </AdvancedSettings>
</SettingsSection>
);
}
diff --git a/apps/web/src/components/settings/WorktreesSettings.tsx b/apps/web/src/components/settings/WorktreesSettings.tsx
new file mode 100644
index 00000000000..a771e92ceca
--- /dev/null
+++ b/apps/web/src/components/settings/WorktreesSettings.tsx
@@ -0,0 +1,73 @@
+import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
+
+import { AdvancedSettings } from "./AdvancedSettings";
+import { BranchNamingSettings } from "./BranchNamingSettings";
+import { WorktreeSubmodulesRow } from "./ProjectDefaultsSettings";
+import { ScopedSwitch } from "./ScopedSwitch";
+import { useSettingsScope } from "./SettingsScopeContext";
+import {
+ SettingResetButton,
+ SettingsPageContainer,
+ SettingsRow,
+ SettingsSection,
+} from "./settingsLayout";
+import { searchableSetting } from "./settingsSearch";
+import { WorktreeCleanupSection, WorktreesDirectoryRow } from "./StorageSettings";
+import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
+
+function StartFromRemoteRow() {
+ const settings = useScopedSettings();
+ const updateSettings = useUpdateScopedSettings();
+ return (
+ <SettingsRow
+ serverScoped
+ settingKeys={["newWorktreesStartFromOrigin"]}
+ {...searchableSetting("start-from-origin")}
+ description="Uses the latest commit of the base branch’s tracked remote branch, even if its name differs. Otherwise uses the same-named branch on origin. Uses your local branch if that remote branch is missing."
+ resetAction={
+ settings.newWorktreesStartFromOrigin !==
+ DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin ? (
+ <SettingResetButton
+ label="new worktrees start from remote"
+ onClick={() =>
+ updateSettings({
+ newWorktreesStartFromOrigin: DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin,
+ })
+ }
+ />
+ ) : null
+ }
+ control={
+ <ScopedSwitch
+ settingKeys={["newWorktreesStartFromOrigin"]}
+ checked={settings.newWorktreesStartFromOrigin}
+ onCheckedChange={(checked) =>
+ updateSettings({ newWorktreesStartFromOrigin: Boolean(checked) })
+ }
+ aria-label="Start new worktrees from remote by default"
+ />
+ }
+ />
+ );
+}
+
+export function WorktreesSettingsPanel() {
+ const { scope } = useSettingsScope();
+ const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
+
+ return (
+ <SettingsPageContainer>
+ <SettingsSection id="worktree-creation" title="Creation">
+ {!isProjectScope && <WorktreesDirectoryRow />}
+ <StartFromRemoteRow />
+ <AdvancedSettings targetIds={[searchableSetting("worktree-submodules").id]}>
+ <WorktreeSubmodulesRow />
+ </AdvancedSettings>
+ </SettingsSection>
+ <SettingsSection id="worktree-branches" title="Branches">
+ <BranchNamingSettings />
+ </SettingsSection>
+ <WorktreeCleanupSection />
+ </SettingsPageContainer>
+ );
+}
diff --git a/apps/web/src/components/settings/settingsSearch.test.ts b/apps/web/src/components/settings/settingsSearch.test.ts
index 1584bbe719a..f10dfbd738c 100644
--- a/apps/web/src/components/settings/settingsSearch.test.ts
+++ b/apps/web/src/components/settings/settingsSearch.test.ts
@@ -12,6 +12,7 @@ import {
getSettingsSearchTargetScope,
getThreadAutoSettlementSearchAvailability,
isSettingsSearchScopeAvailable,
+ movedSettingsPath,
searchSettings,
SETTINGS_SEARCH_ITEMS,
sourceControlHostSearchItems,
@@ -29,7 +30,7 @@ const ITEMS: ReadonlyArray<SettingsSearchItem> = [
{
id: "network-access",
title: "Network access",
- to: "/settings/connections",
+ to: "/settings/access",
searchTerms: ["remote pairing backend"],
},
{
@@ -54,7 +55,7 @@ describe("searchSettings", () => {
it("matches titles, sections, and remembered setting details", () => {
expect(searchSettings("word", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
expect(searchSettings("network", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
- expect(searchSettings("connections", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
+ expect(searchSettings("sharing", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
expect(searchSettings("claude", ITEMS).map((item) => item.id)).toEqual(["providers"]);
expect(searchSettings("long lines", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
});
@@ -208,6 +209,7 @@ describe("auto-settlement search availability", () => {
"auto-settle-inactive-threads",
"auto-settle-merged-threads",
"days-before-auto-settle",
+ "keep-threads-with-pull-requests",
]);
});
@@ -285,3 +287,30 @@ describe("source control host search items", () => {
);
});
});
+
+describe("movedSettingsPath", () => {
+ it("sends old links to the page their row moved to", () => {
+ expect(movedSettingsPath("/settings/general", "text-generation-model")).toBe(
+ "/settings/threads",
+ );
+ expect(movedSettingsPath("/settings/connections", "authorized-clients")).toBe(
+ "/settings/access",
+ );
+ expect(movedSettingsPath("/settings/source-control", "worktree-branch-naming")).toBe(
+ "/settings/worktrees",
+ );
+ expect(movedSettingsPath("/settings/appearance", "diff-color-scheme")).toBe("/settings/diffs");
+ expect(movedSettingsPath("/settings/connections", "network-access")).toBe("/settings/access");
+ expect(movedSettingsPath("/settings/storage", "storage-worktrees")).toBe("/settings/worktrees");
+ expect(movedSettingsPath("/settings/storage", "")).toBe("/settings/maintenance");
+ expect(movedSettingsPath("/settings/integrations", "devices")).toBe("/settings/devices");
+ expect(movedSettingsPath("/settings/beta", "")).toBe("/settings/labs");
+ });
+
+ it("leaves current pages alone", () => {
+ expect(movedSettingsPath("/settings/general", "time-format")).toBeNull();
+ expect(movedSettingsPath("/settings/projects", "project-defaults")).toBeNull();
+ expect(movedSettingsPath("/settings/connections", "remote-environments")).toBeNull();
+ expect(movedSettingsPath("/settings/appearance", "theme")).toBeNull();
+ });
+});
diff --git a/apps/web/src/components/settings/settingsSearch.ts b/apps/web/src/components/settings/settingsSearch.ts
index 6ebea8d80e6..927d366602e 100644
--- a/apps/web/src/components/settings/settingsSearch.ts
+++ b/apps/web/src/components/settings/settingsSearch.ts
@@ -13,26 +13,29 @@ import * as Schema from "effect/Schema";
import { TYPOGRAPHY_ADVANCED_STORAGE_KEY } from "../../appearanceFonts";
import { writeLocalStorageValue } from "../../hooks/useLocalStorage";
import { commandLabel } from "./KeybindingsSettings.logic";
-import {
- validateSettingsScopeSearch,
- type ResolvedSettingsScope,
- type SettingsScopeSearch,
-} from "./settingsScope";
+import type { ResolvedSettingsScope } from "./settingsScope";
export type SettingsPath =
| "/settings/projects"
| "/settings/general"
| "/settings/diagnostics"
| "/settings/appearance"
+ | "/settings/chat"
+ | "/settings/diffs"
| "/settings/keybindings"
| "/settings/snap-shot"
| "/settings/providers"
- | "/settings/integrations"
+ | "/settings/threads"
+ | "/settings/browser"
+ | "/settings/devices"
| "/settings/scheduled-tasks"
| "/settings/source-control"
- | "/settings/storage"
+ | "/settings/worktrees"
| "/settings/connections"
- | "/settings/beta"
+ | "/settings/access"
+ | "/settings/maintenance"
+ | "/settings/labs"
+ | "/settings/about"
| "/settings/archived";
export type SettingsSearchScope =
@@ -80,21 +83,65 @@ export interface SettingsSearchAvailability {
export const SETTINGS_SECTION_LABELS: Readonly<Record<SettingsPath, string>> = {
"/settings/diagnostics": "Diagnostics",
- "/settings/projects": "Project",
+ "/settings/projects": "Projects",
"/settings/general": "General",
"/settings/appearance": "Appearance",
+ "/settings/chat": "Chat",
+ "/settings/diffs": "Diffs & pull requests",
"/settings/keybindings": "Keybindings",
"/settings/snap-shot": "SnapShots",
"/settings/providers": "Providers",
- "/settings/integrations": "Integrations",
+ "/settings/threads": "Threads",
+ "/settings/browser": "Browser",
+ "/settings/devices": "Devices",
"/settings/scheduled-tasks": "Scheduled tasks",
"/settings/source-control": "Source control",
- "/settings/storage": "Storage",
- "/settings/connections": "Connections",
- "/settings/beta": "Beta",
+ "/settings/worktrees": "Worktrees",
+ "/settings/connections": "Environments",
+ "/settings/access": "Sharing & access",
+ "/settings/maintenance": "Maintenance",
+ "/settings/labs": "Labs",
+ "/settings/about": "About",
"/settings/archived": "Archive",
};
+/** Sidebar order. A group without a heading is set apart by space alone. */
+export const SETTINGS_NAV_GROUPS: ReadonlyArray<{
+ readonly heading: string | null;
+ readonly paths: ReadonlyArray<SettingsPath>;
+}> = [
+ {
+ heading: null,
+ paths: [
+ "/settings/general",
+ "/settings/appearance",
+ "/settings/chat",
+ "/settings/diffs",
+ "/settings/keybindings",
+ "/settings/snap-shot",
+ ],
+ },
+ {
+ heading: "Agents",
+ paths: [
+ "/settings/providers",
+ "/settings/threads",
+ "/settings/browser",
+ "/settings/devices",
+ "/settings/scheduled-tasks",
+ ],
+ },
+ {
+ heading: "Code",
+ paths: ["/settings/projects", "/settings/source-control", "/settings/worktrees"],
+ },
+ { heading: "Connections", paths: ["/settings/connections", "/settings/access"] },
+ {
+ heading: null,
+ paths: ["/settings/maintenance", "/settings/labs", "/settings/about", "/settings/archived"],
+ },
+];
+
export function keybindingSearchAnchorId<Command extends KeybindingCommand>(command: Command) {
return `keybinding-${command}` as const;
}
@@ -161,7 +208,7 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "storage-worktree-keep-when",
targetId: "storage-worktrees",
title: "Keep worktrees with local changes",
- to: "/settings/storage",
+ to: "/settings/worktrees",
scope: "project-defaults",
searchTerms: [
"any local files uncommitted changes edited tracked files ignored env build output cleanup",
@@ -170,14 +217,14 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "storage-delete-now",
title: "Delete now",
- to: "/settings/storage",
+ to: "/settings/maintenance",
scope: "environment-defaults",
searchTerms: ["storage cleanup run now results report removed kept failed"],
},
{
id: "storage-worktrees",
title: "Worktree cleanup",
- to: "/settings/storage",
+ to: "/settings/worktrees",
scope: "project-defaults",
searchTerms: [
"disk storage delete deleted archived threads old inactive merged unchanged worktrees retention days project inherit off custom",
@@ -186,21 +233,21 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "storage-worktrees-location",
title: "Worktree location",
- to: "/settings/storage",
+ to: "/settings/worktrees",
scope: "environment-defaults",
searchTerms: ["worktree location folder directory path drive external disk"],
},
{
id: "storage-artifacts",
title: "Artifacts and logs",
- to: "/settings/storage",
+ to: "/settings/maintenance",
scope: "environment-defaults",
searchTerms: ["disk storage browser screenshots captures rotated logs cleanup retention"],
},
{
id: "project-defaults",
title: "Project defaults and overrides",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["model workspace environments projects inheritance checkout"],
},
@@ -213,14 +260,14 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "default-model",
title: "Default model",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["new thread project provider reasoning effort"],
},
{
id: "default-permissions",
title: "Permissions",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: [
"new thread default runtime mode supervised approvals auto accept edits full access",
@@ -257,7 +304,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "diff-color-scheme",
title: "Diff colors",
- to: "/settings/appearance",
+ to: "/settings/diffs",
searchTerms: ["red green blue orange additions deletions changes counts palette colorblind"],
},
{
@@ -308,6 +355,12 @@ export const SETTINGS_SEARCH_ITEMS = [
to: "/settings/appearance",
searchTerms: ["typography family size monospace output"],
},
+ {
+ id: "separate-fonts",
+ title: "Separate fonts",
+ to: "/settings/appearance",
+ searchTerms: ["typography advanced prompt code terminal font family size individually"],
+ },
{
id: "font-smoothing",
title: "Font smoothing",
@@ -341,38 +394,38 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "snooze-limited-threads",
title: "Snooze until limits reset",
- to: "/settings/general",
+ to: "/settings/threads",
searchTerms: ["usage quota rate limit reset wake recover continue"],
},
{
id: "auto-resume-limited-threads",
title: "Resume after usage limits",
- to: "/settings/general",
+ to: "/settings/threads",
searchTerms: ["usage quota rate limit reset recover continue"],
},
{
id: "new-design",
title: "New design",
- to: "/settings/beta",
- searchTerms: ["beta redesign look style sidebar composer black quieter classic"],
+ to: "/settings/appearance",
+ searchTerms: ["redesign look style sidebar composer black quieter classic"],
},
{
id: "working-shelf",
title: "Working section",
- to: "/settings/beta",
- searchTerms: ["beta hide fold running monitoring threads inbox sidebar shelf"],
+ to: "/settings/general",
+ searchTerms: ["hide fold running monitoring threads inbox sidebar shelf"],
},
{
id: "guest-links",
title: "Guest links",
- to: "/settings/beta",
+ to: "/settings/labs",
scope: "environment",
searchTerms: ["beta share guest invite link teammate watch t3 connect tunnel"],
},
{
id: "auto-settle-inactive-threads",
title: "Auto-settle inactive threads",
- to: "/settings/general",
+ to: "/settings/threads",
searchTerms: ["sidebar inactivity days no activity automatically"],
requiresThreadAutoSettlement: true,
scope: "project-defaults",
@@ -380,22 +433,31 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "compact-idle-threads",
title: "Compact idle threads",
- to: "/settings/general",
+ to: "/settings/providers",
scope: "environment-defaults",
searchTerms: ["claude context compaction idle cache tokens usage summary resume"],
},
{
id: "auto-settle-merged-threads",
title: "Auto-settle merged threads",
- to: "/settings/general",
+ to: "/settings/threads",
searchTerms: ["pull request merge closed automatically sidebar"],
requiresThreadAutoSettlement: true,
scope: "project-defaults",
},
+ {
+ id: "keep-threads-with-pull-requests",
+ title: "Keep threads with a PR",
+ to: "/settings/threads",
+ targetId: "auto-settle-inactive-threads",
+ searchTerms: ["pull request inactivity auto-settle merge close sidebar"],
+ requiresThreadAutoSettlement: true,
+ scope: "project-defaults",
+ },
{
id: "days-before-auto-settle",
title: "Days of inactivity before auto-settle",
- to: "/settings/general",
+ to: "/settings/threads",
targetId: "auto-settle-inactive-threads",
searchTerms: ["thread timeout activity sidebar"],
requiresThreadAutoSettlement: true,
@@ -422,75 +484,75 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "response-streaming",
title: "Response streaming",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["output token paragraph buffered wait turn legacy"],
},
{
id: "hide-whitespace-changes",
title: "Hide whitespace changes",
- to: "/settings/general",
+ to: "/settings/diffs",
searchTerms: ["diff ignore spaces edits default"],
},
{
id: "default-diff-file-state",
title: "Default diff file state",
- to: "/settings/general",
+ to: "/settings/diffs",
searchTerms: ["collapsed expanded collapse expand files pull request pr code tab"],
},
{
id: "diff-layout",
title: "Diff layout",
- to: "/settings/general",
+ to: "/settings/diffs",
searchTerms: ["stacked split side by side unified inline view"],
},
{
id: "proactive-panels",
title: "Proactive panels",
- to: "/settings/general",
+ to: "/settings/diffs",
searchTerms: ["automatically open diff pull request pr right panel agent completion"],
},
{
id: "skills-in-slash-menu",
title: "Show skills in slash menu",
- to: "/settings/general",
+ to: "/settings/chat",
searchTerms: ["command menu dollar $ slash /"],
},
{
id: "composer-rich-text",
title: "Rich text composer",
- to: "/settings/general",
+ to: "/settings/chat",
searchTerms: ["composer rich text tiptap bold italic markdown styled wysiwyg"],
},
{
id: "composer-collapse",
title: "Collapse composer on scroll",
- to: "/settings/general",
+ to: "/settings/chat",
searchTerms: ["composer rest resting scroll wheel conversation timeline shrink minimize"],
},
{
id: "send-shortcut",
title: "Send shortcut",
- to: "/settings/general",
+ to: "/settings/chat",
searchTerms: ["enter return command ctrl multiline prompt new line composer"],
},
{
id: "follow-up-behavior",
title: "Follow-up behavior",
- to: "/settings/general",
+ to: "/settings/chat",
searchTerms: ["queue steer running turn send default behavior composer"],
},
{
id: "provider-update-checks",
title: "Provider update checks",
- to: "/settings/general",
+ to: "/settings/maintenance",
searchTerms: ["installed cli versions newer available codex claude cursor grok opencode"],
scope: "environment-defaults",
},
{
id: "continue-threads-after-server-update",
title: "Continue threads after restarts",
- to: "/settings/general",
+ to: "/settings/maintenance",
scope: "project-defaults",
searchTerms: [
"resume running active interrupted work restart reboot machine crash desktop update automatically",
@@ -499,7 +561,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "background-activity",
title: "Background activity",
- to: "/settings/general",
+ to: "/settings/maintenance",
scope: "environment-defaults",
searchTerms: [
"balanced performance battery saver advanced git fetch provider health refresh host power monitor idle policy",
@@ -508,28 +570,28 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "new-threads",
title: "New threads",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["default workspace mode draft local worktree"],
},
{
id: "worktree-submodules",
title: "Submodules",
- to: "/settings/general",
+ to: "/settings/worktrees",
scope: "project-defaults",
searchTerms: ["git submodule init recursive top-level none worktree t3.json"],
},
{
id: "start-from-origin",
title: "Start from remote",
- to: "/settings/general",
+ to: "/settings/worktrees",
scope: "project-defaults",
searchTerms: ["new worktrees start remote origin latest fetched branch local"],
},
{
id: "add-project-starts-in",
title: "Add project starts in",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "environment-defaults",
searchTerms: ["base directory folder browser path home"],
},
@@ -561,47 +623,47 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "text-generation-model",
title: "Text generation model",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["generated thread titles source control content default provider"],
},
{
id: "thread-title-instructions",
title: "Thread title instructions",
- to: "/settings/general",
+ to: "/settings/threads",
scope: "project-defaults",
searchTerms: ["generated thread titles prompt custom style naming rename regenerate"],
},
{
id: "app-version",
title: "Version",
- to: "/settings/general",
+ to: "/settings/about",
searchTerms: ["about check for updates download install upgrade release"],
},
{
id: "update-track",
title: "Update track",
- to: "/settings/general",
+ to: "/settings/about",
searchTerms: ["release channel stable latest nightly prerelease"],
releaseChannelOnly: true,
},
{
id: "cli-command",
title: "t3 command",
- to: "/settings/general",
+ to: "/settings/about",
searchTerms: ["cli terminal shell path install command line"],
desktopOnly: true,
},
{
id: "mobile-app",
title: "Mobile app",
- to: "/settings/general",
+ to: "/settings/about",
searchTerms: ["phone tablet iPhone iPad iOS Android App Store Google Play QR"],
},
{
id: "privacy-policy",
title: "Privacy policy",
- to: "/settings/general",
+ to: "/settings/about",
searchTerms: ["telemetry analytics usage data tracking legal opt out"],
},
{
@@ -615,30 +677,30 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "diagnostics",
title: "Diagnostics",
- to: "/settings/general",
+ to: "/settings/maintenance",
searchTerms: ["logs traces processes resource history failures spans cpu memory"],
},
{
id: "open-source-licenses",
title: "Open source licenses",
- to: "/settings/general",
+ to: "/settings/about",
},
{
id: "legacy-plan-mode",
title: "Plan mode (legacy)",
- to: "/settings/general",
+ to: "/settings/labs",
searchTerms: ["build plan composer old"],
},
{
id: "legacy-context-window-indicator",
title: "Context window indicator (legacy)",
- to: "/settings/general",
+ to: "/settings/labs",
searchTerms: ["composer meter usage tokens circle old"],
},
{
id: "legacy-sidebar",
title: "Sidebar (legacy)",
- to: "/settings/general",
+ to: "/settings/labs",
searchTerms: ["project thread tree old flat list"],
},
{
@@ -722,100 +784,100 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "agent-browser-access",
title: "Agent browser access",
- to: "/settings/integrations",
+ to: "/settings/browser",
scope: "project-defaults",
searchTerms: ["allow disable enable open drive preview tools sessions project override"],
},
{
id: "device-hosts",
title: "Device hosts",
- to: "/settings/integrations",
+ to: "/settings/devices",
searchTerms: ["ssh remote simulator emulator ios android mac mini identity key connection"],
},
{
id: "agent-device-access",
title: "Agent device access",
- to: "/settings/integrations",
+ to: "/settings/devices",
targetId: "devices",
searchTerms: ["allow simulator emulator ios android drive tools sessions"],
},
{
id: "device-hub",
title: "Device hub",
- to: "/settings/integrations",
+ to: "/settings/devices",
targetId: "devices",
searchTerms: ["simulator emulator ios android install start"],
},
{
id: "device-platform-support",
title: "Simulator support",
- to: "/settings/integrations",
+ to: "/settings/devices",
targetId: "devices",
searchTerms: ["xcode android studio sdk avd runtime"],
},
{
id: "browser-profiles",
title: "Browser profiles",
- to: "/settings/integrations",
+ to: "/settings/browser",
targetId: "browser",
},
{
id: "browser-default-profile",
title: "Default browser profile",
- to: "/settings/integrations",
+ to: "/settings/browser",
targetId: "browser-profiles",
},
{
id: "browser-default-viewport",
title: "Default browser viewport",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["preview size width height device desktop mobile rotate"],
},
{
id: "browser-default-zoom",
title: "Default browser zoom",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["preview page scale tabs percent"],
},
{
id: "browser-default-appearance",
title: "Default browser appearance",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["preview color scheme light dark system os"],
},
{
id: "browser-recording-frame-rate",
title: "Browser recording frame rate",
- to: "/settings/integrations",
+ to: "/settings/browser",
},
{
id: "browser-recording-key-presses",
title: "Show key presses in recordings",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["browser preview keyboard shortcuts keystrokes overlay capture"],
},
{
id: "browser-recording-mouse-presses",
title: "Show mouse presses in recordings",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["browser preview clicks buttons drag overlay capture"],
},
{
id: "browser-link-target",
title: "Open links in",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["links default browser in-app browser external open"],
},
{
id: "browser-search-engine",
title: "Search engine",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom"],
},
{
id: "pull-request-links-open-in-app",
title: "Open pull requests in T3 Code",
- to: "/settings/integrations",
+ to: "/settings/diffs",
searchTerms: [
`pr links ${SOURCE_CONTROL_HOST_LABELS} browser external click default pull request view panel`,
],
@@ -823,7 +885,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "browser-auto-show-floating-preview",
title: "Auto-show floating preview",
- to: "/settings/integrations",
+ to: "/settings/browser",
searchTerms: ["agent opens browser device simulator pop into view hide"],
},
{
@@ -861,7 +923,8 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "git-fetch-interval",
title: "Git fetch interval",
- to: "/settings/source-control",
+ to: "/settings/maintenance",
+ targetId: "background-activity",
searchTerms: [
"automatic remote branch refresh background credentials security keys seconds off",
],
@@ -871,7 +934,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "worktree-branch-naming",
title: "Worktree branch naming",
- to: "/settings/source-control",
+ to: "/settings/worktrees",
searchTerms: ["static semantic prefix custom prompt instructions feat fix refactor chore"],
environmentOnly: true,
scope: "project-defaults",
@@ -938,7 +1001,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "environment-icon",
title: "Environment icon",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["machine glyph sidebar mac mini studio laptop desktop server cloud vm"],
},
@@ -946,14 +1009,13 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "local-environment",
title: "Local environment",
to: "/settings/connections",
- targetId: "connections-environment",
searchTerms: ["turn off on disable enable local server agents remote only restart"],
desktopOnly: true,
},
{
id: "network-access",
title: "Network access",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["expose backend remote pairing local machine interfaces host restart"],
localBackendManagementOnly: true,
@@ -961,7 +1023,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "tailscale-https",
title: "Tailscale HTTPS",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["serve magicdns endpoint remote secure network"],
desktopOnly: true,
@@ -970,7 +1032,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "wsl-backend",
title: "WSL backend",
- to: "/settings/connections",
+ to: "/settings/access",
searchTerms: [
"windows subsystem linux distro second server projects stop windows backend restart",
],
@@ -983,7 +1045,7 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "t3-connect",
localEnvironmentOnly: true,
title: "T3 Connect",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["managed tunnel cloud other devices remote"],
desktopOnly: true,
@@ -993,7 +1055,7 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "hold-webhooks-while-offline",
localEnvironmentOnly: true,
title: "Hold webhooks while offline",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["webhook automations offline queue mailbox t3 connect"],
cloudOnly: true,
@@ -1003,7 +1065,7 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "publish-agent-activity",
localEnvironmentOnly: true,
title: "Publish agent activity",
- to: "/settings/connections",
+ to: "/settings/access",
targetId: "connections-environment",
searchTerms: ["mobile push notifications live activities cloud tunnel"],
cloudOnly: true,
@@ -1011,7 +1073,7 @@ export const SETTINGS_SEARCH_ITEMS = [
{
id: "connections-environment",
title: "This machine",
- to: "/settings/connections",
+ to: "/settings/access",
searchTerms: [
"connections server backend local remote access administrative permissions scope pairing links qr code authorized clients sessions revoke endpoint",
],
@@ -1055,18 +1117,57 @@ const SETTINGS_CATEGORY_SCOPES: Readonly<Record<SettingsPath, SettingsSearchScop
"/settings/projects": "project",
"/settings/general": null,
"/settings/appearance": null,
+ "/settings/chat": null,
+ "/settings/diffs": null,
"/settings/snap-shot": null,
"/settings/keybindings": null,
"/settings/providers": null,
- "/settings/integrations": null,
+ "/settings/threads": null,
+ "/settings/browser": null,
+ "/settings/devices": null,
"/settings/source-control": "environment-defaults",
- "/settings/storage": "project-defaults",
+ "/settings/worktrees": "project-defaults",
"/settings/connections": "connections",
+ "/settings/access": "connections",
"/settings/scheduled-tasks": null,
- "/settings/beta": null,
+ "/settings/maintenance": null,
+ "/settings/labs": null,
+ "/settings/about": null,
"/settings/archived": "project-defaults",
};
+const RENAMED_SETTINGS_PATHS: Readonly<Record<string, SettingsPath>> = {
+ "/settings/integrations": "/settings/browser",
+ "/settings/storage": "/settings/maintenance",
+ "/settings/beta": "/settings/labs",
+};
+const SPLIT_SETTINGS_PATHS: ReadonlySet<string> = new Set([
+ "/settings/general",
+ "/settings/appearance",
+ "/settings/source-control",
+ "/settings/connections",
+ ...Object.keys(RENAMED_SETTINGS_PATHS),
+]);
+// Section anchors that moved but are not search results themselves.
+const MOVED_SECTION_ANCHORS: Readonly<Record<string, SettingsPath>> = {
+ "authorized-clients": "/settings/access",
+ "legacy-features": "/settings/labs",
+ "text-generation": "/settings/threads",
+ about: "/settings/about",
+};
+
+/** Where an old settings link now lives. Its anchor finds the page its row moved to. */
+export function movedSettingsPath(pathname: string, hash: string): SettingsPath | null {
+ if (!SPLIT_SETTINGS_PATHS.has(pathname)) return null;
+ const items: readonly SettingsSearchItem[] = SETTINGS_SEARCH_ITEMS;
+ const anchored = hash
+ ? (items.find((item) => item.id === hash) ?? items.find((item) => item.targetId === hash))
+ : undefined;
+ const to =
+ anchored?.to ?? MOVED_SECTION_ANCHORS[hash] ?? RENAMED_SETTINGS_PATHS[pathname] ?? null;
+ return to === pathname ? null : to;
+}
+
export function getSettingsSearchTargetScope(targetId: string) {
const items: readonly SettingsSearchItem[] = SETTINGS_SEARCH_ITEMS;
const item =
@@ -1143,18 +1244,6 @@ export function isSettingsSearchScopeAvailable(
}
}
-function settingsScopeKindFromSearch(search: SettingsScopeSearch): ResolvedSettingsScope["kind"] {
- const target = validateSettingsScopeSearch({ ...search });
- if (target.checkout && !target.project) return "unavailable";
- if (target.project) return target.checkout ? "checkout" : "project";
- return target.machine ? "environment" : "all";
-}
-
-export function isSettingsOverviewVisible(search: SettingsScopeSearch): boolean {
- const kind = settingsScopeKindFromSearch(search);
- return kind === "project" || kind === "checkout";
-}
-
export function searchableSetting(id: SettingsSearchItemId): {
readonly id: string;
readonly title: string;
@@ -1237,14 +1326,10 @@ export function searchSettings(
.map(({ item }) => item);
}
-// Font smoothing only renders on macOS, so a search jump to it elsewhere
-// must not flip the section - the target would never mount to be scrolled to.
+// These rows only exist with separate fonts on, so a search jump to one turns them on.
const ADVANCED_TYPOGRAPHY_TARGET_IDS: ReadonlySet<string> = new Set([
"prompt-font",
"terminal-font",
- ...(typeof navigator !== "undefined" && isMacPlatform(navigator.platform)
- ? ["font-smoothing"]
- : []),
]);
export function isAdvancedTypographyTarget(targetId: string): boolean {
diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts
index d79eee32001..d92ea611086 100644
--- a/apps/web/src/routeTree.gen.ts
+++ b/apps/web/src/routeTree.gen.ts
@@ -21,6 +21,8 @@ import { Route as ChatUsageRouteImport } from './routes/_chat.usage'
import { Route as ChatSettingsRouteImport } from './routes/_chat.settings'
import { Route as ChatPullRequestsRouteImport } from './routes/_chat.pull-requests'
import { Route as ChatNewRouteImport } from './routes/_chat.new'
+import { Route as ChatSettingsWorktreesRouteImport } from './routes/_chat.settings.worktrees'
+import { Route as ChatSettingsThreadsRouteImport } from './routes/_chat.settings.threads'
import { Route as ChatSettingsStorageRouteImport } from './routes/_chat.settings.storage'
import { Route as ChatSettingsSourceControlRouteImport } from './routes/_chat.settings.source-control'
import { Route as ChatSettingsSnapShotRouteImport } from './routes/_chat.settings.snap-shot'
@@ -28,14 +30,22 @@ import { Route as ChatSettingsScheduledTasksRouteImport } from './routes/_chat.s
import { Route as ChatSettingsProvidersRouteImport } from './routes/_chat.settings.providers'
import { Route as ChatSettingsProjectsRouteImport } from './routes/_chat.settings.projects'
import { Route as ChatSettingsOpenSourceLicensesRouteImport } from './routes/_chat.settings.open-source-licenses'
+import { Route as ChatSettingsMaintenanceRouteImport } from './routes/_chat.settings.maintenance'
+import { Route as ChatSettingsLabsRouteImport } from './routes/_chat.settings.labs'
import { Route as ChatSettingsKeybindingsRouteImport } from './routes/_chat.settings.keybindings'
import { Route as ChatSettingsIntegrationsRouteImport } from './routes/_chat.settings.integrations'
import { Route as ChatSettingsGeneralRouteImport } from './routes/_chat.settings.general'
+import { Route as ChatSettingsDiffsRouteImport } from './routes/_chat.settings.diffs'
import { Route as ChatSettingsDiagnosticsRouteImport } from './routes/_chat.settings.diagnostics'
+import { Route as ChatSettingsDevicesRouteImport } from './routes/_chat.settings.devices'
import { Route as ChatSettingsConnectionsRouteImport } from './routes/_chat.settings.connections'
+import { Route as ChatSettingsChatRouteImport } from './routes/_chat.settings.chat'
+import { Route as ChatSettingsBrowserRouteImport } from './routes/_chat.settings.browser'
import { Route as ChatSettingsBetaRouteImport } from './routes/_chat.settings.beta'
import { Route as ChatSettingsArchivedRouteImport } from './routes/_chat.settings.archived'
import { Route as ChatSettingsAppearanceRouteImport } from './routes/_chat.settings.appearance'
+import { Route as ChatSettingsAccessRouteImport } from './routes/_chat.settings.access'
+import { Route as ChatSettingsAboutRouteImport } from './routes/_chat.settings.about'
import { Route as ChatDraftDraftIdRouteImport } from './routes/_chat.draft.$draftId'
import { Route as ChatEnvironmentIdThreadIdRouteImport } from './routes/_chat.$environmentId.$threadId'
@@ -98,6 +108,16 @@ const ChatNewRoute = ChatNewRouteImport.update({
path: '/new',
getParentRoute: () => ChatRoute,
} as any)
+const ChatSettingsWorktreesRoute = ChatSettingsWorktreesRouteImport.update({
+ id: '/worktrees',
+ path: '/worktrees',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
+const ChatSettingsThreadsRoute = ChatSettingsThreadsRouteImport.update({
+ id: '/threads',
+ path: '/threads',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatSettingsStorageRoute = ChatSettingsStorageRouteImport.update({
id: '/storage',
path: '/storage',
@@ -136,6 +156,16 @@ const ChatSettingsOpenSourceLicensesRoute =
path: '/open-source-licenses',
getParentRoute: () => ChatSettingsRoute,
} as any)
+const ChatSettingsMaintenanceRoute = ChatSettingsMaintenanceRouteImport.update({
+ id: '/maintenance',
+ path: '/maintenance',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
+const ChatSettingsLabsRoute = ChatSettingsLabsRouteImport.update({
+ id: '/labs',
+ path: '/labs',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatSettingsKeybindingsRoute = ChatSettingsKeybindingsRouteImport.update({
id: '/keybindings',
path: '/keybindings',
@@ -152,16 +182,36 @@ const ChatSettingsGeneralRoute = ChatSettingsGeneralRouteImport.update({
path: '/general',
getParentRoute: () => ChatSettingsRoute,
} as any)
+const ChatSettingsDiffsRoute = ChatSettingsDiffsRouteImport.update({
+ id: '/diffs',
+ path: '/diffs',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatSettingsDiagnosticsRoute = ChatSettingsDiagnosticsRouteImport.update({
id: '/diagnostics',
path: '/diagnostics',
getParentRoute: () => ChatSettingsRoute,
} as any)
+const ChatSettingsDevicesRoute = ChatSettingsDevicesRouteImport.update({
+ id: '/devices',
+ path: '/devices',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatSettingsConnectionsRoute = ChatSettingsConnectionsRouteImport.update({
id: '/connections',
path: '/connections',
getParentRoute: () => ChatSettingsRoute,
} as any)
+const ChatSettingsChatRoute = ChatSettingsChatRouteImport.update({
+ id: '/chat',
+ path: '/chat',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
+const ChatSettingsBrowserRoute = ChatSettingsBrowserRouteImport.update({
+ id: '/browser',
+ path: '/browser',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatSettingsBetaRoute = ChatSettingsBetaRouteImport.update({
id: '/beta',
path: '/beta',
@@ -177,6 +227,16 @@ const ChatSettingsAppearanceRoute = ChatSettingsAppearanceRouteImport.update({
path: '/appearance',
getParentRoute: () => ChatSettingsRoute,
} as any)
+const ChatSettingsAccessRoute = ChatSettingsAccessRouteImport.update({
+ id: '/access',
+ path: '/access',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
+const ChatSettingsAboutRoute = ChatSettingsAboutRouteImport.update({
+ id: '/about',
+ path: '/about',
+ getParentRoute: () => ChatSettingsRoute,
+} as any)
const ChatDraftDraftIdRoute = ChatDraftDraftIdRouteImport.update({
id: '/draft/$draftId',
path: '/draft/$draftId',
@@ -203,14 +263,22 @@ export interface FileRoutesByFullPath {
'/projects/$projectKey': typeof ProjectsProjectKeyRoute
'/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
'/draft/$draftId': typeof ChatDraftDraftIdRoute
+ '/settings/about': typeof ChatSettingsAboutRoute
+ '/settings/access': typeof ChatSettingsAccessRoute
'/settings/appearance': typeof ChatSettingsAppearanceRoute
'/settings/archived': typeof ChatSettingsArchivedRoute
'/settings/beta': typeof ChatSettingsBetaRoute
+ '/settings/browser': typeof ChatSettingsBrowserRoute
+ '/settings/chat': typeof ChatSettingsChatRoute
'/settings/connections': typeof ChatSettingsConnectionsRoute
+ '/settings/devices': typeof ChatSettingsDevicesRoute
'/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
+ '/settings/diffs': typeof ChatSettingsDiffsRoute
'/settings/general': typeof ChatSettingsGeneralRoute
'/settings/integrations': typeof ChatSettingsIntegrationsRoute
'/settings/keybindings': typeof ChatSettingsKeybindingsRoute
+ '/settings/labs': typeof ChatSettingsLabsRoute
+ '/settings/maintenance': typeof ChatSettingsMaintenanceRoute
'/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
'/settings/projects': typeof ChatSettingsProjectsRoute
'/settings/providers': typeof ChatSettingsProvidersRoute
@@ -218,6 +286,8 @@ export interface FileRoutesByFullPath {
'/settings/snap-shot': typeof ChatSettingsSnapShotRoute
'/settings/source-control': typeof ChatSettingsSourceControlRoute
'/settings/storage': typeof ChatSettingsStorageRoute
+ '/settings/threads': typeof ChatSettingsThreadsRoute
+ '/settings/worktrees': typeof ChatSettingsWorktreesRoute
}
export interface FileRoutesByTo {
'/connect': typeof ConnectRoute
@@ -233,14 +303,22 @@ export interface FileRoutesByTo {
'/': typeof ChatIndexRoute
'/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
'/draft/$draftId': typeof ChatDraftDraftIdRoute
+ '/settings/about': typeof ChatSettingsAboutRoute
+ '/settings/access': typeof ChatSettingsAccessRoute
'/settings/appearance': typeof ChatSettingsAppearanceRoute
'/settings/archived': typeof ChatSettingsArchivedRoute
'/settings/beta': typeof ChatSettingsBetaRoute
+ '/settings/browser': typeof ChatSettingsBrowserRoute
+ '/settings/chat': typeof ChatSettingsChatRoute
'/settings/connections': typeof ChatSettingsConnectionsRoute
+ '/settings/devices': typeof ChatSettingsDevicesRoute
'/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
+ '/settings/diffs': typeof ChatSettingsDiffsRoute
'/settings/general': typeof ChatSettingsGeneralRoute
'/settings/integrations': typeof ChatSettingsIntegrationsRoute
'/settings/keybindings': typeof ChatSettingsKeybindingsRoute
+ '/settings/labs': typeof ChatSettingsLabsRoute
+ '/settings/maintenance': typeof ChatSettingsMaintenanceRoute
'/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
'/settings/projects': typeof ChatSettingsProjectsRoute
'/settings/providers': typeof ChatSettingsProvidersRoute
@@ -248,6 +326,8 @@ export interface FileRoutesByTo {
'/settings/snap-shot': typeof ChatSettingsSnapShotRoute
'/settings/source-control': typeof ChatSettingsSourceControlRoute
'/settings/storage': typeof ChatSettingsStorageRoute
+ '/settings/threads': typeof ChatSettingsThreadsRoute
+ '/settings/worktrees': typeof ChatSettingsWorktreesRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
@@ -265,14 +345,22 @@ export interface FileRoutesById {
'/_chat/': typeof ChatIndexRoute
'/_chat/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
'/_chat/draft/$draftId': typeof ChatDraftDraftIdRoute
+ '/_chat/settings/about': typeof ChatSettingsAboutRoute
+ '/_chat/settings/access': typeof ChatSettingsAccessRoute
'/_chat/settings/appearance': typeof ChatSettingsAppearanceRoute
'/_chat/settings/archived': typeof ChatSettingsArchivedRoute
'/_chat/settings/beta': typeof ChatSettingsBetaRoute
+ '/_chat/settings/browser': typeof ChatSettingsBrowserRoute
+ '/_chat/settings/chat': typeof ChatSettingsChatRoute
'/_chat/settings/connections': typeof ChatSettingsConnectionsRoute
+ '/_chat/settings/devices': typeof ChatSettingsDevicesRoute
'/_chat/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
+ '/_chat/settings/diffs': typeof ChatSettingsDiffsRoute
'/_chat/settings/general': typeof ChatSettingsGeneralRoute
'/_chat/settings/integrations': typeof ChatSettingsIntegrationsRoute
'/_chat/settings/keybindings': typeof ChatSettingsKeybindingsRoute
+ '/_chat/settings/labs': typeof ChatSettingsLabsRoute
+ '/_chat/settings/maintenance': typeof ChatSettingsMaintenanceRoute
'/_chat/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
'/_chat/settings/projects': typeof ChatSettingsProjectsRoute
'/_chat/settings/providers': typeof ChatSettingsProvidersRoute
@@ -280,6 +368,8 @@ export interface FileRoutesById {
'/_chat/settings/snap-shot': typeof ChatSettingsSnapShotRoute
'/_chat/settings/source-control': typeof ChatSettingsSourceControlRoute
'/_chat/settings/storage': typeof ChatSettingsStorageRoute
+ '/_chat/settings/threads': typeof ChatSettingsThreadsRoute
+ '/_chat/settings/worktrees': typeof ChatSettingsWorktreesRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
@@ -297,14 +387,22 @@ export interface FileRouteTypes {
| '/projects/$projectKey'
| '/$environmentId/$threadId'
| '/draft/$draftId'
+ | '/settings/about'
+ | '/settings/access'
| '/settings/appearance'
| '/settings/archived'
| '/settings/beta'
+ | '/settings/browser'
+ | '/settings/chat'
| '/settings/connections'
+ | '/settings/devices'
| '/settings/diagnostics'
+ | '/settings/diffs'
| '/settings/general'
| '/settings/integrations'
| '/settings/keybindings'
+ | '/settings/labs'
+ | '/settings/maintenance'
| '/settings/open-source-licenses'
| '/settings/projects'
| '/settings/providers'
@@ -312,6 +410,8 @@ export interface FileRouteTypes {
| '/settings/snap-shot'
| '/settings/source-control'
| '/settings/storage'
+ | '/settings/threads'
+ | '/settings/worktrees'
fileRoutesByTo: FileRoutesByTo
to:
| '/connect'
@@ -327,14 +427,22 @@ export interface FileRouteTypes {
| '/'
| '/$environmentId/$threadId'
| '/draft/$draftId'
+ | '/settings/about'
+ | '/settings/access'
| '/settings/appearance'
| '/settings/archived'
| '/settings/beta'
+ | '/settings/browser'
+ | '/settings/chat'
| '/settings/connections'
+ | '/settings/devices'
| '/settings/diagnostics'
+ | '/settings/diffs'
| '/settings/general'
| '/settings/integrations'
| '/settings/keybindings'
+ | '/settings/labs'
+ | '/settings/maintenance'
| '/settings/open-source-licenses'
| '/settings/projects'
| '/settings/providers'
@@ -342,6 +450,8 @@ export interface FileRouteTypes {
| '/settings/snap-shot'
| '/settings/source-control'
| '/settings/storage'
+ | '/settings/threads'
+ | '/settings/worktrees'
id:
| '__root__'
| '/_chat'
@@ -358,14 +468,22 @@ export interface FileRouteTypes {
| '/_chat/'
| '/_chat/$environmentId/$threadId'
| '/_chat/draft/$draftId'
+ | '/_chat/settings/about'
+ | '/_chat/settings/access'
| '/_chat/settings/appearance'
| '/_chat/settings/archived'
| '/_chat/settings/beta'
+ | '/_chat/settings/browser'
+ | '/_chat/settings/chat'
| '/_chat/settings/connections'
+ | '/_chat/settings/devices'
| '/_chat/settings/diagnostics'
+ | '/_chat/settings/diffs'
| '/_chat/settings/general'
| '/_chat/settings/integrations'
| '/_chat/settings/keybindings'
+ | '/_chat/settings/labs'
+ | '/_chat/settings/maintenance'
| '/_chat/settings/open-source-licenses'
| '/_chat/settings/projects'
| '/_chat/settings/providers'
@@ -373,6 +491,8 @@ export interface FileRouteTypes {
| '/_chat/settings/snap-shot'
| '/_chat/settings/source-control'
| '/_chat/settings/storage'
+ | '/_chat/settings/threads'
+ | '/_chat/settings/worktrees'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
@@ -471,6 +591,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatNewRouteImport
parentRoute: typeof ChatRoute
}
+ '/_chat/settings/worktrees': {
+ id: '/_chat/settings/worktrees'
+ path: '/worktrees'
+ fullPath: '/settings/worktrees'
+ preLoaderRoute: typeof ChatSettingsWorktreesRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
+ '/_chat/settings/threads': {
+ id: '/_chat/settings/threads'
+ path: '/threads'
+ fullPath: '/settings/threads'
+ preLoaderRoute: typeof ChatSettingsThreadsRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/settings/storage': {
id: '/_chat/settings/storage'
path: '/storage'
@@ -520,6 +654,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatSettingsOpenSourceLicensesRouteImport
parentRoute: typeof ChatSettingsRoute
}
+ '/_chat/settings/maintenance': {
+ id: '/_chat/settings/maintenance'
+ path: '/maintenance'
+ fullPath: '/settings/maintenance'
+ preLoaderRoute: typeof ChatSettingsMaintenanceRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
+ '/_chat/settings/labs': {
+ id: '/_chat/settings/labs'
+ path: '/labs'
+ fullPath: '/settings/labs'
+ preLoaderRoute: typeof ChatSettingsLabsRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/settings/keybindings': {
id: '/_chat/settings/keybindings'
path: '/keybindings'
@@ -541,6 +689,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatSettingsGeneralRouteImport
parentRoute: typeof ChatSettingsRoute
}
+ '/_chat/settings/diffs': {
+ id: '/_chat/settings/diffs'
+ path: '/diffs'
+ fullPath: '/settings/diffs'
+ preLoaderRoute: typeof ChatSettingsDiffsRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/settings/diagnostics': {
id: '/_chat/settings/diagnostics'
path: '/diagnostics'
@@ -548,6 +703,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatSettingsDiagnosticsRouteImport
parentRoute: typeof ChatSettingsRoute
}
+ '/_chat/settings/devices': {
+ id: '/_chat/settings/devices'
+ path: '/devices'
+ fullPath: '/settings/devices'
+ preLoaderRoute: typeof ChatSettingsDevicesRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/settings/connections': {
id: '/_chat/settings/connections'
path: '/connections'
@@ -555,6 +717,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatSettingsConnectionsRouteImport
parentRoute: typeof ChatSettingsRoute
}
+ '/_chat/settings/chat': {
+ id: '/_chat/settings/chat'
+ path: '/chat'
+ fullPath: '/settings/chat'
+ preLoaderRoute: typeof ChatSettingsChatRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
+ '/_chat/settings/browser': {
+ id: '/_chat/settings/browser'
+ path: '/browser'
+ fullPath: '/settings/browser'
+ preLoaderRoute: typeof ChatSettingsBrowserRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/settings/beta': {
id: '/_chat/settings/beta'
path: '/beta'
@@ -576,6 +752,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatSettingsAppearanceRouteImport
parentRoute: typeof ChatSettingsRoute
}
+ '/_chat/settings/access': {
+ id: '/_chat/settings/access'
+ path: '/access'
+ fullPath: '/settings/access'
+ preLoaderRoute: typeof ChatSettingsAccessRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
+ '/_chat/settings/about': {
+ id: '/_chat/settings/about'
+ path: '/about'
+ fullPath: '/settings/about'
+ preLoaderRoute: typeof ChatSettingsAboutRouteImport
+ parentRoute: typeof ChatSettingsRoute
+ }
'/_chat/draft/$draftId': {
id: '/_chat/draft/$draftId'
path: '/draft/$draftId'
@@ -594,14 +784,22 @@ declare module '@tanstack/react-router' {
}
interface ChatSettingsRouteChildren {
+ ChatSettingsAboutRoute: typeof ChatSettingsAboutRoute
+ ChatSettingsAccessRoute: typeof ChatSettingsAccessRoute
ChatSettingsAppearanceRoute: typeof ChatSettingsAppearanceRoute
ChatSettingsArchivedRoute: typeof ChatSettingsArchivedRoute
ChatSettingsBetaRoute: typeof ChatSettingsBetaRoute
+ ChatSettingsBrowserRoute: typeof ChatSettingsBrowserRoute
+ ChatSettingsChatRoute: typeof ChatSettingsChatRoute
ChatSettingsConnectionsRoute: typeof ChatSettingsConnectionsRoute
+ ChatSettingsDevicesRoute: typeof ChatSettingsDevicesRoute
ChatSettingsDiagnosticsRoute: typeof ChatSettingsDiagnosticsRoute
+ ChatSettingsDiffsRoute: typeof ChatSettingsDiffsRoute
ChatSettingsGeneralRoute: typeof ChatSettingsGeneralRoute
ChatSettingsIntegrationsRoute: typeof ChatSettingsIntegrationsRoute
ChatSettingsKeybindingsRoute: typeof ChatSettingsKeybindingsRoute
+ ChatSettingsLabsRoute: typeof ChatSettingsLabsRoute
+ ChatSettingsMaintenanceRoute: typeof ChatSettingsMaintenanceRoute
ChatSettingsOpenSourceLicensesRoute: typeof ChatSettingsOpenSourceLicensesRoute
ChatSettingsProjectsRoute: typeof ChatSettingsProjectsRoute
ChatSettingsProvidersRoute: typeof ChatSettingsProvidersRoute
@@ -609,17 +807,27 @@ interface ChatSettingsRouteChildren {
ChatSettingsSnapShotRoute: typeof ChatSettingsSnapShotRoute
ChatSettingsSourceControlRoute: typeof ChatSettingsSourceControlRoute
ChatSettingsStorageRoute: typeof ChatSettingsStorageRoute
+ ChatSettingsThreadsRoute: typeof ChatSettingsThreadsRoute
+ ChatSettingsWorktreesRoute: typeof ChatSettingsWorktreesRoute
}
const ChatSettingsRouteChildren: ChatSettingsRouteChildren = {
+ ChatSettingsAboutRoute: ChatSettingsAboutRoute,
+ ChatSettingsAccessRoute: ChatSettingsAccessRoute,
ChatSettingsAppearanceRoute: ChatSettingsAppearanceRoute,
ChatSettingsArchivedRoute: ChatSettingsArchivedRoute,
ChatSettingsBetaRoute: ChatSettingsBetaRoute,
+ ChatSettingsBrowserRoute: ChatSettingsBrowserRoute,
+ ChatSettingsChatRoute: ChatSettingsChatRoute,
ChatSettingsConnectionsRoute: ChatSettingsConnectionsRoute,
+ ChatSettingsDevicesRoute: ChatSettingsDevicesRoute,
ChatSettingsDiagnosticsRoute: ChatSettingsDiagnosticsRoute,
+ ChatSettingsDiffsRoute: ChatSettingsDiffsRoute,
ChatSettingsGeneralRoute: ChatSettingsGeneralRoute,
ChatSettingsIntegrationsRoute: ChatSettingsIntegrationsRoute,
ChatSettingsKeybindingsRoute: ChatSettingsKeybindingsRoute,
+ ChatSettingsLabsRoute: ChatSettingsLabsRoute,
+ ChatSettingsMaintenanceRoute: ChatSettingsMaintenanceRoute,
ChatSettingsOpenSourceLicensesRoute: ChatSettingsOpenSourceLicensesRoute,
ChatSettingsProjectsRoute: ChatSettingsProjectsRoute,
ChatSettingsProvidersRoute: ChatSettingsProvidersRoute,
@@ -627,6 +835,8 @@ const ChatSettingsRouteChildren: ChatSettingsRouteChildren = {
ChatSettingsSnapShotRoute: ChatSettingsSnapShotRoute,
ChatSettingsSourceControlRoute: ChatSettingsSourceControlRoute,
ChatSettingsStorageRoute: ChatSettingsStorageRoute,
+ ChatSettingsThreadsRoute: ChatSettingsThreadsRoute,
+ ChatSettingsWorktreesRoute: ChatSettingsWorktreesRoute,
}
const ChatSettingsRouteWithChildren = ChatSettingsRoute._addFileChildren(
diff --git a/apps/web/src/routes/_chat.settings.about.tsx b/apps/web/src/routes/_chat.settings.about.tsx
new file mode 100644
index 00000000000..8571603621e
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.about.tsx
@@ -0,0 +1,4 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { AboutSettingsPanel } from "../components/settings/SettingsPanels";
+
+export const Route = createFileRoute("/_chat/settings/about")({ component: AboutSettingsPanel });
diff --git a/apps/web/src/routes/_chat.settings.access.tsx b/apps/web/src/routes/_chat.settings.access.tsx
new file mode 100644
index 00000000000..08789621dee
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.access.tsx
@@ -0,0 +1,10 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { ConnectionsSettings } from "../components/settings/ConnectionsSettings";
+
+function SettingsAccessRoute() {
+ return <ConnectionsSettings view="access" />;
+}
+
+export const Route = createFileRoute("/_chat/settings/access")({
+ component: SettingsAccessRoute,
+});
diff --git a/apps/web/src/routes/_chat.settings.beta.tsx b/apps/web/src/routes/_chat.settings.beta.tsx
index 24f0a9d78fd..9b915a76059 100644
--- a/apps/web/src/routes/_chat.settings.beta.tsx
+++ b/apps/web/src/routes/_chat.settings.beta.tsx
@@ -1,5 +1,4 @@
import { createFileRoute } from "@tanstack/react-router";
-import { BetaSettingsPanel } from "../components/settings/BetaSettingsPanel";
-
-export const Route = createFileRoute("/_chat/settings/beta")({ component: BetaSettingsPanel });
+// Renamed to /settings/labs; the settings route redirects old links.
+export const Route = createFileRoute("/_chat/settings/beta")({});
diff --git a/apps/web/src/routes/_chat.settings.browser.tsx b/apps/web/src/routes/_chat.settings.browser.tsx
new file mode 100644
index 00000000000..b2a6aadb648
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.browser.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { BrowserSettingsPanel } from "../components/settings/IntegrationsSettings";
+
+export const Route = createFileRoute("/_chat/settings/browser")({
+ component: BrowserSettingsPanel,
+});
diff --git a/apps/web/src/routes/_chat.settings.chat.tsx b/apps/web/src/routes/_chat.settings.chat.tsx
new file mode 100644
index 00000000000..cb43890a984
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.chat.tsx
@@ -0,0 +1,4 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { ChatSettingsPanel } from "../components/settings/SettingsPanels";
+
+export const Route = createFileRoute("/_chat/settings/chat")({ component: ChatSettingsPanel });
diff --git a/apps/web/src/routes/_chat.settings.connections.tsx b/apps/web/src/routes/_chat.settings.connections.tsx
index a8763e2ad12..be7d4654ea6 100644
--- a/apps/web/src/routes/_chat.settings.connections.tsx
+++ b/apps/web/src/routes/_chat.settings.connections.tsx
@@ -1,7 +1,10 @@
import { createFileRoute } from "@tanstack/react-router";
-
import { ConnectionsSettings } from "../components/settings/ConnectionsSettings";
+function SettingsConnectionsRoute() {
+ return <ConnectionsSettings view="environments" />;
+}
+
export const Route = createFileRoute("/_chat/settings/connections")({
- component: ConnectionsSettings,
+ component: SettingsConnectionsRoute,
});
diff --git a/apps/web/src/routes/_chat.settings.devices.tsx b/apps/web/src/routes/_chat.settings.devices.tsx
new file mode 100644
index 00000000000..0d71da9af79
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.devices.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { DevicesSettingsPanel } from "../components/settings/IntegrationsSettings";
+
+export const Route = createFileRoute("/_chat/settings/devices")({
+ component: DevicesSettingsPanel,
+});
diff --git a/apps/web/src/routes/_chat.settings.diffs.tsx b/apps/web/src/routes/_chat.settings.diffs.tsx
new file mode 100644
index 00000000000..819c8095d2f
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.diffs.tsx
@@ -0,0 +1,4 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { DiffsSettingsPanel } from "../components/settings/SettingsPanels";
+
+export const Route = createFileRoute("/_chat/settings/diffs")({ component: DiffsSettingsPanel });
diff --git a/apps/web/src/routes/_chat.settings.integrations.tsx b/apps/web/src/routes/_chat.settings.integrations.tsx
index e8dd1cb50e6..78e1ee72cac 100644
--- a/apps/web/src/routes/_chat.settings.integrations.tsx
+++ b/apps/web/src/routes/_chat.settings.integrations.tsx
@@ -1,7 +1,4 @@
import { createFileRoute } from "@tanstack/react-router";
-import { IntegrationsSettingsPanel } from "../components/settings/IntegrationsSettings";
-
-export const Route = createFileRoute("/_chat/settings/integrations")({
- component: IntegrationsSettingsPanel,
-});
+// Renamed to /settings/browser; the settings route redirects old links.
+export const Route = createFileRoute("/_chat/settings/integrations")({});
diff --git a/apps/web/src/routes/_chat.settings.labs.tsx b/apps/web/src/routes/_chat.settings.labs.tsx
new file mode 100644
index 00000000000..eb2fc487b9c
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.labs.tsx
@@ -0,0 +1,4 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { LabsSettingsPanel } from "../components/settings/LabsSettingsPanel";
+
+export const Route = createFileRoute("/_chat/settings/labs")({ component: LabsSettingsPanel });
diff --git a/apps/web/src/routes/_chat.settings.maintenance.tsx b/apps/web/src/routes/_chat.settings.maintenance.tsx
new file mode 100644
index 00000000000..fb3edd44b8f
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.maintenance.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { MaintenanceSettingsPanel } from "../components/settings/SettingsPanels";
+
+export const Route = createFileRoute("/_chat/settings/maintenance")({
+ component: MaintenanceSettingsPanel,
+});
diff --git a/apps/web/src/routes/_chat.settings.storage.tsx b/apps/web/src/routes/_chat.settings.storage.tsx
index 93b6fc01c21..c0a16b05d08 100644
--- a/apps/web/src/routes/_chat.settings.storage.tsx
+++ b/apps/web/src/routes/_chat.settings.storage.tsx
@@ -1,6 +1,4 @@
import { createFileRoute } from "@tanstack/react-router";
-import { StorageSettingsPanel } from "../components/settings/StorageSettings";
-export const Route = createFileRoute("/_chat/settings/storage")({
- component: StorageSettingsPanel,
-});
+// Renamed to /settings/maintenance; the settings route redirects old links.
+export const Route = createFileRoute("/_chat/settings/storage")({});
diff --git a/apps/web/src/routes/_chat.settings.threads.tsx b/apps/web/src/routes/_chat.settings.threads.tsx
new file mode 100644
index 00000000000..1a1ae6fe414
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.threads.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { ThreadsSettingsPanel } from "../components/settings/SettingsPanels";
+
+export const Route = createFileRoute("/_chat/settings/threads")({
+ component: ThreadsSettingsPanel,
+});
diff --git a/apps/web/src/routes/_chat.settings.tsx b/apps/web/src/routes/_chat.settings.tsx
index de61b1cca8e..0dccf0b30c2 100644
--- a/apps/web/src/routes/_chat.settings.tsx
+++ b/apps/web/src/routes/_chat.settings.tsx
@@ -23,6 +23,7 @@ import {
getSettingsSearchTargetScope,
getThreadAutoSettlementSearchAvailability,
isSettingsSearchScopeAvailable,
+ movedSettingsPath,
} from "../components/settings/settingsSearch";
function RestoreDeviceDefaultsButton({ onRestored }: { onRestored: () => void }) {
@@ -174,6 +175,8 @@ export const Route = createFileRoute("/_chat/settings")({
if (location.pathname === "/settings") {
throw redirect({ to: "/settings/general", replace: true });
}
+ const moved = movedSettingsPath(location.pathname, location.hash);
+ if (moved) throw redirect({ to: moved, search: true, hash: true, replace: true });
},
component: SettingsRouteLayout,
});
diff --git a/apps/web/src/routes/_chat.settings.worktrees.tsx b/apps/web/src/routes/_chat.settings.worktrees.tsx
new file mode 100644
index 00000000000..55067eb09e9
--- /dev/null
+++ b/apps/web/src/routes/_chat.settings.worktrees.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { WorktreesSettingsPanel } from "../components/settings/WorktreesSettings";
+
+export const Route = createFileRoute("/_chat/settings/worktrees")({
+ component: WorktreesSettingsPanel,
+});
diff --git a/apps/web/src/terminal/ghostty/surface.ts b/apps/web/src/terminal/ghostty/surface.ts
index 964a947f67a..321bc0b48cc 100644
--- a/apps/web/src/terminal/ghostty/surface.ts
+++ b/apps/web/src/terminal/ghostty/surface.ts
@@ -768,6 +768,11 @@ export class GhosttyTerminalSurface {
this.refreshHoveredLink();
}
+ /** Mount height, in CSS pixels, that shows exactly `rows` rows at the current font. */
+ heightForRows(rows: number): number {
+ return Math.ceil(rows * this.metrics.height + CONTENT_PADDING * 2);
+ }
+
async setFont(font: GhosttyTerminalFont): Promise<void> {
if (this.disposed) return;
const fontSize = terminalFontSize(font.size);
diff --git a/apps/web/test/appScenarios.renders.tsx b/apps/web/test/appScenarios.renders.tsx
index 897e1cb02ab..9c1a7d520ee 100644
--- a/apps/web/test/appScenarios.renders.tsx
+++ b/apps/web/test/appScenarios.renders.tsx
@@ -252,7 +252,7 @@ const openSettings =
(router: AppRouter, to: "/settings/general" | "/settings/appearance") => async () => {
await act(() => router.navigate({ to }));
// A section title from each page, since neither page has a heading that names it.
- const name = to === "/settings/general" ? "Time format" : "Motion";
+ const name = to === "/settings/general" ? "Time format" : "Interface";
await expect.element(page.getByRole("heading", { name, exact: true })).toBeVisible();
// Appearance highlights its code font preview off-thread, then attaches it in a shadow root.
if (to === "/settings/appearance") {
diff --git a/docs/user/background-service.md b/docs/user/background-service.md
index e93cf7a0d96..be4ad66ff3a 100644
--- a/docs/user/background-service.md
+++ b/docs/user/background-service.md
@@ -135,7 +135,7 @@ For failures after signing in to T3 Connect, see
T3 Code removes superseded internal history on its own while it runs; your
conversations are kept. Databases created before this shrank automatically
still hold the freed space on disk until a one-time offline repair returns it
-and turns on automatic shrinking. Settings > Storage (web and desktop) or
+and turns on automatic shrinking. Settings > Maintenance (web and desktop) or
Settings > Maintenance (mobile) suggests the repair when at least 1 GiB can be
reclaimed.
diff --git a/docs/user/browser-import.md b/docs/user/browser-import.md
index ab1465e00bf..194249d6910 100644
--- a/docs/user/browser-import.md
+++ b/docs/user/browser-import.md
@@ -3,7 +3,7 @@
The desktop app can import cookies from another browser so you can reuse its signed-in sessions
in the preview browser.
-Open **Settings → Integrations → Browser profiles → Add profile**, then choose a browser under
+Open **Settings → Browser → Browser profiles → Add profile**, then choose a browser under
**Import from**. Close the source browser before importing, and allow an operating-system keyring
unlock prompt if one appears.
diff --git a/docs/user/composer.md b/docs/user/composer.md
index 6fe436af306..acd49abdebf 100644
--- a/docs/user/composer.md
+++ b/docs/user/composer.md
@@ -51,7 +51,7 @@ See [images and videos](#images-and-videos-in-messages) for previewing and savin
## Send while the agent is working
-On web and desktop, choose **Settings → General → Follow-up behavior** to queue
+On web and desktop, choose **Settings → Chat → Follow-up behavior** to queue
new messages for a later turn or steer the running turn immediately. The setting
applies to this client; already queued messages keep their place. Queued messages
are saved on the server and can be edited, reordered, or removed above the composer.
@@ -227,8 +227,8 @@ Type `/` for commands or `$` to add a skill from the selected environment and
provider. On mobile, both are also available before starting a thread on
**New task**.
-The slash menu also includes skills unless you turn off **Settings → General →
-Show skills in slash menu**. Only skills enabled for the provider are listed.
+The slash menu also includes skills unless you turn off **Settings → Chat →
+Show skills in slash menu**, under Advanced. Only skills enabled for the provider are listed.
After you add or change skills, plugins, or MCP servers, use **Restart agent
session** in the command palette on web and desktop. The conversation continues,
diff --git a/docs/user/devices.md b/docs/user/devices.md
index 6c32f94eeca..42c0db4b27a 100644
--- a/docs/user/devices.md
+++ b/docs/user/devices.md
@@ -22,7 +22,7 @@ Choose **Float device over chat** in the toolbar to keep watching and tapping th
device in a small window while the right panel shows something else; drag the
window by its handle, resize it from any edge, and use **Open in right panel**
to bring it back.
-Turn off the device hub in **Settings → Integrations → Devices** to stop the
+Turn off the device hub in **Settings → Devices** to stop the
helper processes; simulators and emulators keep running until you power them
off.
@@ -70,7 +70,7 @@ back from the device after a change.
When an agent opens a device, it floats over the chat in web and desktop clients
connected to the thread, the same way an agent-driven browser does. Turn off
-**Auto-show floating preview** in **Settings → Integrations → Browser** to open a
+**Auto-show floating preview** in **Settings → Browser** to open a
right-panel tab instead. In the mobile app, open the agent's thread and tap the
device button above the composer to watch the live screen and control it.
On iOS layouts with an inspector, the device opens beside the thread. Maximize
@@ -86,7 +86,7 @@ once per server. Restart an existing agent session after granting access so it
receives the device CLI environment.
To keep agents away from simulators, turn off **Agent device access** in
-**Settings → Integrations → Devices**. This hides the device tools from agents
+**Settings → Devices**. This hides the device tools from agents
started from then on; your own Device panel is unaffected.
## Remote connections
@@ -98,7 +98,7 @@ still-image stream and Android cannot show video.
## SSH device hosts
-In Settings → Integrations → Devices, choose the environments that should use
+In Settings → Devices, choose the environments that should use
the host and add it under **Device hosts**. Enter an SSH alias or `user@host`, with
an optional identity file and port. These resolve on the environment server,
so use the SSH configuration and keys available there. Password prompts are
@@ -125,6 +125,6 @@ localhost without forwarding or another reachable address.
## Device tool updates
-The connected T3 server manages the device hub and agent tools on its own machine and configured SSH hosts. Required versions install automatically the next time those tools are used. Settings → Integrations → Check device tool versions reads installed versions without installing tools or starting devices.
+The connected T3 server manages the device hub and agent tools on its own machine and configured SSH hosts. Required versions install automatically the next time those tools are used. Settings → Devices → Check versions reads installed versions without installing tools or starting devices.
To receive newer tool versions on a remote environment, update that environment's T3 server. Updating only the browser or mobile app does not update the remote server. An offline host keeps its installed files, but an update needs network access before device support can start; T3 does not fall back to an older version. Reconnect the host and use Retry if installation fails. Existing device and agent-access settings are preserved.
diff --git a/docs/user/guest-links.md b/docs/user/guest-links.md
index de10d16b0ef..b97e400c651 100644
--- a/docs/user/guest-links.md
+++ b/docs/user/guest-links.md
@@ -6,7 +6,7 @@ until you send or dismiss it.
## Share a thread
-Guest links are a beta. Turn on **Settings → Beta → Guest links** for the machine that runs the
+Guest links are a beta. Turn on **Settings → Labs → Guest links** for the machine that runs the
thread. They also need [T3 Connect](./remote-access.md): sign in and link that machine, because the
link points at its T3 Connect address. The machine must stay online while the guest uses it.
While the setting is off, every guest link on that machine stops working; links that have not
diff --git a/docs/user/install.md b/docs/user/install.md
index 64b1f19fac5..dec00ded243 100644
--- a/docs/user/install.md
+++ b/docs/user/install.md
@@ -80,7 +80,7 @@ update fails. Download the new `.deb` and install it the same way.
### The `t3` command
The desktop app includes the `t3` command-line tool. To run it from any
-terminal, open **Settings → General → About** and choose **Install** next to
+terminal, open **Settings → About** and choose **Install** next to
**t3 command**. On macOS and Linux it adds a `t3` link to a folder on your
`PATH`; on Windows it adds the app's command folder to your `PATH`. Open a new
terminal afterwards. **Remove** takes it off again. If you already have `t3`
@@ -88,7 +88,7 @@ from npm, it stays as it is.
### Windows Subsystem for Linux
-Choose a WSL distro in **Settings → Connections** to run agents and projects
+Choose a WSL distro in **Settings → Sharing & access** to run agents and projects
there. Install the provider CLIs inside that distro. T3 Code installs its own
server runtime there automatically; the first launch after an app update can
take longer.
@@ -114,7 +114,7 @@ Install T3 Code from the
The phone connects to a server on another machine. Follow
[remote access](./remote-access.md) to link it through T3 Connect or a pairing URL.
-Store links and QR codes are also available in **Settings → General → Mobile app**
+Store links and QR codes are also available in **Settings → About → Mobile app**
on web and desktop. The store apps work with both stable and Nightly servers. Test builds are optional:
- **iPhone and iPad:** TestFlight is invite-only.
diff --git a/docs/user/keybindings.md b/docs/user/keybindings.md
index 75b7a855047..f30e832b39e 100644
--- a/docs/user/keybindings.md
+++ b/docs/user/keybindings.md
@@ -5,7 +5,7 @@ also lists the command IDs and defaults available in your version.
## Composer controls
-In **Settings → General → Send shortcut**, choose whether Enter sends, requires
+In **Settings → Chat → Send shortcut**, choose whether Enter sends, requires
`mod+Enter` for multiline prompts, or always requires `mod+Enter`. `Shift+Enter`
inserts a new line. This applies to the web and desktop composer at desktop widths.
diff --git a/docs/user/open-source-licenses.md b/docs/user/open-source-licenses.md
index bc1854aba5d..1324d552c23 100644
--- a/docs/user/open-source-licenses.md
+++ b/docs/user/open-source-licenses.md
@@ -3,7 +3,7 @@
T3 Code includes third-party software and adapted assets. To read their license and attribution
notices:
-- On web and desktop, open **Settings → General**, find **Open source licenses** under **About**,
+- On web and desktop, open **Settings → About**, find **Open source licenses** under **Legal**,
and select **View licenses**.
- On mobile, open **Settings → About T3 Code → Open source licenses**.
diff --git a/docs/user/outside-agents.md b/docs/user/outside-agents.md
index f1503ef49b2..f040f221805 100644
--- a/docs/user/outside-agents.md
+++ b/docs/user/outside-agents.md
@@ -8,7 +8,7 @@ in once, and you choose what it may do.
## Get the MCP URL
-In **Settings → Connections**, open a saved environment's menu and choose
+In **Settings → Environments**, open a saved environment's menu and choose
**Copy MCP URL**. The URL is the environment's address followed by `/mcp`, for
example:
@@ -41,7 +41,7 @@ The page names the agent and where its access goes:
Anyone who runs that service gets the access.
Only approve a sign-in you just started. To approve, enter a pairing code from
-**Settings → Connections** or from `t3 auth pairing create` on the host. A
+**Settings → Sharing & access** or from `t3 auth pairing create` on the host. A
browser already signed in to the environment with permission to manage access
can approve without a code.
@@ -116,6 +116,6 @@ result that always includes the thread id.
## Remove an agent
-Approved agents appear under **Settings → Connections** like other clients.
+Approved agents appear under **Settings → Sharing & access** like other clients.
Revoke one there to cut off its access immediately. A sign-in lasts 30 days;
after that the agent asks you to approve it again.
diff --git a/docs/user/permission-modes.md b/docs/user/permission-modes.md
index a15850973fb..dd13f91f553 100644
--- a/docs/user/permission-modes.md
+++ b/docs/user/permission-modes.md
@@ -3,7 +3,7 @@
Permission modes control when an agent needs your approval to act. Choose a mode in the message
composer; it applies to that thread.
-Set the default for new threads in **Settings → General → New threads → Permissions**.
+Set the default for new threads in **Settings → Threads → New threads → Permissions**.
Projects can override the environment default. New threads use this setting rather than the
mode of the thread you were viewing. The initial default is **Full access**; existing threads
and modes you choose in a draft keep their permissions.
diff --git a/docs/user/project-settings.md b/docs/user/project-settings.md
index 905b323320a..286ecb7a012 100644
--- a/docs/user/project-settings.md
+++ b/docs/user/project-settings.md
@@ -48,7 +48,7 @@ and other phone-only settings ignore the filter.
## Worktree branch names
-In **Settings → Source control → Worktree branch naming**, choose a static prefix,
+In **Settings → Worktrees → Worktree branch naming**, choose a static prefix,
a model-selected semantic prefix such as `feat/` or `fix/`, or custom instructions
for the complete name. The static prefix defaults to `t3/`; a trailing slash is
optional, and an empty prefix adds nothing. Invalid characters in a static prefix
@@ -138,7 +138,7 @@ requests and the prompt each one produced.
If the environment is offline, the sender gets an error and nothing runs;
redeliver from the sender, such as GitHub's **Recent Deliveries**, once it is
back. To have T3 Connect keep requests instead, turn on **Hold webhooks while
-offline** in **Settings → Connections**. T3 Connect then stores requests to a
+offline** in **Settings → Sharing & access**. T3 Connect then stores requests to a
T3 Connect URL for up to 24 hours and delivers them when the environment
returns. Leave it off if you don't want request bodies stored outside your
machine. To skip requests that waited too long, set **Skip requests older
@@ -146,12 +146,12 @@ than** on the task.
## Defaults and inheritance
-General contains the model and workspace for new threads. Integrations controls agent browser
+Threads contains the model and workspace for new threads. Browser controls agent browser
access. Source control contains automatic pull, the default pull request merge method and text
generation. The same rows edit environment defaults or project overrides depending on the
project crumb.
-The Project category, shown while a project is selected, holds the project's name, icon, actions,
+The Projects category, under Code, holds the project's name, icon, actions,
checkouts and removal. Actions belong to a project: editing them creates the project's own list
on each selected environment, and reset returns to the environment's shared list. A project's
`t3.json` actions can be imported there.
@@ -162,7 +162,7 @@ built-in default. Leave a setting on **Inherit** to let the next tier decide.
Browser access changes apply when an agent session next starts.
New worktrees initialize git submodules recursively. If that step is slow because the repository
-declares many nested submodules, set **Submodules** in **Settings → General** (with the project
+declares many nested submodules, set **Submodules** in **Settings → Worktrees** under Advanced (with the project
selected to override it there) to **Top level only** to stop at the ones the repository declares
itself, or **Skip** to leave them for a setup script. It resolves in the same order as the
workspace default: a `"worktreeSubmodules"` value in the `t3.json` of the branch being checked out
@@ -171,13 +171,13 @@ applies when the project and environment are both on **Inherit**.
## Worktree location
New worktrees go in the `worktrees` folder of the T3 home directory. To put them somewhere else,
-such as another drive, set **Settings → Storage → Worktree location** to an absolute path like
+such as another drive, set **Settings → Worktrees → Worktree location** to an absolute path like
`D:\worktrees` or `~/worktrees`. The setting is per machine. Existing worktrees stay where they
are, and cleanup covers both the default folder and the custom one.
## Storage cleanup
-Open **Settings → Storage** to enable automatic cleanup on one machine or all connected
+Open **Settings → Worktrees → Cleanup** to enable automatic cleanup on one machine or all connected
environments. Policies are off by default and run on the server at startup, when changed, and
hourly. Offline machines keep their existing policies.
diff --git a/docs/user/providers-claude.md b/docs/user/providers-claude.md
index cd9c22c5428..5e0c1b158bf 100644
--- a/docs/user/providers-claude.md
+++ b/docs/user/providers-claude.md
@@ -57,7 +57,7 @@ history for that message. The cache lasts about an hour on a Claude
subscription and 5 minutes with an API key, Bedrock, or Vertex. See [commands and skills](./composer.md#commands-and-skills) for using
composer commands.
-**Compact idle threads** in **Settings > General** controls this for threads
+**Compact idle threads** in **Settings > Providers > Advanced** controls this for threads
over 200,000 tokens. Each Claude provider's settings can override it:
- **When you return** shows the **Compact** chip described above. This is the default.
diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md
index fbda09d6af4..4b9acbeecaf 100644
--- a/docs/user/remote-access.md
+++ b/docs/user/remote-access.md
@@ -36,7 +36,7 @@ disconnect an otherwise healthy conversation.
Use direct pairing when the other device can reach the host's network address.
-On a desktop host, open **Settings → Connections**, enable **Network access**,
+On a desktop host, open **Settings → Sharing & access**, enable **Network access**,
then create a pairing link using an address the other device can reach. Changing
network access restarts the desktop app. You can turn it off in the same place.
@@ -54,14 +54,14 @@ t3 pair
```
Scan the QR code on your phone or paste the pairing URL into **Add environment**
-in the receiving app. Connection settings are under **Settings → Connections**
+in the receiving app. Connection settings are under **Settings → Environments**
on web and desktop and **Settings → Environments** on mobile. A loopback address
such as `127.0.0.1` reaches only the device opening the link.
Pairing authorizes that device for future connections. Use a fresh one-time link
for each new device; you do not need the original token to reconnect. Links
created in Settings can only be copied from the client that created them while
-its Connections page stays open. If you leave or reload that page, create
+its Sharing & access page stays open. If you leave or reload that page, create
another link to share.
### Reach one machine several ways
@@ -92,7 +92,7 @@ later route, T3 Code checks the earlier ones when your network changes, when you
return to the app, and every minute, and moves back as soon as one works.
On web and desktop, select the route count under the machine's name in
-**Settings → Connections** to see its routes. Drag a route to change the order,
+**Settings → Environments** to see its routes. Drag a route to change the order,
or remove it. On mobile, open the machine under **Settings → Environments** and
choose **Edit**. Signing out of T3 Connect removes only that route; a machine
you can still reach another way stays saved.
@@ -107,7 +107,7 @@ different permissions.
### Balance new threads across machines
Auto balance is off by default. On web and desktop, enable it in
-**Settings → Connections → Load balancing** to automatically choose a machine for
+**Settings → Environments → Load balancing** to automatically choose a machine for
new threads in projects grouped across connected environments. The section
appears once two or more machines are switched on.
Each machine starts at **Normal**. Choose **Prefer** to favor it when it has CPU and
@@ -125,7 +125,7 @@ Mobile keeps its manual environment selection.
### Tailscale HTTPS
Join both devices to the same tailnet. In the desktop app, enable **Tailscale
-HTTPS** in **Settings → Connections**. Turn it off there to remove that route.
+HTTPS** in **Settings → Sharing & access**. Turn it off there to remove that route.
To start a command-line server with Tailscale HTTPS:
@@ -162,7 +162,7 @@ scheme uses HTTP, so include `https://` when your server uses HTTPS.
## Desktop-managed SSH
-In the desktop app, open **Settings → Connections → Add environment**, choose
+In the desktop app, open **Settings → Environments → Add environment**, choose
**SSH**, and enter a host or SSH alias such as `[email protected]`. T3 Code starts
or reuses a server there and opens the port forward for you. Projects, provider
credentials, and agent work stay on the remote machine.
@@ -184,7 +184,7 @@ running is left alone.
Each desktop app keeps one session on the host for its SSH connection and reuses
it when it reconnects. Revoke sessions you no longer use in **Settings →
-Connections** on the host, or on a headless host with `t3 auth session list` and
+Sharing & access** on the host, or on a headless host with `t3 auth session list` and
`t3 auth session revoke <id>`. A desktop that can still sign in over SSH pairs
again on its next connect.
@@ -249,7 +249,7 @@ threads on an environment through its MCP server. See
## Manage or revoke access
-On the host, **Settings → Connections** lets authorized administrators create
+On the host, **Settings → Sharing & access** lets authorized administrators create
pairing links and revoke client sessions. Revoking an unused link prevents new
pairings; revoke a device's session to remove its existing access. Command-line
management is available through `t3 auth --help`.
@@ -305,7 +305,7 @@ page, or **Settings → T3 Connect** on mobile, and choose **Deregister**. This
revokes its cloud access and frees its host space even when the environment is
offline or has been wiped. When T3 Connect rejects a host's link, the host
shows that it was removed from T3 Connect. To link it again, turn on
-**T3 Connect** in **Settings → Connections** on a desktop host, or run
+**T3 Connect** in **Settings → Sharing & access** on a desktop host, or run
`t3 connect link` on a command-line host and then restart T3 Code there. A
command-line host that released its tunnel when it last stopped may link itself
again on its next start; run `t3 connect unlink` on that host to keep it off.
@@ -339,7 +339,7 @@ error, where the problem is, and how to fix it.
## Using the Desktop App as a Remote Only
If a computer should only drive work running elsewhere, turn off its local environment. In the
-desktop app, open **Settings → Connections** and switch off **Local
+desktop app, open **Settings → Environments** and switch off **Local
environment**. T3 Code restarts without a local server: no local agents or terminals run, WSL
backends stay off, and other devices can no longer connect to this computer. Your projects,
history, and saved connections are kept, and you keep working through pairing, T3 Connect, or SSH.
diff --git a/docs/user/source-control.md b/docs/user/source-control.md
index a0ea63b57c9..90c64932530 100644
--- a/docs/user/source-control.md
+++ b/docs/user/source-control.md
@@ -183,7 +183,7 @@ Press **Escape** before releasing to cancel. Failed closes stay in the list so y
GitHub, GitLab, and Azure DevOps support auto-merge while checks are outstanding. GitHub also
supports approving waiting fork workflows and opening a revert pull request for a merged change.
-Pull request sharing is off by default. In Settings → Connections → Pull request sharing (Pull
+Pull request sharing is off by default. In Settings → Environments → Pull request sharing (Pull
request routing under Environments on mobile), choose **Read PRs** or **Read and act** for each
environment you trust to share its source control access.
Enable both the original environment and the environment answering its requests on this client.
diff --git a/docs/user/t3-connect-troubleshooting.md b/docs/user/t3-connect-troubleshooting.md
index 1150688ec92..eaed689fb8c 100644
--- a/docs/user/t3-connect-troubleshooting.md
+++ b/docs/user/t3-connect-troubleshooting.md
@@ -7,12 +7,12 @@ A T3 Connect connection goes through four parts, in this order:
3. **The host's tunnel** (cloudflared on the host) carries the request to the host.
4. **T3 Code on the host** answers.
-When a connection fails, open **Settings > Connections**, find the environment,
+When a connection fails, open **Settings > Environments**, find the environment,
and select **Details**. The first part marked as failed is the cause. Find its
section below.
To see the host's side, run `t3 connect status` on the host, or open
-**Settings > Connections** on the host. Both check the host's T3 Connect
+**Settings > Sharing & access** on the host. Both check the host's T3 Connect
address from the host, and say why it fails. `t3 connect` runs the same check
when it finishes setup. This check cannot test another device's network. For a
problem on one device, use **Details** on that device.
@@ -105,7 +105,7 @@ T3 Connect does not have an active link between your account and the host.
account on this device and on the host. On the host, run `t3 connect logout`,
then `t3 connect`.
- **T3 Connect is off on the host, or the host only publishes agent activity.**
- On the host, open **Settings > Connections** and turn **T3 Connect** on, or
+ On the host, open **Settings > Sharing & access** and turn **T3 Connect** on, or
run `t3 connect`.
- **The host was linked, but the server did not apply the link yet.** Run
`t3 service restart` on the host, or restart `t3 serve`.
diff --git a/docs/user/telemetry.md b/docs/user/telemetry.md
index 90f37c77626..5b224b4ba14 100644
--- a/docs/user/telemetry.md
+++ b/docs/user/telemetry.md
@@ -24,7 +24,7 @@ Linux, so export it there and restart the app. On Windows, set it as a user envi
## Export diagnostics to your own receiver
To send traces, metrics, or logs to an OpenTelemetry receiver, open
-**Settings > General > Diagnostics**, select an environment, and enter each signal's OTLP HTTP
+**Settings > Maintenance > Diagnostics**, select an environment, and enter each signal's OTLP HTTP
endpoint under **OpenTelemetry export** (for example `http://localhost:4318/v1/traces`). Save, then
restart that environment's server. The receiver must be reachable from the server's machine.
**Test** sends an empty export from the server to check an endpoint before or after you save it;
diff --git a/docs/user/thread-sidebar.md b/docs/user/thread-sidebar.md
index 85158e68732..60cf5a9cb0a 100644
--- a/docs/user/thread-sidebar.md
+++ b/docs/user/thread-sidebar.md
@@ -107,8 +107,8 @@ To generate a fresh title from the conversation, open a thread's menu and choose
**Regenerate title**. The action is unavailable while title generation is in progress
or when the connected environment needs a server update.
-To change how titles are written, add **Thread title instructions** in **Settings → General →
-Text generation**, such as a length limit or an identifier to put first. They apply to new and
+To change how titles are written, add **Thread title instructions** in **Settings → Threads →
+Text generation**, under Advanced, such as a length limit or an identifier to put first. They apply to new and
regenerated titles. Select a project to give it its own instructions.
Agents connected through T3 Code can use the same server-owned metadata workflow to
@@ -126,7 +126,7 @@ there. A thread returns to the top of the active list when it finishes, fails, o
answer. The Working section lists the thread you last sent work to first. Pinned threads stay in
the pinned section.
-This is on by default. Turn it off with **Settings → Beta → Working section** on web and desktop,
+This is on by default. Turn it off with **Settings → General → Working section** on web and desktop,
or **Settings → Thread behavior → Working section** on iOS and Android. Each device keeps its own
choice.
@@ -160,7 +160,7 @@ threads whose pull request merged. A closed pull request can also settle an idle
thread. An empty thread's inactivity counts from when it was created.
Work in progress, pending questions or approvals, and background work the agent
is waiting on prevent automatic settlement. An open pull request does not prevent inactivity
-settlement unless you turn on **Keep threads with a PR** in **Settings → General**,
+settlement unless you turn on **Keep threads with a PR** in **Settings → Threads**,
but an old closed or merged pull request does not settle work you
resumed after it closed. Only your own messages count as resuming. A turn that
finished background work or a pull request watch starts on its own does not.
@@ -170,7 +170,7 @@ choose **Auto-settle behavior**, and pick **Disabled**. The current option is ch
**Enabled** to return to the usual rules. Manual settle, snooze, and archive still work while it
is disabled.
-Change these rules in **Settings → General** on web and desktop, or **Settings → Thread behavior** on mobile.
+Change these rules in **Settings → Threads** on web and desktop, or **Settings → Thread behavior** on mobile.
They continue to run when your apps are closed. On web and desktop, choose an environment at the
top to change only its rules, or **All environments** to update connected environments together.
Mixed values show where the selected environments disagree. Mobile applies these
@@ -219,7 +219,7 @@ the continuation finishes. If the queue was held by a restart, resume it then.
When the provider reports a reset time, choose **Resume at reset** to schedule a
continuation. You can cancel it from the thread. Enable **Resume after
-usage limits** in **Settings → General** on web and desktop, or **Settings → Thread
+usage limits** in **Settings → Threads** on web and desktop, or **Settings → Thread
behavior** on mobile, to schedule limit stops by default.
The environment must be running when the reset arrives; it resumes overdue
continuations after a restart. Stopping the thread, sending a new message,
diff --git a/docs/user/updating.md b/docs/user/updating.md
index cb36732b574..a8945c5ced2 100644
--- a/docs/user/updating.md
+++ b/docs/user/updating.md
@@ -2,7 +2,7 @@
The app you use and the server running your agents can be on different machines.
When a server is behind your web or desktop app, an update notice appears in the
-conversation and **Settings → Connections**. Update the machine named in that
+conversation and **Settings → Environments**. Update the machine named in that
notice.
## Update everything at once
@@ -26,7 +26,7 @@ restarts.
Server updates appear only after that version is published to npm. Remote
desktop apps do not wait for npm. The confirmation lists each machine it skips
and why, such as a machine that is offline or needs a manual update. Use the
-notice or **Settings → Connections** for those.
+notice or **Settings → Environments** for those.
If a desktop app restarts on its old version, T3 Code tells you the update did
not apply. It does not install that version again on its own, even when another
@@ -41,7 +41,7 @@ below.
Server updates restart the connection and can interrupt active agents and
terminal commands. Saved threads, settings, and project files remain.
-**Settings → General → Continue threads after restarts** is on by default.
+**Settings → Maintenance → Continue threads after restarts** is on by default.
It resumes supported active threads after an update, crash, or machine
restart. Changes are saved to connected environments that support this setting;
update older servers first. If a supported environment was offline or has a
diff --git a/packages/client-runtime/src/connection/diagnosis.ts b/packages/client-runtime/src/connection/diagnosis.ts
index ed51ef0cf9f..a3de100766a 100644
--- a/packages/client-runtime/src/connection/diagnosis.ts
+++ b/packages/client-runtime/src/connection/diagnosis.ts
@@ -137,7 +137,7 @@ function headline(host: string, located: Located, failure: ConnectionAttemptErro
}
function steps(host: string, located: Located, failure: ConnectionAttemptError | null): string[] {
- const checkHost = `On ${host}, check Settings > Connections or run \`t3 connect status\`.`;
+ const checkHost = `On ${host}, check Settings > Sharing & access or run \`t3 connect status\`.`;
switch (located.cause) {
case "offline":
return ["Connect this device to the internet. T3 Code reconnects on its own."];
@@ -148,7 +148,7 @@ function steps(host: string, located: Located, failure: ConnectionAttemptError |
case "not_linked":
return [
"Check that this device is signed in to the same T3 Connect account as the host.",
- `On ${host}, open Settings > Connections and turn T3 Connect on.`,
+ `On ${host}, open Settings > Sharing & access and turn T3 Connect on.`,
];
case "tunnel_pending":
return ["Wait a minute. T3 Code retries on its own.", checkHost];
@@ -158,7 +158,7 @@ function steps(host: string, located: Located, failure: ConnectionAttemptError |
"If it keeps failing, copy the diagnostics and report it.",
];
case "tunnel_not_enabled":
- return [`On ${host}, open Settings > Connections and turn T3 Connect on.`];
+ return [`On ${host}, open Settings > Sharing & access and turn T3 Connect on.`];
case "released":
case "tunnel_down":
return [
diff --git a/packages/client-runtime/src/relay/errorPresentation.ts b/packages/client-runtime/src/relay/errorPresentation.ts
index ddf01e1e7ec..e3dd743bd14 100644
--- a/packages/client-runtime/src/relay/errorPresentation.ts
+++ b/packages/client-runtime/src/relay/errorPresentation.ts
@@ -47,7 +47,7 @@ export function relayProtectedErrorMessage(error: RelayProtectedError): string {
return "The environment's T3 Connect tunnel is still being set up.";
}
if (error.reason === "endpoint_provider_not_managed") {
- return "This environment is linked only to publish agent activity, so it cannot accept connections. On that computer, open Settings > Connections and turn T3 Connect on.";
+ return "This environment is linked only to publish agent activity, so it cannot accept connections. On that computer, open Settings > Sharing & access and turn T3 Connect on.";
}
return error.reason
? `Relay rejected the environment connection request (${error.reason}).`
diff --git a/packages/contracts/src/guestShare.ts b/packages/contracts/src/guestShare.ts
index e78c26dc592..fa4b3a256f0 100644
--- a/packages/contracts/src/guestShare.ts
+++ b/packages/contracts/src/guestShare.ts
@@ -65,7 +65,7 @@ export const GuestShareCreateResult = Schema.Struct({
export type GuestShareCreateResult = typeof GuestShareCreateResult.Type;
const GUEST_SHARE_CREATE_MESSAGES = {
- disabled: "Guest links are off. Turn them on in Settings > Beta.",
+ disabled: "Guest links are off. Turn them on in Settings > Labs.",
connect_unavailable: "Guest links need a running T3 Connect tunnel.",
thread_unavailable: "This thread cannot be shared.",
read_failed: "Failed to read the shared thread.",
diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts
index 88460d06bcd..5bf83defff0 100644
--- a/packages/contracts/src/settings.ts
+++ b/packages/contracts/src/settings.ts
@@ -712,7 +712,7 @@ export const ClaudeSettings = makeProviderSettingsSchema(
Schema.annotateKey({
title: "Compact idle threads",
description:
- "When to compact an idle thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Overrides the default in General settings.",
+ "When to compact an idle thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Overrides the default in Providers > Advanced.",
providerSettingsForm: {
control: "select",
options: INSTANCE_IDLE_COMPACTION_MODES,