The best way to control Claude Code, Codex and more from any computer or phone
refactor(web): settings group by concern, with General split into focused pages (#25651)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 26, 2026 at 16:02 UTC
9db433f4bab5dcc923672ef2e6f31f377d39705e
71 files changed
+2368
-1833
apps/desktop/src/backend/DesktopBackendPool.ts
+1
-1
@@ -132,7 +132,7 @@ export const layer = Layer.effect(
132
});
133
yield* electronDialog.showErrorBox(
134
"WSL backend couldn't start",
135
- `${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.`,
135
+ `${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.`,
136
);
137
// Clear wslOnly too so enabling WSL cannot restore a failed mode.
138
// Keep the in-memory fallback if persistence fails.
apps/server/src/vcs/GitVcsDriverCore.ts
+1
-1
@@ -3695,7 +3695,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
3695
operation: "GitVcsDriver.createWorktree",
3696
command: "git worktree add",
3697
cwd: input.cwd,
3698
- detail: `The worktree location "${options?.worktreesDirectory}" must be an absolute folder on this machine, not a drive root. Change it in Settings → Storage.`,
3698
+ detail: `The worktree location "${options?.worktreesDirectory}" must be an absolute folder on this machine, not a drive root. Change it in Settings → Worktrees.`,
3699
});
3700
}
3701
worktreePath = path.join(parentDir, repoName, sanitizedBranch);
apps/web/src/components/HostedEmptyState.tsx
+1
-1
@@ -49,7 +49,7 @@ export function HostedEmptyState() {
49
<EmptyContent>
50
{localEnvironmentOff ? (
51
<Button render={<Link to="/settings/connections" />} size="sm">
52
- Open Connections
52
+ Open Environments
53
</Button>
54
) : (
55
<ol className="w-full space-y-4 text-left">
apps/web/src/components/PermissionUpdateNotice.ts
+2
-2
@@ -48,10 +48,10 @@ function showPermissionNotice(
48
timeout: 0,
49
onClose: persistDismissal,
50
actionProps: {
51
- children: "Open Connections",
51
+ children: "Open Sharing & access",
52
onClick: () => {
53
dismiss();
54
- void router.navigate({ to: "/settings/connections" });
54
+ void router.navigate({ to: "/settings/access" });
55
},
56
},
57
data: {
apps/web/src/components/auth/ConnectAgentSurface.tsx
+2
-2
@@ -233,8 +233,8 @@ export function ConnectAgentSurface() {
233
value={pairingCode}
234
/>
235
<p className="text-xs text-muted-foreground">
236
- Create one in Settings → Connections, or run <code>t3 auth pairing create</code> on
237
- this machine.
236
+ Create one in Settings → Sharing & access, or run <code>t3 auth pairing create</code>{" "}
237
+ on this machine.
238
</p>
239
</div>
240
)}
apps/web/src/components/chat/guestShareAvailability.ts
+1
-1
@@ -6,7 +6,7 @@ import { serverEnvironment } from "~/state/server";
6
7
/**
8
* Whether this environment offers "Share with guest": the user may create links there, and its
9
- * Guest links beta is on (Settings > Beta). The server refuses links while the beta is off.
9
+ * Guest links beta is on (Settings > Labs). The server refuses links while the beta is off.
10
*/
11
export const canShareWithGuestAtom = Atom.family((environmentId: EnvironmentId) =>
12
Atom.make(
apps/web/src/components/chat/useSystemComposerBanners.tsx
+1
-1
@@ -178,7 +178,7 @@ export function useSystemComposerBanners(input: SystemComposerBannersInput) {
178
size="xs"
179
variant="ghost"
180
disabled={disconnectingEnvironment}
181
- title="Hide this server's threads. Switch it on again in Connections."
181
+ title="Hide this server's threads. Switch it on again in Environments."
182
onClick={() =>
183
void handleDisconnectActiveEnvironmentStable(
184
activeEnvironmentUnavailableState.environmentId,
apps/web/src/components/settings/AdvancedSettings.tsx
new
+42
@@ -0,0 +1,42 @@
1
+import { ChevronRightIcon } from "lucide-react";
2
+import { type ReactNode, useState } from "react";
3
+
4
+import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
5
+import { useSettingsSearchTargetId } from "./settingsLayout";
6
+
7
+/**
8
+ * Folds power-user rows at the end of a section. `targetIds` names the search targets inside, so a
9
+ * search jump opens the fold before its row mounts.
10
+ */
11
+export function AdvancedSettings({
12
+ targetIds,
13
+ children,
14
+}: {
15
+ readonly targetIds: ReadonlyArray<string>;
16
+ readonly children: ReactNode;
17
+}) {
18
+ const [open, setOpen] = useState(false);
19
+ const searchTargetId = useSettingsSearchTargetId();
20
+ const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
21
+ if (seenSearchTargetId !== searchTargetId) {
22
+ setSeenSearchTargetId(searchTargetId);
23
+ if (searchTargetId !== null && targetIds.includes(searchTargetId)) setOpen(true);
24
+ }
25
+
26
+ return (
27
+ <Collapsible open={open} onOpenChange={setOpen}>
28
+ <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">
29
+ <ChevronRightIcon
30
+ aria-hidden
31
+ className="size-3.5 shrink-0 transition-transform duration-150 group-data-panel-open:rotate-90 motion-reduce:transition-none"
32
+ />
33
+ Advanced
34
+ </CollapsibleTrigger>
35
+ <CollapsiblePanel>
36
+ <div className="border-t border-border/50 [&>*+*]:border-t [&>*+*]:border-border/50">
37
+ {children}
38
+ </div>
39
+ </CollapsiblePanel>
40
+ </Collapsible>
41
+ );
42
+}
apps/web/src/components/settings/AppearanceSettingsPanel.tsx
+151
-170
@@ -29,6 +29,7 @@ import {
29
SettingsSection,
30
} from "./settingsLayout";
31
import { searchableSetting } from "./settingsSearch";
32
+import { AdvancedSettings } from "./AdvancedSettings";
33
import { PanelAnimationsPreview } from "./PanelAnimationsPreview";
34
import { TypographySection } from "./TypographySettings";
35
@@ -104,6 +105,27 @@ export function AppearanceSettingsPanel() {
105
</SettingsSection>
106
107
<SettingsSection id="appearance-interface" title="Interface">
108
+ <SettingsRow
109
+ {...searchableSetting("new-design")}
110
+ description="A true black dark mode, dimmer read threads, and simpler composer controls. Turn it off for the classic look."
111
+ resetAction={
112
+ settings.redesignEnabled !== DEFAULT_UNIFIED_SETTINGS.redesignEnabled ? (
113
+ <SettingResetButton
114
+ label="new design"
115
+ onClick={() =>
116
+ updateSettings({ redesignEnabled: DEFAULT_UNIFIED_SETTINGS.redesignEnabled })
117
+ }
118
+ />
119
+ ) : null
120
+ }
121
+ control={
122
+ <Switch
123
+ checked={settings.redesignEnabled}
124
+ onCheckedChange={(checked) => updateSettings({ redesignEnabled: Boolean(checked) })}
125
+ aria-label="New design"
126
+ />
127
+ }
128
+ />
129
<SettingsRow
130
{...searchableSetting("setting-appearance-contrast")}
131
description="Adjust the contrast of colors and borders across the interface."
@@ -198,127 +220,6 @@ export function AppearanceSettingsPanel() {
220
}
221
/>
222
201
- {showEnvironmentIdentification ? (
202
- <SettingsRow
203
- {...searchableSetting("environment-identification")}
204
- description="Choose how Dev and Nightly environments are identified."
205
- resetAction={
206
- settings.environmentIdentificationMode !== DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
207
- <SettingResetButton
208
- label="environment identification"
209
- onClick={() =>
210
- updateSettings({
211
- environmentIdentificationMode: DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE,
212
- })
213
- }
214
- />
215
- ) : null
216
- }
217
- control={
218
- <Select
219
- value={settings.environmentIdentificationMode}
220
- onValueChange={(value) => {
221
- if (value === "artwork" || value === "pill" || value === "none") {
222
- updateSettings({ environmentIdentificationMode: value });
223
- }
224
- }}
225
- >
226
- <SelectTrigger
227
- size="sm"
228
- className="w-full sm:w-40"
229
- aria-label="Environment identification"
230
- >
231
- <SelectValue>
232
- {ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode]}
233
- </SelectValue>
234
- </SelectTrigger>
235
- <SelectPopup align="end" alignItemWithTrigger={false}>
236
- {Object.entries(ENVIRONMENT_IDENTIFICATION_LABELS).map(([value, label]) => (
237
- <SelectItem hideIndicator key={value} value={value}>
238
- {label}
239
- </SelectItem>
240
- ))}
241
- </SelectPopup>
242
- </Select>
243
- }
244
- />
245
- ) : null}
246
-
247
- <SettingsRow
248
- {...searchableSetting("diff-color-scheme")}
249
- description="Choose colors for additions and deletions, including change counts."
250
- resetAction={
251
- settings.diffColorScheme !== DEFAULT_UNIFIED_SETTINGS.diffColorScheme ? (
252
- <SettingResetButton
253
- label="diff colors"
254
- onClick={() =>
255
- updateSettings({ diffColorScheme: DEFAULT_UNIFIED_SETTINGS.diffColorScheme })
256
- }
257
- />
258
- ) : null
259
- }
260
- control={
261
- <div className="w-full sm:w-40">
262
- <Select
263
- value={settings.diffColorScheme}
264
- onValueChange={(value) => {
265
- if (value === "red-green" || value === "blue-orange")
266
- updateSettings({ diffColorScheme: value });
267
- }}
268
- >
269
- <SelectTrigger size="sm" className="w-full min-w-0" aria-label="Diff colors">
270
- <span
271
- aria-hidden="true"
272
- className={
273
- settings.diffColorScheme === "blue-orange"
274
- ? "flex shrink-0 flex-row-reverse gap-1"
275
- : "flex shrink-0 gap-1"
276
- }
277
- >
278
- <span className="size-2 rounded-full bg-diff-deletion" />
279
- <span className="size-2 rounded-full bg-diff-addition" />
280
- </span>
281
- <SelectValue>
282
- {settings.diffColorScheme === "blue-orange" ? "Blue & orange" : "Red & green"}
283
- </SelectValue>
284
- </SelectTrigger>
285
- <SelectPopup align="end" alignItemWithTrigger={false}>
286
- <SelectItem value="red-green">Red & green (default)</SelectItem>
287
- <SelectItem value="blue-orange">Blue & orange</SelectItem>
288
- </SelectPopup>
289
- </Select>
290
- </div>
291
- }
292
- />
293
-
294
- <SettingsRow
295
- {...searchableSetting("composer-context")}
296
- description="Keep branch and worktree controls below the composer after a thread starts."
297
- resetAction={
298
- settings.persistComposerContextStrip !==
299
- DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip ? (
300
- <SettingResetButton
301
- label="composer context"
302
- onClick={() =>
303
- updateSettings({
304
- persistComposerContextStrip:
305
- DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip,
306
- })
307
- }
308
- />
309
- ) : null
310
- }
311
- control={
312
- <Switch
313
- checked={settings.persistComposerContextStrip}
314
- onCheckedChange={(checked) =>
315
- updateSettings({ persistComposerContextStrip: Boolean(checked) })
316
- }
317
- aria-label="Keep composer context visible in active threads"
318
- />
319
- }
320
- />
321
-
223
<SettingsRow
224
{...searchableSetting("chat-width")}
225
description="Set how wide messages and the composer can grow on large screens."
@@ -376,60 +277,140 @@ export function AppearanceSettingsPanel() {
277
/>
278
}
279
/>
379
- </SettingsSection>
380
-
381
- <SettingsSection id="motion" title="Motion">
382
- <SettingsRow
383
- {...searchableSetting("panel-animations")}
384
- description="Set how fast panels open and close."
385
- control={
386
- <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">
387
- <PanelAnimationsPreview durationMs={settings.panelAnimationDurationMs} />
388
- <div className="flex w-full items-center gap-3">
389
- <output
390
- className="min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground"
391
- htmlFor="panel-animation-duration"
392
- >
393
- {settings.panelAnimationDurationMs} ms
394
- </output>
395
- <input
396
- aria-label="Panel animation duration"
397
- className="settings-slider min-w-0 flex-1"
398
- id="panel-animation-duration"
399
- max={MAX_PANEL_ANIMATION_DURATION_MS}
400
- min={MIN_PANEL_ANIMATION_DURATION_MS}
401
- onChange={(event) => {
402
- const panelAnimationDurationMs = Number(event.currentTarget.value);
403
- if (
404
- Number.isInteger(panelAnimationDurationMs) &&
405
- panelAnimationDurationMs >= MIN_PANEL_ANIMATION_DURATION_MS &&
406
- panelAnimationDurationMs <= MAX_PANEL_ANIMATION_DURATION_MS
407
- ) {
408
- updateSettings({ panelAnimationDurationMs });
280
+ <AdvancedSettings
281
+ targetIds={[
282
+ searchableSetting("panel-animations").id,
283
+ searchableSetting("environment-identification").id,
284
+ // Environment identification's search result lands on this section.
285
+ "appearance-interface",
286
+ searchableSetting("composer-context").id,
287
+ ]}
288
+ >
289
+ <SettingsRow
290
+ {...searchableSetting("panel-animations")}
291
+ description="Set how fast panels open and close."
292
+ control={
293
+ <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">
294
+ <PanelAnimationsPreview durationMs={settings.panelAnimationDurationMs} />
295
+ <div className="flex w-full items-center gap-3">
296
+ <output
297
+ className="min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground"
298
+ htmlFor="panel-animation-duration"
299
+ >
300
+ {settings.panelAnimationDurationMs} ms
301
+ </output>
302
+ <input
303
+ aria-label="Panel animation duration"
304
+ className="settings-slider min-w-0 flex-1"
305
+ id="panel-animation-duration"
306
+ max={MAX_PANEL_ANIMATION_DURATION_MS}
307
+ min={MIN_PANEL_ANIMATION_DURATION_MS}
308
+ onChange={(event) => {
309
+ const panelAnimationDurationMs = Number(event.currentTarget.value);
310
+ if (
311
+ Number.isInteger(panelAnimationDurationMs) &&
312
+ panelAnimationDurationMs >= MIN_PANEL_ANIMATION_DURATION_MS &&
313
+ panelAnimationDurationMs <= MAX_PANEL_ANIMATION_DURATION_MS
314
+ ) {
315
+ updateSettings({ panelAnimationDurationMs });
316
+ }
317
+ }}
318
+ step={25}
319
+ style={panelAnimationDurationSliderStyle}
320
+ type="range"
321
+ value={settings.panelAnimationDurationMs}
322
+ />
323
+ </div>
324
+ </div>
325
+ }
326
+ resetAction={
327
+ settings.panelAnimationDurationMs !==
328
+ DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs ? (
329
+ <SettingResetButton
330
+ label="panel animations"
331
+ onClick={() =>
332
+ updateSettings({
333
+ panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,
334
+ })
335
+ }
336
+ />
337
+ ) : null
338
+ }
339
+ />
340
+ {showEnvironmentIdentification ? (
341
+ <SettingsRow
342
+ {...searchableSetting("environment-identification")}
343
+ description="Choose how Dev and Nightly environments are identified."
344
+ resetAction={
345
+ settings.environmentIdentificationMode !==
346
+ DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
347
+ <SettingResetButton
348
+ label="environment identification"
349
+ onClick={() =>
350
+ updateSettings({
351
+ environmentIdentificationMode: DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE,
352
+ })
353
+ }
354
+ />
355
+ ) : null
356
+ }
357
+ control={
358
+ <Select
359
+ value={settings.environmentIdentificationMode}
360
+ onValueChange={(value) => {
361
+ if (value === "artwork" || value === "pill" || value === "none") {
362
+ updateSettings({ environmentIdentificationMode: value });
363
}
364
}}
411
- step={25}
412
- style={panelAnimationDurationSliderStyle}
413
- type="range"
414
- value={settings.panelAnimationDurationMs}
365
+ >
366
+ <SelectTrigger
367
+ size="sm"
368
+ className="w-full sm:w-40"
369
+ aria-label="Environment identification"
370
+ >
371
+ <SelectValue>
372
+ {ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode]}
373
+ </SelectValue>
374
+ </SelectTrigger>
375
+ <SelectPopup align="end" alignItemWithTrigger={false}>
376
+ {Object.entries(ENVIRONMENT_IDENTIFICATION_LABELS).map(([value, label]) => (
377
+ <SelectItem hideIndicator key={value} value={value}>
378
+ {label}
379
+ </SelectItem>
380
+ ))}
381
+ </SelectPopup>
382
+ </Select>
383
+ }
384
+ />
385
+ ) : null}
386
+ <SettingsRow
387
+ {...searchableSetting("composer-context")}
388
+ description="Keep branch and worktree controls below the composer after a thread starts."
389
+ resetAction={
390
+ settings.persistComposerContextStrip !==
391
+ DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip ? (
392
+ <SettingResetButton
393
+ label="composer context"
394
+ onClick={() =>
395
+ updateSettings({
396
+ persistComposerContextStrip:
397
+ DEFAULT_UNIFIED_SETTINGS.persistComposerContextStrip,
398
+ })
399
+ }
400
/>
416
- </div>
417
- </div>
418
- }
419
- resetAction={
420
- settings.panelAnimationDurationMs !==
421
- DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs ? (
422
- <SettingResetButton
423
- label="panel animations"
424
- onClick={() =>
425
- updateSettings({
426
- panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,
427
- })
401
+ ) : null
402
+ }
403
+ control={
404
+ <Switch
405
+ checked={settings.persistComposerContextStrip}
406
+ onCheckedChange={(checked) =>
407
+ updateSettings({ persistComposerContextStrip: Boolean(checked) })
408
}
409
+ aria-label="Keep composer context visible in active threads"
410
/>
430
- ) : null
431
- }
432
- />
411
+ }
412
+ />
413
+ </AdvancedSettings>
414
</SettingsSection>
415
416
<TypographySection />
apps/web/src/components/settings/BetaSettingsPanel.tsx
deleted
-127
@@ -1,127 +0,0 @@
1
-import { useAuth } from "@clerk/react";
2
-import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
3
-import { Link } from "@tanstack/react-router";
4
-
5
-import { hasCloudPublicConfig } from "~/cloud/publicConfig";
6
-import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
7
-import { Button } from "../ui/button";
8
-import { Switch } from "../ui/switch";
9
-import { ScopedSwitch } from "./ScopedSwitch";
10
-import {
11
- SettingResetButton,
12
- SettingsPageContainer,
13
- SettingsRow,
14
- SettingsSection,
15
-} from "./settingsLayout";
16
-import { searchableSetting } from "./settingsSearch";
17
-import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
18
-
19
-/** Features that are still settling in. Some are on by default; each can be turned off here. */
20
-export function BetaSettingsPanel() {
21
- const settings = useScopedSettings();
22
- const updateSettings = useUpdateScopedSettings();
23
- return (
24
- <SettingsPageContainer>
25
- <SettingsSection id="beta" title="Beta">
26
- <SettingsRow
27
- {...searchableSetting("new-design")}
28
- description="A true black dark mode, dimmer read threads, and simpler composer controls. Turn it off for the classic look."
29
- resetAction={
30
- settings.redesignEnabled !== DEFAULT_UNIFIED_SETTINGS.redesignEnabled ? (
31
- <SettingResetButton
32
- label="new design"
33
- onClick={() =>
34
- updateSettings({ redesignEnabled: DEFAULT_UNIFIED_SETTINGS.redesignEnabled })
35
- }
36
- />
37
- ) : null
38
- }
39
- control={
40
- <Switch
41
- checked={settings.redesignEnabled}
42
- onCheckedChange={(checked) => updateSettings({ redesignEnabled: Boolean(checked) })}
43
- aria-label="New design"
44
- />
45
- }
46
- />
47
- <SettingsRow
48
- {...searchableSetting("working-shelf")}
49
- description="Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you."
50
- resetAction={
51
- settings.sidebarWorkingShelfEnabled !==
52
- DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled ? (
53
- <SettingResetButton
54
- label="working section"
55
- onClick={() =>
56
- updateSettings({
57
- sidebarWorkingShelfEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled,
58
- })
59
- }
60
- />
61
- ) : null
62
- }
63
- control={
64
- <Switch
65
- checked={settings.sidebarWorkingShelfEnabled}
66
- onCheckedChange={(checked) =>
67
- updateSettings({ sidebarWorkingShelfEnabled: Boolean(checked) })
68
- }
69
- aria-label="Working section"
70
- />
71
- }
72
- />
73
- {/* Clerk is only mounted when this build has T3 Connect. */}
74
- {hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
75
- </SettingsSection>
76
- </SettingsPageContainer>
77
- );
78
-}
79
-
80
-/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
81
-function GuestLinksRowWithSignIn() {
82
- const { isSignedIn } = useAuth();
83
- const { openAuthPrompt } = useT3ConnectAuthPrompt();
84
- // `isSignedIn` is undefined until Clerk loads.
85
- if (isSignedIn !== false) return <GuestLinksRow />;
86
- return (
87
- <SettingsRow
88
- {...searchableSetting("guest-links")}
89
- 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."
90
- control={
91
- <Button size="sm" variant="outline" onClick={openAuthPrompt}>
92
- Sign in
93
- </Button>
94
- }
95
- />
96
- );
97
-}
98
-
99
-function GuestLinksRow() {
100
- const settings = useScopedSettings();
101
- const updateSettings = useUpdateScopedSettings();
102
- return (
103
- <SettingsRow
104
- serverScoped
105
- {...searchableSetting("guest-links")}
106
- settingKeys={["guestSharingEnabled"]}
107
- description={
108
- <>
109
- Share a thread with a guest who watches it live in their browser and sends messages you
110
- approve. Needs T3 Connect: sign in and link this machine in{" "}
111
- <Link to="/settings/connections" className="underline underline-offset-2">
112
- Connections
113
- </Link>
114
- . While it is off, every guest link stops working.
115
- </>
116
- }
117
- control={
118
- <ScopedSwitch
119
- settingKeys={["guestSharingEnabled"]}
120
- checked={settings.guestSharingEnabled}
121
- onCheckedChange={(checked) => updateSettings({ guestSharingEnabled: Boolean(checked) })}
122
- aria-label="Guest links"
123
- />
124
- }
125
- />
126
- );
127
-}
apps/web/src/components/settings/ConnectionsSettings.tsx
+13
-7
@@ -151,7 +151,8 @@ function LocalVersionStatusLabel() {
151
);
152
}
153
154
-export function ConnectionsSettings() {
154
+/** Environments lists the machines this app connects to; access covers who may reach this one. */
155
+export function ConnectionsSettings({ view }: { readonly view: "environments" | "access" }) {
156
const desktopBridge = window.desktopBridge;
157
const { environments } = useEnvironments();
158
const primaryEnvironment = usePrimaryEnvironment();
@@ -285,8 +286,9 @@ export function ConnectionsSettings() {
286
const canMaintain = useEnvironmentScope(primaryEnvironmentId, AuthEnvironmentMaintainScope);
287
const canManageRelay = useEnvironmentScope(primaryEnvironmentId, AuthRelayWriteScope);
288
const canManageLocalBackend = !isLocalEnvironmentDisabled() && canMaintain;
289
+ const showsAccess = view === "access";
290
const authAccessChanges = useEnvironmentQuery(
289
- canReadAccess && primaryEnvironmentId !== null
291
+ showsAccess && canReadAccess && primaryEnvironmentId !== null
292
? authEnvironment.accessChanges({
293
environmentId: primaryEnvironmentId,
294
input: null,
@@ -294,10 +296,10 @@ export function ConnectionsSettings() {
296
: null,
297
);
298
const desktopNetworkAccess = useEnvironmentQuery(
297
- canManageLocalBackend && desktopBridge ? desktopNetworkAccessStateAtom : null,
299
+ showsAccess && canManageLocalBackend && desktopBridge ? desktopNetworkAccessStateAtom : null,
300
);
301
const desktopWsl = useEnvironmentQuery(
300
- canManageLocalBackend && desktopBridge ? desktopWslStateAtom : null,
302
+ showsAccess && canManageLocalBackend && desktopBridge ? desktopWslStateAtom : null,
303
);
304
const desktopWslState = desktopWsl.data;
305
const desktopWslError = desktopWslMutationError ?? desktopWsl.error;
@@ -1069,7 +1071,6 @@ export function ConnectionsSettings() {
1071
) : null
1072
}
1073
>
1072
- <LocalEnvironmentSetting />
1074
{canManageLocalBackend ? (
1075
<SettingsRow
1076
title="Version"
@@ -1466,7 +1467,6 @@ export function ConnectionsSettings() {
1467
title="No environment selected"
1468
description="Connect an environment to view its settings and access."
1469
/>
1469
- <LocalEnvironmentSetting />
1470
{canReadRelay || canManageRelay ? (
1471
<CloudLinkRow canReadRelay={canReadRelay} canManageRelay={canManageRelay} />
1472
) : null}
@@ -1475,9 +1475,15 @@ export function ConnectionsSettings() {
1475
</>
1476
);
1477
1478
+ if (showsAccess) return <SettingsPageContainer>{primarySettings}</SettingsPageContainer>;
1479
+
1480
return (
1481
<SettingsPageContainer>
1480
- {primarySettings}
1482
+ {desktopBridge?.setLocalEnvironmentEnabled ? (
1483
+ <SettingsSection id="this-app" title="This app">
1484
+ <LocalEnvironmentSetting />
1485
+ </SettingsSection>
1486
+ ) : null}
1487
<SettingsSection
1488
{...searchableSetting("remote-environments")}
1489
title="Environments"
apps/web/src/components/settings/IntegrationsSettings.tsx
+39
-24
@@ -118,6 +118,7 @@ import {
118
SettingsSection,
119
} from "./settingsLayout";
120
import { searchableSetting } from "./settingsSearch";
121
+import { AdvancedSettings } from "./AdvancedSettings";
122
import { useSettingsScope } from "./SettingsScopeContext";
123
import { BrowserImportWizard, type WizardTarget } from "./BrowserImportWizard";
124
import type { ImportOutcome } from "./browserImportWizard.logic";
@@ -761,7 +762,7 @@ function BrowserSearchEngineSetting() {
762
);
763
}
764
764
-function PullRequestLinksOpenInAppSetting() {
765
+export function PullRequestLinksOpenInAppSetting() {
766
const openInApp = useClientSettings((settings) => settings.pullRequestLinksOpenInApp);
767
const updateSettings = useUpdatePrimarySettings();
768
@@ -1598,36 +1599,50 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
1599
);
1600
}
1601
1601
-export function IntegrationsSettingsPanel() {
1602
- const previewDefaultsDisabled = !isElectron;
1603
- const previewDefaults = (
1604
- <>
1605
- <BrowserProfilesSetting disabled={previewDefaultsDisabled} />
1606
- <BrowserViewportSetting disabled={previewDefaultsDisabled} />
1607
- <BrowserZoomSetting disabled={previewDefaultsDisabled} />
1608
- <BrowserAppearanceSetting disabled={previewDefaultsDisabled} />
1609
- <BrowserRecordingFrameRateSetting disabled={previewDefaultsDisabled} />
1610
- <BrowserRecordingInputSettings disabled={previewDefaultsDisabled} />
1611
- <BrowserLinkTargetSetting disabled={previewDefaultsDisabled} />
1612
- <BrowserAutoShowFloatingPreviewSetting disabled={previewDefaultsDisabled} />
1613
- </>
1614
- );
1602
+export function BrowserSettingsPanel() {
1603
+ const desktopOnly = !isElectron;
1604
+ const desktopOnlyMessage = desktopOnly ? "Only available in the desktop app." : undefined;
1605
1606
return (
1607
<SettingsPageContainer>
1618
- <SettingsSection id="browser" title="Browser">
1608
+ <SettingsSection id="browser-agent-access" title="Agent access">
1609
<AgentBrowserAccessSetting />
1620
- {previewDefaultsDisabled ? (
1621
- <SettingsUnavailableGroup message="Only available in the desktop app.">
1622
- {previewDefaults}
1623
- </SettingsUnavailableGroup>
1624
- ) : (
1625
- previewDefaults
1626
- )}
1610
+ </SettingsSection>
1611
+ <SettingsSection id="browser" title="Browsing">
1612
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
1613
+ <BrowserProfilesSetting disabled={desktopOnly} />
1614
+ <BrowserLinkTargetSetting disabled={desktopOnly} />
1615
+ <BrowserAutoShowFloatingPreviewSetting disabled={desktopOnly} />
1616
+ </SettingsUnavailableGroup>
1617
{/* Not desktop-only: web clients search from server-run browser tabs too. */}
1618
<BrowserSearchEngineSetting />
1629
- <PullRequestLinksOpenInAppSetting />
1619
+ <AdvancedSettings
1620
+ targetIds={[
1621
+ searchableSetting("browser-default-viewport").id,
1622
+ searchableSetting("browser-default-zoom").id,
1623
+ searchableSetting("browser-default-appearance").id,
1624
+ ]}
1625
+ >
1626
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
1627
+ <BrowserViewportSetting disabled={desktopOnly} />
1628
+ <BrowserZoomSetting disabled={desktopOnly} />
1629
+ <BrowserAppearanceSetting disabled={desktopOnly} />
1630
+ </SettingsUnavailableGroup>
1631
+ </AdvancedSettings>
1632
</SettingsSection>
1633
+ <SettingsSection id="browser-recordings" title="Recordings">
1634
+ <SettingsUnavailableGroup message={desktopOnlyMessage}>
1635
+ <BrowserRecordingFrameRateSetting disabled={desktopOnly} />
1636
+ <BrowserRecordingInputSettings disabled={desktopOnly} />
1637
+ </SettingsUnavailableGroup>
1638
+ </SettingsSection>
1639
+ </SettingsPageContainer>
1640
+ );
1641
+}
1642
+
1643
+export function DevicesSettingsPanel() {
1644
+ return (
1645
+ <SettingsPageContainer>
1646
<DeviceIntegrationSettings />
1647
</SettingsPageContainer>
1648
);
apps/web/src/components/settings/LabsSettingsPanel.tsx
new
+73
@@ -0,0 +1,73 @@
1
+import { useAuth } from "@clerk/react";
2
+import { Link } from "@tanstack/react-router";
3
+
4
+import { hasCloudPublicConfig } from "~/cloud/publicConfig";
5
+import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
6
+import { Button } from "../ui/button";
7
+import { ScopedSwitch } from "./ScopedSwitch";
8
+import { SettingsPageContainer, SettingsRow, SettingsSection } from "./settingsLayout";
9
+import { searchableSetting } from "./settingsSearch";
10
+import { LegacyFeaturesSection } from "./SettingsPanels";
11
+import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
12
+
13
+/** Features still settling in, and legacy behavior kept for people who rely on it. */
14
+export function LabsSettingsPanel() {
15
+ return (
16
+ <SettingsPageContainer>
17
+ <SettingsSection id="beta" title="Beta">
18
+ {/* Clerk is only mounted when this build has T3 Connect. */}
19
+ {hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
20
+ </SettingsSection>
21
+ <LegacyFeaturesSection />
22
+ </SettingsPageContainer>
23
+ );
24
+}
25
+
26
+/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
27
+function GuestLinksRowWithSignIn() {
28
+ const { isSignedIn } = useAuth();
29
+ const { openAuthPrompt } = useT3ConnectAuthPrompt();
30
+ // `isSignedIn` is undefined until Clerk loads.
31
+ if (isSignedIn !== false) return <GuestLinksRow />;
32
+ return (
33
+ <SettingsRow
34
+ {...searchableSetting("guest-links")}
35
+ 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."
36
+ control={
37
+ <Button size="sm" variant="outline" onClick={openAuthPrompt}>
38
+ Sign in
39
+ </Button>
40
+ }
41
+ />
42
+ );
43
+}
44
+
45
+function GuestLinksRow() {
46
+ const settings = useScopedSettings();
47
+ const updateSettings = useUpdateScopedSettings();
48
+ return (
49
+ <SettingsRow
50
+ serverScoped
51
+ {...searchableSetting("guest-links")}
52
+ settingKeys={["guestSharingEnabled"]}
53
+ description={
54
+ <>
55
+ Share a thread with a guest who watches it live in their browser and sends messages you
56
+ approve. Needs T3 Connect: sign in and link this machine in{" "}
57
+ <Link to="/settings/access" className="underline underline-offset-2">
58
+ Sharing & access
59
+ </Link>
60
+ . While it is off, every guest link stops working.
61
+ </>
62
+ }
63
+ control={
64
+ <ScopedSwitch
65
+ settingKeys={["guestSharingEnabled"]}
66
+ checked={settings.guestSharingEnabled}
67
+ onCheckedChange={(checked) => updateSettings({ guestSharingEnabled: Boolean(checked) })}
68
+ aria-label="Guest links"
69
+ />
70
+ }
71
+ />
72
+ );
73
+}
apps/web/src/components/settings/ProjectDefaultsSettings.tsx
+61
-47
@@ -89,7 +89,6 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
89
const mixedPermissions = useScopedSettingsMixed(["defaultRuntimeMode"]);
90
const PermissionIcon = runtimeModeConfig[settings.defaultRuntimeMode].icon;
91
const mixedWorkspace = useScopedSettingsMixed(["defaultThreadEnvMode"]);
92
- const mixedSubmodules = useScopedSettingsMixed(["worktreeSubmodules"]);
92
const mixedAutoPull = useScopedSettingsMixed(["defaultAutoPull"]);
93
const mixedAgentCredits = useScopedSettingsMixed(["removeAgentCreditsOnMerge"]);
94
const mixedMergeMethod = useScopedSettingsMixed(["pullRequestMergeMethod"]);
@@ -328,52 +327,6 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
327
}
328
/>
329
{workspaceRow}
331
- <SettingsRow
332
- serverScoped
333
- settingKeys={["worktreeSubmodules"]}
334
- mixed={mixedSubmodules}
335
- {...searchableSetting("worktree-submodules")}
336
- description={
337
- isProjectScope
338
- ? "How new worktrees in this project populate git submodules."
339
- : "How new worktrees populate git submodules. Projects and their t3.json can override it."
340
- }
341
- resetAction={
342
- !isProjectScope && settings.worktreeSubmodules !== null ? (
343
- <SettingResetButton
344
- label="worktree submodules"
345
- onClick={() => updateSettings({ worktreeSubmodules: null })}
346
- />
347
- ) : null
348
- }
349
- control={
350
- <Select
351
- value={mixedSubmodules ? null : (effective?.worktreeSubmodules ?? null)}
352
- onValueChange={(value) => {
353
- if (isWorktreeSubmodules(value)) updateSettings({ worktreeSubmodules: value });
354
- }}
355
- >
356
- <SelectTrigger size="sm" aria-label="Worktree submodules">
357
- <SelectValue>
358
- {(value: string | null) =>
359
- isWorktreeSubmodules(value)
360
- ? WORKTREE_SUBMODULES_LABELS[value]
361
- : unavailable
362
- ? "Unavailable"
363
- : "Mixed"
364
- }
365
- </SelectValue>
366
- </SelectTrigger>
367
- <SelectPopup align="end" alignItemWithTrigger={false}>
368
- {WORKTREE_SUBMODULES_OPTIONS.map((option) => (
369
- <SelectItem key={option} value={option}>
370
- {WORKTREE_SUBMODULES_LABELS[option]}
371
- </SelectItem>
372
- ))}
373
- </SelectPopup>
374
- </Select>
375
- }
376
- />
330
</>
331
) : (
332
<>
@@ -485,3 +438,64 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
438
</SettingsSection>
439
);
440
}
441
+
442
+export function WorktreeSubmodulesRow() {
443
+ const { scope, target, connectedEnvironments } = useSettingsScope();
444
+ const settings = useScopedSettings();
445
+ const updateSettings = useUpdateScopedSettings();
446
+ const mixedSubmodules = useScopedSettingsMixed(["worktreeSubmodules"]);
447
+ const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
448
+ const unavailable = connectedEnvironments.length === 0;
449
+ const effective = target
450
+ ? resolveProjectSettings(target.settings, null, null, null).settings
451
+ : null;
452
+
453
+ return (
454
+ <SettingsRow
455
+ serverScoped
456
+ settingKeys={["worktreeSubmodules"]}
457
+ mixed={mixedSubmodules}
458
+ {...searchableSetting("worktree-submodules")}
459
+ description={
460
+ isProjectScope
461
+ ? "How new worktrees in this project populate git submodules."
462
+ : "How new worktrees populate git submodules. Projects and their t3.json can override it."
463
+ }
464
+ resetAction={
465
+ !isProjectScope && settings.worktreeSubmodules !== null ? (
466
+ <SettingResetButton
467
+ label="worktree submodules"
468
+ onClick={() => updateSettings({ worktreeSubmodules: null })}
469
+ />
470
+ ) : null
471
+ }
472
+ control={
473
+ <Select
474
+ value={mixedSubmodules ? null : (effective?.worktreeSubmodules ?? null)}
475
+ onValueChange={(value) => {
476
+ if (isWorktreeSubmodules(value)) updateSettings({ worktreeSubmodules: value });
477
+ }}
478
+ >
479
+ <SelectTrigger size="sm" aria-label="Worktree submodules">
480
+ <SelectValue>
481
+ {(value: string | null) =>
482
+ isWorktreeSubmodules(value)
483
+ ? WORKTREE_SUBMODULES_LABELS[value]
484
+ : unavailable
485
+ ? "Unavailable"
486
+ : "Mixed"
487
+ }
488
+ </SelectValue>
489
+ </SelectTrigger>
490
+ <SelectPopup align="end" alignItemWithTrigger={false}>
491
+ {WORKTREE_SUBMODULES_OPTIONS.map((option) => (
492
+ <SelectItem key={option} value={option}>
493
+ {WORKTREE_SUBMODULES_LABELS[option]}
494
+ </SelectItem>
495
+ ))}
496
+ </SelectPopup>
497
+ </Select>
498
+ }
499
+ />
500
+ );
501
+}
apps/web/src/components/settings/ProviderSettingsPanel.tsx
+3
-1
@@ -105,6 +105,7 @@ import { CodexSetupSection, CodexManagedRuntimeFields } from "./CodexSetupSectio
105
import { readCodexSetupMode } from "./CodexSetupSection.logic";
106
import { providerClients } from "./providerDriverMeta";
107
import { searchableSetting } from "./settingsSearch";
108
+import { CompactIdleThreadsRow } from "./SettingsPanels";
109
import {
110
backgroundActivityOverrideSettings,
111
buildProviderInstanceUpdatePatch,
@@ -1107,7 +1108,7 @@ export function EnvironmentProviderSettings({
1108
<PolicyTooltip>
1109
This interval is configured here, then the shared Background activity policy decides
1110
whether provider probes may run when the timer fires. Custom intervals appear as
1110
- Advanced in General settings.
1111
+ Advanced in Maintenance settings.
1112
</PolicyTooltip>
1113
</span>
1114
}
@@ -1172,6 +1173,7 @@ export function EnvironmentProviderSettings({
1173
</div>
1174
}
1175
/>
1176
+ <CompactIdleThreadsRow />
1177
</SettingsSection>
1178
1179
{isAddInstanceDialogOpen && !readOnly ? (
apps/web/src/components/settings/ScheduledTasksSettings.tsx
+2
-2
@@ -1064,8 +1064,8 @@ function WebhookDeliveryMode({ environmentId }: { readonly environmentId: Enviro
1064
{cloudLink.data.holdWebhooksWhileOffline
1065
? "Held for up to 24 hours while this environment is offline. "
1066
: "Forwarded live. Requests fail while this environment is offline. "}
1067
- <Link to="/settings/connections" className="underline underline-offset-2">
1068
- Change in Connections
1067
+ <Link to="/settings/access" className="underline underline-offset-2">
1068
+ Change in Sharing & access
1069
</Link>
1070
</p>
1071
);
apps/web/src/components/settings/SettingsFontPreviews.tsx
+11
-1
@@ -142,6 +142,7 @@ const TERMINAL_PREVIEW_TRANSCRIPT =
142
" \x1b[42;30m READY \x1b[0m \x1b[2mwatching for changes, press\x1b[0m \x1b[1mq\x1b[0m \x1b[2mto quit\x1b[0m\r\n" +
143
"\r\n" +
144
TERMINAL_PROMPT;
145
+const TERMINAL_PREVIEW_ROWS = TERMINAL_PREVIEW_TRANSCRIPT.split("\r\n").length;
146
147
function previewTerminalFont(family: string, size: number): { family?: string; size: number } {
148
const trimmed = family.trim();
@@ -154,8 +155,17 @@ export function TerminalFontPreview({ family, size }: { family: string; size: nu
155
const [initialFont] = useState(() => previewTerminalFont(family, size));
156
const { theme, resolvedTheme } = useTheme();
157
158
+ // The box grows with the font so the whole transcript shows without scrolling.
159
useEffect(() => {
158
- void surface?.setFont(previewTerminalFont(family, size));
160
+ if (!surface) return;
161
+ void surface.setFont(previewTerminalFont(family, size)).then(() => {
162
+ const mount = mountRef.current;
163
+ if (!mount) return;
164
+ // The border sits inside the box's height and is not part of the terminal's grid.
165
+ const border = mount.offsetHeight - mount.clientHeight;
166
+ mount.style.height = `${surface.heightForRows(TERMINAL_PREVIEW_ROWS) + border}px`;
167
+ surface.fit();
168
+ });
169
}, [surface, family, size]);
170
171
// Palette changes may preserve light/dark mode; re-read terminal tokens for every theme change.
apps/web/src/components/settings/SettingsPanels.tsx
+826
-721
@@ -1,7 +1,6 @@
1
-import { SettingsGroup } from "./SettingsGroup";
1
import { NotificationSettings } from "./NotificationSettings";
2
import { PRIVACY_POLICY_URL } from "../../legalLinks";
4
-import { CheckIcon, ChevronRightIcon } from "lucide-react";
3
+import { CheckIcon } from "lucide-react";
4
import { Link, useNavigate } from "@tanstack/react-router";
5
import { useRef, useState } from "react";
6
import {
@@ -51,7 +50,7 @@ import {
50
useUpdateScopedSettings,
51
} from "./useScopedSettings";
52
import { useScopedModelDisabledReason } from "./useScopedModelAvailability";
54
-import { useSettingsScope } from "./SettingsScopeContext";
53
+import { useOptionalSettingsScope, useSettingsScope } from "./SettingsScopeContext";
54
import { scopedIdleCompaction } from "./scopedSettings";
55
import { ProjectDefaultsSettings } from "./ProjectDefaultsSettings";
56
import { ThreadTitleInstructionsSettings } from "./ThreadTitleInstructionsSettings";
@@ -71,7 +70,6 @@ import { isMacPlatform } from "../../lib/utils";
70
import { useEnvironmentProviders } from "../../state/environments";
71
import { EMPTY_SERVER_PROVIDERS } from "../../state/server";
72
import { Button } from "../ui/button";
74
-import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
73
import { DraftInput } from "../ui/draft-input";
74
import { Input } from "../ui/input";
75
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -94,11 +92,12 @@ import {
92
SettingsPageContainer,
93
SettingsRow,
94
SettingsSection,
97
- useSettingsSearchTarget,
98
- useSettingsSearchTargetId,
95
} from "./settingsLayout";
96
import { searchableSetting } from "./settingsSearch";
97
import { BackgroundActivitySettingsRow } from "./BackgroundActivitySettings";
98
+import { AdvancedSettings } from "./AdvancedSettings";
99
+import { PullRequestLinksOpenInAppSetting } from "./IntegrationsSettings";
100
+import { StorageCleanupSections } from "./StorageSettings";
101
102
const RESPONSE_STREAMING_MODE_LABELS: Record<ResponseStreamingMode, string> = {
103
turn: "Wait for the full response",
@@ -700,166 +699,80 @@ function AutoSettleDaysInput({
699
);
700
}
701
703
-const LEGACY_FEATURE_TARGET_IDS: ReadonlySet<string> = new Set([
704
- "legacy-plan-mode",
705
- "legacy-context-window-indicator",
706
- "legacy-sidebar",
707
-]);
708
-
709
-function LegacyFeaturesSection() {
702
+export function LegacyFeaturesSection() {
703
const settings = useScopedSettings();
704
const updateSettings = useUpdateScopedSettings();
712
- const [open, setOpen] = useState(false);
713
- const searchTargetId = useSettingsSearchTargetId();
714
- const targetRef = useSettingsSearchTarget<HTMLElement>("legacy-features");
715
- // A search jump to a legacy setting opens the fold before its row mounts.
716
- const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
717
- if (seenSearchTargetId !== searchTargetId) {
718
- setSeenSearchTargetId(searchTargetId);
719
- if (searchTargetId !== null && LEGACY_FEATURE_TARGET_IDS.has(searchTargetId)) setOpen(true);
720
- }
705
706
return (
723
- <section id="legacy-features" ref={targetRef} tabIndex={-1} className="space-y-2.5">
724
- <Collapsible open={open} onOpenChange={setOpen}>
725
- <CollapsibleTrigger className="group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4">
726
- <h2 className="text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground">
727
- Legacy features
728
- </h2>
729
- <ChevronRightIcon className="size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90" />
730
- </CollapsibleTrigger>
731
- <CollapsiblePanel>
732
- <SettingsGroup>
733
- <SettingsRow
734
- {...searchableSetting("legacy-plan-mode")}
735
- description="Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode."
736
- control={
737
- <Switch
738
- checked={settings.planModeEnabled}
739
- onCheckedChange={(checked) => {
740
- updateSettings({ planModeEnabled: Boolean(checked) });
741
- }}
742
- aria-label="Plan mode (legacy)"
743
- />
744
- }
745
- />
746
- <SettingsRow
747
- {...searchableSetting("legacy-context-window-indicator")}
748
- description="Shows context window usage as a circular indicator in the composer."
749
- control={
750
- <Switch
751
- checked={settings.contextWindowMeterEnabled}
752
- onCheckedChange={(checked) =>
753
- updateSettings({ contextWindowMeterEnabled: Boolean(checked) })
754
- }
755
- aria-label="Context window indicator (legacy)"
756
- />
757
- }
758
- />
759
- <SettingsRow
760
- {...searchableSetting("legacy-sidebar")}
761
- description="Restore per-project thread trees instead of the default flat sidebar."
762
- control={
763
- <Switch
764
- checked={settings.legacySidebarEnabled}
765
- onCheckedChange={(checked) =>
766
- updateSettings({ legacySidebarEnabled: Boolean(checked) })
767
- }
768
- aria-label="Sidebar (legacy)"
769
- />
770
- }
771
- />
772
- </SettingsGroup>
773
- </CollapsiblePanel>
774
- </Collapsible>
775
- </section>
707
+ <SettingsSection id="legacy-features" title="Legacy">
708
+ <SettingsRow
709
+ {...searchableSetting("legacy-plan-mode")}
710
+ description="Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode."
711
+ control={
712
+ <Switch
713
+ checked={settings.planModeEnabled}
714
+ onCheckedChange={(checked) => {
715
+ updateSettings({ planModeEnabled: Boolean(checked) });
716
+ }}
717
+ aria-label="Plan mode (legacy)"
718
+ />
719
+ }
720
+ />
721
+ <SettingsRow
722
+ {...searchableSetting("legacy-context-window-indicator")}
723
+ description="Shows context window usage as a circular indicator in the composer."
724
+ control={
725
+ <Switch
726
+ checked={settings.contextWindowMeterEnabled}
727
+ onCheckedChange={(checked) =>
728
+ updateSettings({ contextWindowMeterEnabled: Boolean(checked) })
729
+ }
730
+ aria-label="Context window indicator (legacy)"
731
+ />
732
+ }
733
+ />
734
+ <SettingsRow
735
+ {...searchableSetting("legacy-sidebar")}
736
+ description="Restore per-project thread trees instead of the default flat sidebar."
737
+ control={
738
+ <Switch
739
+ checked={settings.legacySidebarEnabled}
740
+ onCheckedChange={(checked) =>
741
+ updateSettings({ legacySidebarEnabled: Boolean(checked) })
742
+ }
743
+ aria-label="Sidebar (legacy)"
744
+ />
745
+ }
746
+ />
747
+ </SettingsSection>
748
);
749
}
750
751
export function GeneralSettingsPanel() {
780
- const modifierLabel = isMacPlatform(navigator.platform) ? "⌘" : "Ctrl";
781
- const sendShortcutOptions = [
782
- { value: "enter", label: "Enter" },
783
- { value: "mod-enter-multiline", label: `${modifierLabel} + Enter for multiline prompts` },
784
- { value: "mod-enter", label: `${modifierLabel} + Enter always` },
785
- ] as const;
752
const settings = useScopedSettings();
753
const updateSettings = useUpdateScopedSettings();
788
- const navigate = useNavigate();
789
- const { scope, environment, connectedEnvironments, target, targets } = useSettingsScope();
790
- const idleCompaction = scopedIdleCompaction(targets.length > 0 ? targets : [{ settings }]);
791
- const environmentId = environment?.environmentId ?? null;
792
- const isEnvironmentScope = scope.environmentIds.length === 1 && environmentId !== null;
793
- const hasServerTargets = connectedEnvironments.length > 0;
794
- const mixedResponseStreamingMode = useScopedSettingsMixed(["responseStreamingMode"]);
754
const lastEnabledProjectGroupingMode = useRef<SidebarProjectGroupingMode>(
755
readLastEnabledProjectGroupingMode(),
756
);
798
- const providersByEnvironment = useEnvironmentProviders();
799
- const serverProviders =
800
- (environment?.serverConfig
801
- ? providersByEnvironment.get(environment.environmentId)
802
- : undefined) ?? EMPTY_SERVER_PROVIDERS;
803
- const supportsAutoSettlement =
804
- connectedEnvironments.length > 0 &&
805
- connectedEnvironments.every(
806
- (target) => target.serverConfig?.environment.capabilities.threadAutoSettlement === true,
807
- );
808
- const supportsAutoSettlementScope = connectedEnvironments.every(
809
- (target) => target.serverConfig?.environment.capabilities.threadAutoSettlementScope === true,
810
- );
811
- const supportsRestartContinuation =
812
- connectedEnvironments.length > 0 &&
813
- connectedEnvironments.every(
814
- (target) => target.serverConfig?.environment.capabilities.threadRestartContinuation === true,
815
- );
816
-
817
- const textGenerationProviders = serverProviders.filter(
818
- (provider) => provider.supportsTextGeneration !== false,
819
- );
820
- const textGenerationModelSelection = resolveAppModelSelectionState(
821
- settings,
822
- textGenerationProviders,
823
- );
824
- const textGenInstanceId = textGenerationModelSelection.instanceId;
825
- const textGenModel = textGenerationModelSelection.model;
826
- const textGenModelOptions = textGenerationModelSelection.options;
827
- const textGenerationModelInstanceEntries = sortProviderInstanceEntries(
828
- applyProviderInstanceSettings(
829
- deriveProviderInstanceEntries(textGenerationProviders),
830
- settings,
831
- target?.projectId ?? null,
832
- ),
833
- );
834
- const hasTextGenerationProvider = textGenerationModelInstanceEntries.some(
835
- (entry) => entry.enabled && entry.isAvailable,
836
- );
837
- const textGenInstanceEntry = textGenerationModelInstanceEntries.find(
838
- (entry) => entry.instanceId === textGenInstanceId,
839
- );
840
- const textGenProvider: ProviderDriverKind =
841
- textGenInstanceEntry?.driverKind ?? DEFAULT_DRIVER_KIND;
842
- const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance(
843
- settings,
844
- textGenerationProviders,
845
- textGenInstanceId,
846
- textGenModel,
847
- );
848
- const isTextGenerationModelDirty = !Equal.equals(
849
- settings.textGenerationModelSelection ?? null,
850
- DEFAULT_UNIFIED_SETTINGS.textGenerationModelSelection ?? null,
851
- );
852
- const textGenerationModelDisabledReason = useScopedModelDisabledReason(
853
- settings,
854
- textGenerationModelInstanceEntries,
855
- );
856
- const mixedAddProjectBaseDirectory = useScopedSettingsMixed(["addProjectBaseDirectory"]);
857
- const mixedTextGenerationModel = useScopedSettingsMixed(["textGenerationModelSelection"]);
757
758
return (
759
<SettingsPageContainer>
861
- <ProjectDefaultsSettings category="general" />
862
- <SettingsSection id="organization" title="Organization">
760
+ <SettingsSection id="notifications" title="Notifications">
761
+ <NotificationSettings />
762
+ <SettingsRow
763
+ {...searchableSetting("in-app-notifications")}
764
+ description="Show a toast when another thread finishes, fails, or needs input or approval while this app has focus."
765
+ control={
766
+ <Switch
767
+ checked={settings.inAppNotificationsEnabled}
768
+ onCheckedChange={(checked) => updateSettings({ inAppNotificationsEnabled: checked })}
769
+ aria-label="In-app notifications"
770
+ />
771
+ }
772
+ />
773
+ </SettingsSection>
774
+
775
+ <SettingsSection id="sidebar" title="Sidebar">
776
<SettingsRow
777
{...searchableSetting("project-grouping")}
778
description="Combine matching repositories across environments."
@@ -935,302 +848,95 @@ export function GeneralSettingsPanel() {
848
</Select>
849
}
850
/>
938
-
851
<SettingsRow
940
- serverScoped
941
- {...searchableSetting("auto-resume-limited-threads")}
942
- description="Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation."
943
- settingKeys={["autoResumeLimitedThreads"]}
944
- control={
945
- <ScopedSwitch
946
- settingKeys={["autoResumeLimitedThreads"]}
947
- checked={settings.autoResumeLimitedThreads}
948
- onCheckedChange={(checked) =>
949
- updateSettings({ autoResumeLimitedThreads: Boolean(checked) })
950
- }
951
- aria-label="Resume after usage limits"
952
- />
852
+ {...searchableSetting("working-shelf")}
853
+ description="Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you."
854
+ resetAction={
855
+ settings.sidebarWorkingShelfEnabled !==
856
+ DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled ? (
857
+ <SettingResetButton
858
+ label="working section"
859
+ onClick={() =>
860
+ updateSettings({
861
+ sidebarWorkingShelfEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled,
862
+ })
863
+ }
864
+ />
865
+ ) : null
866
}
954
- />
955
- <SettingsRow
956
- serverScoped
957
- {...searchableSetting("snooze-limited-threads")}
958
- description="Snooze usage-limit stops until reset. Pair with resume to continue on wake."
959
- settingKeys={["snoozeLimitedThreads"]}
867
control={
961
- <ScopedSwitch
962
- settingKeys={["snoozeLimitedThreads"]}
963
- checked={settings.snoozeLimitedThreads}
868
+ <Switch
869
+ checked={settings.sidebarWorkingShelfEnabled}
870
onCheckedChange={(checked) =>
965
- updateSettings({ snoozeLimitedThreads: Boolean(checked) })
871
+ updateSettings({ sidebarWorkingShelfEnabled: Boolean(checked) })
872
}
967
- aria-label="Snooze until limits reset"
873
+ aria-label="Working section"
874
/>
875
}
876
/>
877
+ </SettingsSection>
878
879
+ <SettingsSection id="confirmations" title="Confirmations">
880
<SettingsRow
973
- serverScoped
974
- settingKeys={["idleCompaction", "compactIdleThreads"]}
975
- mixed={idleCompaction.mixed}
976
- {...searchableSetting("compact-idle-threads")}
977
- 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."
881
+ {...searchableSetting("unpin-confirmation")}
882
+ description="Ask before unpinning a thread from the pinned section."
883
resetAction={
979
- globalIdleCompaction(settings) !== globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) ? (
884
+ settings.confirmThreadUnpin !== DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin ? (
885
<SettingResetButton
981
- label="compact idle threads"
886
+ label="unpin confirmation"
887
onClick={() =>
983
- updateSettings({ idleCompaction: globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) })
888
+ updateSettings({
889
+ confirmThreadUnpin: DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin,
890
+ })
891
}
892
/>
893
) : null
894
}
988
- control={
989
- <Select
990
- value={idleCompaction.mixed ? null : globalIdleCompaction(settings)}
991
- onValueChange={(value) => {
992
- const mode = IDLE_COMPACTION_MODES.find((candidate) => candidate.value === value);
993
- if (mode) updateSettings({ idleCompaction: mode.value });
994
- }}
995
- >
996
- <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Compact idle threads">
997
- <SelectValue>
998
- {(value: string | null) =>
999
- value === null
1000
- ? "Mixed"
1001
- : IDLE_COMPACTION_MODES.find((mode) => mode.value === value)?.label
1002
- }
1003
- </SelectValue>
1004
- </SelectTrigger>
1005
- <SelectPopup align="end" alignItemWithTrigger={false}>
1006
- {IDLE_COMPACTION_MODES.map((mode) => (
1007
- <SelectItem
1008
- hideIndicator
1009
- key={mode.value}
1010
- value={mode.value}
1011
- // A server from before modes has only the on/off switch, so it cannot store "Never".
1012
- disabled={mode.value === "off" && !idleCompaction.neverAvailable}
1013
- >
1014
- {mode.label}
1015
- </SelectItem>
1016
- ))}
1017
- </SelectPopup>
1018
- </Select>
1019
- }
1020
- />
1021
-
1022
- {supportsAutoSettlement ? (
1023
- <>
1024
- <SettingsRow
1025
- serverScoped
1026
- settingKeys={["sidebarAutoSettleOnMerge"]}
1027
- {...searchableSetting("auto-settle-merged-threads")}
1028
- description="Settle a thread when its pull request merges. Closed pull requests still settle automatically."
1029
- resetAction={
1030
- settings.sidebarAutoSettleOnMerge !==
1031
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge ? (
1032
- <SettingResetButton
1033
- label="auto-settle on merge"
1034
- onClick={() =>
1035
- updateSettings({
1036
- sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge,
1037
- })
1038
- }
1039
- />
1040
- ) : null
1041
- }
1042
- control={
1043
- <ScopedSwitch
1044
- settingKeys={["sidebarAutoSettleOnMerge"]}
1045
- checked={settings.sidebarAutoSettleOnMerge}
1046
- onCheckedChange={(checked) =>
1047
- updateSettings({ sidebarAutoSettleOnMerge: Boolean(checked) })
1048
- }
1049
- aria-label="Auto-settle merged threads"
1050
- />
1051
- }
1052
- />
1053
-
1054
- <SettingsRow
1055
- serverScoped
1056
- settingKeys={["sidebarAutoSettleAfterDays"]}
1057
- {...searchableSetting("auto-settle-inactive-threads")}
1058
- description="Sidebar threads with no activity for this long settle automatically."
1059
- resetAction={
1060
- settings.sidebarAutoSettleAfterDays !==
1061
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays ? (
1062
- <SettingResetButton
1063
- label="auto-settle"
1064
- onClick={() =>
1065
- updateSettings({
1066
- sidebarAutoSettleAfterDays:
1067
- DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays,
1068
- })
1069
- }
1070
- />
1071
- ) : null
1072
- }
1073
- control={
1074
- <ScopedSwitch
1075
- settingKeys={["sidebarAutoSettleAfterDays"]}
1076
- checked={settings.sidebarAutoSettleAfterDays !== null}
1077
- onCheckedChange={(checked) =>
1078
- updateSettings({
1079
- sidebarAutoSettleAfterDays: checked ? AUTO_SETTLE_DEFAULT_DAYS : null,
1080
- })
1081
- }
1082
- aria-label="Auto-settle inactive threads"
1083
- />
1084
- }
1085
- />
1086
- {settings.sidebarAutoSettleAfterDays !== null ? (
1087
- <SettingsRow
1088
- serverScoped
1089
- settingKeys={["sidebarAutoSettleAfterDays"]}
1090
- title={searchableSetting("days-before-auto-settle").title}
1091
- description="Any new activity un-settles a thread automatically."
1092
- control={
1093
- <AutoSettleDaysInput
1094
- value={settings.sidebarAutoSettleAfterDays}
1095
- onCommit={(days) => updateSettings({ sidebarAutoSettleAfterDays: days })}
1096
- />
1097
- }
1098
- />
1099
- ) : null}
1100
- {settings.sidebarAutoSettleAfterDays !== null && supportsAutoSettlementScope ? (
1101
- <SettingsRow
1102
- serverScoped
1103
- settingKeys={["sidebarAutoSettleKeepPullRequests"]}
1104
- title="Keep threads with a PR"
1105
- description="Inactivity does not settle threads with a pull request. Merge and close still do."
1106
- control={
1107
- <ScopedSwitch
1108
- settingKeys={["sidebarAutoSettleKeepPullRequests"]}
1109
- checked={settings.sidebarAutoSettleKeepPullRequests}
1110
- onCheckedChange={(checked) =>
1111
- updateSettings({ sidebarAutoSettleKeepPullRequests: checked })
1112
- }
1113
- aria-label="Keep threads with a PR"
1114
- />
1115
- }
1116
- />
1117
- ) : null}
1118
- </>
1119
- ) : null}
1120
- </SettingsSection>
1121
-
1122
- <SettingsSection id="behavior" title="Behavior">
1123
- <NotificationSettings />
1124
- <SettingsRow
1125
- {...searchableSetting("in-app-notifications")}
1126
- description="Show a toast when another thread finishes, fails, or needs input or approval while this app has focus."
895
control={
896
<Switch
1129
- checked={settings.inAppNotificationsEnabled}
1130
- onCheckedChange={(checked) => updateSettings({ inAppNotificationsEnabled: checked })}
1131
- aria-label="In-app notifications"
897
+ checked={settings.confirmThreadUnpin}
898
+ onCheckedChange={(checked) =>
899
+ updateSettings({ confirmThreadUnpin: Boolean(checked) })
900
+ }
901
+ aria-label="Confirm thread unpinning"
902
/>
903
}
904
/>
905
<SettingsRow
1136
- {...searchableSetting("time-format")}
1137
- description="System default follows your browser or OS clock preference."
906
+ {...searchableSetting("archive-confirmation")}
907
+ description="Require a second click on the inline archive action before a thread is archived."
908
resetAction={
1139
- settings.timestampFormat !== DEFAULT_UNIFIED_SETTINGS.timestampFormat ? (
909
+ settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? (
910
<SettingResetButton
1141
- label="time format"
911
+ label="archive confirmation"
912
onClick={() =>
913
updateSettings({
1144
- timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,
914
+ confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive,
915
})
916
}
917
/>
918
) : null
919
}
920
control={
1151
- <Select
1152
- value={settings.timestampFormat}
1153
- onValueChange={(value) => {
1154
- if (value === "locale" || value === "12-hour" || value === "24-hour") {
1155
- updateSettings({ timestampFormat: value });
1156
- }
1157
- }}
1158
- >
1159
- <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Timestamp format">
1160
- <SelectValue>{TIMESTAMP_FORMAT_LABELS[settings.timestampFormat]}</SelectValue>
1161
- </SelectTrigger>
1162
- <SelectPopup align="end" alignItemWithTrigger={false}>
1163
- <SelectItem hideIndicator value="locale">
1164
- {TIMESTAMP_FORMAT_LABELS.locale}
1165
- </SelectItem>
1166
- <SelectItem hideIndicator value="12-hour">
1167
- {TIMESTAMP_FORMAT_LABELS["12-hour"]}
1168
- </SelectItem>
1169
- <SelectItem hideIndicator value="24-hour">
1170
- {TIMESTAMP_FORMAT_LABELS["24-hour"]}
1171
- </SelectItem>
1172
- </SelectPopup>
1173
- </Select>
1174
- }
1175
- />
1176
- <SettingsRow
1177
- serverScoped
1178
- settingKeys={["responseStreamingMode"]}
1179
- {...searchableSetting("response-streaming")}
1180
- description={
1181
- mixedResponseStreamingMode
1182
- ? "The selected targets use different streaming modes."
1183
- : RESPONSE_STREAMING_MODE_DESCRIPTIONS[settings.responseStreamingMode]
1184
- }
1185
- resetAction={
1186
- settings.responseStreamingMode !== DEFAULT_UNIFIED_SETTINGS.responseStreamingMode ? (
1187
- <SettingResetButton
1188
- label="response streaming"
1189
- onClick={() =>
1190
- updateSettings({
1191
- responseStreamingMode: DEFAULT_UNIFIED_SETTINGS.responseStreamingMode,
1192
- })
1193
- }
1194
- />
1195
- ) : null
1196
- }
1197
- control={
1198
- <Select
1199
- value={mixedResponseStreamingMode ? null : settings.responseStreamingMode}
1200
- onValueChange={(value) => {
1201
- if (value === "turn" || value === "paragraph") {
1202
- updateSettings({ responseStreamingMode: value });
1203
- }
1204
- }}
1205
- >
1206
- <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Response streaming">
1207
- <SelectValue>
1208
- {(value: ResponseStreamingMode | null) =>
1209
- value === null ? "Mixed" : RESPONSE_STREAMING_MODE_LABELS[value]
1210
- }
1211
- </SelectValue>
1212
- </SelectTrigger>
1213
- <SelectPopup align="end" alignItemWithTrigger={false}>
1214
- <SelectItem hideIndicator value="turn">
1215
- {RESPONSE_STREAMING_MODE_LABELS.turn}
1216
- </SelectItem>
1217
- <SelectItem hideIndicator value="paragraph">
1218
- {RESPONSE_STREAMING_MODE_LABELS.paragraph}
1219
- </SelectItem>
1220
- </SelectPopup>
1221
- </Select>
921
+ <Switch
922
+ checked={settings.confirmThreadArchive}
923
+ onCheckedChange={(checked) =>
924
+ updateSettings({ confirmThreadArchive: Boolean(checked) })
925
+ }
926
+ aria-label="Confirm thread archiving"
927
+ />
928
}
929
/>
930
<SettingsRow
1225
- {...searchableSetting("hide-whitespace-changes")}
1226
- description="Set whether the diff panel ignores whitespace-only edits by default."
931
+ {...searchableSetting("delete-confirmation")}
932
+ description="Ask before deleting a thread and its chat history."
933
resetAction={
1228
- settings.diffIgnoreWhitespace !== DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace ? (
934
+ settings.confirmThreadDelete !== DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete ? (
935
<SettingResetButton
1230
- label="diff whitespace changes"
936
+ label="delete confirmation"
937
onClick={() =>
938
updateSettings({
1233
- diffIgnoreWhitespace: DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace,
939
+ confirmThreadDelete: DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete,
940
})
941
}
942
/>
@@ -1238,24 +944,68 @@ export function GeneralSettingsPanel() {
944
}
945
control={
946
<Switch
1241
- checked={settings.diffIgnoreWhitespace}
947
+ checked={settings.confirmThreadDelete}
948
onCheckedChange={(checked) =>
1243
- updateSettings({ diffIgnoreWhitespace: Boolean(checked) })
949
+ updateSettings({ confirmThreadDelete: Boolean(checked) })
950
}
1245
- aria-label="Hide whitespace changes by default"
951
+ aria-label="Confirm thread deletion"
952
/>
953
}
954
/>
955
+ {isElectron ? (
956
+ <SettingsRow
957
+ {...searchableSetting("quit-confirmation")}
958
+ description="Hold mode also quits on two quick presses."
959
+ resetAction={
960
+ settings.confirmQuit !== DEFAULT_UNIFIED_SETTINGS.confirmQuit ? (
961
+ <SettingResetButton
962
+ label="quit shortcut behavior"
963
+ onClick={() =>
964
+ updateSettings({ confirmQuit: DEFAULT_UNIFIED_SETTINGS.confirmQuit })
965
+ }
966
+ />
967
+ ) : null
968
+ }
969
+ control={
970
+ <Select
971
+ value={settings.confirmQuit}
972
+ onValueChange={(value) => {
973
+ if (value === "direct" || value === "hold" || value === "double-click") {
974
+ updateSettings({ confirmQuit: value });
975
+ }
976
+ }}
977
+ >
978
+ <SelectTrigger
979
+ size="sm"
980
+ className="w-full sm:w-40"
981
+ aria-label="Quit shortcut behavior"
982
+ >
983
+ <SelectValue>{QUIT_CONFIRMATION_MODE_LABELS[settings.confirmQuit]}</SelectValue>
984
+ </SelectTrigger>
985
+ <SelectPopup align="end" alignItemWithTrigger={false}>
986
+ {Object.entries(QUIT_CONFIRMATION_MODE_LABELS).map(([value, label]) => (
987
+ <SelectItem hideIndicator key={value} value={value}>
988
+ {label}
989
+ </SelectItem>
990
+ ))}
991
+ </SelectPopup>
992
+ </Select>
993
+ }
994
+ />
995
+ ) : null}
996
+ </SettingsSection>
997
+
998
+ <SettingsSection id="display" title="Display">
999
<SettingsRow
1250
- {...searchableSetting("default-diff-file-state")}
1251
- description="Start with files expanded or collapsed when opening diffs or a pull request's Code tab."
1000
+ {...searchableSetting("time-format")}
1001
+ description="System default follows your browser or OS clock preference."
1002
resetAction={
1253
- settings.diffFilesCollapsed !== DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed ? (
1003
+ settings.timestampFormat !== DEFAULT_UNIFIED_SETTINGS.timestampFormat ? (
1004
<SettingResetButton
1255
- label="default diff file state"
1005
+ label="time format"
1006
onClick={() =>
1007
updateSettings({
1258
- diffFilesCollapsed: DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed,
1008
+ timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,
1009
})
1010
}
1011
/>
@@ -1263,118 +1013,48 @@ export function GeneralSettingsPanel() {
1013
}
1014
control={
1015
<Select
1266
- value={settings.diffFilesCollapsed ? "collapsed" : "expanded"}
1016
+ value={settings.timestampFormat}
1017
onValueChange={(value) => {
1268
- if (value === "expanded" || value === "collapsed") {
1269
- updateSettings({ diffFilesCollapsed: value === "collapsed" });
1018
+ if (value === "locale" || value === "12-hour" || value === "24-hour") {
1019
+ updateSettings({ timestampFormat: value });
1020
}
1021
}}
1022
>
1273
- <SelectTrigger
1274
- size="sm"
1275
- className="w-full sm:w-40"
1276
- aria-label="Default diff file state"
1277
- >
1278
- <SelectValue>{settings.diffFilesCollapsed ? "Collapsed" : "Expanded"}</SelectValue>
1023
+ <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Timestamp format">
1024
+ <SelectValue>{TIMESTAMP_FORMAT_LABELS[settings.timestampFormat]}</SelectValue>
1025
</SelectTrigger>
1026
<SelectPopup align="end" alignItemWithTrigger={false}>
1281
- <SelectItem hideIndicator value="expanded">
1282
- Expanded
1283
- </SelectItem>
1284
- <SelectItem hideIndicator value="collapsed">
1285
- Collapsed
1027
+ <SelectItem hideIndicator value="locale">
1028
+ {TIMESTAMP_FORMAT_LABELS.locale}
1029
</SelectItem>
1287
- </SelectPopup>
1288
- </Select>
1289
- }
1290
- />
1291
- <SettingsRow
1292
- {...searchableSetting("diff-layout")}
1293
- description="Show diffs stacked or side by side. The toggle in the diff toolbar changes this too."
1294
- resetAction={
1295
- settings.diffLayout !== DEFAULT_UNIFIED_SETTINGS.diffLayout ? (
1296
- <SettingResetButton
1297
- label="diff layout"
1298
- onClick={() => updateSettings({ diffLayout: DEFAULT_UNIFIED_SETTINGS.diffLayout })}
1299
- />
1300
- ) : null
1301
- }
1302
- control={
1303
- <Select
1304
- value={settings.diffLayout}
1305
- onValueChange={(value) => {
1306
- if (value === "stacked" || value === "split") {
1307
- updateSettings({ diffLayout: value });
1308
- }
1309
- }}
1310
- >
1311
- <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Diff layout">
1312
- <SelectValue>{DIFF_LAYOUT_LABELS[settings.diffLayout]}</SelectValue>
1313
- </SelectTrigger>
1314
- <SelectPopup align="end" alignItemWithTrigger={false}>
1315
- <SelectItem hideIndicator value="stacked">
1316
- {DIFF_LAYOUT_LABELS.stacked}
1030
+ <SelectItem hideIndicator value="12-hour">
1031
+ {TIMESTAMP_FORMAT_LABELS["12-hour"]}
1032
</SelectItem>
1318
- <SelectItem hideIndicator value="split">
1319
- {DIFF_LAYOUT_LABELS.split}
1033
+ <SelectItem hideIndicator value="24-hour">
1034
+ {TIMESTAMP_FORMAT_LABELS["24-hour"]}
1035
</SelectItem>
1036
</SelectPopup>
1037
</Select>
1038
}
1039
/>
1040
+ </SettingsSection>
1041
+ </SettingsPageContainer>
1042
+ );
1043
+}
1044
1326
- <SettingsRow
1327
- {...searchableSetting("proactive-panels")}
1328
- description="Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines."
1329
- resetAction={
1330
- settings.proactivePanelsEnabled !== DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled ? (
1331
- <SettingResetButton
1332
- label="proactive panels"
1333
- onClick={() =>
1334
- updateSettings({
1335
- proactivePanelsEnabled: DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled,
1336
- })
1337
- }
1338
- />
1339
- ) : null
1340
- }
1341
- control={
1342
- <Switch
1343
- checked={settings.proactivePanelsEnabled}
1344
- onCheckedChange={(checked) =>
1345
- updateSettings({ proactivePanelsEnabled: Boolean(checked) })
1346
- }
1347
- aria-label="Proactive panels"
1348
- />
1349
- }
1350
- />
1351
-
1352
- <SettingsRow
1353
- {...searchableSetting("skills-in-slash-menu")}
1354
- description="Also include skills in the / command menu. Skills always appear when you type $."
1355
- resetAction={
1356
- settings.showSkillsInSlashMenu !== DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu ? (
1357
- <SettingResetButton
1358
- label="skills in slash menu"
1359
- onClick={() =>
1360
- updateSettings({
1361
- showSkillsInSlashMenu: DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu,
1362
- })
1363
- }
1364
- />
1365
- ) : null
1366
- }
1367
- control={
1368
- <Switch
1369
- checked={settings.showSkillsInSlashMenu}
1370
- onCheckedChange={(checked) =>
1371
- updateSettings({ showSkillsInSlashMenu: Boolean(checked) })
1372
- }
1373
- aria-label="Show skills in slash menu"
1374
- />
1375
- }
1376
- />
1045
+export function ChatSettingsPanel() {
1046
+ const modifierLabel = isMacPlatform(navigator.platform) ? "⌘" : "Ctrl";
1047
+ const sendShortcutOptions = [
1048
+ { value: "enter", label: "Enter" },
1049
+ { value: "mod-enter-multiline", label: `${modifierLabel} + Enter for multiline prompts` },
1050
+ { value: "mod-enter", label: `${modifierLabel} + Enter always` },
1051
+ ] as const;
1052
+ const settings = useScopedSettings();
1053
+ const updateSettings = useUpdateScopedSettings();
1054
1055
+ return (
1056
+ <SettingsPageContainer>
1057
+ <SettingsSection id="composer" title="Composer">
1058
<SettingsRow
1059
{...searchableSetting("composer-rich-text")}
1060
description="Show formatted Markdown as you type."
@@ -1401,34 +1081,6 @@ export function GeneralSettingsPanel() {
1081
/>
1082
}
1083
/>
1404
-
1405
- <SettingsRow
1406
- {...searchableSetting("composer-collapse")}
1407
- 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."
1408
- resetAction={
1409
- settings.composerCollapseOnScroll !==
1410
- DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll ? (
1411
- <SettingResetButton
1412
- label="collapse composer on scroll"
1413
- onClick={() =>
1414
- updateSettings({
1415
- composerCollapseOnScroll: DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll,
1416
- })
1417
- }
1418
- />
1419
- ) : null
1420
- }
1421
- control={
1422
- <Switch
1423
- checked={settings.composerCollapseOnScroll}
1424
- onCheckedChange={(checked) =>
1425
- updateSettings({ composerCollapseOnScroll: Boolean(checked) })
1426
- }
1427
- aria-label="Collapse composer on scroll"
1428
- />
1429
- }
1430
- />
1431
-
1084
<SettingsRow
1085
{...searchableSetting("send-shortcut")}
1086
description="Choose when Enter sends a prompt or inserts a new line"
@@ -1475,7 +1127,62 @@ export function GeneralSettingsPanel() {
1127
</Select>
1128
}
1129
/>
1130
+ <SettingsRow
1131
+ {...searchableSetting("composer-collapse")}
1132
+ 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."
1133
+ resetAction={
1134
+ settings.composerCollapseOnScroll !==
1135
+ DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll ? (
1136
+ <SettingResetButton
1137
+ label="collapse composer on scroll"
1138
+ onClick={() =>
1139
+ updateSettings({
1140
+ composerCollapseOnScroll: DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll,
1141
+ })
1142
+ }
1143
+ />
1144
+ ) : null
1145
+ }
1146
+ control={
1147
+ <Switch
1148
+ checked={settings.composerCollapseOnScroll}
1149
+ onCheckedChange={(checked) =>
1150
+ updateSettings({ composerCollapseOnScroll: Boolean(checked) })
1151
+ }
1152
+ aria-label="Collapse composer on scroll"
1153
+ />
1154
+ }
1155
+ />
1156
+ <AdvancedSettings targetIds={[searchableSetting("skills-in-slash-menu").id]}>
1157
+ <SettingsRow
1158
+ {...searchableSetting("skills-in-slash-menu")}
1159
+ description="Also include skills in the / command menu. Skills always appear when you type $."
1160
+ resetAction={
1161
+ settings.showSkillsInSlashMenu !== DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu ? (
1162
+ <SettingResetButton
1163
+ label="skills in slash menu"
1164
+ onClick={() =>
1165
+ updateSettings({
1166
+ showSkillsInSlashMenu: DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu,
1167
+ })
1168
+ }
1169
+ />
1170
+ ) : null
1171
+ }
1172
+ control={
1173
+ <Switch
1174
+ checked={settings.showSkillsInSlashMenu}
1175
+ onCheckedChange={(checked) =>
1176
+ updateSettings({ showSkillsInSlashMenu: Boolean(checked) })
1177
+ }
1178
+ aria-label="Show skills in slash menu"
1179
+ />
1180
+ }
1181
+ />
1182
+ </AdvancedSettings>
1183
+ </SettingsSection>
1184
1185
+ <SettingsSection id="follow-ups" title="Follow-ups">
1186
<SettingsRow
1187
{...searchableSetting("follow-up-behavior")}
1188
description={
@@ -1511,115 +1218,344 @@ export function GeneralSettingsPanel() {
1218
</SelectValue>
1219
</SelectTrigger>
1220
<SelectPopup align="end" alignItemWithTrigger={false}>
1514
- <SelectItem value="queue">Queue</SelectItem>
1515
- <SelectItem value="steer">Steer</SelectItem>
1221
+ <SelectItem value="queue">Queue</SelectItem>
1222
+ <SelectItem value="steer">Steer</SelectItem>
1223
+ </SelectPopup>
1224
+ </Select>
1225
+ }
1226
+ />
1227
+ </SettingsSection>
1228
+ </SettingsPageContainer>
1229
+ );
1230
+}
1231
+
1232
+function DiffColorsSettingsRow() {
1233
+ const settings = useScopedSettings();
1234
+ const updateSettings = useUpdateScopedSettings();
1235
+ return (
1236
+ <SettingsRow
1237
+ {...searchableSetting("diff-color-scheme")}
1238
+ description="Choose colors for additions and deletions, including change counts."
1239
+ resetAction={
1240
+ settings.diffColorScheme !== DEFAULT_UNIFIED_SETTINGS.diffColorScheme ? (
1241
+ <SettingResetButton
1242
+ label="diff colors"
1243
+ onClick={() =>
1244
+ updateSettings({ diffColorScheme: DEFAULT_UNIFIED_SETTINGS.diffColorScheme })
1245
+ }
1246
+ />
1247
+ ) : null
1248
+ }
1249
+ control={
1250
+ <div className="w-full sm:w-40">
1251
+ <Select
1252
+ value={settings.diffColorScheme}
1253
+ onValueChange={(value) => {
1254
+ if (value === "red-green" || value === "blue-orange")
1255
+ updateSettings({ diffColorScheme: value });
1256
+ }}
1257
+ >
1258
+ <SelectTrigger size="sm" className="w-full min-w-0" aria-label="Diff colors">
1259
+ <span
1260
+ aria-hidden="true"
1261
+ className={
1262
+ settings.diffColorScheme === "blue-orange"
1263
+ ? "flex shrink-0 flex-row-reverse gap-1"
1264
+ : "flex shrink-0 gap-1"
1265
+ }
1266
+ >
1267
+ <span className="size-2 rounded-full bg-diff-deletion" />
1268
+ <span className="size-2 rounded-full bg-diff-addition" />
1269
+ </span>
1270
+ <SelectValue>
1271
+ {settings.diffColorScheme === "blue-orange" ? "Blue & orange" : "Red & green"}
1272
+ </SelectValue>
1273
+ </SelectTrigger>
1274
+ <SelectPopup align="end" alignItemWithTrigger={false}>
1275
+ <SelectItem value="red-green">Red & green (default)</SelectItem>
1276
+ <SelectItem value="blue-orange">Blue & orange</SelectItem>
1277
+ </SelectPopup>
1278
+ </Select>
1279
+ </div>
1280
+ }
1281
+ />
1282
+ );
1283
+}
1284
+
1285
+export function DiffsSettingsPanel() {
1286
+ const settings = useScopedSettings();
1287
+ const updateSettings = useUpdateScopedSettings();
1288
+
1289
+ return (
1290
+ <SettingsPageContainer>
1291
+ <SettingsSection id="diffs" title="Diffs">
1292
+ <SettingsRow
1293
+ {...searchableSetting("diff-layout")}
1294
+ description="Show diffs stacked or side by side. The toggle in the diff toolbar changes this too."
1295
+ resetAction={
1296
+ settings.diffLayout !== DEFAULT_UNIFIED_SETTINGS.diffLayout ? (
1297
+ <SettingResetButton
1298
+ label="diff layout"
1299
+ onClick={() => updateSettings({ diffLayout: DEFAULT_UNIFIED_SETTINGS.diffLayout })}
1300
+ />
1301
+ ) : null
1302
+ }
1303
+ control={
1304
+ <Select
1305
+ value={settings.diffLayout}
1306
+ onValueChange={(value) => {
1307
+ if (value === "stacked" || value === "split") {
1308
+ updateSettings({ diffLayout: value });
1309
+ }
1310
+ }}
1311
+ >
1312
+ <SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Diff layout">
1313
+ <SelectValue>{DIFF_LAYOUT_LABELS[settings.diffLayout]}</SelectValue>
1314
+ </SelectTrigger>
1315
+ <SelectPopup align="end" alignItemWithTrigger={false}>
1316
+ <SelectItem hideIndicator value="stacked">
1317
+ {DIFF_LAYOUT_LABELS.stacked}
1318
+ </SelectItem>
1319
+ <SelectItem hideIndicator value="split">
1320
+ {DIFF_LAYOUT_LABELS.split}
1321
+ </SelectItem>
1322
</SelectPopup>
1323
</Select>
1324
}
1325
/>
1520
-
1326
<SettingsRow
1522
- serverScoped
1523
- settingKeys={["enableProviderUpdateChecks"]}
1524
- {...searchableSetting("provider-update-checks")}
1525
- description="Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear."
1327
+ {...searchableSetting("hide-whitespace-changes")}
1328
+ description="Set whether the diff panel ignores whitespace-only edits by default."
1329
resetAction={
1527
- settings.enableProviderUpdateChecks !==
1528
- DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks ? (
1330
+ settings.diffIgnoreWhitespace !== DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace ? (
1331
<SettingResetButton
1530
- label="provider update checks"
1332
+ label="diff whitespace changes"
1333
onClick={() =>
1334
updateSettings({
1533
- enableProviderUpdateChecks: DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks,
1335
+ diffIgnoreWhitespace: DEFAULT_UNIFIED_SETTINGS.diffIgnoreWhitespace,
1336
})
1337
}
1338
/>
1339
) : null
1340
}
1341
control={
1540
- <ScopedSwitch
1541
- settingKeys={["enableProviderUpdateChecks"]}
1542
- checked={settings.enableProviderUpdateChecks}
1342
+ <Switch
1343
+ checked={settings.diffIgnoreWhitespace}
1344
onCheckedChange={(checked) =>
1544
- updateSettings({ enableProviderUpdateChecks: Boolean(checked) })
1345
+ updateSettings({ diffIgnoreWhitespace: Boolean(checked) })
1346
}
1546
- aria-label="Check provider versions"
1347
+ aria-label="Hide whitespace changes by default"
1348
/>
1349
}
1350
/>
1550
-
1351
<SettingsRow
1552
- {...searchableSetting("continue-threads-after-server-update")}
1553
- serverScoped
1554
- settingKeys={["continueThreadsAfterServerUpdate"]}
1555
- description="Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments."
1556
- status={
1557
- !supportsRestartContinuation
1558
- ? "All selected connected environments must support restart continuation."
1559
- : undefined
1560
- }
1352
+ {...searchableSetting("default-diff-file-state")}
1353
+ description="Start with files expanded or collapsed when opening diffs or a pull request's Code tab."
1354
resetAction={
1562
- supportsRestartContinuation &&
1563
- settings.continueThreadsAfterServerUpdate !==
1564
- DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate ? (
1355
+ settings.diffFilesCollapsed !== DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed ? (
1356
<SettingResetButton
1566
- label="continue threads after restarts"
1357
+ label="default diff file state"
1358
onClick={() =>
1359
updateSettings({
1569
- continueThreadsAfterServerUpdate:
1570
- DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate,
1360
+ diffFilesCollapsed: DEFAULT_UNIFIED_SETTINGS.diffFilesCollapsed,
1361
})
1362
}
1363
/>
1364
) : null
1365
}
1366
control={
1577
- <ScopedSwitch
1578
- settingKeys={["continueThreadsAfterServerUpdate"]}
1579
- checked={settings.continueThreadsAfterServerUpdate}
1580
- disabled={!supportsRestartContinuation}
1581
- onCheckedChange={(checked) =>
1582
- updateSettings({ continueThreadsAfterServerUpdate: Boolean(checked) })
1583
- }
1584
- aria-label="Continue threads after restarts"
1585
- />
1367
+ <Select
1368
+ value={settings.diffFilesCollapsed ? "collapsed" : "expanded"}
1369
+ onValueChange={(value) => {
1370
+ if (value === "expanded" || value === "collapsed") {
1371
+ updateSettings({ diffFilesCollapsed: value === "collapsed" });
1372
+ }
1373
+ }}
1374
+ >
1375
+ <SelectTrigger
1376
+ size="sm"
1377
+ className="w-full sm:w-40"
1378
+ aria-label="Default diff file state"
1379
+ >
1380
+ <SelectValue>{settings.diffFilesCollapsed ? "Collapsed" : "Expanded"}</SelectValue>
1381
+ </SelectTrigger>
1382
+ <SelectPopup align="end" alignItemWithTrigger={false}>
1383
+ <SelectItem hideIndicator value="expanded">
1384
+ Expanded
1385
+ </SelectItem>
1386
+ <SelectItem hideIndicator value="collapsed">
1387
+ Collapsed
1388
+ </SelectItem>
1389
+ </SelectPopup>
1390
+ </Select>
1391
}
1392
/>
1588
-
1589
- <BackgroundActivitySettingsRow />
1393
+ <DiffColorsSettingsRow />
1394
</SettingsSection>
1395
1592
- <SettingsSection id="projects-and-threads" title="Projects & threads">
1396
+ <SettingsSection id="pull-requests" title="Pull requests">
1397
<SettingsRow
1594
- serverScoped
1595
- settingKeys={["newWorktreesStartFromOrigin"]}
1596
- {...searchableSetting("start-from-origin")}
1597
- 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."
1398
+ {...searchableSetting("proactive-panels")}
1399
+ description="Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines."
1400
resetAction={
1599
- settings.newWorktreesStartFromOrigin !==
1600
- DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin ? (
1401
+ settings.proactivePanelsEnabled !== DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled ? (
1402
<SettingResetButton
1602
- label="new worktrees start from remote"
1403
+ label="proactive panels"
1404
onClick={() =>
1405
updateSettings({
1605
- newWorktreesStartFromOrigin:
1606
- DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin,
1406
+ proactivePanelsEnabled: DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled,
1407
})
1408
}
1409
/>
1410
) : null
1411
}
1412
control={
1613
- <ScopedSwitch
1614
- settingKeys={["newWorktreesStartFromOrigin"]}
1615
- checked={settings.newWorktreesStartFromOrigin}
1413
+ <Switch
1414
+ checked={settings.proactivePanelsEnabled}
1415
onCheckedChange={(checked) =>
1617
- updateSettings({ newWorktreesStartFromOrigin: Boolean(checked) })
1416
+ updateSettings({ proactivePanelsEnabled: Boolean(checked) })
1417
}
1619
- aria-label="Start new worktrees from remote by default"
1418
+ aria-label="Proactive panels"
1419
/>
1420
}
1421
/>
1422
+ <PullRequestLinksOpenInAppSetting />
1423
+ </SettingsSection>
1424
+ </SettingsPageContainer>
1425
+ );
1426
+}
1427
+
1428
+/** The Providers panel can render without a settings scope, as its tests do; this row needs one. */
1429
+export function CompactIdleThreadsRow() {
1430
+ return useOptionalSettingsScope() === null ? null : <ScopedCompactIdleThreadsRow />;
1431
+}
1432
+
1433
+function ScopedCompactIdleThreadsRow() {
1434
+ const settings = useScopedSettings();
1435
+ const updateSettings = useUpdateScopedSettings();
1436
+ const { targets } = useSettingsScope();
1437
+ const idleCompaction = scopedIdleCompaction(targets.length > 0 ? targets : [{ settings }]);
1438
+
1439
+ return (
1440
+ <SettingsRow
1441
+ serverScoped
1442
+ settingKeys={["idleCompaction", "compactIdleThreads"]}
1443
+ mixed={idleCompaction.mixed}
1444
+ {...searchableSetting("compact-idle-threads")}
1445
+ 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."
1446
+ resetAction={
1447
+ globalIdleCompaction(settings) !== globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) ? (
1448
+ <SettingResetButton
1449
+ label="compact idle threads"
1450
+ onClick={() =>
1451
+ updateSettings({ idleCompaction: globalIdleCompaction(DEFAULT_UNIFIED_SETTINGS) })
1452
+ }
1453
+ />
1454
+ ) : null
1455
+ }
1456
+ control={
1457
+ <Select
1458
+ value={idleCompaction.mixed ? null : globalIdleCompaction(settings)}
1459
+ onValueChange={(value) => {
1460
+ const mode = IDLE_COMPACTION_MODES.find((candidate) => candidate.value === value);
1461
+ if (mode) updateSettings({ idleCompaction: mode.value });
1462
+ }}
1463
+ >
1464
+ <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Compact idle threads">
1465
+ <SelectValue>
1466
+ {(value: string | null) =>
1467
+ value === null
1468
+ ? "Mixed"
1469
+ : IDLE_COMPACTION_MODES.find((mode) => mode.value === value)?.label
1470
+ }
1471
+ </SelectValue>
1472
+ </SelectTrigger>
1473
+ <SelectPopup align="end" alignItemWithTrigger={false}>
1474
+ {IDLE_COMPACTION_MODES.map((mode) => (
1475
+ <SelectItem
1476
+ hideIndicator
1477
+ key={mode.value}
1478
+ value={mode.value}
1479
+ // A server from before modes has only the on/off switch, so it cannot store "Never".
1480
+ disabled={mode.value === "off" && !idleCompaction.neverAvailable}
1481
+ >
1482
+ {mode.label}
1483
+ </SelectItem>
1484
+ ))}
1485
+ </SelectPopup>
1486
+ </Select>
1487
+ }
1488
+ />
1489
+ );
1490
+}
1491
+
1492
+export function ThreadsSettingsPanel() {
1493
+ const settings = useScopedSettings();
1494
+ const updateSettings = useUpdateScopedSettings();
1495
+ const navigate = useNavigate();
1496
+ const { environment, connectedEnvironments, target } = useSettingsScope();
1497
+ const environmentId = environment?.environmentId ?? null;
1498
+ const hasServerTargets = connectedEnvironments.length > 0;
1499
+ const mixedResponseStreamingMode = useScopedSettingsMixed(["responseStreamingMode"]);
1500
+ const providersByEnvironment = useEnvironmentProviders();
1501
+ const serverProviders =
1502
+ (environment?.serverConfig
1503
+ ? providersByEnvironment.get(environment.environmentId)
1504
+ : undefined) ?? EMPTY_SERVER_PROVIDERS;
1505
+ const supportsAutoSettlement =
1506
+ connectedEnvironments.length > 0 &&
1507
+ connectedEnvironments.every(
1508
+ (target) => target.serverConfig?.environment.capabilities.threadAutoSettlement === true,
1509
+ );
1510
+ const supportsAutoSettlementScope = connectedEnvironments.every(
1511
+ (target) => target.serverConfig?.environment.capabilities.threadAutoSettlementScope === true,
1512
+ );
1513
+
1514
+ const textGenerationProviders = serverProviders.filter(
1515
+ (provider) => provider.supportsTextGeneration !== false,
1516
+ );
1517
+ const textGenerationModelSelection = resolveAppModelSelectionState(
1518
+ settings,
1519
+ textGenerationProviders,
1520
+ );
1521
+ const textGenInstanceId = textGenerationModelSelection.instanceId;
1522
+ const textGenModel = textGenerationModelSelection.model;
1523
+ const textGenModelOptions = textGenerationModelSelection.options;
1524
+ const textGenerationModelInstanceEntries = sortProviderInstanceEntries(
1525
+ applyProviderInstanceSettings(
1526
+ deriveProviderInstanceEntries(textGenerationProviders),
1527
+ settings,
1528
+ target?.projectId ?? null,
1529
+ ),
1530
+ );
1531
+ const hasTextGenerationProvider = textGenerationModelInstanceEntries.some(
1532
+ (entry) => entry.enabled && entry.isAvailable,
1533
+ );
1534
+ const textGenInstanceEntry = textGenerationModelInstanceEntries.find(
1535
+ (entry) => entry.instanceId === textGenInstanceId,
1536
+ );
1537
+ const textGenProvider: ProviderDriverKind =
1538
+ textGenInstanceEntry?.driverKind ?? DEFAULT_DRIVER_KIND;
1539
+ const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance(
1540
+ settings,
1541
+ textGenerationProviders,
1542
+ textGenInstanceId,
1543
+ textGenModel,
1544
+ );
1545
+ const isTextGenerationModelDirty = !Equal.equals(
1546
+ settings.textGenerationModelSelection ?? null,
1547
+ DEFAULT_UNIFIED_SETTINGS.textGenerationModelSelection ?? null,
1548
+ );
1549
+ const textGenerationModelDisabledReason = useScopedModelDisabledReason(
1550
+ settings,
1551
+ textGenerationModelInstanceEntries,
1552
+ );
1553
+ const mixedAddProjectBaseDirectory = useScopedSettingsMixed(["addProjectBaseDirectory"]);
1554
+ const mixedTextGenerationModel = useScopedSettingsMixed(["textGenerationModelSelection"]);
1555
+
1556
+ return (
1557
+ <SettingsPageContainer>
1558
+ <SettingsSection id="new-projects" title="New projects">
1559
<SettingsRow
1560
serverScoped
1561
settingKeys={["addProjectBaseDirectory"]}
@@ -1652,127 +1588,141 @@ export function GeneralSettingsPanel() {
1588
/>
1589
</SettingsSection>
1590
1655
- <SettingsSection id="confirmations" title="Confirmations">
1656
- <SettingsRow
1657
- {...searchableSetting("unpin-confirmation")}
1658
- description="Ask before unpinning a thread from the pinned section."
1659
- resetAction={
1660
- settings.confirmThreadUnpin !== DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin ? (
1661
- <SettingResetButton
1662
- label="unpin confirmation"
1663
- onClick={() =>
1664
- updateSettings({
1665
- confirmThreadUnpin: DEFAULT_UNIFIED_SETTINGS.confirmThreadUnpin,
1666
- })
1667
- }
1668
- />
1669
- ) : null
1670
- }
1671
- control={
1672
- <Switch
1673
- checked={settings.confirmThreadUnpin}
1674
- onCheckedChange={(checked) =>
1675
- updateSettings({ confirmThreadUnpin: Boolean(checked) })
1676
- }
1677
- aria-label="Confirm thread unpinning"
1678
- />
1679
- }
1680
- />
1681
-
1682
- <SettingsRow
1683
- {...searchableSetting("archive-confirmation")}
1684
- description="Require a second click on the inline archive action before a thread is archived."
1685
- resetAction={
1686
- settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? (
1687
- <SettingResetButton
1688
- label="archive confirmation"
1689
- onClick={() =>
1690
- updateSettings({
1691
- confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive,
1692
- })
1693
- }
1694
- />
1695
- ) : null
1696
- }
1697
- control={
1698
- <Switch
1699
- checked={settings.confirmThreadArchive}
1700
- onCheckedChange={(checked) =>
1701
- updateSettings({ confirmThreadArchive: Boolean(checked) })
1702
- }
1703
- aria-label="Confirm thread archiving"
1704
- />
1705
- }
1706
- />
1591
+ <ProjectDefaultsSettings category="general" />
1592
1593
+ <SettingsSection id="usage-limits" title="Usage limits">
1594
<SettingsRow
1709
- {...searchableSetting("delete-confirmation")}
1710
- description="Ask before deleting a thread and its chat history."
1711
- resetAction={
1712
- settings.confirmThreadDelete !== DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete ? (
1713
- <SettingResetButton
1714
- label="delete confirmation"
1715
- onClick={() =>
1716
- updateSettings({
1717
- confirmThreadDelete: DEFAULT_UNIFIED_SETTINGS.confirmThreadDelete,
1718
- })
1719
- }
1720
- />
1721
- ) : null
1595
+ serverScoped
1596
+ {...searchableSetting("auto-resume-limited-threads")}
1597
+ description="Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation."
1598
+ settingKeys={["autoResumeLimitedThreads"]}
1599
+ control={
1600
+ <ScopedSwitch
1601
+ settingKeys={["autoResumeLimitedThreads"]}
1602
+ checked={settings.autoResumeLimitedThreads}
1603
+ onCheckedChange={(checked) =>
1604
+ updateSettings({ autoResumeLimitedThreads: Boolean(checked) })
1605
+ }
1606
+ aria-label="Resume after usage limits"
1607
+ />
1608
}
1609
+ />
1610
+ <SettingsRow
1611
+ serverScoped
1612
+ {...searchableSetting("snooze-limited-threads")}
1613
+ description="Snooze usage-limit stops until reset. Pair with resume to continue on wake."
1614
+ settingKeys={["snoozeLimitedThreads"]}
1615
control={
1724
- <Switch
1725
- checked={settings.confirmThreadDelete}
1616
+ <ScopedSwitch
1617
+ settingKeys={["snoozeLimitedThreads"]}
1618
+ checked={settings.snoozeLimitedThreads}
1619
onCheckedChange={(checked) =>
1727
- updateSettings({ confirmThreadDelete: Boolean(checked) })
1620
+ updateSettings({ snoozeLimitedThreads: Boolean(checked) })
1621
}
1729
- aria-label="Confirm thread deletion"
1622
+ aria-label="Snooze until limits reset"
1623
/>
1624
}
1625
/>
1626
+ </SettingsSection>
1627
1734
- {isElectron ? (
1628
+ {supportsAutoSettlement ? (
1629
+ <SettingsSection id="auto-settle" title="Auto-settle">
1630
<SettingsRow
1736
- {...searchableSetting("quit-confirmation")}
1737
- description="Hold mode also quits on two quick presses."
1631
+ serverScoped
1632
+ settingKeys={["sidebarAutoSettleOnMerge"]}
1633
+ {...searchableSetting("auto-settle-merged-threads")}
1634
+ description="Settle a thread when its pull request merges. Closed pull requests still settle automatically."
1635
resetAction={
1739
- settings.confirmQuit !== DEFAULT_UNIFIED_SETTINGS.confirmQuit ? (
1636
+ settings.sidebarAutoSettleOnMerge !==
1637
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge ? (
1638
<SettingResetButton
1741
- label="quit shortcut behavior"
1639
+ label="auto-settle on merge"
1640
onClick={() =>
1743
- updateSettings({ confirmQuit: DEFAULT_UNIFIED_SETTINGS.confirmQuit })
1641
+ updateSettings({
1642
+ sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge,
1643
+ })
1644
}
1645
/>
1646
) : null
1647
}
1648
control={
1749
- <Select
1750
- value={settings.confirmQuit}
1751
- onValueChange={(value) => {
1752
- if (value === "direct" || value === "hold" || value === "double-click") {
1753
- updateSettings({ confirmQuit: value });
1649
+ <ScopedSwitch
1650
+ settingKeys={["sidebarAutoSettleOnMerge"]}
1651
+ checked={settings.sidebarAutoSettleOnMerge}
1652
+ onCheckedChange={(checked) =>
1653
+ updateSettings({ sidebarAutoSettleOnMerge: Boolean(checked) })
1654
+ }
1655
+ aria-label="Auto-settle merged threads"
1656
+ />
1657
+ }
1658
+ />
1659
+
1660
+ <SettingsRow
1661
+ serverScoped
1662
+ settingKeys={["sidebarAutoSettleAfterDays"]}
1663
+ {...searchableSetting("auto-settle-inactive-threads")}
1664
+ description="Sidebar threads with no activity for this long settle automatically."
1665
+ resetAction={
1666
+ settings.sidebarAutoSettleAfterDays !==
1667
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays ? (
1668
+ <SettingResetButton
1669
+ label="auto-settle"
1670
+ onClick={() =>
1671
+ updateSettings({
1672
+ sidebarAutoSettleAfterDays:
1673
+ DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays,
1674
+ })
1675
}
1755
- }}
1756
- >
1757
- <SelectTrigger
1758
- size="sm"
1759
- className="w-full sm:w-40"
1760
- aria-label="Quit shortcut behavior"
1761
- >
1762
- <SelectValue>{QUIT_CONFIRMATION_MODE_LABELS[settings.confirmQuit]}</SelectValue>
1763
- </SelectTrigger>
1764
- <SelectPopup align="end" alignItemWithTrigger={false}>
1765
- {Object.entries(QUIT_CONFIRMATION_MODE_LABELS).map(([value, label]) => (
1766
- <SelectItem hideIndicator key={value} value={value}>
1767
- {label}
1768
- </SelectItem>
1769
- ))}
1770
- </SelectPopup>
1771
- </Select>
1676
+ />
1677
+ ) : null
1678
+ }
1679
+ control={
1680
+ <ScopedSwitch
1681
+ settingKeys={["sidebarAutoSettleAfterDays"]}
1682
+ checked={settings.sidebarAutoSettleAfterDays !== null}
1683
+ onCheckedChange={(checked) =>
1684
+ updateSettings({
1685
+ sidebarAutoSettleAfterDays: checked ? AUTO_SETTLE_DEFAULT_DAYS : null,
1686
+ })
1687
+ }
1688
+ aria-label="Auto-settle inactive threads"
1689
+ />
1690
}
1691
/>
1774
- ) : null}
1775
- </SettingsSection>
1692
+ {settings.sidebarAutoSettleAfterDays !== null ? (
1693
+ <SettingsRow
1694
+ serverScoped
1695
+ settingKeys={["sidebarAutoSettleAfterDays"]}
1696
+ title={searchableSetting("days-before-auto-settle").title}
1697
+ description="Any new activity un-settles a thread automatically."
1698
+ control={
1699
+ <AutoSettleDaysInput
1700
+ value={settings.sidebarAutoSettleAfterDays}
1701
+ onCommit={(days) => updateSettings({ sidebarAutoSettleAfterDays: days })}
1702
+ />
1703
+ }
1704
+ />
1705
+ ) : null}
1706
+ {settings.sidebarAutoSettleAfterDays !== null && supportsAutoSettlementScope ? (
1707
+ <SettingsRow
1708
+ serverScoped
1709
+ settingKeys={["sidebarAutoSettleKeepPullRequests"]}
1710
+ title="Keep threads with a PR"
1711
+ description="Inactivity does not settle threads with a pull request. Merge and close still do."
1712
+ control={
1713
+ <ScopedSwitch
1714
+ settingKeys={["sidebarAutoSettleKeepPullRequests"]}
1715
+ checked={settings.sidebarAutoSettleKeepPullRequests}
1716
+ onCheckedChange={(checked) =>
1717
+ updateSettings({ sidebarAutoSettleKeepPullRequests: checked })
1718
+ }
1719
+ aria-label="Keep threads with a PR"
1720
+ />
1721
+ }
1722
+ />
1723
+ ) : null}
1724
+ </SettingsSection>
1725
+ ) : null}
1726
1727
<SettingsSection id="text-generation" title="Text generation">
1728
<SettingsRow
@@ -1877,37 +1827,157 @@ export function GeneralSettingsPanel() {
1827
)
1828
}
1829
/>
1880
- <ThreadTitleInstructionsSettings />
1830
+ <AdvancedSettings
1831
+ targetIds={[
1832
+ searchableSetting("thread-title-instructions").id,
1833
+ searchableSetting("response-streaming").id,
1834
+ ]}
1835
+ >
1836
+ <ThreadTitleInstructionsSettings />
1837
+ <SettingsRow
1838
+ serverScoped
1839
+ settingKeys={["responseStreamingMode"]}
1840
+ {...searchableSetting("response-streaming")}
1841
+ description={
1842
+ mixedResponseStreamingMode
1843
+ ? "The selected targets use different streaming modes."
1844
+ : RESPONSE_STREAMING_MODE_DESCRIPTIONS[settings.responseStreamingMode]
1845
+ }
1846
+ resetAction={
1847
+ settings.responseStreamingMode !== DEFAULT_UNIFIED_SETTINGS.responseStreamingMode ? (
1848
+ <SettingResetButton
1849
+ label="response streaming"
1850
+ onClick={() =>
1851
+ updateSettings({
1852
+ responseStreamingMode: DEFAULT_UNIFIED_SETTINGS.responseStreamingMode,
1853
+ })
1854
+ }
1855
+ />
1856
+ ) : null
1857
+ }
1858
+ control={
1859
+ <Select
1860
+ value={mixedResponseStreamingMode ? null : settings.responseStreamingMode}
1861
+ onValueChange={(value) => {
1862
+ if (value === "turn" || value === "paragraph") {
1863
+ updateSettings({ responseStreamingMode: value });
1864
+ }
1865
+ }}
1866
+ >
1867
+ <SelectTrigger size="sm" className="w-full sm:w-56" aria-label="Response streaming">
1868
+ <SelectValue>
1869
+ {(value: ResponseStreamingMode | null) =>
1870
+ value === null ? "Mixed" : RESPONSE_STREAMING_MODE_LABELS[value]
1871
+ }
1872
+ </SelectValue>
1873
+ </SelectTrigger>
1874
+ <SelectPopup align="end" alignItemWithTrigger={false}>
1875
+ <SelectItem hideIndicator value="turn">
1876
+ {RESPONSE_STREAMING_MODE_LABELS.turn}
1877
+ </SelectItem>
1878
+ <SelectItem hideIndicator value="paragraph">
1879
+ {RESPONSE_STREAMING_MODE_LABELS.paragraph}
1880
+ </SelectItem>
1881
+ </SelectPopup>
1882
+ </Select>
1883
+ }
1884
+ />
1885
+ </AdvancedSettings>
1886
</SettingsSection>
1887
+ </SettingsPageContainer>
1888
+ );
1889
+}
1890
1883
- <SettingsSection id="about" title="About">
1884
- {isElectron || HOSTED_APP_CHANNEL ? (
1885
- <AboutVersionSection />
1886
- ) : (
1887
- <>
1888
- <SettingsRow
1889
- id={searchableSetting("app-version").id}
1890
- title={<AboutVersionTitle />}
1891
- description="Current version of the application."
1891
+export function MaintenanceSettingsPanel() {
1892
+ const settings = useScopedSettings();
1893
+ const updateSettings = useUpdateScopedSettings();
1894
+ const { scope, environment, connectedEnvironments } = useSettingsScope();
1895
+ const environmentId = environment?.environmentId ?? null;
1896
+ const isEnvironmentScope = scope.environmentIds.length === 1 && environmentId !== null;
1897
+ const supportsRestartContinuation =
1898
+ connectedEnvironments.length > 0 &&
1899
+ connectedEnvironments.every(
1900
+ (target) => target.serverConfig?.environment.capabilities.threadRestartContinuation === true,
1901
+ );
1902
+
1903
+ return (
1904
+ <SettingsPageContainer>
1905
+ <SettingsSection id="updates" title="Updates">
1906
+ <SettingsRow
1907
+ serverScoped
1908
+ settingKeys={["enableProviderUpdateChecks"]}
1909
+ {...searchableSetting("provider-update-checks")}
1910
+ description="Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear."
1911
+ resetAction={
1912
+ settings.enableProviderUpdateChecks !==
1913
+ DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks ? (
1914
+ <SettingResetButton
1915
+ label="provider update checks"
1916
+ onClick={() =>
1917
+ updateSettings({
1918
+ enableProviderUpdateChecks: DEFAULT_UNIFIED_SETTINGS.enableProviderUpdateChecks,
1919
+ })
1920
+ }
1921
+ />
1922
+ ) : null
1923
+ }
1924
+ control={
1925
+ <ScopedSwitch
1926
+ settingKeys={["enableProviderUpdateChecks"]}
1927
+ checked={settings.enableProviderUpdateChecks}
1928
+ onCheckedChange={(checked) =>
1929
+ updateSettings({ enableProviderUpdateChecks: Boolean(checked) })
1930
+ }
1931
+ aria-label="Check provider versions"
1932
/>
1893
- </>
1894
- )}
1895
- <MobileAppSettingsRow />
1933
+ }
1934
+ />
1935
<SettingsRow
1897
- {...searchableSetting("privacy-policy")}
1898
- description="How we handle your data, including the anonymous usage data T3 Code collects."
1936
+ {...searchableSetting("continue-threads-after-server-update")}
1937
+ serverScoped
1938
+ settingKeys={["continueThreadsAfterServerUpdate"]}
1939
+ description="Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments."
1940
+ status={
1941
+ !supportsRestartContinuation
1942
+ ? "All selected connected environments must support restart continuation."
1943
+ : undefined
1944
+ }
1945
+ resetAction={
1946
+ supportsRestartContinuation &&
1947
+ settings.continueThreadsAfterServerUpdate !==
1948
+ DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate ? (
1949
+ <SettingResetButton
1950
+ label="continue threads after restarts"
1951
+ onClick={() =>
1952
+ updateSettings({
1953
+ continueThreadsAfterServerUpdate:
1954
+ DEFAULT_UNIFIED_SETTINGS.continueThreadsAfterServerUpdate,
1955
+ })
1956
+ }
1957
+ />
1958
+ ) : null
1959
+ }
1960
control={
1900
- <Button
1901
- render={<a href={PRIVACY_POLICY_URL} target="_blank" rel="noreferrer noopener" />}
1902
- size="sm"
1903
- variant="outline"
1904
- >
1905
- View policy
1906
- </Button>
1961
+ <ScopedSwitch
1962
+ settingKeys={["continueThreadsAfterServerUpdate"]}
1963
+ checked={settings.continueThreadsAfterServerUpdate}
1964
+ disabled={!supportsRestartContinuation}
1965
+ onCheckedChange={(checked) =>
1966
+ updateSettings({ continueThreadsAfterServerUpdate: Boolean(checked) })
1967
+ }
1968
+ aria-label="Continue threads after restarts"
1969
+ />
1970
}
1971
/>
1972
</SettingsSection>
1910
- <SettingsSection title="Diagnostics">
1973
+
1974
+ <SettingsSection id="background" title="Background activity">
1975
+ <BackgroundActivitySettingsRow />
1976
+ </SettingsSection>
1977
+
1978
+ <StorageCleanupSections />
1979
+
1980
+ <SettingsSection id="diagnostics-section" title="Diagnostics">
1981
<SettingsRow
1982
{...searchableSetting("diagnostics")}
1983
description={
@@ -1927,6 +1997,43 @@ export function GeneralSettingsPanel() {
1997
</Button>
1998
}
1999
/>
2000
+ </SettingsSection>
2001
+ </SettingsPageContainer>
2002
+ );
2003
+}
2004
+
2005
+export function AboutSettingsPanel() {
2006
+ return (
2007
+ <SettingsPageContainer>
2008
+ <SettingsSection id="about" title="App">
2009
+ {isElectron || HOSTED_APP_CHANNEL ? (
2010
+ <AboutVersionSection />
2011
+ ) : (
2012
+ <>
2013
+ <SettingsRow
2014
+ id={searchableSetting("app-version").id}
2015
+ title={<AboutVersionTitle />}
2016
+ description="Current version of the application."
2017
+ />
2018
+ </>
2019
+ )}
2020
+ <MobileAppSettingsRow />
2021
+ </SettingsSection>
2022
+
2023
+ <SettingsSection id="legal" title="Legal">
2024
+ <SettingsRow
2025
+ {...searchableSetting("privacy-policy")}
2026
+ description="How we handle your data, including the anonymous usage data T3 Code collects."
2027
+ control={
2028
+ <Button
2029
+ render={<a href={PRIVACY_POLICY_URL} target="_blank" rel="noreferrer noopener" />}
2030
+ size="sm"
2031
+ variant="outline"
2032
+ >
2033
+ View policy
2034
+ </Button>
2035
+ }
2036
+ />
2037
<SettingsRow
2038
{...searchableSetting("open-source-licenses")}
2039
description="Notices for dependencies, assets, and optional tools used by T3 Code."
@@ -1941,8 +2048,6 @@ export function GeneralSettingsPanel() {
2048
}
2049
/>
2050
</SettingsSection>
1944
-
1945
- <LegacyFeaturesSection />
2051
</SettingsPageContainer>
2052
);
2053
}
apps/web/src/components/settings/SettingsScopeNotice.tsx
+20
-20
@@ -32,8 +32,11 @@ export function SettingsScopeNotice({
32
target,
33
targetId,
34
eligibleEnvironmentIds,
35
+ inline = false,
36
}: {
37
children: string;
38
+ /** Renders inside a section instead of as its own page. */
39
+ inline?: boolean;
40
target: "environment" | "all" | "project" | "checkout";
41
targetId?: string;
42
eligibleEnvironmentIds?: readonly EnvironmentId[];
@@ -147,26 +150,23 @@ export function SettingsScopeNotice({
150
</button>
151
));
152
};
150
- return (
151
- <SettingsPageContainer>
152
- <div className="space-y-3">
153
- <p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
154
- {children}
155
- </p>
156
- <div className="space-y-4">
157
- {choiceGroups.map((group) =>
158
- group?.displayName ? (
159
- <SettingsSection key={group.projectKey} title={group.displayName}>
160
- {renderChoices(group)}
161
- </SettingsSection>
162
- ) : (
163
- <SettingsGroup key={group?.projectKey ?? target}>
164
- {renderChoices(group)}
165
- </SettingsGroup>
166
- ),
167
- )}
168
- </div>
153
+ const notice = (
154
+ <div className="space-y-3">
155
+ <p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
156
+ {children}
157
+ </p>
158
+ <div className="space-y-4">
159
+ {choiceGroups.map((group) =>
160
+ group?.displayName ? (
161
+ <SettingsSection key={group.projectKey} title={group.displayName}>
162
+ {renderChoices(group)}
163
+ </SettingsSection>
164
+ ) : (
165
+ <SettingsGroup key={group?.projectKey ?? target}>{renderChoices(group)}</SettingsGroup>
166
+ ),
167
+ )}
168
</div>
170
- </SettingsPageContainer>
169
+ </div>
170
);
171
+ return inline ? notice : <SettingsPageContainer>{notice}</SettingsPageContainer>;
172
}
apps/web/src/components/settings/SettingsScopeSentence.tsx
+6
@@ -43,9 +43,15 @@ import {
43
} from "./settingsScopeAxis";
44
45
export const SETTINGS_DEVICE_ONLY_PATHS: ReadonlySet<string> = new Set([
46
+ "/settings/general",
47
"/settings/appearance",
48
+ "/settings/chat",
49
+ "/settings/diffs",
50
"/settings/snap-shot",
51
"/settings/connections",
52
+ // Network access and authorized clients belong to the environment serving this app.
53
+ "/settings/access",
54
+ "/settings/about",
55
]);
56
57
interface SettingsScopeMenuProps {
apps/web/src/components/settings/SettingsSidebarNav.tsx
+78
-53
@@ -10,18 +10,25 @@ import {
10
import {
11
ArchiveIcon,
12
FlaskConicalIcon,
13
- BlocksIcon,
13
BotIcon,
14
createLucideIcon,
15
CalendarClockIcon,
16
+ FileDiffIcon,
17
+ FolderTreeIcon,
18
GitBranchIcon,
18
- HardDriveIcon,
19
+ GlobeIcon,
20
+ InfoIcon,
21
+ MessageSquareTextIcon,
22
+ MessagesSquareIcon,
23
PanelsTopLeftIcon,
24
KeyboardIcon,
21
- Link2Icon,
25
PaletteIcon,
26
SearchIcon,
27
+ ServerIcon,
28
Settings2Icon,
29
+ ShieldCheckIcon,
30
+ SmartphoneIcon,
31
+ WrenchIcon,
32
XIcon,
33
} from "lucide-react";
34
import { useLocation, useNavigate } from "@tanstack/react-router";
@@ -41,8 +48,8 @@ import {
48
import { scrollToSettingsTarget } from "./settingsLayout";
49
import {
50
searchSettings,
44
- isSettingsOverviewVisible,
51
revealSettingsSearchTarget,
52
+ SETTINGS_NAV_GROUPS,
53
SETTINGS_SECTION_LABELS,
54
type SettingsPath,
55
type SettingsSearchItem,
@@ -77,32 +84,33 @@ const SETTINGS_SECTION_ICONS: Readonly<
84
Record<SettingsPath, ComponentType<{ className?: string }>>
85
> = {
86
"/settings/general": Settings2Icon,
80
- "/settings/diagnostics": Settings2Icon,
87
+ "/settings/diagnostics": WrenchIcon,
88
"/settings/appearance": PaletteIcon,
89
+ "/settings/chat": MessageSquareTextIcon,
90
+ "/settings/diffs": FileDiffIcon,
91
"/settings/projects": PanelsTopLeftIcon,
92
"/settings/keybindings": KeyboardIcon,
93
"/settings/snap-shot": SnapShotIcon,
94
"/settings/providers": BotIcon,
86
- "/settings/integrations": BlocksIcon,
95
+ "/settings/threads": MessagesSquareIcon,
96
+ "/settings/browser": GlobeIcon,
97
+ "/settings/devices": SmartphoneIcon,
98
"/settings/scheduled-tasks": CalendarClockIcon,
99
"/settings/source-control": GitBranchIcon,
89
- "/settings/storage": HardDriveIcon,
90
- "/settings/connections": Link2Icon,
91
- "/settings/beta": FlaskConicalIcon,
100
+ "/settings/worktrees": FolderTreeIcon,
101
+ "/settings/connections": ServerIcon,
102
+ "/settings/access": ShieldCheckIcon,
103
+ "/settings/maintenance": WrenchIcon,
104
+ "/settings/labs": FlaskConicalIcon,
105
+ "/settings/about": InfoIcon,
106
"/settings/archived": ArchiveIcon,
107
};
108
95
-const SETTINGS_NAV_ITEMS: ReadonlyArray<{
96
- label: string;
97
- to: SettingsPath;
98
- icon: ComponentType<{ className?: string }>;
99
-}> = (Object.keys(SETTINGS_SECTION_LABELS) as SettingsPath[])
100
- .filter((to) => to !== "/settings/diagnostics")
101
- .map((to) => ({
102
- to,
103
- label: SETTINGS_SECTION_LABELS[to],
104
- icon: SETTINGS_SECTION_ICONS[to],
105
- }));
109
+// Detail pages without a nav entry highlight the page that links to them.
110
+const SETTINGS_DETAIL_PAGE_PARENTS: Readonly<Record<string, SettingsPath>> = {
111
+ "/settings/diagnostics": "/settings/maintenance",
112
+ "/settings/open-source-licenses": "/settings/about",
113
+};
114
115
// Attached only to the highlighted result, so it runs whenever the highlight lands on a row.
116
function scrollResultIntoView(row: HTMLElement | null) {
@@ -119,9 +127,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
127
const currentHash = useLocation({ select: (location) => location.hash });
128
const currentSearch = useLocation({ select: (location) => location.search });
129
const scopeSearch = validateSettingsScopeSearch(currentSearch);
122
- const navItems = SETTINGS_NAV_ITEMS.filter(
123
- (item) => item.to !== "/settings/projects" || isSettingsOverviewVisible(scopeSearch),
124
- );
130
+ const activePath = SETTINGS_DETAIL_PAGE_PARENTS[pathname] ?? pathname;
131
const searchInputRef = useRef<HTMLInputElement>(null);
132
const [query, setQuery] = useState("");
133
// Below md the nav is an icon rail; searching expands it over the page.
@@ -341,41 +347,60 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
347
))}
348
</SidebarMenu>
349
) : (
344
- <SidebarMenu>
350
+ <div className="flex flex-col gap-4">
351
{compactSearchOpen ? null : (
346
- <SidebarMenuItem className="md:hidden">
347
- <SidebarMenuButton
348
- aria-label="Search settings"
349
- onClick={() => setCompactSearchOpen(true)}
350
- >
351
- <SearchIcon />
352
- </SidebarMenuButton>
353
- </SidebarMenuItem>
354
- )}
355
- {navItems.map((item) => {
356
- const Icon = item.icon;
357
- const isGeneralDetailPage =
358
- item.to === "/settings/general" &&
359
- pathname === "/settings/open-source-licenses";
360
- const isActive =
361
- isGeneralDetailPage ||
362
- pathname === item.to ||
363
- pathname.startsWith(`${item.to}/`);
364
- return (
365
- <SidebarMenuItem key={item.to}>
352
+ <SidebarMenu className="md:hidden">
353
+ <SidebarMenuItem>
354
<SidebarMenuButton
367
- isActive={isActive}
368
- onClick={() => handleSectionClick(item.to)}
355
+ aria-label="Search settings"
356
+ onClick={() => setCompactSearchOpen(true)}
357
>
370
- <Icon />
371
- <span className={cn("truncate", !compactSearchOpen && "max-md:sr-only")}>
372
- {item.label}
373
- </span>
358
+ <SearchIcon />
359
</SidebarMenuButton>
360
</SidebarMenuItem>
376
- );
377
- })}
378
- </SidebarMenu>
361
+ </SidebarMenu>
362
+ )}
363
+ {SETTINGS_NAV_GROUPS.map((group, index) => (
364
+ <div
365
+ key={group.heading ?? index}
366
+ role="group"
367
+ aria-label={group.heading ?? undefined}
368
+ 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"
369
+ >
370
+ {group.heading ? (
371
+ <h3
372
+ className={cn(
373
+ "px-2 text-xs font-medium text-sidebar-muted-foreground/80",
374
+ !compactSearchOpen && "max-md:hidden",
375
+ )}
376
+ >
377
+ {group.heading}
378
+ </h3>
379
+ ) : null}
380
+ <SidebarMenu>
381
+ {group.paths.map((to) => {
382
+ const Icon = SETTINGS_SECTION_ICONS[to];
383
+ const isActive = activePath === to || activePath.startsWith(`${to}/`);
384
+ return (
385
+ <SidebarMenuItem key={to}>
386
+ <SidebarMenuButton
387
+ isActive={isActive}
388
+ onClick={() => handleSectionClick(to)}
389
+ >
390
+ <Icon />
391
+ <span
392
+ className={cn("truncate", !compactSearchOpen && "max-md:sr-only")}
393
+ >
394
+ {SETTINGS_SECTION_LABELS[to]}
395
+ </span>
396
+ </SidebarMenuButton>
397
+ </SidebarMenuItem>
398
+ );
399
+ })}
400
+ </SidebarMenu>
401
+ </div>
402
+ ))}
403
+ </div>
404
)}
405
</div>
406
</SidebarGroup>
apps/web/src/components/settings/SourceControlSettings.tsx
+2
-145
@@ -1,23 +1,14 @@
1
import { RefreshIcon } from "~/components/ui/refresh-icon";
2
import { ChevronDownIcon } from "lucide-react";
3
-import * as Duration from "effect/Duration";
3
import * as Option from "effect/Option";
4
import { useState, type ReactNode } from "react";
5
import type {
7
- BackgroundActivitySettings,
6
SourceControlDiscoveryResult,
7
SourceControlProviderAuth,
8
SourceControlProviderDiscoveryItem,
9
VcsDriverKind,
10
VcsDiscoveryItem,
11
} from "@t3tools/contracts";
14
-import {
15
- getBackgroundActivityBaseProfile,
16
- getBackgroundActivityPresetSettings,
17
- resolveServerBackgroundActivitySettings,
18
-} from "@t3tools/shared/backgroundActivitySettings";
19
-
20
-import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
12
import { useSettingsScope } from "./SettingsScopeContext";
13
import { ProjectDefaultsSettings } from "./ProjectDefaultsSettings";
14
import { cn } from "../../lib/utils";
@@ -35,13 +26,6 @@ import {
26
EmptyTitle,
27
} from "../ui/empty";
28
import { Skeleton } from "../ui/skeleton";
38
-import {
39
- NumberField,
40
- NumberFieldDecrement,
41
- NumberFieldGroup,
42
- NumberFieldIncrement,
43
- NumberFieldInput,
44
-} from "../ui/number-field";
29
import { Switch } from "../ui/switch";
30
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
31
@@ -52,8 +36,6 @@ import { SourceControlTokenSettings } from "./SourceControlTokenSettings";
36
import { RedactedSensitiveText } from "./RedactedSensitiveText";
37
import { SourceControlWritingSettingsSection } from "./SourceControlWritingSettings";
38
import {
55
- PolicyTooltip,
56
- SettingResetButton,
39
SettingsPageContainer,
40
SettingsSearchTarget,
41
SettingsSection,
@@ -75,47 +57,6 @@ const VCS_ICONS: Partial<Record<VcsDriverKind, Icon>> = {
57
};
58
59
const SOURCE_CONTROL_SKELETON_ROWS = ["primary", "secondary"] as const;
78
-const GIT_FETCH_INTERVAL_STEP_SECONDS = 5;
79
-type BackgroundActivityOverridePatch = Partial<{
80
- [K in keyof BackgroundActivitySettings["overrides"]]:
81
- | BackgroundActivitySettings["overrides"][K]
82
- | undefined;
83
-}>;
84
-
85
-function durationToSeconds(duration: Duration.Duration): number {
86
- return Math.round(Duration.toMillis(duration) / 1_000);
87
-}
88
-
89
-function normalizeFetchIntervalSeconds(value: number | null): number {
90
- if (value === null || !Number.isFinite(value)) {
91
- return 0;
92
- }
93
- return Math.max(0, Math.round(value));
94
-}
95
-
96
-function backgroundActivityOverrideSettings(
97
- current: BackgroundActivitySettings,
98
- overrides: BackgroundActivityOverridePatch,
99
-) {
100
- const nextOverrides: BackgroundActivityOverridePatch = {
101
- ...current.overrides,
102
- ...overrides,
103
- };
104
- for (const [key, value] of Object.entries(nextOverrides)) {
105
- if (value === undefined) {
106
- delete nextOverrides[key as keyof typeof nextOverrides];
107
- }
108
- }
109
- return {
110
- backgroundActivity: {
111
- schemaVersion: 1 as const,
112
- profile: "custom" as const,
113
- baseProfile: getBackgroundActivityBaseProfile(current),
114
- overrides: nextOverrides as BackgroundActivitySettings["overrides"],
115
- },
116
- };
117
-}
118
-
60
function optionLabel(value: Option.Option<string>): string | null {
61
return Option.getOrNull(value);
62
}
@@ -277,9 +218,7 @@ function DiscoveryItemRow({
218
const hasDetails = children !== undefined;
219
const searchTargetId = useSettingsSearchTargetId();
220
const [seenSearchTargetId, setSeenSearchTargetId] = useState<string | null>(null);
280
- const targetsThisRow =
281
- (item.kind === "git" && searchTargetId === searchableSetting("git-fetch-interval").id) ||
282
- searchTargetId === sourceControlHostSettingsSearchId(item.kind);
221
+ const targetsThisRow = searchTargetId === sourceControlHostSettingsSearchId(item.kind);
222
if (targetsThisRow && !isExpanded && seenSearchTargetId !== searchTargetId) {
223
setIsExpanded(true);
224
}
@@ -346,86 +285,6 @@ function DiscoveryItemRow({
285
);
286
}
287
349
-function GitFetchIntervalSettings() {
350
- const settings = useScopedSettings();
351
- const updateSettings = useUpdateScopedSettings();
352
- const resolvedBackgroundActivity = resolveServerBackgroundActivitySettings(settings);
353
- const automaticGitFetchIntervalSeconds = durationToSeconds(
354
- resolvedBackgroundActivity.automaticGitFetchInterval,
355
- );
356
- const defaultAutomaticGitFetchIntervalSeconds = durationToSeconds(
357
- getBackgroundActivityPresetSettings(
358
- getBackgroundActivityBaseProfile(settings.backgroundActivity),
359
- ).automaticGitFetchInterval,
360
- );
361
- const canResetFetchInterval =
362
- automaticGitFetchIntervalSeconds !== defaultAutomaticGitFetchIntervalSeconds;
363
- const setting = searchableSetting("git-fetch-interval");
364
-
365
- return (
366
- <SettingsSearchTarget id={setting.id} className="grid gap-3">
367
- <div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
368
- <div className="min-w-0 space-y-1">
369
- <div className="flex min-w-0 items-center gap-1">
370
- <span className="text-xs font-medium text-foreground">{setting.title}</span>
371
- <PolicyTooltip>
372
- This interval is configured for Git only. The shared Background activity policy still
373
- decides whether Git refreshes may run when the timer fires. Custom intervals appear as
374
- Advanced in General settings.
375
- </PolicyTooltip>
376
- <span
377
- className={cn(
378
- "inline-flex size-5 shrink-0 items-center justify-center transition-opacity",
379
- canResetFetchInterval ? "opacity-100" : "pointer-events-none opacity-0",
380
- )}
381
- aria-hidden={!canResetFetchInterval}
382
- >
383
- {canResetFetchInterval ? (
384
- <SettingResetButton
385
- label="fetch interval"
386
- onClick={() =>
387
- updateSettings(
388
- backgroundActivityOverrideSettings(settings.backgroundActivity, {
389
- automaticGitFetchInterval: undefined,
390
- }),
391
- )
392
- }
393
- />
394
- ) : null}
395
- </span>
396
- </div>
397
- <p className="max-w-2xl text-xs leading-relaxed text-muted-foreground">
398
- Refresh remote branches in the background. Set to 0 to avoid automatic Git prompts.
399
- </p>
400
- </div>
401
- <div className="flex shrink-0 items-center gap-2">
402
- <NumberField
403
- value={automaticGitFetchIntervalSeconds}
404
- min={0}
405
- step={GIT_FETCH_INTERVAL_STEP_SECONDS}
406
- size="sm"
407
- className="w-32"
408
- onValueChange={(value) =>
409
- updateSettings(
410
- backgroundActivityOverrideSettings(settings.backgroundActivity, {
411
- automaticGitFetchInterval: Duration.seconds(normalizeFetchIntervalSeconds(value)),
412
- }),
413
- )
414
- }
415
- >
416
- <NumberFieldGroup>
417
- <NumberFieldDecrement aria-label="Decrease fetch interval" />
418
- <NumberFieldInput aria-label="Automatic Git fetch interval in seconds" />
419
- <NumberFieldIncrement aria-label="Increase fetch interval" />
420
- </NumberFieldGroup>
421
- </NumberField>
422
- <span className="text-xs text-muted-foreground">seconds</span>
423
- </div>
424
- </div>
425
- </SettingsSearchTarget>
426
- );
427
-}
428
-
288
function SourceControlSectionSkeleton({
289
title,
290
headerAction,
@@ -609,9 +468,7 @@ export function SourceControlSettingsPanel() {
468
headerAction={scanButton}
469
>
470
{result.versionControlSystems.map((item) => (
612
- <DiscoveryItemRow key={`vcs:${item.kind}`} item={item}>
613
- {item.kind === "git" ? <GitFetchIntervalSettings /> : undefined}
614
- </DiscoveryItemRow>
471
+ <DiscoveryItemRow key={`vcs:${item.kind}`} item={item} />
472
))}
473
</SettingsSection>
474
) : null}
apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
+1
@@ -99,6 +99,7 @@ describe("mixed source control instructions", () => {
99
customInstructions,
100
}));
101
102
+ await userEvent.click(page.getByRole("button", { name: "Advanced" }));
103
await userEvent.click(resetButton("change request templates"));
104
105
expect(state.updateSettings).toHaveBeenCalledTimes(1);
apps/web/src/components/settings/SourceControlWritingSettings.tsx
+146
-141
@@ -44,7 +44,7 @@ import {
44
SettingsRow,
45
SettingsSection,
46
} from "./settingsLayout";
47
-import { BranchNamingSettings } from "./BranchNamingSettings";
47
+import { AdvancedSettings } from "./AdvancedSettings";
48
import { searchableSetting } from "./settingsSearch";
49
50
const MODE_OPTIONS: Record<SourceControlWritingStyleMode, { label: string; description: string }> =
@@ -178,8 +178,7 @@ export function SourceControlWritingSettingsSection() {
178
);
179
180
return (
181
- <SettingsSection id="source-control-text-generation" title="Text generation">
182
- <BranchNamingSettings />
181
+ <SettingsSection id="source-control-text-generation" title="Writing & review">
182
<SettingsRow
183
serverScoped
184
settingKeys={["sourceControlWritingStyle"]}
@@ -297,144 +296,6 @@ export function SourceControlWritingSettingsSection() {
296
) : null}
297
</SettingsRow>
298
300
- <SettingsRow
301
- serverScoped
302
- settingKeys={["sourceControlWritingStyle"]}
303
- mixed={templatesMixed}
304
- {...searchableSetting("follow-change-request-templates")}
305
- description="Use the repository's template for change request descriptions when available."
306
- resetAction={
307
- templatesMixed ||
308
- style.followChangeRequestTemplates !== defaults.followChangeRequestTemplates ? (
309
- <SettingResetButton
310
- label="change request templates"
311
- onClick={() =>
312
- updateSettings({
313
- sourceControlWritingStyle: {
314
- followChangeRequestTemplates: defaults.followChangeRequestTemplates,
315
- },
316
- })
317
- }
318
- />
319
- ) : null
320
- }
321
- control={
322
- <Switch
323
- mixed={templatesMixed}
324
- checked={templatesMixed ? false : style.followChangeRequestTemplates}
325
- onCheckedChange={(checked) =>
326
- updateSettings({
327
- sourceControlWritingStyle: {
328
- followChangeRequestTemplates: Boolean(checked),
329
- },
330
- })
331
- }
332
- aria-label="Follow change request templates"
333
- />
334
- }
335
- />
336
-
337
- <SettingsRow
338
- serverScoped
339
- settingKeys={["sourceControlWriterModelSelection"]}
340
- {...searchableSetting("source-control-writer-model")}
341
- description="Model for source control text and branch or bookmark names. Off uses the environment's text generation model."
342
- control={
343
- !hasServerTargets ? (
344
- <span className="text-sm text-muted-foreground">
345
- Connect an environment to choose its source control writer model.
346
- </span>
347
- ) : (
348
- <div className="flex flex-wrap items-center justify-end gap-2">
349
- {usesDedicatedModel && !canEnableDedicatedModel ? (
350
- <span className="text-sm text-muted-foreground">
351
- No text generation providers available.
352
- </span>
353
- ) : null}
354
- {usesDedicatedModel && canEnableDedicatedModel ? (
355
- <ProviderModelPicker
356
- environmentId={environmentId}
357
- activeInstanceId={activeSelection.instanceId}
358
- model={activeSelection.model}
359
- lockedProvider={null}
360
- instanceEntries={instanceEntries}
361
- modelOptionsByInstance={modelOptionsByInstance}
362
- triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
363
- triggerAriaLabel="Source control writer model"
364
- {...(mixedWriterModel ? { triggerLabel: "Mixed" } : {})}
365
- {...(environmentId
366
- ? {
367
- onOpenProviderSetup: (instanceId: ProviderInstanceId) => {
368
- void navigate({
369
- to: "/settings/providers",
370
- search: { environmentId, instanceId },
371
- });
372
- },
373
- }
374
- : {})}
375
- getModelDisabledReason={writerModelDisabledReason}
376
- onInstanceModelChange={(instanceId, model) => {
377
- const reason = writerModelDisabledReason(instanceId, model);
378
- if (reason) {
379
- toastManager.add({
380
- type: "error",
381
- title: "Source control writer model not saved",
382
- description: reason,
383
- });
384
- return;
385
- }
386
- updateSettings({
387
- sourceControlWriterModelSelection: createModelSelection(instanceId, model),
388
- });
389
- }}
390
- />
391
- ) : null}
392
- {usesDedicatedModel &&
393
- canEnableDedicatedModel &&
394
- !mixedWriterModel &&
395
- writerInstanceEntry ? (
396
- <TraitsPicker
397
- provider={writerInstanceEntry.driverKind}
398
- models={writerInstanceEntry.models}
399
- model={activeSelection.model}
400
- modelOptions={activeSelection.options ?? []}
401
- allowPromptInjectedEffort={false}
402
- planModeEnabled={
403
- settings.planModeEnabled || selectsPlanAgent(activeSelection.options)
404
- }
405
- triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
406
- onModelOptionsChange={(options) =>
407
- updateSettings({
408
- sourceControlWriterModelSelection: createModelSelection(
409
- activeSelection.instanceId,
410
- activeSelection.model,
411
- options,
412
- ),
413
- })
414
- }
415
- />
416
- ) : null}
417
- <Switch
418
- checked={usesDedicatedModel}
419
- disabled={!usesDedicatedModel && !canEnableDedicatedModel}
420
- onCheckedChange={(checked) =>
421
- updateSettings({
422
- sourceControlWriterModelSelection: checked
423
- ? createModelSelection(
424
- defaultModelSelection.instanceId,
425
- defaultModelSelection.model,
426
- defaultModelSelection.options,
427
- )
428
- : null,
429
- })
430
- }
431
- aria-label="Use a separate source control writer model"
432
- />
433
- </div>
434
- )
435
- }
436
- />
437
-
299
<SettingsRow
300
serverScoped
301
settingKeys={["reviewGuidesEnabled"]}
@@ -596,6 +457,150 @@ export function SourceControlWritingSettingsSection() {
457
</SettingsRow>
458
</>
459
) : null}
460
+ <AdvancedSettings
461
+ targetIds={[
462
+ searchableSetting("follow-change-request-templates").id,
463
+ searchableSetting("source-control-writer-model").id,
464
+ ]}
465
+ >
466
+ <SettingsRow
467
+ serverScoped
468
+ settingKeys={["sourceControlWritingStyle"]}
469
+ mixed={templatesMixed}
470
+ {...searchableSetting("follow-change-request-templates")}
471
+ description="Use the repository's template for change request descriptions when available."
472
+ resetAction={
473
+ templatesMixed ||
474
+ style.followChangeRequestTemplates !== defaults.followChangeRequestTemplates ? (
475
+ <SettingResetButton
476
+ label="change request templates"
477
+ onClick={() =>
478
+ updateSettings({
479
+ sourceControlWritingStyle: {
480
+ followChangeRequestTemplates: defaults.followChangeRequestTemplates,
481
+ },
482
+ })
483
+ }
484
+ />
485
+ ) : null
486
+ }
487
+ control={
488
+ <Switch
489
+ mixed={templatesMixed}
490
+ checked={templatesMixed ? false : style.followChangeRequestTemplates}
491
+ onCheckedChange={(checked) =>
492
+ updateSettings({
493
+ sourceControlWritingStyle: {
494
+ followChangeRequestTemplates: Boolean(checked),
495
+ },
496
+ })
497
+ }
498
+ aria-label="Follow change request templates"
499
+ />
500
+ }
501
+ />
502
+
503
+ <SettingsRow
504
+ serverScoped
505
+ settingKeys={["sourceControlWriterModelSelection"]}
506
+ {...searchableSetting("source-control-writer-model")}
507
+ description="Model for source control text and branch or bookmark names. Off uses the environment's text generation model."
508
+ control={
509
+ !hasServerTargets ? (
510
+ <span className="text-sm text-muted-foreground">
511
+ Connect an environment to choose its source control writer model.
512
+ </span>
513
+ ) : (
514
+ <div className="flex flex-wrap items-center justify-end gap-2">
515
+ {usesDedicatedModel && !canEnableDedicatedModel ? (
516
+ <span className="text-sm text-muted-foreground">
517
+ No text generation providers available.
518
+ </span>
519
+ ) : null}
520
+ {usesDedicatedModel && canEnableDedicatedModel ? (
521
+ <ProviderModelPicker
522
+ environmentId={environmentId}
523
+ activeInstanceId={activeSelection.instanceId}
524
+ model={activeSelection.model}
525
+ lockedProvider={null}
526
+ instanceEntries={instanceEntries}
527
+ modelOptionsByInstance={modelOptionsByInstance}
528
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
529
+ triggerAriaLabel="Source control writer model"
530
+ {...(mixedWriterModel ? { triggerLabel: "Mixed" } : {})}
531
+ {...(environmentId
532
+ ? {
533
+ onOpenProviderSetup: (instanceId: ProviderInstanceId) => {
534
+ void navigate({
535
+ to: "/settings/providers",
536
+ search: { environmentId, instanceId },
537
+ });
538
+ },
539
+ }
540
+ : {})}
541
+ getModelDisabledReason={writerModelDisabledReason}
542
+ onInstanceModelChange={(instanceId, model) => {
543
+ const reason = writerModelDisabledReason(instanceId, model);
544
+ if (reason) {
545
+ toastManager.add({
546
+ type: "error",
547
+ title: "Source control writer model not saved",
548
+ description: reason,
549
+ });
550
+ return;
551
+ }
552
+ updateSettings({
553
+ sourceControlWriterModelSelection: createModelSelection(instanceId, model),
554
+ });
555
+ }}
556
+ />
557
+ ) : null}
558
+ {usesDedicatedModel &&
559
+ canEnableDedicatedModel &&
560
+ !mixedWriterModel &&
561
+ writerInstanceEntry ? (
562
+ <TraitsPicker
563
+ provider={writerInstanceEntry.driverKind}
564
+ models={writerInstanceEntry.models}
565
+ model={activeSelection.model}
566
+ modelOptions={activeSelection.options ?? []}
567
+ allowPromptInjectedEffort={false}
568
+ planModeEnabled={
569
+ settings.planModeEnabled || selectsPlanAgent(activeSelection.options)
570
+ }
571
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
572
+ onModelOptionsChange={(options) =>
573
+ updateSettings({
574
+ sourceControlWriterModelSelection: createModelSelection(
575
+ activeSelection.instanceId,
576
+ activeSelection.model,
577
+ options,
578
+ ),
579
+ })
580
+ }
581
+ />
582
+ ) : null}
583
+ <Switch
584
+ checked={usesDedicatedModel}
585
+ disabled={!usesDedicatedModel && !canEnableDedicatedModel}
586
+ onCheckedChange={(checked) =>
587
+ updateSettings({
588
+ sourceControlWriterModelSelection: checked
589
+ ? createModelSelection(
590
+ defaultModelSelection.instanceId,
591
+ defaultModelSelection.model,
592
+ defaultModelSelection.options,
593
+ )
594
+ : null,
595
+ })
596
+ }
597
+ aria-label="Use a separate source control writer model"
598
+ />
599
+ </div>
600
+ )
601
+ }
602
+ />
603
+ </AdvancedSettings>
604
</SettingsSection>
605
);
606
}
apps/web/src/components/settings/StorageSettings.browser.test.tsx
+2
-2
@@ -82,7 +82,7 @@ vi.mock(import("../ui/toast"), async (original) => {
82
return { ...actual, toastManager: { ...actual.toastManager, add: vi.fn() } };
83
});
84
85
-import { StorageSettingsPanel } from "./StorageSettings";
85
+import { StorageCleanupSections } from "./StorageSettings";
86
87
function setup() {
88
state.settings = {
@@ -105,7 +105,7 @@ function setup() {
105
106
const panel = () => (
107
<RegistryProvider>
108
- <StorageSettingsPanel />
108
+ <StorageCleanupSections />
109
</RegistryProvider>
110
);
111
const deleteButton = (container: HTMLElement) =>
apps/web/src/components/settings/StorageSettings.tsx
+208
-161
@@ -29,15 +29,11 @@ import {
29
NumberFieldIncrement,
30
NumberFieldInput,
31
} from "../ui/number-field";
32
-import {
33
- SettingResetButton,
34
- SettingsPageContainer,
35
- SettingsRow,
36
- SettingsSection,
37
-} from "./settingsLayout";
32
+import { SettingResetButton, SettingsRow, SettingsSection } from "./settingsLayout";
33
import { DatabaseStorageNotice } from "./DatabaseStorageNotice";
39
-import { SettingsScopeNotice } from "./SettingsScopeNotice";
34
+import { AdvancedSettings } from "./AdvancedSettings";
35
import { FoldedSettingsSection } from "./FoldedSettingsSection";
36
+import { SettingsScopeNotice } from "./SettingsScopeNotice";
37
import { SettingsGroup } from "./SettingsGroup";
38
import type { ScopedSettingsTarget } from "./scopedSettings";
39
import { useSettingsScope } from "./SettingsScopeContext";
@@ -50,7 +46,7 @@ import {
46
} from "./useScopedSettings";
47
import { settingsScopeEnvironmentLabel } from "./settingsScopeAxis";
48
53
-function WorktreesDirectoryRow() {
49
+export function WorktreesDirectoryRow() {
50
const { connectedEnvironments, targets } = useSettingsScope();
51
const settings = useScopedSettings();
52
const updateSettings = useUpdateScopedSettings();
@@ -422,7 +418,38 @@ function CleanupSection() {
418
);
419
}
420
425
-export function StorageSettingsPanel() {
421
+function supportsStorageCleanup(
422
+ environments: ReadonlyArray<{
423
+ readonly serverConfig: {
424
+ readonly environment: { readonly capabilities: { readonly storageCleanup?: boolean } };
425
+ } | null;
426
+ }>,
427
+) {
428
+ return environments.every(
429
+ (environment) => environment.serverConfig?.environment.capabilities.storageCleanup === true,
430
+ );
431
+}
432
+
433
+/** Narrows a mixed selection to the machines that support cleanup. */
434
+function StorageCleanupScopeNotice() {
435
+ const { connectedEnvironments } = useSettingsScope();
436
+ return (
437
+ <SettingsScopeNotice
438
+ inline
439
+ target="environment"
440
+ eligibleEnvironmentIds={connectedEnvironments
441
+ .filter(
442
+ (environment) =>
443
+ environment.serverConfig?.environment.capabilities.storageCleanup === true,
444
+ )
445
+ .map((environment) => environment.environmentId)}
446
+ >
447
+ Update the selected environments to use storage cleanup, or choose a machine that supports it.
448
+ </SettingsScopeNotice>
449
+ );
450
+}
451
+
452
+export function WorktreeCleanupSection() {
453
const { scope, environments, connectedEnvironments, targets, target } = useSettingsScope();
454
const scopedSettings = useScopedSettings();
455
const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
@@ -462,45 +489,24 @@ export function StorageSettingsPanel() {
489
)
490
) {
491
return (
465
- <SettingsScopeNotice target="all">
466
- Update the selected machines to configure project worktree cleanup.
467
- </SettingsScopeNotice>
492
+ <SettingsSection id="storage-worktrees" title="Cleanup" variant="plain">
493
+ <SettingsScopeNotice inline target="all">
494
+ Update the selected machines to configure project worktree cleanup.
495
+ </SettingsScopeNotice>
496
+ </SettingsSection>
497
);
498
}
470
-
471
- if (
472
- connectedEnvironments.some(
473
- (environment) => environment.serverConfig?.environment.capabilities.storageCleanup !== true,
474
- )
475
- ) {
499
+ if (!supportsStorageCleanup(connectedEnvironments)) {
500
return (
477
- <SettingsScopeNotice
478
- target="environment"
479
- eligibleEnvironmentIds={connectedEnvironments
480
- .filter(
481
- (environment) =>
482
- environment.serverConfig?.environment.capabilities.storageCleanup === true,
483
- )
484
- .map((environment) => environment.environmentId)}
485
- >
486
- Update the selected environments to use storage cleanup, or choose a machine that supports
487
- it.
488
- </SettingsScopeNotice>
501
+ <SettingsSection id="storage-worktrees" title="Cleanup" variant="plain">
502
+ <StorageCleanupScopeNotice />
503
+ </SettingsSection>
504
);
505
}
506
507
return (
493
- <SettingsPageContainer>
494
- {!isProjectScope && (
495
- <DatabaseStorageNotice
496
- environments={connectedEnvironments.filter(
497
- (environment) =>
498
- environment.serverConfig?.environment.capabilities.databaseStorage === true,
499
- )}
500
- />
501
- )}
502
- <SettingsSection id="storage-worktrees" title="Worktrees">
503
- {!isProjectScope && <WorktreesDirectoryRow />}
508
+ <SettingsSection id="storage-worktrees" title="Cleanup">
509
+ <>
510
{isProjectScope && (
511
<SettingsRow
512
title="Automatic worktree cleanup"
@@ -559,49 +565,6 @@ export function StorageSettingsPanel() {
565
/>
566
}
567
/>
562
- <SettingsRow
563
- title="Delete inactive worktrees"
564
- status={ruleStatus("worktreeAfterDays")}
565
- description="Remove worktrees after their threads have been inactive for this many days. Branches and thread history are kept."
566
- serverScoped={!isProjectScope}
567
- control={
568
- <RetentionControl
569
- label="Delete inactive worktrees"
570
- value={settings.worktreeAfterDays}
571
- onChange={(worktreeAfterDays) => updateWorktree({ worktreeAfterDays })}
572
- />
573
- }
574
- />
575
- {connectedEnvironments.length > 0 &&
576
- connectedEnvironments.every(
577
- (environment) =>
578
- environment.serverConfig?.environment.capabilities.settledWorktreeCleanup ===
579
- true,
580
- ) && (
581
- <SettingsRow
582
- title="Delete settled worktrees"
583
- status={[
584
- ruleStatus("worktreeSettledAfterDays"),
585
- environments.length > connectedEnvironments.length
586
- ? "Offline machines will not get this setting"
587
- : undefined,
588
- ]
589
- .filter(Boolean)
590
- .join(". ")}
591
- 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."
592
- serverScoped={!isProjectScope}
593
- control={
594
- <RetentionControl
595
- label="Delete settled worktrees"
596
- value={settings.worktreeSettledAfterDays}
597
- minimum={0}
598
- onChange={(worktreeSettledAfterDays) =>
599
- updateWorktree({ worktreeSettledAfterDays })
600
- }
601
- />
602
- }
603
- />
604
- )}
568
<SettingsRow
569
title="Delete merged worktrees"
570
status={ruleStatus("worktreeOnMerge")}
@@ -616,96 +579,180 @@ export function StorageSettingsPanel() {
579
}
580
/>
581
<SettingsRow
619
- title="Delete unchanged worktrees"
620
- status={ruleStatus("worktreeUnchanged")}
621
- description="Remove worktrees with no commits beyond the default branch."
582
+ title="Delete inactive worktrees"
583
+ status={ruleStatus("worktreeAfterDays")}
584
+ description="Remove worktrees after their threads have been inactive for this many days. Branches and thread history are kept."
585
serverScoped={!isProjectScope}
586
control={
624
- <Switch
625
- aria-label="Delete unchanged worktrees"
626
- checked={settings.worktreeUnchanged}
627
- onCheckedChange={(worktreeUnchanged) => updateWorktree({ worktreeUnchanged })}
587
+ <RetentionControl
588
+ label="Delete inactive worktrees"
589
+ value={settings.worktreeAfterDays}
590
+ onChange={(worktreeAfterDays) => updateWorktree({ worktreeAfterDays })}
591
/>
592
}
593
/>
631
- {connectedEnvironments.every(
632
- (environment) =>
633
- environment.serverConfig?.environment.capabilities.storageCleanupRun === true,
634
- ) && (
594
+ <AdvancedSettings
595
+ // The keep-when search result lands on this section, not its row.
596
+ targetIds={["storage-worktrees", searchableSetting("storage-worktree-keep-when").id]}
597
+ >
598
+ {connectedEnvironments.length > 0 &&
599
+ connectedEnvironments.every(
600
+ (environment) =>
601
+ environment.serverConfig?.environment.capabilities.settledWorktreeCleanup ===
602
+ true,
603
+ ) && (
604
+ <SettingsRow
605
+ title="Delete settled worktrees"
606
+ status={[
607
+ ruleStatus("worktreeSettledAfterDays"),
608
+ environments.length > connectedEnvironments.length
609
+ ? "Offline machines will not get this setting"
610
+ : undefined,
611
+ ]
612
+ .filter(Boolean)
613
+ .join(". ")}
614
+ 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."
615
+ serverScoped={!isProjectScope}
616
+ control={
617
+ <RetentionControl
618
+ label="Delete settled worktrees"
619
+ value={settings.worktreeSettledAfterDays}
620
+ minimum={0}
621
+ onChange={(worktreeSettledAfterDays) =>
622
+ updateWorktree({ worktreeSettledAfterDays })
623
+ }
624
+ />
625
+ }
626
+ />
627
+ )}
628
<SettingsRow
636
- {...searchableSetting("storage-worktree-keep-when")}
637
- status={ruleStatus("worktreeKeepWhen")}
638
- description={
639
- settings.worktreeKeepWhen === "any-local-files"
640
- ? "Includes ignored files, except node_modules."
641
- : settings.worktreeKeepWhen === "tracked-changes"
642
- ? "Deletes untracked and ignored files, including .env."
643
- : "Keeps edits and untracked files. Deletes ignored files, including .env."
644
- }
629
+ title="Delete unchanged worktrees"
630
+ status={ruleStatus("worktreeUnchanged")}
631
+ description="Remove worktrees with no commits beyond the default branch."
632
serverScoped={!isProjectScope}
633
control={
647
- <Select
648
- value={ruleStatus("worktreeKeepWhen") ? null : settings.worktreeKeepWhen}
649
- onValueChange={(next) => {
650
- if (
651
- next === "any-local-files" ||
652
- next === "uncommitted-changes" ||
653
- next === "tracked-changes"
654
- )
655
- updateWorktree({ worktreeKeepWhen: next });
656
- }}
657
- >
658
- <SelectTrigger size="sm" aria-label="Keep worktrees with local changes">
659
- <SelectValue>
660
- {ruleStatus("worktreeKeepWhen")
661
- ? "Mixed"
662
- : KEEP_WHEN_LABELS[settings.worktreeKeepWhen]}
663
- </SelectValue>
664
- </SelectTrigger>
665
- <SelectPopup align="end" alignItemWithTrigger={false}>
666
- <SelectItem value="any-local-files">Any local files</SelectItem>
667
- <SelectItem value="uncommitted-changes">Uncommitted changes</SelectItem>
668
- <SelectItem value="tracked-changes">Edited tracked files</SelectItem>
669
- </SelectPopup>
670
- </Select>
634
+ <Switch
635
+ aria-label="Delete unchanged worktrees"
636
+ checked={settings.worktreeUnchanged}
637
+ onCheckedChange={(worktreeUnchanged) => updateWorktree({ worktreeUnchanged })}
638
+ />
639
}
640
/>
673
- )}
641
+ {connectedEnvironments.every(
642
+ (environment) =>
643
+ environment.serverConfig?.environment.capabilities.storageCleanupRun === true,
644
+ ) && (
645
+ <SettingsRow
646
+ {...searchableSetting("storage-worktree-keep-when")}
647
+ status={ruleStatus("worktreeKeepWhen")}
648
+ description={
649
+ settings.worktreeKeepWhen === "any-local-files"
650
+ ? "Includes ignored files, except node_modules."
651
+ : settings.worktreeKeepWhen === "tracked-changes"
652
+ ? "Deletes untracked and ignored files, including .env."
653
+ : "Keeps edits and untracked files. Deletes ignored files, including .env."
654
+ }
655
+ serverScoped={!isProjectScope}
656
+ control={
657
+ <Select
658
+ value={ruleStatus("worktreeKeepWhen") ? null : settings.worktreeKeepWhen}
659
+ onValueChange={(next) => {
660
+ if (
661
+ next === "any-local-files" ||
662
+ next === "uncommitted-changes" ||
663
+ next === "tracked-changes"
664
+ )
665
+ updateWorktree({ worktreeKeepWhen: next });
666
+ }}
667
+ >
668
+ <SelectTrigger size="sm" aria-label="Keep worktrees with local changes">
669
+ <SelectValue>
670
+ {ruleStatus("worktreeKeepWhen")
671
+ ? "Mixed"
672
+ : KEEP_WHEN_LABELS[settings.worktreeKeepWhen]}
673
+ </SelectValue>
674
+ </SelectTrigger>
675
+ <SelectPopup align="end" alignItemWithTrigger={false}>
676
+ <SelectItem value="any-local-files">Any local files</SelectItem>
677
+ <SelectItem value="uncommitted-changes">Uncommitted changes</SelectItem>
678
+ <SelectItem value="tracked-changes">Edited tracked files</SelectItem>
679
+ </SelectPopup>
680
+ </Select>
681
+ }
682
+ />
683
+ )}
684
+ </AdvancedSettings>
685
</>
686
)}
676
- </SettingsSection>
687
+ </>
688
+ </SettingsSection>
689
+ );
690
+}
691
678
- {!isProjectScope && (
679
- <SettingsSection id="storage-artifacts" title="Artifacts and logs">
680
- <SettingsRow
681
- title="Delete old browser artifacts"
682
- status={ruleStatus("browserArtifactsAfterDays")}
683
- description="Delete saved browser captures after this many days. Older capture links will no longer open."
684
- serverScoped
685
- control={
686
- <RetentionControl
687
- label="Delete old browser artifacts"
688
- value={settings.browserArtifactsAfterDays}
689
- onChange={(browserArtifactsAfterDays) => update({ browserArtifactsAfterDays })}
690
- />
691
- }
692
- />
693
- <SettingsRow
694
- title="Delete old rotated logs"
695
- status={ruleStatus("logsAfterDays")}
696
- description="Delete inactive rotated log files after this many days. Current logs are kept."
697
- serverScoped
698
- control={
699
- <RetentionControl
700
- label="Delete old rotated logs"
701
- value={settings.logsAfterDays}
702
- onChange={(logsAfterDays) => update({ logsAfterDays })}
703
- />
704
- }
705
- />
706
- </SettingsSection>
692
+/** Retention for logs and captures, and the manual cleanup run, which covers worktrees too. */
693
+export function StorageCleanupSections() {
694
+ const { scope, connectedEnvironments, targets } = useSettingsScope();
695
+ const scopedSettings = useScopedSettings();
696
+ const updateSettings = useUpdateScopedSettings();
697
+ if (scope.kind === "project" || scope.kind === "checkout") return null;
698
+ const settings = scopedSettings.storageCleanup;
699
+ const ruleStatus = (key: "browserArtifactsAfterDays" | "logsAfterDays") =>
700
+ targets.some((target) => target.settings.storageCleanup[key] !== settings[key])
701
+ ? "Mixed across selected machines"
702
+ : undefined;
703
+ const update = (patch: Partial<StorageCleanupSettings>) =>
704
+ updateSettings({ storageCleanup: patch });
705
+ const databaseStorageNotice = (
706
+ <DatabaseStorageNotice
707
+ environments={connectedEnvironments.filter(
708
+ (environment) =>
709
+ environment.serverConfig?.environment.capabilities.databaseStorage === true,
710
)}
708
- {!isProjectScope && <CleanupSection />}
709
- </SettingsPageContainer>
711
+ />
712
+ );
713
+ if (!supportsStorageCleanup(connectedEnvironments)) {
714
+ return (
715
+ <>
716
+ {databaseStorageNotice}
717
+ <SettingsSection id="storage-artifacts" title="Artifacts and logs" variant="plain">
718
+ <StorageCleanupScopeNotice />
719
+ </SettingsSection>
720
+ </>
721
+ );
722
+ }
723
+
724
+ return (
725
+ <>
726
+ {databaseStorageNotice}
727
+ <SettingsSection id="storage-artifacts" title="Artifacts and logs">
728
+ <SettingsRow
729
+ title="Delete old browser artifacts"
730
+ status={ruleStatus("browserArtifactsAfterDays")}
731
+ description="Delete saved browser captures after this many days. Older capture links will no longer open."
732
+ serverScoped
733
+ control={
734
+ <RetentionControl
735
+ label="Delete old browser artifacts"
736
+ value={settings.browserArtifactsAfterDays}
737
+ onChange={(browserArtifactsAfterDays) => update({ browserArtifactsAfterDays })}
738
+ />
739
+ }
740
+ />
741
+ <SettingsRow
742
+ title="Delete old rotated logs"
743
+ status={ruleStatus("logsAfterDays")}
744
+ description="Delete inactive rotated log files after this many days. Current logs are kept."
745
+ serverScoped
746
+ control={
747
+ <RetentionControl
748
+ label="Delete old rotated logs"
749
+ value={settings.logsAfterDays}
750
+ onChange={(logsAfterDays) => update({ logsAfterDays })}
751
+ />
752
+ }
753
+ />
754
+ </SettingsSection>
755
+ <CleanupSection />
756
+ </>
757
);
758
}
apps/web/src/components/settings/ThemeSettings.tsx
+1
-1
@@ -827,7 +827,7 @@ export function ThemeLibrary({
827
828
return (
829
<div className="space-y-3">
830
- <h3 className="px-3 text-sm font-normal text-foreground/70 sm:px-4 redesign:text-base redesign:font-semibold redesign:text-foreground">
830
+ <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">
831
{searchableSetting("color-scheme").title}
832
</h3>
833
{renderModeTiles()}
apps/web/src/components/settings/TypographySettings.tsx
+30
-15
@@ -26,6 +26,7 @@ import {
26
resolveTerminalFontSizePreference,
27
TYPOGRAPHY_ADVANCED_STORAGE_KEY,
28
} from "../../appearanceFonts";
29
+import { AdvancedSettings } from "./AdvancedSettings";
30
import { CodeFontPreview, PromptFontPreview, TerminalFontPreview } from "./SettingsFontPreviews";
31
import { discoverInstalledFonts, FontFamilyPicker, useFontEnumeration } from "./FontFamilyPicker";
32
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -261,11 +262,32 @@ function FontSettingsGroup() {
262
<PromptFontRow />
263
<CodeFontRow />
264
<TerminalFontRow />
264
- <FontSmoothingRow />
265
</>
266
);
267
}
268
269
+function SeparateFontsRow({
270
+ checked,
271
+ onCheckedChange,
272
+}: {
273
+ readonly checked: boolean;
274
+ readonly onCheckedChange: (checked: boolean) => void;
275
+}) {
276
+ return (
277
+ <SettingsRow
278
+ {...searchableSetting("separate-fonts")}
279
+ description="Set the prompt, code, and terminal fonts separately instead of one monospace font."
280
+ control={
281
+ <Switch
282
+ checked={checked}
283
+ onCheckedChange={(next) => onCheckedChange(Boolean(next))}
284
+ aria-label="Separate fonts"
285
+ />
286
+ }
287
+ />
288
+ );
289
+}
290
+
291
function SimpleFontRows() {
292
const settings = useScopedSettings();
293
return (
@@ -312,22 +334,15 @@ export function TypographySection() {
334
const showAdvanced =
335
advanced || (searchTargetId !== null && isAdvancedTypographyTarget(searchTargetId));
336
return (
315
- <SettingsSection
316
- id="typography"
317
- title="Typography"
318
- headerAction={
319
- <label className="flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground">
320
- Advanced
321
- <Switch
322
- checked={showAdvanced}
323
- onCheckedChange={(checked) => setAdvanced(Boolean(checked))}
324
- aria-label="Show advanced typography settings"
325
- />
326
- </label>
327
- }
328
- >
337
+ <SettingsSection id="typography" title="Typography">
338
{showAdvanced ? <FontSettingsGroup /> : <SimpleFontRows />}
339
<WordWrapRow />
340
+ <AdvancedSettings
341
+ targetIds={[searchableSetting("separate-fonts").id, searchableSetting("font-smoothing").id]}
342
+ >
343
+ <SeparateFontsRow checked={showAdvanced} onCheckedChange={setAdvanced} />
344
+ <FontSmoothingRow />
345
+ </AdvancedSettings>
346
</SettingsSection>
347
);
348
}
apps/web/src/components/settings/WorktreesSettings.tsx
new
+73
@@ -0,0 +1,73 @@
1
+import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
2
+
3
+import { AdvancedSettings } from "./AdvancedSettings";
4
+import { BranchNamingSettings } from "./BranchNamingSettings";
5
+import { WorktreeSubmodulesRow } from "./ProjectDefaultsSettings";
6
+import { ScopedSwitch } from "./ScopedSwitch";
7
+import { useSettingsScope } from "./SettingsScopeContext";
8
+import {
9
+ SettingResetButton,
10
+ SettingsPageContainer,
11
+ SettingsRow,
12
+ SettingsSection,
13
+} from "./settingsLayout";
14
+import { searchableSetting } from "./settingsSearch";
15
+import { WorktreeCleanupSection, WorktreesDirectoryRow } from "./StorageSettings";
16
+import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
17
+
18
+function StartFromRemoteRow() {
19
+ const settings = useScopedSettings();
20
+ const updateSettings = useUpdateScopedSettings();
21
+ return (
22
+ <SettingsRow
23
+ serverScoped
24
+ settingKeys={["newWorktreesStartFromOrigin"]}
25
+ {...searchableSetting("start-from-origin")}
26
+ 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."
27
+ resetAction={
28
+ settings.newWorktreesStartFromOrigin !==
29
+ DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin ? (
30
+ <SettingResetButton
31
+ label="new worktrees start from remote"
32
+ onClick={() =>
33
+ updateSettings({
34
+ newWorktreesStartFromOrigin: DEFAULT_UNIFIED_SETTINGS.newWorktreesStartFromOrigin,
35
+ })
36
+ }
37
+ />
38
+ ) : null
39
+ }
40
+ control={
41
+ <ScopedSwitch
42
+ settingKeys={["newWorktreesStartFromOrigin"]}
43
+ checked={settings.newWorktreesStartFromOrigin}
44
+ onCheckedChange={(checked) =>
45
+ updateSettings({ newWorktreesStartFromOrigin: Boolean(checked) })
46
+ }
47
+ aria-label="Start new worktrees from remote by default"
48
+ />
49
+ }
50
+ />
51
+ );
52
+}
53
+
54
+export function WorktreesSettingsPanel() {
55
+ const { scope } = useSettingsScope();
56
+ const isProjectScope = scope.kind === "project" || scope.kind === "checkout";
57
+
58
+ return (
59
+ <SettingsPageContainer>
60
+ <SettingsSection id="worktree-creation" title="Creation">
61
+ {!isProjectScope && <WorktreesDirectoryRow />}
62
+ <StartFromRemoteRow />
63
+ <AdvancedSettings targetIds={[searchableSetting("worktree-submodules").id]}>
64
+ <WorktreeSubmodulesRow />
65
+ </AdvancedSettings>
66
+ </SettingsSection>
67
+ <SettingsSection id="worktree-branches" title="Branches">
68
+ <BranchNamingSettings />
69
+ </SettingsSection>
70
+ <WorktreeCleanupSection />
71
+ </SettingsPageContainer>
72
+ );
73
+}
apps/web/src/components/settings/settingsSearch.test.ts
+31
-2
@@ -12,6 +12,7 @@ import {
12
getSettingsSearchTargetScope,
13
getThreadAutoSettlementSearchAvailability,
14
isSettingsSearchScopeAvailable,
15
+ movedSettingsPath,
16
searchSettings,
17
SETTINGS_SEARCH_ITEMS,
18
sourceControlHostSearchItems,
@@ -29,7 +30,7 @@ const ITEMS: ReadonlyArray<SettingsSearchItem> = [
30
{
31
id: "network-access",
32
title: "Network access",
32
- to: "/settings/connections",
33
+ to: "/settings/access",
34
searchTerms: ["remote pairing backend"],
35
},
36
{
@@ -54,7 +55,7 @@ describe("searchSettings", () => {
55
it("matches titles, sections, and remembered setting details", () => {
56
expect(searchSettings("word", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
57
expect(searchSettings("network", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
57
- expect(searchSettings("connections", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
58
+ expect(searchSettings("sharing", ITEMS).map((item) => item.id)).toEqual(["network-access"]);
59
expect(searchSettings("claude", ITEMS).map((item) => item.id)).toEqual(["providers"]);
60
expect(searchSettings("long lines", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
61
});
@@ -208,6 +209,7 @@ describe("auto-settlement search availability", () => {
209
"auto-settle-inactive-threads",
210
"auto-settle-merged-threads",
211
"days-before-auto-settle",
212
+ "keep-threads-with-pull-requests",
213
]);
214
});
215
@@ -285,3 +287,30 @@ describe("source control host search items", () => {
287
);
288
});
289
});
290
+
291
+describe("movedSettingsPath", () => {
292
+ it("sends old links to the page their row moved to", () => {
293
+ expect(movedSettingsPath("/settings/general", "text-generation-model")).toBe(
294
+ "/settings/threads",
295
+ );
296
+ expect(movedSettingsPath("/settings/connections", "authorized-clients")).toBe(
297
+ "/settings/access",
298
+ );
299
+ expect(movedSettingsPath("/settings/source-control", "worktree-branch-naming")).toBe(
300
+ "/settings/worktrees",
301
+ );
302
+ expect(movedSettingsPath("/settings/appearance", "diff-color-scheme")).toBe("/settings/diffs");
303
+ expect(movedSettingsPath("/settings/connections", "network-access")).toBe("/settings/access");
304
+ expect(movedSettingsPath("/settings/storage", "storage-worktrees")).toBe("/settings/worktrees");
305
+ expect(movedSettingsPath("/settings/storage", "")).toBe("/settings/maintenance");
306
+ expect(movedSettingsPath("/settings/integrations", "devices")).toBe("/settings/devices");
307
+ expect(movedSettingsPath("/settings/beta", "")).toBe("/settings/labs");
308
+ });
309
+
310
+ it("leaves current pages alone", () => {
311
+ expect(movedSettingsPath("/settings/general", "time-format")).toBeNull();
312
+ expect(movedSettingsPath("/settings/projects", "project-defaults")).toBeNull();
313
+ expect(movedSettingsPath("/settings/connections", "remote-environments")).toBeNull();
314
+ expect(movedSettingsPath("/settings/appearance", "theme")).toBeNull();
315
+ });
316
+});
apps/web/src/components/settings/settingsSearch.ts
+195
-110
@@ -13,26 +13,29 @@ import * as Schema from "effect/Schema";
13
import { TYPOGRAPHY_ADVANCED_STORAGE_KEY } from "../../appearanceFonts";
14
import { writeLocalStorageValue } from "../../hooks/useLocalStorage";
15
import { commandLabel } from "./KeybindingsSettings.logic";
16
-import {
17
- validateSettingsScopeSearch,
18
- type ResolvedSettingsScope,
19
- type SettingsScopeSearch,
20
-} from "./settingsScope";
16
+import type { ResolvedSettingsScope } from "./settingsScope";
17
18
export type SettingsPath =
19
| "/settings/projects"
20
| "/settings/general"
21
| "/settings/diagnostics"
22
| "/settings/appearance"
23
+ | "/settings/chat"
24
+ | "/settings/diffs"
25
| "/settings/keybindings"
26
| "/settings/snap-shot"
27
| "/settings/providers"
30
- | "/settings/integrations"
28
+ | "/settings/threads"
29
+ | "/settings/browser"
30
+ | "/settings/devices"
31
| "/settings/scheduled-tasks"
32
| "/settings/source-control"
33
- | "/settings/storage"
33
+ | "/settings/worktrees"
34
| "/settings/connections"
35
- | "/settings/beta"
35
+ | "/settings/access"
36
+ | "/settings/maintenance"
37
+ | "/settings/labs"
38
+ | "/settings/about"
39
| "/settings/archived";
40
41
export type SettingsSearchScope =
@@ -80,21 +83,65 @@ export interface SettingsSearchAvailability {
83
84
export const SETTINGS_SECTION_LABELS: Readonly<Record<SettingsPath, string>> = {
85
"/settings/diagnostics": "Diagnostics",
83
- "/settings/projects": "Project",
86
+ "/settings/projects": "Projects",
87
"/settings/general": "General",
88
"/settings/appearance": "Appearance",
89
+ "/settings/chat": "Chat",
90
+ "/settings/diffs": "Diffs & pull requests",
91
"/settings/keybindings": "Keybindings",
92
"/settings/snap-shot": "SnapShots",
93
"/settings/providers": "Providers",
89
- "/settings/integrations": "Integrations",
94
+ "/settings/threads": "Threads",
95
+ "/settings/browser": "Browser",
96
+ "/settings/devices": "Devices",
97
"/settings/scheduled-tasks": "Scheduled tasks",
98
"/settings/source-control": "Source control",
92
- "/settings/storage": "Storage",
93
- "/settings/connections": "Connections",
94
- "/settings/beta": "Beta",
99
+ "/settings/worktrees": "Worktrees",
100
+ "/settings/connections": "Environments",
101
+ "/settings/access": "Sharing & access",
102
+ "/settings/maintenance": "Maintenance",
103
+ "/settings/labs": "Labs",
104
+ "/settings/about": "About",
105
"/settings/archived": "Archive",
106
};
107
108
+/** Sidebar order. A group without a heading is set apart by space alone. */
109
+export const SETTINGS_NAV_GROUPS: ReadonlyArray<{
110
+ readonly heading: string | null;
111
+ readonly paths: ReadonlyArray<SettingsPath>;
112
+}> = [
113
+ {
114
+ heading: null,
115
+ paths: [
116
+ "/settings/general",
117
+ "/settings/appearance",
118
+ "/settings/chat",
119
+ "/settings/diffs",
120
+ "/settings/keybindings",
121
+ "/settings/snap-shot",
122
+ ],
123
+ },
124
+ {
125
+ heading: "Agents",
126
+ paths: [
127
+ "/settings/providers",
128
+ "/settings/threads",
129
+ "/settings/browser",
130
+ "/settings/devices",
131
+ "/settings/scheduled-tasks",
132
+ ],
133
+ },
134
+ {
135
+ heading: "Code",
136
+ paths: ["/settings/projects", "/settings/source-control", "/settings/worktrees"],
137
+ },
138
+ { heading: "Connections", paths: ["/settings/connections", "/settings/access"] },
139
+ {
140
+ heading: null,
141
+ paths: ["/settings/maintenance", "/settings/labs", "/settings/about", "/settings/archived"],
142
+ },
143
+];
144
+
145
export function keybindingSearchAnchorId<Command extends KeybindingCommand>(command: Command) {
146
return `keybinding-${command}` as const;
147
}
@@ -161,7 +208,7 @@ export const SETTINGS_SEARCH_ITEMS = [
208
id: "storage-worktree-keep-when",
209
targetId: "storage-worktrees",
210
title: "Keep worktrees with local changes",
164
- to: "/settings/storage",
211
+ to: "/settings/worktrees",
212
scope: "project-defaults",
213
searchTerms: [
214
"any local files uncommitted changes edited tracked files ignored env build output cleanup",
@@ -170,14 +217,14 @@ export const SETTINGS_SEARCH_ITEMS = [
217
{
218
id: "storage-delete-now",
219
title: "Delete now",
173
- to: "/settings/storage",
220
+ to: "/settings/maintenance",
221
scope: "environment-defaults",
222
searchTerms: ["storage cleanup run now results report removed kept failed"],
223
},
224
{
225
id: "storage-worktrees",
226
title: "Worktree cleanup",
180
- to: "/settings/storage",
227
+ to: "/settings/worktrees",
228
scope: "project-defaults",
229
searchTerms: [
230
"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 = [
233
{
234
id: "storage-worktrees-location",
235
title: "Worktree location",
189
- to: "/settings/storage",
236
+ to: "/settings/worktrees",
237
scope: "environment-defaults",
238
searchTerms: ["worktree location folder directory path drive external disk"],
239
},
240
{
241
id: "storage-artifacts",
242
title: "Artifacts and logs",
196
- to: "/settings/storage",
243
+ to: "/settings/maintenance",
244
scope: "environment-defaults",
245
searchTerms: ["disk storage browser screenshots captures rotated logs cleanup retention"],
246
},
247
{
248
id: "project-defaults",
249
title: "Project defaults and overrides",
203
- to: "/settings/general",
250
+ to: "/settings/threads",
251
scope: "project-defaults",
252
searchTerms: ["model workspace environments projects inheritance checkout"],
253
},
@@ -213,14 +260,14 @@ export const SETTINGS_SEARCH_ITEMS = [
260
{
261
id: "default-model",
262
title: "Default model",
216
- to: "/settings/general",
263
+ to: "/settings/threads",
264
scope: "project-defaults",
265
searchTerms: ["new thread project provider reasoning effort"],
266
},
267
{
268
id: "default-permissions",
269
title: "Permissions",
223
- to: "/settings/general",
270
+ to: "/settings/threads",
271
scope: "project-defaults",
272
searchTerms: [
273
"new thread default runtime mode supervised approvals auto accept edits full access",
@@ -257,7 +304,7 @@ export const SETTINGS_SEARCH_ITEMS = [
304
{
305
id: "diff-color-scheme",
306
title: "Diff colors",
260
- to: "/settings/appearance",
307
+ to: "/settings/diffs",
308
searchTerms: ["red green blue orange additions deletions changes counts palette colorblind"],
309
},
310
{
@@ -308,6 +355,12 @@ export const SETTINGS_SEARCH_ITEMS = [
355
to: "/settings/appearance",
356
searchTerms: ["typography family size monospace output"],
357
},
358
+ {
359
+ id: "separate-fonts",
360
+ title: "Separate fonts",
361
+ to: "/settings/appearance",
362
+ searchTerms: ["typography advanced prompt code terminal font family size individually"],
363
+ },
364
{
365
id: "font-smoothing",
366
title: "Font smoothing",
@@ -341,38 +394,38 @@ export const SETTINGS_SEARCH_ITEMS = [
394
{
395
id: "snooze-limited-threads",
396
title: "Snooze until limits reset",
344
- to: "/settings/general",
397
+ to: "/settings/threads",
398
searchTerms: ["usage quota rate limit reset wake recover continue"],
399
},
400
{
401
id: "auto-resume-limited-threads",
402
title: "Resume after usage limits",
350
- to: "/settings/general",
403
+ to: "/settings/threads",
404
searchTerms: ["usage quota rate limit reset recover continue"],
405
},
406
{
407
id: "new-design",
408
title: "New design",
356
- to: "/settings/beta",
357
- searchTerms: ["beta redesign look style sidebar composer black quieter classic"],
409
+ to: "/settings/appearance",
410
+ searchTerms: ["redesign look style sidebar composer black quieter classic"],
411
},
412
{
413
id: "working-shelf",
414
title: "Working section",
362
- to: "/settings/beta",
363
- searchTerms: ["beta hide fold running monitoring threads inbox sidebar shelf"],
415
+ to: "/settings/general",
416
+ searchTerms: ["hide fold running monitoring threads inbox sidebar shelf"],
417
},
418
{
419
id: "guest-links",
420
title: "Guest links",
368
- to: "/settings/beta",
421
+ to: "/settings/labs",
422
scope: "environment",
423
searchTerms: ["beta share guest invite link teammate watch t3 connect tunnel"],
424
},
425
{
426
id: "auto-settle-inactive-threads",
427
title: "Auto-settle inactive threads",
375
- to: "/settings/general",
428
+ to: "/settings/threads",
429
searchTerms: ["sidebar inactivity days no activity automatically"],
430
requiresThreadAutoSettlement: true,
431
scope: "project-defaults",
@@ -380,22 +433,31 @@ export const SETTINGS_SEARCH_ITEMS = [
433
{
434
id: "compact-idle-threads",
435
title: "Compact idle threads",
383
- to: "/settings/general",
436
+ to: "/settings/providers",
437
scope: "environment-defaults",
438
searchTerms: ["claude context compaction idle cache tokens usage summary resume"],
439
},
440
{
441
id: "auto-settle-merged-threads",
442
title: "Auto-settle merged threads",
390
- to: "/settings/general",
443
+ to: "/settings/threads",
444
searchTerms: ["pull request merge closed automatically sidebar"],
445
requiresThreadAutoSettlement: true,
446
scope: "project-defaults",
447
},
448
+ {
449
+ id: "keep-threads-with-pull-requests",
450
+ title: "Keep threads with a PR",
451
+ to: "/settings/threads",
452
+ targetId: "auto-settle-inactive-threads",
453
+ searchTerms: ["pull request inactivity auto-settle merge close sidebar"],
454
+ requiresThreadAutoSettlement: true,
455
+ scope: "project-defaults",
456
+ },
457
{
458
id: "days-before-auto-settle",
459
title: "Days of inactivity before auto-settle",
398
- to: "/settings/general",
460
+ to: "/settings/threads",
461
targetId: "auto-settle-inactive-threads",
462
searchTerms: ["thread timeout activity sidebar"],
463
requiresThreadAutoSettlement: true,
@@ -422,75 +484,75 @@ export const SETTINGS_SEARCH_ITEMS = [
484
{
485
id: "response-streaming",
486
title: "Response streaming",
425
- to: "/settings/general",
487
+ to: "/settings/threads",
488
scope: "project-defaults",
489
searchTerms: ["output token paragraph buffered wait turn legacy"],
490
},
491
{
492
id: "hide-whitespace-changes",
493
title: "Hide whitespace changes",
432
- to: "/settings/general",
494
+ to: "/settings/diffs",
495
searchTerms: ["diff ignore spaces edits default"],
496
},
497
{
498
id: "default-diff-file-state",
499
title: "Default diff file state",
438
- to: "/settings/general",
500
+ to: "/settings/diffs",
501
searchTerms: ["collapsed expanded collapse expand files pull request pr code tab"],
502
},
503
{
504
id: "diff-layout",
505
title: "Diff layout",
444
- to: "/settings/general",
506
+ to: "/settings/diffs",
507
searchTerms: ["stacked split side by side unified inline view"],
508
},
509
{
510
id: "proactive-panels",
511
title: "Proactive panels",
450
- to: "/settings/general",
512
+ to: "/settings/diffs",
513
searchTerms: ["automatically open diff pull request pr right panel agent completion"],
514
},
515
{
516
id: "skills-in-slash-menu",
517
title: "Show skills in slash menu",
456
- to: "/settings/general",
518
+ to: "/settings/chat",
519
searchTerms: ["command menu dollar $ slash /"],
520
},
521
{
522
id: "composer-rich-text",
523
title: "Rich text composer",
462
- to: "/settings/general",
524
+ to: "/settings/chat",
525
searchTerms: ["composer rich text tiptap bold italic markdown styled wysiwyg"],
526
},
527
{
528
id: "composer-collapse",
529
title: "Collapse composer on scroll",
468
- to: "/settings/general",
530
+ to: "/settings/chat",
531
searchTerms: ["composer rest resting scroll wheel conversation timeline shrink minimize"],
532
},
533
{
534
id: "send-shortcut",
535
title: "Send shortcut",
474
- to: "/settings/general",
536
+ to: "/settings/chat",
537
searchTerms: ["enter return command ctrl multiline prompt new line composer"],
538
},
539
{
540
id: "follow-up-behavior",
541
title: "Follow-up behavior",
480
- to: "/settings/general",
542
+ to: "/settings/chat",
543
searchTerms: ["queue steer running turn send default behavior composer"],
544
},
545
{
546
id: "provider-update-checks",
547
title: "Provider update checks",
486
- to: "/settings/general",
548
+ to: "/settings/maintenance",
549
searchTerms: ["installed cli versions newer available codex claude cursor grok opencode"],
550
scope: "environment-defaults",
551
},
552
{
553
id: "continue-threads-after-server-update",
554
title: "Continue threads after restarts",
493
- to: "/settings/general",
555
+ to: "/settings/maintenance",
556
scope: "project-defaults",
557
searchTerms: [
558
"resume running active interrupted work restart reboot machine crash desktop update automatically",
@@ -499,7 +561,7 @@ export const SETTINGS_SEARCH_ITEMS = [
561
{
562
id: "background-activity",
563
title: "Background activity",
502
- to: "/settings/general",
564
+ to: "/settings/maintenance",
565
scope: "environment-defaults",
566
searchTerms: [
567
"balanced performance battery saver advanced git fetch provider health refresh host power monitor idle policy",
@@ -508,28 +570,28 @@ export const SETTINGS_SEARCH_ITEMS = [
570
{
571
id: "new-threads",
572
title: "New threads",
511
- to: "/settings/general",
573
+ to: "/settings/threads",
574
scope: "project-defaults",
575
searchTerms: ["default workspace mode draft local worktree"],
576
},
577
{
578
id: "worktree-submodules",
579
title: "Submodules",
518
- to: "/settings/general",
580
+ to: "/settings/worktrees",
581
scope: "project-defaults",
582
searchTerms: ["git submodule init recursive top-level none worktree t3.json"],
583
},
584
{
585
id: "start-from-origin",
586
title: "Start from remote",
525
- to: "/settings/general",
587
+ to: "/settings/worktrees",
588
scope: "project-defaults",
589
searchTerms: ["new worktrees start remote origin latest fetched branch local"],
590
},
591
{
592
id: "add-project-starts-in",
593
title: "Add project starts in",
532
- to: "/settings/general",
594
+ to: "/settings/threads",
595
scope: "environment-defaults",
596
searchTerms: ["base directory folder browser path home"],
597
},
@@ -561,47 +623,47 @@ export const SETTINGS_SEARCH_ITEMS = [
623
{
624
id: "text-generation-model",
625
title: "Text generation model",
564
- to: "/settings/general",
626
+ to: "/settings/threads",
627
scope: "project-defaults",
628
searchTerms: ["generated thread titles source control content default provider"],
629
},
630
{
631
id: "thread-title-instructions",
632
title: "Thread title instructions",
571
- to: "/settings/general",
633
+ to: "/settings/threads",
634
scope: "project-defaults",
635
searchTerms: ["generated thread titles prompt custom style naming rename regenerate"],
636
},
637
{
638
id: "app-version",
639
title: "Version",
578
- to: "/settings/general",
640
+ to: "/settings/about",
641
searchTerms: ["about check for updates download install upgrade release"],
642
},
643
{
644
id: "update-track",
645
title: "Update track",
584
- to: "/settings/general",
646
+ to: "/settings/about",
647
searchTerms: ["release channel stable latest nightly prerelease"],
648
releaseChannelOnly: true,
649
},
650
{
651
id: "cli-command",
652
title: "t3 command",
591
- to: "/settings/general",
653
+ to: "/settings/about",
654
searchTerms: ["cli terminal shell path install command line"],
655
desktopOnly: true,
656
},
657
{
658
id: "mobile-app",
659
title: "Mobile app",
598
- to: "/settings/general",
660
+ to: "/settings/about",
661
searchTerms: ["phone tablet iPhone iPad iOS Android App Store Google Play QR"],
662
},
663
{
664
id: "privacy-policy",
665
title: "Privacy policy",
604
- to: "/settings/general",
666
+ to: "/settings/about",
667
searchTerms: ["telemetry analytics usage data tracking legal opt out"],
668
},
669
{
@@ -615,30 +677,30 @@ export const SETTINGS_SEARCH_ITEMS = [
677
{
678
id: "diagnostics",
679
title: "Diagnostics",
618
- to: "/settings/general",
680
+ to: "/settings/maintenance",
681
searchTerms: ["logs traces processes resource history failures spans cpu memory"],
682
},
683
{
684
id: "open-source-licenses",
685
title: "Open source licenses",
624
- to: "/settings/general",
686
+ to: "/settings/about",
687
},
688
{
689
id: "legacy-plan-mode",
690
title: "Plan mode (legacy)",
629
- to: "/settings/general",
691
+ to: "/settings/labs",
692
searchTerms: ["build plan composer old"],
693
},
694
{
695
id: "legacy-context-window-indicator",
696
title: "Context window indicator (legacy)",
635
- to: "/settings/general",
697
+ to: "/settings/labs",
698
searchTerms: ["composer meter usage tokens circle old"],
699
},
700
{
701
id: "legacy-sidebar",
702
title: "Sidebar (legacy)",
641
- to: "/settings/general",
703
+ to: "/settings/labs",
704
searchTerms: ["project thread tree old flat list"],
705
},
706
{
@@ -722,100 +784,100 @@ export const SETTINGS_SEARCH_ITEMS = [
784
{
785
id: "agent-browser-access",
786
title: "Agent browser access",
725
- to: "/settings/integrations",
787
+ to: "/settings/browser",
788
scope: "project-defaults",
789
searchTerms: ["allow disable enable open drive preview tools sessions project override"],
790
},
791
{
792
id: "device-hosts",
793
title: "Device hosts",
732
- to: "/settings/integrations",
794
+ to: "/settings/devices",
795
searchTerms: ["ssh remote simulator emulator ios android mac mini identity key connection"],
796
},
797
{
798
id: "agent-device-access",
799
title: "Agent device access",
738
- to: "/settings/integrations",
800
+ to: "/settings/devices",
801
targetId: "devices",
802
searchTerms: ["allow simulator emulator ios android drive tools sessions"],
803
},
804
{
805
id: "device-hub",
806
title: "Device hub",
745
- to: "/settings/integrations",
807
+ to: "/settings/devices",
808
targetId: "devices",
809
searchTerms: ["simulator emulator ios android install start"],
810
},
811
{
812
id: "device-platform-support",
813
title: "Simulator support",
752
- to: "/settings/integrations",
814
+ to: "/settings/devices",
815
targetId: "devices",
816
searchTerms: ["xcode android studio sdk avd runtime"],
817
},
818
{
819
id: "browser-profiles",
820
title: "Browser profiles",
759
- to: "/settings/integrations",
821
+ to: "/settings/browser",
822
targetId: "browser",
823
},
824
{
825
id: "browser-default-profile",
826
title: "Default browser profile",
765
- to: "/settings/integrations",
827
+ to: "/settings/browser",
828
targetId: "browser-profiles",
829
},
830
{
831
id: "browser-default-viewport",
832
title: "Default browser viewport",
771
- to: "/settings/integrations",
833
+ to: "/settings/browser",
834
searchTerms: ["preview size width height device desktop mobile rotate"],
835
},
836
{
837
id: "browser-default-zoom",
838
title: "Default browser zoom",
777
- to: "/settings/integrations",
839
+ to: "/settings/browser",
840
searchTerms: ["preview page scale tabs percent"],
841
},
842
{
843
id: "browser-default-appearance",
844
title: "Default browser appearance",
783
- to: "/settings/integrations",
845
+ to: "/settings/browser",
846
searchTerms: ["preview color scheme light dark system os"],
847
},
848
{
849
id: "browser-recording-frame-rate",
850
title: "Browser recording frame rate",
789
- to: "/settings/integrations",
851
+ to: "/settings/browser",
852
},
853
{
854
id: "browser-recording-key-presses",
855
title: "Show key presses in recordings",
794
- to: "/settings/integrations",
856
+ to: "/settings/browser",
857
searchTerms: ["browser preview keyboard shortcuts keystrokes overlay capture"],
858
},
859
{
860
id: "browser-recording-mouse-presses",
861
title: "Show mouse presses in recordings",
800
- to: "/settings/integrations",
862
+ to: "/settings/browser",
863
searchTerms: ["browser preview clicks buttons drag overlay capture"],
864
},
865
{
866
id: "browser-link-target",
867
title: "Open links in",
806
- to: "/settings/integrations",
868
+ to: "/settings/browser",
869
searchTerms: ["links default browser in-app browser external open"],
870
},
871
{
872
id: "browser-search-engine",
873
title: "Search engine",
812
- to: "/settings/integrations",
874
+ to: "/settings/browser",
875
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom"],
876
},
877
{
878
id: "pull-request-links-open-in-app",
879
title: "Open pull requests in T3 Code",
818
- to: "/settings/integrations",
880
+ to: "/settings/diffs",
881
searchTerms: [
882
`pr links ${SOURCE_CONTROL_HOST_LABELS} browser external click default pull request view panel`,
883
],
@@ -823,7 +885,7 @@ export const SETTINGS_SEARCH_ITEMS = [
885
{
886
id: "browser-auto-show-floating-preview",
887
title: "Auto-show floating preview",
826
- to: "/settings/integrations",
888
+ to: "/settings/browser",
889
searchTerms: ["agent opens browser device simulator pop into view hide"],
890
},
891
{
@@ -861,7 +923,8 @@ export const SETTINGS_SEARCH_ITEMS = [
923
{
924
id: "git-fetch-interval",
925
title: "Git fetch interval",
864
- to: "/settings/source-control",
926
+ to: "/settings/maintenance",
927
+ targetId: "background-activity",
928
searchTerms: [
929
"automatic remote branch refresh background credentials security keys seconds off",
930
],
@@ -871,7 +934,7 @@ export const SETTINGS_SEARCH_ITEMS = [
934
{
935
id: "worktree-branch-naming",
936
title: "Worktree branch naming",
874
- to: "/settings/source-control",
937
+ to: "/settings/worktrees",
938
searchTerms: ["static semantic prefix custom prompt instructions feat fix refactor chore"],
939
environmentOnly: true,
940
scope: "project-defaults",
@@ -938,7 +1001,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1001
{
1002
id: "environment-icon",
1003
title: "Environment icon",
941
- to: "/settings/connections",
1004
+ to: "/settings/access",
1005
targetId: "connections-environment",
1006
searchTerms: ["machine glyph sidebar mac mini studio laptop desktop server cloud vm"],
1007
},
@@ -946,14 +1009,13 @@ export const SETTINGS_SEARCH_ITEMS = [
1009
id: "local-environment",
1010
title: "Local environment",
1011
to: "/settings/connections",
949
- targetId: "connections-environment",
1012
searchTerms: ["turn off on disable enable local server agents remote only restart"],
1013
desktopOnly: true,
1014
},
1015
{
1016
id: "network-access",
1017
title: "Network access",
956
- to: "/settings/connections",
1018
+ to: "/settings/access",
1019
targetId: "connections-environment",
1020
searchTerms: ["expose backend remote pairing local machine interfaces host restart"],
1021
localBackendManagementOnly: true,
@@ -961,7 +1023,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1023
{
1024
id: "tailscale-https",
1025
title: "Tailscale HTTPS",
964
- to: "/settings/connections",
1026
+ to: "/settings/access",
1027
targetId: "connections-environment",
1028
searchTerms: ["serve magicdns endpoint remote secure network"],
1029
desktopOnly: true,
@@ -970,7 +1032,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1032
{
1033
id: "wsl-backend",
1034
title: "WSL backend",
973
- to: "/settings/connections",
1035
+ to: "/settings/access",
1036
searchTerms: [
1037
"windows subsystem linux distro second server projects stop windows backend restart",
1038
],
@@ -983,7 +1045,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1045
id: "t3-connect",
1046
localEnvironmentOnly: true,
1047
title: "T3 Connect",
986
- to: "/settings/connections",
1048
+ to: "/settings/access",
1049
targetId: "connections-environment",
1050
searchTerms: ["managed tunnel cloud other devices remote"],
1051
desktopOnly: true,
@@ -993,7 +1055,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1055
id: "hold-webhooks-while-offline",
1056
localEnvironmentOnly: true,
1057
title: "Hold webhooks while offline",
996
- to: "/settings/connections",
1058
+ to: "/settings/access",
1059
targetId: "connections-environment",
1060
searchTerms: ["webhook automations offline queue mailbox t3 connect"],
1061
cloudOnly: true,
@@ -1003,7 +1065,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1065
id: "publish-agent-activity",
1066
localEnvironmentOnly: true,
1067
title: "Publish agent activity",
1006
- to: "/settings/connections",
1068
+ to: "/settings/access",
1069
targetId: "connections-environment",
1070
searchTerms: ["mobile push notifications live activities cloud tunnel"],
1071
cloudOnly: true,
@@ -1011,7 +1073,7 @@ export const SETTINGS_SEARCH_ITEMS = [
1073
{
1074
id: "connections-environment",
1075
title: "This machine",
1014
- to: "/settings/connections",
1076
+ to: "/settings/access",
1077
searchTerms: [
1078
"connections server backend local remote access administrative permissions scope pairing links qr code authorized clients sessions revoke endpoint",
1079
],
@@ -1055,18 +1117,57 @@ const SETTINGS_CATEGORY_SCOPES: Readonly<Record<SettingsPath, SettingsSearchScop
1117
"/settings/projects": "project",
1118
"/settings/general": null,
1119
"/settings/appearance": null,
1120
+ "/settings/chat": null,
1121
+ "/settings/diffs": null,
1122
"/settings/snap-shot": null,
1123
"/settings/keybindings": null,
1124
"/settings/providers": null,
1061
- "/settings/integrations": null,
1125
+ "/settings/threads": null,
1126
+ "/settings/browser": null,
1127
+ "/settings/devices": null,
1128
"/settings/source-control": "environment-defaults",
1063
- "/settings/storage": "project-defaults",
1129
+ "/settings/worktrees": "project-defaults",
1130
"/settings/connections": "connections",
1131
+ "/settings/access": "connections",
1132
"/settings/scheduled-tasks": null,
1066
- "/settings/beta": null,
1133
+ "/settings/maintenance": null,
1134
+ "/settings/labs": null,
1135
+ "/settings/about": null,
1136
"/settings/archived": "project-defaults",
1137
};
1138
1139
+const RENAMED_SETTINGS_PATHS: Readonly<Record<string, SettingsPath>> = {
1140
+ "/settings/integrations": "/settings/browser",
1141
+ "/settings/storage": "/settings/maintenance",
1142
+ "/settings/beta": "/settings/labs",
1143
+};
1144
+const SPLIT_SETTINGS_PATHS: ReadonlySet<string> = new Set([
1145
+ "/settings/general",
1146
+ "/settings/appearance",
1147
+ "/settings/source-control",
1148
+ "/settings/connections",
1149
+ ...Object.keys(RENAMED_SETTINGS_PATHS),
1150
+]);
1151
+// Section anchors that moved but are not search results themselves.
1152
+const MOVED_SECTION_ANCHORS: Readonly<Record<string, SettingsPath>> = {
1153
+ "authorized-clients": "/settings/access",
1154
+ "legacy-features": "/settings/labs",
1155
+ "text-generation": "/settings/threads",
1156
+ about: "/settings/about",
1157
+};
1158
+
1159
+/** Where an old settings link now lives. Its anchor finds the page its row moved to. */
1160
+export function movedSettingsPath(pathname: string, hash: string): SettingsPath | null {
1161
+ if (!SPLIT_SETTINGS_PATHS.has(pathname)) return null;
1162
+ const items: readonly SettingsSearchItem[] = SETTINGS_SEARCH_ITEMS;
1163
+ const anchored = hash
1164
+ ? (items.find((item) => item.id === hash) ?? items.find((item) => item.targetId === hash))
1165
+ : undefined;
1166
+ const to =
1167
+ anchored?.to ?? MOVED_SECTION_ANCHORS[hash] ?? RENAMED_SETTINGS_PATHS[pathname] ?? null;
1168
+ return to === pathname ? null : to;
1169
+}
1170
+
1171
export function getSettingsSearchTargetScope(targetId: string) {
1172
const items: readonly SettingsSearchItem[] = SETTINGS_SEARCH_ITEMS;
1173
const item =
@@ -1143,18 +1244,6 @@ export function isSettingsSearchScopeAvailable(
1244
}
1245
}
1246
1146
-function settingsScopeKindFromSearch(search: SettingsScopeSearch): ResolvedSettingsScope["kind"] {
1147
- const target = validateSettingsScopeSearch({ ...search });
1148
- if (target.checkout && !target.project) return "unavailable";
1149
- if (target.project) return target.checkout ? "checkout" : "project";
1150
- return target.machine ? "environment" : "all";
1151
-}
1152
-
1153
-export function isSettingsOverviewVisible(search: SettingsScopeSearch): boolean {
1154
- const kind = settingsScopeKindFromSearch(search);
1155
- return kind === "project" || kind === "checkout";
1156
-}
1157
-
1247
export function searchableSetting(id: SettingsSearchItemId): {
1248
readonly id: string;
1249
readonly title: string;
@@ -1237,14 +1326,10 @@ export function searchSettings(
1326
.map(({ item }) => item);
1327
}
1328
1240
-// Font smoothing only renders on macOS, so a search jump to it elsewhere
1241
-// must not flip the section - the target would never mount to be scrolled to.
1329
+// These rows only exist with separate fonts on, so a search jump to one turns them on.
1330
const ADVANCED_TYPOGRAPHY_TARGET_IDS: ReadonlySet<string> = new Set([
1331
"prompt-font",
1332
"terminal-font",
1245
- ...(typeof navigator !== "undefined" && isMacPlatform(navigator.platform)
1246
- ? ["font-smoothing"]
1247
- : []),
1333
]);
1334
1335
export function isAdvancedTypographyTarget(targetId: string): boolean {
apps/web/src/routeTree.gen.ts
+210
@@ -21,6 +21,8 @@ import { Route as ChatUsageRouteImport } from './routes/_chat.usage'
21
import { Route as ChatSettingsRouteImport } from './routes/_chat.settings'
22
import { Route as ChatPullRequestsRouteImport } from './routes/_chat.pull-requests'
23
import { Route as ChatNewRouteImport } from './routes/_chat.new'
24
+import { Route as ChatSettingsWorktreesRouteImport } from './routes/_chat.settings.worktrees'
25
+import { Route as ChatSettingsThreadsRouteImport } from './routes/_chat.settings.threads'
26
import { Route as ChatSettingsStorageRouteImport } from './routes/_chat.settings.storage'
27
import { Route as ChatSettingsSourceControlRouteImport } from './routes/_chat.settings.source-control'
28
import { Route as ChatSettingsSnapShotRouteImport } from './routes/_chat.settings.snap-shot'
@@ -28,14 +30,22 @@ import { Route as ChatSettingsScheduledTasksRouteImport } from './routes/_chat.s
30
import { Route as ChatSettingsProvidersRouteImport } from './routes/_chat.settings.providers'
31
import { Route as ChatSettingsProjectsRouteImport } from './routes/_chat.settings.projects'
32
import { Route as ChatSettingsOpenSourceLicensesRouteImport } from './routes/_chat.settings.open-source-licenses'
33
+import { Route as ChatSettingsMaintenanceRouteImport } from './routes/_chat.settings.maintenance'
34
+import { Route as ChatSettingsLabsRouteImport } from './routes/_chat.settings.labs'
35
import { Route as ChatSettingsKeybindingsRouteImport } from './routes/_chat.settings.keybindings'
36
import { Route as ChatSettingsIntegrationsRouteImport } from './routes/_chat.settings.integrations'
37
import { Route as ChatSettingsGeneralRouteImport } from './routes/_chat.settings.general'
38
+import { Route as ChatSettingsDiffsRouteImport } from './routes/_chat.settings.diffs'
39
import { Route as ChatSettingsDiagnosticsRouteImport } from './routes/_chat.settings.diagnostics'
40
+import { Route as ChatSettingsDevicesRouteImport } from './routes/_chat.settings.devices'
41
import { Route as ChatSettingsConnectionsRouteImport } from './routes/_chat.settings.connections'
42
+import { Route as ChatSettingsChatRouteImport } from './routes/_chat.settings.chat'
43
+import { Route as ChatSettingsBrowserRouteImport } from './routes/_chat.settings.browser'
44
import { Route as ChatSettingsBetaRouteImport } from './routes/_chat.settings.beta'
45
import { Route as ChatSettingsArchivedRouteImport } from './routes/_chat.settings.archived'
46
import { Route as ChatSettingsAppearanceRouteImport } from './routes/_chat.settings.appearance'
47
+import { Route as ChatSettingsAccessRouteImport } from './routes/_chat.settings.access'
48
+import { Route as ChatSettingsAboutRouteImport } from './routes/_chat.settings.about'
49
import { Route as ChatDraftDraftIdRouteImport } from './routes/_chat.draft.$draftId'
50
import { Route as ChatEnvironmentIdThreadIdRouteImport } from './routes/_chat.$environmentId.$threadId'
51
@@ -98,6 +108,16 @@ const ChatNewRoute = ChatNewRouteImport.update({
108
path: '/new',
109
getParentRoute: () => ChatRoute,
110
} as any)
111
+const ChatSettingsWorktreesRoute = ChatSettingsWorktreesRouteImport.update({
112
+ id: '/worktrees',
113
+ path: '/worktrees',
114
+ getParentRoute: () => ChatSettingsRoute,
115
+} as any)
116
+const ChatSettingsThreadsRoute = ChatSettingsThreadsRouteImport.update({
117
+ id: '/threads',
118
+ path: '/threads',
119
+ getParentRoute: () => ChatSettingsRoute,
120
+} as any)
121
const ChatSettingsStorageRoute = ChatSettingsStorageRouteImport.update({
122
id: '/storage',
123
path: '/storage',
@@ -136,6 +156,16 @@ const ChatSettingsOpenSourceLicensesRoute =
156
path: '/open-source-licenses',
157
getParentRoute: () => ChatSettingsRoute,
158
} as any)
159
+const ChatSettingsMaintenanceRoute = ChatSettingsMaintenanceRouteImport.update({
160
+ id: '/maintenance',
161
+ path: '/maintenance',
162
+ getParentRoute: () => ChatSettingsRoute,
163
+} as any)
164
+const ChatSettingsLabsRoute = ChatSettingsLabsRouteImport.update({
165
+ id: '/labs',
166
+ path: '/labs',
167
+ getParentRoute: () => ChatSettingsRoute,
168
+} as any)
169
const ChatSettingsKeybindingsRoute = ChatSettingsKeybindingsRouteImport.update({
170
id: '/keybindings',
171
path: '/keybindings',
@@ -152,16 +182,36 @@ const ChatSettingsGeneralRoute = ChatSettingsGeneralRouteImport.update({
182
path: '/general',
183
getParentRoute: () => ChatSettingsRoute,
184
} as any)
185
+const ChatSettingsDiffsRoute = ChatSettingsDiffsRouteImport.update({
186
+ id: '/diffs',
187
+ path: '/diffs',
188
+ getParentRoute: () => ChatSettingsRoute,
189
+} as any)
190
const ChatSettingsDiagnosticsRoute = ChatSettingsDiagnosticsRouteImport.update({
191
id: '/diagnostics',
192
path: '/diagnostics',
193
getParentRoute: () => ChatSettingsRoute,
194
} as any)
195
+const ChatSettingsDevicesRoute = ChatSettingsDevicesRouteImport.update({
196
+ id: '/devices',
197
+ path: '/devices',
198
+ getParentRoute: () => ChatSettingsRoute,
199
+} as any)
200
const ChatSettingsConnectionsRoute = ChatSettingsConnectionsRouteImport.update({
201
id: '/connections',
202
path: '/connections',
203
getParentRoute: () => ChatSettingsRoute,
204
} as any)
205
+const ChatSettingsChatRoute = ChatSettingsChatRouteImport.update({
206
+ id: '/chat',
207
+ path: '/chat',
208
+ getParentRoute: () => ChatSettingsRoute,
209
+} as any)
210
+const ChatSettingsBrowserRoute = ChatSettingsBrowserRouteImport.update({
211
+ id: '/browser',
212
+ path: '/browser',
213
+ getParentRoute: () => ChatSettingsRoute,
214
+} as any)
215
const ChatSettingsBetaRoute = ChatSettingsBetaRouteImport.update({
216
id: '/beta',
217
path: '/beta',
@@ -177,6 +227,16 @@ const ChatSettingsAppearanceRoute = ChatSettingsAppearanceRouteImport.update({
227
path: '/appearance',
228
getParentRoute: () => ChatSettingsRoute,
229
} as any)
230
+const ChatSettingsAccessRoute = ChatSettingsAccessRouteImport.update({
231
+ id: '/access',
232
+ path: '/access',
233
+ getParentRoute: () => ChatSettingsRoute,
234
+} as any)
235
+const ChatSettingsAboutRoute = ChatSettingsAboutRouteImport.update({
236
+ id: '/about',
237
+ path: '/about',
238
+ getParentRoute: () => ChatSettingsRoute,
239
+} as any)
240
const ChatDraftDraftIdRoute = ChatDraftDraftIdRouteImport.update({
241
id: '/draft/$draftId',
242
path: '/draft/$draftId',
@@ -203,14 +263,22 @@ export interface FileRoutesByFullPath {
263
'/projects/$projectKey': typeof ProjectsProjectKeyRoute
264
'/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
265
'/draft/$draftId': typeof ChatDraftDraftIdRoute
266
+ '/settings/about': typeof ChatSettingsAboutRoute
267
+ '/settings/access': typeof ChatSettingsAccessRoute
268
'/settings/appearance': typeof ChatSettingsAppearanceRoute
269
'/settings/archived': typeof ChatSettingsArchivedRoute
270
'/settings/beta': typeof ChatSettingsBetaRoute
271
+ '/settings/browser': typeof ChatSettingsBrowserRoute
272
+ '/settings/chat': typeof ChatSettingsChatRoute
273
'/settings/connections': typeof ChatSettingsConnectionsRoute
274
+ '/settings/devices': typeof ChatSettingsDevicesRoute
275
'/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
276
+ '/settings/diffs': typeof ChatSettingsDiffsRoute
277
'/settings/general': typeof ChatSettingsGeneralRoute
278
'/settings/integrations': typeof ChatSettingsIntegrationsRoute
279
'/settings/keybindings': typeof ChatSettingsKeybindingsRoute
280
+ '/settings/labs': typeof ChatSettingsLabsRoute
281
+ '/settings/maintenance': typeof ChatSettingsMaintenanceRoute
282
'/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
283
'/settings/projects': typeof ChatSettingsProjectsRoute
284
'/settings/providers': typeof ChatSettingsProvidersRoute
@@ -218,6 +286,8 @@ export interface FileRoutesByFullPath {
286
'/settings/snap-shot': typeof ChatSettingsSnapShotRoute
287
'/settings/source-control': typeof ChatSettingsSourceControlRoute
288
'/settings/storage': typeof ChatSettingsStorageRoute
289
+ '/settings/threads': typeof ChatSettingsThreadsRoute
290
+ '/settings/worktrees': typeof ChatSettingsWorktreesRoute
291
}
292
export interface FileRoutesByTo {
293
'/connect': typeof ConnectRoute
@@ -233,14 +303,22 @@ export interface FileRoutesByTo {
303
'/': typeof ChatIndexRoute
304
'/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
305
'/draft/$draftId': typeof ChatDraftDraftIdRoute
306
+ '/settings/about': typeof ChatSettingsAboutRoute
307
+ '/settings/access': typeof ChatSettingsAccessRoute
308
'/settings/appearance': typeof ChatSettingsAppearanceRoute
309
'/settings/archived': typeof ChatSettingsArchivedRoute
310
'/settings/beta': typeof ChatSettingsBetaRoute
311
+ '/settings/browser': typeof ChatSettingsBrowserRoute
312
+ '/settings/chat': typeof ChatSettingsChatRoute
313
'/settings/connections': typeof ChatSettingsConnectionsRoute
314
+ '/settings/devices': typeof ChatSettingsDevicesRoute
315
'/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
316
+ '/settings/diffs': typeof ChatSettingsDiffsRoute
317
'/settings/general': typeof ChatSettingsGeneralRoute
318
'/settings/integrations': typeof ChatSettingsIntegrationsRoute
319
'/settings/keybindings': typeof ChatSettingsKeybindingsRoute
320
+ '/settings/labs': typeof ChatSettingsLabsRoute
321
+ '/settings/maintenance': typeof ChatSettingsMaintenanceRoute
322
'/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
323
'/settings/projects': typeof ChatSettingsProjectsRoute
324
'/settings/providers': typeof ChatSettingsProvidersRoute
@@ -248,6 +326,8 @@ export interface FileRoutesByTo {
326
'/settings/snap-shot': typeof ChatSettingsSnapShotRoute
327
'/settings/source-control': typeof ChatSettingsSourceControlRoute
328
'/settings/storage': typeof ChatSettingsStorageRoute
329
+ '/settings/threads': typeof ChatSettingsThreadsRoute
330
+ '/settings/worktrees': typeof ChatSettingsWorktreesRoute
331
}
332
export interface FileRoutesById {
333
__root__: typeof rootRouteImport
@@ -265,14 +345,22 @@ export interface FileRoutesById {
345
'/_chat/': typeof ChatIndexRoute
346
'/_chat/$environmentId/$threadId': typeof ChatEnvironmentIdThreadIdRoute
347
'/_chat/draft/$draftId': typeof ChatDraftDraftIdRoute
348
+ '/_chat/settings/about': typeof ChatSettingsAboutRoute
349
+ '/_chat/settings/access': typeof ChatSettingsAccessRoute
350
'/_chat/settings/appearance': typeof ChatSettingsAppearanceRoute
351
'/_chat/settings/archived': typeof ChatSettingsArchivedRoute
352
'/_chat/settings/beta': typeof ChatSettingsBetaRoute
353
+ '/_chat/settings/browser': typeof ChatSettingsBrowserRoute
354
+ '/_chat/settings/chat': typeof ChatSettingsChatRoute
355
'/_chat/settings/connections': typeof ChatSettingsConnectionsRoute
356
+ '/_chat/settings/devices': typeof ChatSettingsDevicesRoute
357
'/_chat/settings/diagnostics': typeof ChatSettingsDiagnosticsRoute
358
+ '/_chat/settings/diffs': typeof ChatSettingsDiffsRoute
359
'/_chat/settings/general': typeof ChatSettingsGeneralRoute
360
'/_chat/settings/integrations': typeof ChatSettingsIntegrationsRoute
361
'/_chat/settings/keybindings': typeof ChatSettingsKeybindingsRoute
362
+ '/_chat/settings/labs': typeof ChatSettingsLabsRoute
363
+ '/_chat/settings/maintenance': typeof ChatSettingsMaintenanceRoute
364
'/_chat/settings/open-source-licenses': typeof ChatSettingsOpenSourceLicensesRoute
365
'/_chat/settings/projects': typeof ChatSettingsProjectsRoute
366
'/_chat/settings/providers': typeof ChatSettingsProvidersRoute
@@ -280,6 +368,8 @@ export interface FileRoutesById {
368
'/_chat/settings/snap-shot': typeof ChatSettingsSnapShotRoute
369
'/_chat/settings/source-control': typeof ChatSettingsSourceControlRoute
370
'/_chat/settings/storage': typeof ChatSettingsStorageRoute
371
+ '/_chat/settings/threads': typeof ChatSettingsThreadsRoute
372
+ '/_chat/settings/worktrees': typeof ChatSettingsWorktreesRoute
373
}
374
export interface FileRouteTypes {
375
fileRoutesByFullPath: FileRoutesByFullPath
@@ -297,14 +387,22 @@ export interface FileRouteTypes {
387
| '/projects/$projectKey'
388
| '/$environmentId/$threadId'
389
| '/draft/$draftId'
390
+ | '/settings/about'
391
+ | '/settings/access'
392
| '/settings/appearance'
393
| '/settings/archived'
394
| '/settings/beta'
395
+ | '/settings/browser'
396
+ | '/settings/chat'
397
| '/settings/connections'
398
+ | '/settings/devices'
399
| '/settings/diagnostics'
400
+ | '/settings/diffs'
401
| '/settings/general'
402
| '/settings/integrations'
403
| '/settings/keybindings'
404
+ | '/settings/labs'
405
+ | '/settings/maintenance'
406
| '/settings/open-source-licenses'
407
| '/settings/projects'
408
| '/settings/providers'
@@ -312,6 +410,8 @@ export interface FileRouteTypes {
410
| '/settings/snap-shot'
411
| '/settings/source-control'
412
| '/settings/storage'
413
+ | '/settings/threads'
414
+ | '/settings/worktrees'
415
fileRoutesByTo: FileRoutesByTo
416
to:
417
| '/connect'
@@ -327,14 +427,22 @@ export interface FileRouteTypes {
427
| '/'
428
| '/$environmentId/$threadId'
429
| '/draft/$draftId'
430
+ | '/settings/about'
431
+ | '/settings/access'
432
| '/settings/appearance'
433
| '/settings/archived'
434
| '/settings/beta'
435
+ | '/settings/browser'
436
+ | '/settings/chat'
437
| '/settings/connections'
438
+ | '/settings/devices'
439
| '/settings/diagnostics'
440
+ | '/settings/diffs'
441
| '/settings/general'
442
| '/settings/integrations'
443
| '/settings/keybindings'
444
+ | '/settings/labs'
445
+ | '/settings/maintenance'
446
| '/settings/open-source-licenses'
447
| '/settings/projects'
448
| '/settings/providers'
@@ -342,6 +450,8 @@ export interface FileRouteTypes {
450
| '/settings/snap-shot'
451
| '/settings/source-control'
452
| '/settings/storage'
453
+ | '/settings/threads'
454
+ | '/settings/worktrees'
455
id:
456
| '__root__'
457
| '/_chat'
@@ -358,14 +468,22 @@ export interface FileRouteTypes {
468
| '/_chat/'
469
| '/_chat/$environmentId/$threadId'
470
| '/_chat/draft/$draftId'
471
+ | '/_chat/settings/about'
472
+ | '/_chat/settings/access'
473
| '/_chat/settings/appearance'
474
| '/_chat/settings/archived'
475
| '/_chat/settings/beta'
476
+ | '/_chat/settings/browser'
477
+ | '/_chat/settings/chat'
478
| '/_chat/settings/connections'
479
+ | '/_chat/settings/devices'
480
| '/_chat/settings/diagnostics'
481
+ | '/_chat/settings/diffs'
482
| '/_chat/settings/general'
483
| '/_chat/settings/integrations'
484
| '/_chat/settings/keybindings'
485
+ | '/_chat/settings/labs'
486
+ | '/_chat/settings/maintenance'
487
| '/_chat/settings/open-source-licenses'
488
| '/_chat/settings/projects'
489
| '/_chat/settings/providers'
@@ -373,6 +491,8 @@ export interface FileRouteTypes {
491
| '/_chat/settings/snap-shot'
492
| '/_chat/settings/source-control'
493
| '/_chat/settings/storage'
494
+ | '/_chat/settings/threads'
495
+ | '/_chat/settings/worktrees'
496
fileRoutesById: FileRoutesById
497
}
498
export interface RootRouteChildren {
@@ -471,6 +591,20 @@ declare module '@tanstack/react-router' {
591
preLoaderRoute: typeof ChatNewRouteImport
592
parentRoute: typeof ChatRoute
593
}
594
+ '/_chat/settings/worktrees': {
595
+ id: '/_chat/settings/worktrees'
596
+ path: '/worktrees'
597
+ fullPath: '/settings/worktrees'
598
+ preLoaderRoute: typeof ChatSettingsWorktreesRouteImport
599
+ parentRoute: typeof ChatSettingsRoute
600
+ }
601
+ '/_chat/settings/threads': {
602
+ id: '/_chat/settings/threads'
603
+ path: '/threads'
604
+ fullPath: '/settings/threads'
605
+ preLoaderRoute: typeof ChatSettingsThreadsRouteImport
606
+ parentRoute: typeof ChatSettingsRoute
607
+ }
608
'/_chat/settings/storage': {
609
id: '/_chat/settings/storage'
610
path: '/storage'
@@ -520,6 +654,20 @@ declare module '@tanstack/react-router' {
654
preLoaderRoute: typeof ChatSettingsOpenSourceLicensesRouteImport
655
parentRoute: typeof ChatSettingsRoute
656
}
657
+ '/_chat/settings/maintenance': {
658
+ id: '/_chat/settings/maintenance'
659
+ path: '/maintenance'
660
+ fullPath: '/settings/maintenance'
661
+ preLoaderRoute: typeof ChatSettingsMaintenanceRouteImport
662
+ parentRoute: typeof ChatSettingsRoute
663
+ }
664
+ '/_chat/settings/labs': {
665
+ id: '/_chat/settings/labs'
666
+ path: '/labs'
667
+ fullPath: '/settings/labs'
668
+ preLoaderRoute: typeof ChatSettingsLabsRouteImport
669
+ parentRoute: typeof ChatSettingsRoute
670
+ }
671
'/_chat/settings/keybindings': {
672
id: '/_chat/settings/keybindings'
673
path: '/keybindings'
@@ -541,6 +689,13 @@ declare module '@tanstack/react-router' {
689
preLoaderRoute: typeof ChatSettingsGeneralRouteImport
690
parentRoute: typeof ChatSettingsRoute
691
}
692
+ '/_chat/settings/diffs': {
693
+ id: '/_chat/settings/diffs'
694
+ path: '/diffs'
695
+ fullPath: '/settings/diffs'
696
+ preLoaderRoute: typeof ChatSettingsDiffsRouteImport
697
+ parentRoute: typeof ChatSettingsRoute
698
+ }
699
'/_chat/settings/diagnostics': {
700
id: '/_chat/settings/diagnostics'
701
path: '/diagnostics'
@@ -548,6 +703,13 @@ declare module '@tanstack/react-router' {
703
preLoaderRoute: typeof ChatSettingsDiagnosticsRouteImport
704
parentRoute: typeof ChatSettingsRoute
705
}
706
+ '/_chat/settings/devices': {
707
+ id: '/_chat/settings/devices'
708
+ path: '/devices'
709
+ fullPath: '/settings/devices'
710
+ preLoaderRoute: typeof ChatSettingsDevicesRouteImport
711
+ parentRoute: typeof ChatSettingsRoute
712
+ }
713
'/_chat/settings/connections': {
714
id: '/_chat/settings/connections'
715
path: '/connections'
@@ -555,6 +717,20 @@ declare module '@tanstack/react-router' {
717
preLoaderRoute: typeof ChatSettingsConnectionsRouteImport
718
parentRoute: typeof ChatSettingsRoute
719
}
720
+ '/_chat/settings/chat': {
721
+ id: '/_chat/settings/chat'
722
+ path: '/chat'
723
+ fullPath: '/settings/chat'
724
+ preLoaderRoute: typeof ChatSettingsChatRouteImport
725
+ parentRoute: typeof ChatSettingsRoute
726
+ }
727
+ '/_chat/settings/browser': {
728
+ id: '/_chat/settings/browser'
729
+ path: '/browser'
730
+ fullPath: '/settings/browser'
731
+ preLoaderRoute: typeof ChatSettingsBrowserRouteImport
732
+ parentRoute: typeof ChatSettingsRoute
733
+ }
734
'/_chat/settings/beta': {
735
id: '/_chat/settings/beta'
736
path: '/beta'
@@ -576,6 +752,20 @@ declare module '@tanstack/react-router' {
752
preLoaderRoute: typeof ChatSettingsAppearanceRouteImport
753
parentRoute: typeof ChatSettingsRoute
754
}
755
+ '/_chat/settings/access': {
756
+ id: '/_chat/settings/access'
757
+ path: '/access'
758
+ fullPath: '/settings/access'
759
+ preLoaderRoute: typeof ChatSettingsAccessRouteImport
760
+ parentRoute: typeof ChatSettingsRoute
761
+ }
762
+ '/_chat/settings/about': {
763
+ id: '/_chat/settings/about'
764
+ path: '/about'
765
+ fullPath: '/settings/about'
766
+ preLoaderRoute: typeof ChatSettingsAboutRouteImport
767
+ parentRoute: typeof ChatSettingsRoute
768
+ }
769
'/_chat/draft/$draftId': {
770
id: '/_chat/draft/$draftId'
771
path: '/draft/$draftId'
@@ -594,14 +784,22 @@ declare module '@tanstack/react-router' {
784
}
785
786
interface ChatSettingsRouteChildren {
787
+ ChatSettingsAboutRoute: typeof ChatSettingsAboutRoute
788
+ ChatSettingsAccessRoute: typeof ChatSettingsAccessRoute
789
ChatSettingsAppearanceRoute: typeof ChatSettingsAppearanceRoute
790
ChatSettingsArchivedRoute: typeof ChatSettingsArchivedRoute
791
ChatSettingsBetaRoute: typeof ChatSettingsBetaRoute
792
+ ChatSettingsBrowserRoute: typeof ChatSettingsBrowserRoute
793
+ ChatSettingsChatRoute: typeof ChatSettingsChatRoute
794
ChatSettingsConnectionsRoute: typeof ChatSettingsConnectionsRoute
795
+ ChatSettingsDevicesRoute: typeof ChatSettingsDevicesRoute
796
ChatSettingsDiagnosticsRoute: typeof ChatSettingsDiagnosticsRoute
797
+ ChatSettingsDiffsRoute: typeof ChatSettingsDiffsRoute
798
ChatSettingsGeneralRoute: typeof ChatSettingsGeneralRoute
799
ChatSettingsIntegrationsRoute: typeof ChatSettingsIntegrationsRoute
800
ChatSettingsKeybindingsRoute: typeof ChatSettingsKeybindingsRoute
801
+ ChatSettingsLabsRoute: typeof ChatSettingsLabsRoute
802
+ ChatSettingsMaintenanceRoute: typeof ChatSettingsMaintenanceRoute
803
ChatSettingsOpenSourceLicensesRoute: typeof ChatSettingsOpenSourceLicensesRoute
804
ChatSettingsProjectsRoute: typeof ChatSettingsProjectsRoute
805
ChatSettingsProvidersRoute: typeof ChatSettingsProvidersRoute
@@ -609,17 +807,27 @@ interface ChatSettingsRouteChildren {
807
ChatSettingsSnapShotRoute: typeof ChatSettingsSnapShotRoute
808
ChatSettingsSourceControlRoute: typeof ChatSettingsSourceControlRoute
809
ChatSettingsStorageRoute: typeof ChatSettingsStorageRoute
810
+ ChatSettingsThreadsRoute: typeof ChatSettingsThreadsRoute
811
+ ChatSettingsWorktreesRoute: typeof ChatSettingsWorktreesRoute
812
}
813
814
const ChatSettingsRouteChildren: ChatSettingsRouteChildren = {
815
+ ChatSettingsAboutRoute: ChatSettingsAboutRoute,
816
+ ChatSettingsAccessRoute: ChatSettingsAccessRoute,
817
ChatSettingsAppearanceRoute: ChatSettingsAppearanceRoute,
818
ChatSettingsArchivedRoute: ChatSettingsArchivedRoute,
819
ChatSettingsBetaRoute: ChatSettingsBetaRoute,
820
+ ChatSettingsBrowserRoute: ChatSettingsBrowserRoute,
821
+ ChatSettingsChatRoute: ChatSettingsChatRoute,
822
ChatSettingsConnectionsRoute: ChatSettingsConnectionsRoute,
823
+ ChatSettingsDevicesRoute: ChatSettingsDevicesRoute,
824
ChatSettingsDiagnosticsRoute: ChatSettingsDiagnosticsRoute,
825
+ ChatSettingsDiffsRoute: ChatSettingsDiffsRoute,
826
ChatSettingsGeneralRoute: ChatSettingsGeneralRoute,
827
ChatSettingsIntegrationsRoute: ChatSettingsIntegrationsRoute,
828
ChatSettingsKeybindingsRoute: ChatSettingsKeybindingsRoute,
829
+ ChatSettingsLabsRoute: ChatSettingsLabsRoute,
830
+ ChatSettingsMaintenanceRoute: ChatSettingsMaintenanceRoute,
831
ChatSettingsOpenSourceLicensesRoute: ChatSettingsOpenSourceLicensesRoute,
832
ChatSettingsProjectsRoute: ChatSettingsProjectsRoute,
833
ChatSettingsProvidersRoute: ChatSettingsProvidersRoute,
@@ -627,6 +835,8 @@ const ChatSettingsRouteChildren: ChatSettingsRouteChildren = {
835
ChatSettingsSnapShotRoute: ChatSettingsSnapShotRoute,
836
ChatSettingsSourceControlRoute: ChatSettingsSourceControlRoute,
837
ChatSettingsStorageRoute: ChatSettingsStorageRoute,
838
+ ChatSettingsThreadsRoute: ChatSettingsThreadsRoute,
839
+ ChatSettingsWorktreesRoute: ChatSettingsWorktreesRoute,
840
}
841
842
const ChatSettingsRouteWithChildren = ChatSettingsRoute._addFileChildren(
apps/web/src/routes/_chat.settings.about.tsx
new
+4
@@ -0,0 +1,4 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { AboutSettingsPanel } from "../components/settings/SettingsPanels";
3
+
4
+export const Route = createFileRoute("/_chat/settings/about")({ component: AboutSettingsPanel });
apps/web/src/routes/_chat.settings.access.tsx
new
+10
@@ -0,0 +1,10 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { ConnectionsSettings } from "../components/settings/ConnectionsSettings";
3
+
4
+function SettingsAccessRoute() {
5
+ return <ConnectionsSettings view="access" />;
6
+}
7
+
8
+export const Route = createFileRoute("/_chat/settings/access")({
9
+ component: SettingsAccessRoute,
10
+});
apps/web/src/routes/_chat.settings.beta.tsx
+2
-3
@@ -1,5 +1,4 @@
1
import { createFileRoute } from "@tanstack/react-router";
2
3
-import { BetaSettingsPanel } from "../components/settings/BetaSettingsPanel";
4
-
5
-export const Route = createFileRoute("/_chat/settings/beta")({ component: BetaSettingsPanel });
3
+// Renamed to /settings/labs; the settings route redirects old links.
4
+export const Route = createFileRoute("/_chat/settings/beta")({});
apps/web/src/routes/_chat.settings.browser.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { BrowserSettingsPanel } from "../components/settings/IntegrationsSettings";
3
+
4
+export const Route = createFileRoute("/_chat/settings/browser")({
5
+ component: BrowserSettingsPanel,
6
+});
apps/web/src/routes/_chat.settings.chat.tsx
new
+4
@@ -0,0 +1,4 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { ChatSettingsPanel } from "../components/settings/SettingsPanels";
3
+
4
+export const Route = createFileRoute("/_chat/settings/chat")({ component: ChatSettingsPanel });
apps/web/src/routes/_chat.settings.connections.tsx
+5
-2
@@ -1,7 +1,10 @@
1
import { createFileRoute } from "@tanstack/react-router";
2
-
2
import { ConnectionsSettings } from "../components/settings/ConnectionsSettings";
3
4
+function SettingsConnectionsRoute() {
5
+ return <ConnectionsSettings view="environments" />;
6
+}
7
+
8
export const Route = createFileRoute("/_chat/settings/connections")({
6
- component: ConnectionsSettings,
9
+ component: SettingsConnectionsRoute,
10
});
apps/web/src/routes/_chat.settings.devices.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { DevicesSettingsPanel } from "../components/settings/IntegrationsSettings";
3
+
4
+export const Route = createFileRoute("/_chat/settings/devices")({
5
+ component: DevicesSettingsPanel,
6
+});
apps/web/src/routes/_chat.settings.diffs.tsx
new
+4
@@ -0,0 +1,4 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { DiffsSettingsPanel } from "../components/settings/SettingsPanels";
3
+
4
+export const Route = createFileRoute("/_chat/settings/diffs")({ component: DiffsSettingsPanel });
apps/web/src/routes/_chat.settings.integrations.tsx
+2
-5
@@ -1,7 +1,4 @@
1
import { createFileRoute } from "@tanstack/react-router";
2
3
-import { IntegrationsSettingsPanel } from "../components/settings/IntegrationsSettings";
4
-
5
-export const Route = createFileRoute("/_chat/settings/integrations")({
6
- component: IntegrationsSettingsPanel,
7
-});
3
+// Renamed to /settings/browser; the settings route redirects old links.
4
+export const Route = createFileRoute("/_chat/settings/integrations")({});
apps/web/src/routes/_chat.settings.labs.tsx
new
+4
@@ -0,0 +1,4 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { LabsSettingsPanel } from "../components/settings/LabsSettingsPanel";
3
+
4
+export const Route = createFileRoute("/_chat/settings/labs")({ component: LabsSettingsPanel });
apps/web/src/routes/_chat.settings.maintenance.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { MaintenanceSettingsPanel } from "../components/settings/SettingsPanels";
3
+
4
+export const Route = createFileRoute("/_chat/settings/maintenance")({
5
+ component: MaintenanceSettingsPanel,
6
+});
apps/web/src/routes/_chat.settings.storage.tsx
+2
-4
@@ -1,6 +1,4 @@
1
import { createFileRoute } from "@tanstack/react-router";
2
-import { StorageSettingsPanel } from "../components/settings/StorageSettings";
2
4
-export const Route = createFileRoute("/_chat/settings/storage")({
5
- component: StorageSettingsPanel,
6
-});
3
+// Renamed to /settings/maintenance; the settings route redirects old links.
4
+export const Route = createFileRoute("/_chat/settings/storage")({});
apps/web/src/routes/_chat.settings.threads.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { ThreadsSettingsPanel } from "../components/settings/SettingsPanels";
3
+
4
+export const Route = createFileRoute("/_chat/settings/threads")({
5
+ component: ThreadsSettingsPanel,
6
+});
apps/web/src/routes/_chat.settings.tsx
+3
@@ -23,6 +23,7 @@ import {
23
getSettingsSearchTargetScope,
24
getThreadAutoSettlementSearchAvailability,
25
isSettingsSearchScopeAvailable,
26
+ movedSettingsPath,
27
} from "../components/settings/settingsSearch";
28
29
function RestoreDeviceDefaultsButton({ onRestored }: { onRestored: () => void }) {
@@ -174,6 +175,8 @@ export const Route = createFileRoute("/_chat/settings")({
175
if (location.pathname === "/settings") {
176
throw redirect({ to: "/settings/general", replace: true });
177
}
178
+ const moved = movedSettingsPath(location.pathname, location.hash);
179
+ if (moved) throw redirect({ to: moved, search: true, hash: true, replace: true });
180
},
181
component: SettingsRouteLayout,
182
});
apps/web/src/routes/_chat.settings.worktrees.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { createFileRoute } from "@tanstack/react-router";
2
+import { WorktreesSettingsPanel } from "../components/settings/WorktreesSettings";
3
+
4
+export const Route = createFileRoute("/_chat/settings/worktrees")({
5
+ component: WorktreesSettingsPanel,
6
+});
apps/web/src/terminal/ghostty/surface.ts
+5
@@ -768,6 +768,11 @@ export class GhosttyTerminalSurface {
768
this.refreshHoveredLink();
769
}
770
771
+ /** Mount height, in CSS pixels, that shows exactly `rows` rows at the current font. */
772
+ heightForRows(rows: number): number {
773
+ return Math.ceil(rows * this.metrics.height + CONTENT_PADDING * 2);
774
+ }
775
+
776
async setFont(font: GhosttyTerminalFont): Promise<void> {
777
if (this.disposed) return;
778
const fontSize = terminalFontSize(font.size);
apps/web/test/appScenarios.renders.tsx
+1
-1
@@ -252,7 +252,7 @@ const openSettings =
252
(router: AppRouter, to: "/settings/general" | "/settings/appearance") => async () => {
253
await act(() => router.navigate({ to }));
254
// A section title from each page, since neither page has a heading that names it.
255
- const name = to === "/settings/general" ? "Time format" : "Motion";
255
+ const name = to === "/settings/general" ? "Time format" : "Interface";
256
await expect.element(page.getByRole("heading", { name, exact: true })).toBeVisible();
257
// Appearance highlights its code font preview off-thread, then attaches it in a shadow root.
258
if (to === "/settings/appearance") {
docs/user/background-service.md
+1
-1
@@ -135,7 +135,7 @@ For failures after signing in to T3 Connect, see
135
T3 Code removes superseded internal history on its own while it runs; your
136
conversations are kept. Databases created before this shrank automatically
137
still hold the freed space on disk until a one-time offline repair returns it
138
-and turns on automatic shrinking. Settings > Storage (web and desktop) or
138
+and turns on automatic shrinking. Settings > Maintenance (web and desktop) or
139
Settings > Maintenance (mobile) suggests the repair when at least 1 GiB can be
140
reclaimed.
141
docs/user/browser-import.md
+1
-1
@@ -3,7 +3,7 @@
3
The desktop app can import cookies from another browser so you can reuse its signed-in sessions
4
in the preview browser.
5
6
-Open **Settings → Integrations → Browser profiles → Add profile**, then choose a browser under
6
+Open **Settings → Browser → Browser profiles → Add profile**, then choose a browser under
7
**Import from**. Close the source browser before importing, and allow an operating-system keyring
8
unlock prompt if one appears.
9
docs/user/composer.md
+3
-3
@@ -51,7 +51,7 @@ See [images and videos](#images-and-videos-in-messages) for previewing and savin
51
52
## Send while the agent is working
53
54
-On web and desktop, choose **Settings → General → Follow-up behavior** to queue
54
+On web and desktop, choose **Settings → Chat → Follow-up behavior** to queue
55
new messages for a later turn or steer the running turn immediately. The setting
56
applies to this client; already queued messages keep their place. Queued messages
57
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
227
provider. On mobile, both are also available before starting a thread on
228
**New task**.
229
230
-The slash menu also includes skills unless you turn off **Settings → General →
231
-Show skills in slash menu**. Only skills enabled for the provider are listed.
230
+The slash menu also includes skills unless you turn off **Settings → Chat →
231
+Show skills in slash menu**, under Advanced. Only skills enabled for the provider are listed.
232
233
After you add or change skills, plugins, or MCP servers, use **Restart agent
234
session** in the command palette on web and desktop. The conversation continues,
docs/user/devices.md
+5
-5
@@ -22,7 +22,7 @@ Choose **Float device over chat** in the toolbar to keep watching and tapping th
22
device in a small window while the right panel shows something else; drag the
23
window by its handle, resize it from any edge, and use **Open in right panel**
24
to bring it back.
25
-Turn off the device hub in **Settings → Integrations → Devices** to stop the
25
+Turn off the device hub in **Settings → Devices** to stop the
26
helper processes; simulators and emulators keep running until you power them
27
off.
28
@@ -70,7 +70,7 @@ back from the device after a change.
70
71
When an agent opens a device, it floats over the chat in web and desktop clients
72
connected to the thread, the same way an agent-driven browser does. Turn off
73
-**Auto-show floating preview** in **Settings → Integrations → Browser** to open a
73
+**Auto-show floating preview** in **Settings → Browser** to open a
74
right-panel tab instead. In the mobile app, open the agent's thread and tap the
75
device button above the composer to watch the live screen and control it.
76
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
86
receives the device CLI environment.
87
88
To keep agents away from simulators, turn off **Agent device access** in
89
-**Settings → Integrations → Devices**. This hides the device tools from agents
89
+**Settings → Devices**. This hides the device tools from agents
90
started from then on; your own Device panel is unaffected.
91
92
## Remote connections
@@ -98,7 +98,7 @@ still-image stream and Android cannot show video.
98
99
## SSH device hosts
100
101
-In Settings → Integrations → Devices, choose the environments that should use
101
+In Settings → Devices, choose the environments that should use
102
the host and add it under **Device hosts**. Enter an SSH alias or `user@host`, with
103
an optional identity file and port. These resolve on the environment server,
104
so use the SSH configuration and keys available there. Password prompts are
@@ -125,6 +125,6 @@ localhost without forwarding or another reachable address.
125
126
## Device tool updates
127
128
-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.
128
+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.
129
130
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.
docs/user/guest-links.md
+1
-1
@@ -6,7 +6,7 @@ until you send or dismiss it.
6
7
## Share a thread
8
9
-Guest links are a beta. Turn on **Settings → Beta → Guest links** for the machine that runs the
9
+Guest links are a beta. Turn on **Settings → Labs → Guest links** for the machine that runs the
10
thread. They also need [T3 Connect](./remote-access.md): sign in and link that machine, because the
11
link points at its T3 Connect address. The machine must stay online while the guest uses it.
12
While the setting is off, every guest link on that machine stops working; links that have not
docs/user/install.md
+3
-3
@@ -80,7 +80,7 @@ update fails. Download the new `.deb` and install it the same way.
80
### The `t3` command
81
82
The desktop app includes the `t3` command-line tool. To run it from any
83
-terminal, open **Settings → General → About** and choose **Install** next to
83
+terminal, open **Settings → About** and choose **Install** next to
84
**t3 command**. On macOS and Linux it adds a `t3` link to a folder on your
85
`PATH`; on Windows it adds the app's command folder to your `PATH`. Open a new
86
terminal afterwards. **Remove** takes it off again. If you already have `t3`
@@ -88,7 +88,7 @@ from npm, it stays as it is.
88
89
### Windows Subsystem for Linux
90
91
-Choose a WSL distro in **Settings → Connections** to run agents and projects
91
+Choose a WSL distro in **Settings → Sharing & access** to run agents and projects
92
there. Install the provider CLIs inside that distro. T3 Code installs its own
93
server runtime there automatically; the first launch after an app update can
94
take longer.
@@ -114,7 +114,7 @@ Install T3 Code from the
114
The phone connects to a server on another machine. Follow
115
[remote access](./remote-access.md) to link it through T3 Connect or a pairing URL.
116
117
-Store links and QR codes are also available in **Settings → General → Mobile app**
117
+Store links and QR codes are also available in **Settings → About → Mobile app**
118
on web and desktop. The store apps work with both stable and Nightly servers. Test builds are optional:
119
120
- **iPhone and iPad:** TestFlight is invite-only.
docs/user/keybindings.md
+1
-1
@@ -5,7 +5,7 @@ also lists the command IDs and defaults available in your version.
5
6
## Composer controls
7
8
-In **Settings → General → Send shortcut**, choose whether Enter sends, requires
8
+In **Settings → Chat → Send shortcut**, choose whether Enter sends, requires
9
`mod+Enter` for multiline prompts, or always requires `mod+Enter`. `Shift+Enter`
10
inserts a new line. This applies to the web and desktop composer at desktop widths.
11
docs/user/open-source-licenses.md
+1
-1
@@ -3,7 +3,7 @@
3
T3 Code includes third-party software and adapted assets. To read their license and attribution
4
notices:
5
6
-- On web and desktop, open **Settings → General**, find **Open source licenses** under **About**,
6
+- On web and desktop, open **Settings → About**, find **Open source licenses** under **Legal**,
7
and select **View licenses**.
8
- On mobile, open **Settings → About T3 Code → Open source licenses**.
9
docs/user/outside-agents.md
+3
-3
@@ -8,7 +8,7 @@ in once, and you choose what it may do.
8
9
## Get the MCP URL
10
11
-In **Settings → Connections**, open a saved environment's menu and choose
11
+In **Settings → Environments**, open a saved environment's menu and choose
12
**Copy MCP URL**. The URL is the environment's address followed by `/mcp`, for
13
example:
14
@@ -41,7 +41,7 @@ The page names the agent and where its access goes:
41
Anyone who runs that service gets the access.
42
43
Only approve a sign-in you just started. To approve, enter a pairing code from
44
-**Settings → Connections** or from `t3 auth pairing create` on the host. A
44
+**Settings → Sharing & access** or from `t3 auth pairing create` on the host. A
45
browser already signed in to the environment with permission to manage access
46
can approve without a code.
47
@@ -116,6 +116,6 @@ result that always includes the thread id.
116
117
## Remove an agent
118
119
-Approved agents appear under **Settings → Connections** like other clients.
119
+Approved agents appear under **Settings → Sharing & access** like other clients.
120
Revoke one there to cut off its access immediately. A sign-in lasts 30 days;
121
after that the agent asks you to approve it again.
docs/user/permission-modes.md
+1
-1
@@ -3,7 +3,7 @@
3
Permission modes control when an agent needs your approval to act. Choose a mode in the message
4
composer; it applies to that thread.
5
6
-Set the default for new threads in **Settings → General → New threads → Permissions**.
6
+Set the default for new threads in **Settings → Threads → New threads → Permissions**.
7
Projects can override the environment default. New threads use this setting rather than the
8
mode of the thread you were viewing. The initial default is **Full access**; existing threads
9
and modes you choose in a draft keep their permissions.
docs/user/project-settings.md
+7
-7
@@ -48,7 +48,7 @@ and other phone-only settings ignore the filter.
48
49
## Worktree branch names
50
51
-In **Settings → Source control → Worktree branch naming**, choose a static prefix,
51
+In **Settings → Worktrees → Worktree branch naming**, choose a static prefix,
52
a model-selected semantic prefix such as `feat/` or `fix/`, or custom instructions
53
for the complete name. The static prefix defaults to `t3/`; a trailing slash is
54
optional, and an empty prefix adds nothing. Invalid characters in a static prefix
@@ -138,7 +138,7 @@ requests and the prompt each one produced.
138
If the environment is offline, the sender gets an error and nothing runs;
139
redeliver from the sender, such as GitHub's **Recent Deliveries**, once it is
140
back. To have T3 Connect keep requests instead, turn on **Hold webhooks while
141
-offline** in **Settings → Connections**. T3 Connect then stores requests to a
141
+offline** in **Settings → Sharing & access**. T3 Connect then stores requests to a
142
T3 Connect URL for up to 24 hours and delivers them when the environment
143
returns. Leave it off if you don't want request bodies stored outside your
144
machine. To skip requests that waited too long, set **Skip requests older
@@ -146,12 +146,12 @@ than** on the task.
146
147
## Defaults and inheritance
148
149
-General contains the model and workspace for new threads. Integrations controls agent browser
149
+Threads contains the model and workspace for new threads. Browser controls agent browser
150
access. Source control contains automatic pull, the default pull request merge method and text
151
generation. The same rows edit environment defaults or project overrides depending on the
152
project crumb.
153
154
-The Project category, shown while a project is selected, holds the project's name, icon, actions,
154
+The Projects category, under Code, holds the project's name, icon, actions,
155
checkouts and removal. Actions belong to a project: editing them creates the project's own list
156
on each selected environment, and reset returns to the environment's shared list. A project's
157
`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.
162
Browser access changes apply when an agent session next starts.
163
164
New worktrees initialize git submodules recursively. If that step is slow because the repository
165
-declares many nested submodules, set **Submodules** in **Settings → General** (with the project
165
+declares many nested submodules, set **Submodules** in **Settings → Worktrees** under Advanced (with the project
166
selected to override it there) to **Top level only** to stop at the ones the repository declares
167
itself, or **Skip** to leave them for a setup script. It resolves in the same order as the
168
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**.
171
## Worktree location
172
173
New worktrees go in the `worktrees` folder of the T3 home directory. To put them somewhere else,
174
-such as another drive, set **Settings → Storage → Worktree location** to an absolute path like
174
+such as another drive, set **Settings → Worktrees → Worktree location** to an absolute path like
175
`D:\worktrees` or `~/worktrees`. The setting is per machine. Existing worktrees stay where they
176
are, and cleanup covers both the default folder and the custom one.
177
178
## Storage cleanup
179
180
-Open **Settings → Storage** to enable automatic cleanup on one machine or all connected
180
+Open **Settings → Worktrees → Cleanup** to enable automatic cleanup on one machine or all connected
181
environments. Policies are off by default and run on the server at startup, when changed, and
182
hourly. Offline machines keep their existing policies.
183
docs/user/providers-claude.md
+1
-1
@@ -57,7 +57,7 @@ history for that message. The cache lasts about an hour on a Claude
57
subscription and 5 minutes with an API key, Bedrock, or Vertex. See [commands and skills](./composer.md#commands-and-skills) for using
58
composer commands.
59
60
-**Compact idle threads** in **Settings > General** controls this for threads
60
+**Compact idle threads** in **Settings > Providers > Advanced** controls this for threads
61
over 200,000 tokens. Each Claude provider's settings can override it:
62
63
- **When you return** shows the **Compact** chip described above. This is the default.
docs/user/remote-access.md
+11
-11
@@ -36,7 +36,7 @@ disconnect an otherwise healthy conversation.
36
37
Use direct pairing when the other device can reach the host's network address.
38
39
-On a desktop host, open **Settings → Connections**, enable **Network access**,
39
+On a desktop host, open **Settings → Sharing & access**, enable **Network access**,
40
then create a pairing link using an address the other device can reach. Changing
41
network access restarts the desktop app. You can turn it off in the same place.
42
@@ -54,14 +54,14 @@ t3 pair
54
```
55
56
Scan the QR code on your phone or paste the pairing URL into **Add environment**
57
-in the receiving app. Connection settings are under **Settings → Connections**
57
+in the receiving app. Connection settings are under **Settings → Environments**
58
on web and desktop and **Settings → Environments** on mobile. A loopback address
59
such as `127.0.0.1` reaches only the device opening the link.
60
61
Pairing authorizes that device for future connections. Use a fresh one-time link
62
for each new device; you do not need the original token to reconnect. Links
63
created in Settings can only be copied from the client that created them while
64
-its Connections page stays open. If you leave or reload that page, create
64
+its Sharing & access page stays open. If you leave or reload that page, create
65
another link to share.
66
67
### Reach one machine several ways
@@ -92,7 +92,7 @@ later route, T3 Code checks the earlier ones when your network changes, when you
92
return to the app, and every minute, and moves back as soon as one works.
93
94
On web and desktop, select the route count under the machine's name in
95
-**Settings → Connections** to see its routes. Drag a route to change the order,
95
+**Settings → Environments** to see its routes. Drag a route to change the order,
96
or remove it. On mobile, open the machine under **Settings → Environments** and
97
choose **Edit**. Signing out of T3 Connect removes only that route; a machine
98
you can still reach another way stays saved.
@@ -107,7 +107,7 @@ different permissions.
107
### Balance new threads across machines
108
109
Auto balance is off by default. On web and desktop, enable it in
110
-**Settings → Connections → Load balancing** to automatically choose a machine for
110
+**Settings → Environments → Load balancing** to automatically choose a machine for
111
new threads in projects grouped across connected environments. The section
112
appears once two or more machines are switched on.
113
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.
125
### Tailscale HTTPS
126
127
Join both devices to the same tailnet. In the desktop app, enable **Tailscale
128
-HTTPS** in **Settings → Connections**. Turn it off there to remove that route.
128
+HTTPS** in **Settings → Sharing & access**. Turn it off there to remove that route.
129
130
To start a command-line server with Tailscale HTTPS:
131
@@ -162,7 +162,7 @@ scheme uses HTTP, so include `https://` when your server uses HTTPS.
162
163
## Desktop-managed SSH
164
165
-In the desktop app, open **Settings → Connections → Add environment**, choose
165
+In the desktop app, open **Settings → Environments → Add environment**, choose
166
**SSH**, and enter a host or SSH alias such as `user@example.com`. T3 Code starts
167
or reuses a server there and opens the port forward for you. Projects, provider
168
credentials, and agent work stay on the remote machine.
@@ -184,7 +184,7 @@ running is left alone.
184
185
Each desktop app keeps one session on the host for its SSH connection and reuses
186
it when it reconnects. Revoke sessions you no longer use in **Settings →
187
-Connections** on the host, or on a headless host with `t3 auth session list` and
187
+Sharing & access** on the host, or on a headless host with `t3 auth session list` and
188
`t3 auth session revoke <id>`. A desktop that can still sign in over SSH pairs
189
again on its next connect.
190
@@ -249,7 +249,7 @@ threads on an environment through its MCP server. See
249
250
## Manage or revoke access
251
252
-On the host, **Settings → Connections** lets authorized administrators create
252
+On the host, **Settings → Sharing & access** lets authorized administrators create
253
pairing links and revoke client sessions. Revoking an unused link prevents new
254
pairings; revoke a device's session to remove its existing access. Command-line
255
management is available through `t3 auth --help`.
@@ -305,7 +305,7 @@ page, or **Settings → T3 Connect** on mobile, and choose **Deregister**. This
305
revokes its cloud access and frees its host space even when the environment is
306
offline or has been wiped. When T3 Connect rejects a host's link, the host
307
shows that it was removed from T3 Connect. To link it again, turn on
308
-**T3 Connect** in **Settings → Connections** on a desktop host, or run
308
+**T3 Connect** in **Settings → Sharing & access** on a desktop host, or run
309
`t3 connect link` on a command-line host and then restart T3 Code there. A
310
command-line host that released its tunnel when it last stopped may link itself
311
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.
339
## Using the Desktop App as a Remote Only
340
341
If a computer should only drive work running elsewhere, turn off its local environment. In the
342
-desktop app, open **Settings → Connections** and switch off **Local
342
+desktop app, open **Settings → Environments** and switch off **Local
343
environment**. T3 Code restarts without a local server: no local agents or terminals run, WSL
344
backends stay off, and other devices can no longer connect to this computer. Your projects,
345
history, and saved connections are kept, and you keep working through pairing, T3 Connect, or SSH.
docs/user/source-control.md
+1
-1
@@ -183,7 +183,7 @@ Press **Escape** before releasing to cancel. Failed closes stay in the list so y
183
GitHub, GitLab, and Azure DevOps support auto-merge while checks are outstanding. GitHub also
184
supports approving waiting fork workflows and opening a revert pull request for a merged change.
185
186
-Pull request sharing is off by default. In Settings → Connections → Pull request sharing (Pull
186
+Pull request sharing is off by default. In Settings → Environments → Pull request sharing (Pull
187
request routing under Environments on mobile), choose **Read PRs** or **Read and act** for each
188
environment you trust to share its source control access.
189
Enable both the original environment and the environment answering its requests on this client.
docs/user/t3-connect-troubleshooting.md
+3
-3
@@ -7,12 +7,12 @@ A T3 Connect connection goes through four parts, in this order:
7
3. **The host's tunnel** (cloudflared on the host) carries the request to the host.
8
4. **T3 Code on the host** answers.
9
10
-When a connection fails, open **Settings > Connections**, find the environment,
10
+When a connection fails, open **Settings > Environments**, find the environment,
11
and select **Details**. The first part marked as failed is the cause. Find its
12
section below.
13
14
To see the host's side, run `t3 connect status` on the host, or open
15
-**Settings > Connections** on the host. Both check the host's T3 Connect
15
+**Settings > Sharing & access** on the host. Both check the host's T3 Connect
16
address from the host, and say why it fails. `t3 connect` runs the same check
17
when it finishes setup. This check cannot test another device's network. For a
18
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.
105
account on this device and on the host. On the host, run `t3 connect logout`,
106
then `t3 connect`.
107
- **T3 Connect is off on the host, or the host only publishes agent activity.**
108
- On the host, open **Settings > Connections** and turn **T3 Connect** on, or
108
+ On the host, open **Settings > Sharing & access** and turn **T3 Connect** on, or
109
run `t3 connect`.
110
- **The host was linked, but the server did not apply the link yet.** Run
111
`t3 service restart` on the host, or restart `t3 serve`.
docs/user/telemetry.md
+1
-1
@@ -24,7 +24,7 @@ Linux, so export it there and restart the app. On Windows, set it as a user envi
24
## Export diagnostics to your own receiver
25
26
To send traces, metrics, or logs to an OpenTelemetry receiver, open
27
-**Settings > General > Diagnostics**, select an environment, and enter each signal's OTLP HTTP
27
+**Settings > Maintenance > Diagnostics**, select an environment, and enter each signal's OTLP HTTP
28
endpoint under **OpenTelemetry export** (for example `http://localhost:4318/v1/traces`). Save, then
29
restart that environment's server. The receiver must be reachable from the server's machine.
30
**Test** sends an empty export from the server to check an endpoint before or after you save it;
docs/user/thread-sidebar.md
+6
-6
@@ -107,8 +107,8 @@ To generate a fresh title from the conversation, open a thread's menu and choose
107
**Regenerate title**. The action is unavailable while title generation is in progress
108
or when the connected environment needs a server update.
109
110
-To change how titles are written, add **Thread title instructions** in **Settings → General →
111
-Text generation**, such as a length limit or an identifier to put first. They apply to new and
110
+To change how titles are written, add **Thread title instructions** in **Settings → Threads →
111
+Text generation**, under Advanced, such as a length limit or an identifier to put first. They apply to new and
112
regenerated titles. Select a project to give it its own instructions.
113
114
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
126
answer. The Working section lists the thread you last sent work to first. Pinned threads stay in
127
the pinned section.
128
129
-This is on by default. Turn it off with **Settings → Beta → Working section** on web and desktop,
129
+This is on by default. Turn it off with **Settings → General → Working section** on web and desktop,
130
or **Settings → Thread behavior → Working section** on iOS and Android. Each device keeps its own
131
choice.
132
@@ -160,7 +160,7 @@ threads whose pull request merged. A closed pull request can also settle an idle
160
thread. An empty thread's inactivity counts from when it was created.
161
Work in progress, pending questions or approvals, and background work the agent
162
is waiting on prevent automatic settlement. An open pull request does not prevent inactivity
163
-settlement unless you turn on **Keep threads with a PR** in **Settings → General**,
163
+settlement unless you turn on **Keep threads with a PR** in **Settings → Threads**,
164
but an old closed or merged pull request does not settle work you
165
resumed after it closed. Only your own messages count as resuming. A turn that
166
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
170
**Enabled** to return to the usual rules. Manual settle, snooze, and archive still work while it
171
is disabled.
172
173
-Change these rules in **Settings → General** on web and desktop, or **Settings → Thread behavior** on mobile.
173
+Change these rules in **Settings → Threads** on web and desktop, or **Settings → Thread behavior** on mobile.
174
They continue to run when your apps are closed. On web and desktop, choose an environment at the
175
top to change only its rules, or **All environments** to update connected environments together.
176
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.
219
220
When the provider reports a reset time, choose **Resume at reset** to schedule a
221
continuation. You can cancel it from the thread. Enable **Resume after
222
-usage limits** in **Settings → General** on web and desktop, or **Settings → Thread
222
+usage limits** in **Settings → Threads** on web and desktop, or **Settings → Thread
223
behavior** on mobile, to schedule limit stops by default.
224
The environment must be running when the reset arrives; it resumes overdue
225
continuations after a restart. Stopping the thread, sending a new message,
docs/user/updating.md
+3
-3
@@ -2,7 +2,7 @@
2
3
The app you use and the server running your agents can be on different machines.
4
When a server is behind your web or desktop app, an update notice appears in the
5
-conversation and **Settings → Connections**. Update the machine named in that
5
+conversation and **Settings → Environments**. Update the machine named in that
6
notice.
7
8
## Update everything at once
@@ -26,7 +26,7 @@ restarts.
26
Server updates appear only after that version is published to npm. Remote
27
desktop apps do not wait for npm. The confirmation lists each machine it skips
28
and why, such as a machine that is offline or needs a manual update. Use the
29
-notice or **Settings → Connections** for those.
29
+notice or **Settings → Environments** for those.
30
31
If a desktop app restarts on its old version, T3 Code tells you the update did
32
not apply. It does not install that version again on its own, even when another
@@ -41,7 +41,7 @@ below.
41
Server updates restart the connection and can interrupt active agents and
42
terminal commands. Saved threads, settings, and project files remain.
43
44
-**Settings → General → Continue threads after restarts** is on by default.
44
+**Settings → Maintenance → Continue threads after restarts** is on by default.
45
It resumes supported active threads after an update, crash, or machine
46
restart. Changes are saved to connected environments that support this setting;
47
update older servers first. If a supported environment was offline or has a
packages/client-runtime/src/connection/diagnosis.ts
+3
-3
@@ -137,7 +137,7 @@ function headline(host: string, located: Located, failure: ConnectionAttemptErro
137
}
138
139
function steps(host: string, located: Located, failure: ConnectionAttemptError | null): string[] {
140
- const checkHost = `On ${host}, check Settings > Connections or run \`t3 connect status\`.`;
140
+ const checkHost = `On ${host}, check Settings > Sharing & access or run \`t3 connect status\`.`;
141
switch (located.cause) {
142
case "offline":
143
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 |
148
case "not_linked":
149
return [
150
"Check that this device is signed in to the same T3 Connect account as the host.",
151
- `On ${host}, open Settings > Connections and turn T3 Connect on.`,
151
+ `On ${host}, open Settings > Sharing & access and turn T3 Connect on.`,
152
];
153
case "tunnel_pending":
154
return ["Wait a minute. T3 Code retries on its own.", checkHost];
@@ -158,7 +158,7 @@ function steps(host: string, located: Located, failure: ConnectionAttemptError |
158
"If it keeps failing, copy the diagnostics and report it.",
159
];
160
case "tunnel_not_enabled":
161
- return [`On ${host}, open Settings > Connections and turn T3 Connect on.`];
161
+ return [`On ${host}, open Settings > Sharing & access and turn T3 Connect on.`];
162
case "released":
163
case "tunnel_down":
164
return [
packages/client-runtime/src/relay/errorPresentation.ts
+1
-1
@@ -47,7 +47,7 @@ export function relayProtectedErrorMessage(error: RelayProtectedError): string {
47
return "The environment's T3 Connect tunnel is still being set up.";
48
}
49
if (error.reason === "endpoint_provider_not_managed") {
50
- 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.";
50
+ 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.";
51
}
52
return error.reason
53
? `Relay rejected the environment connection request (${error.reason}).`
packages/contracts/src/guestShare.ts
+1
-1
@@ -65,7 +65,7 @@ export const GuestShareCreateResult = Schema.Struct({
65
export type GuestShareCreateResult = typeof GuestShareCreateResult.Type;
66
67
const GUEST_SHARE_CREATE_MESSAGES = {
68
- disabled: "Guest links are off. Turn them on in Settings > Beta.",
68
+ disabled: "Guest links are off. Turn them on in Settings > Labs.",
69
connect_unavailable: "Guest links need a running T3 Connect tunnel.",
70
thread_unavailable: "This thread cannot be shared.",
71
read_failed: "Failed to read the shared thread.",
packages/contracts/src/settings.ts
+1
-1
@@ -712,7 +712,7 @@ export const ClaudeSettings = makeProviderSettingsSchema(
712
Schema.annotateKey({
713
title: "Compact idle threads",
714
description:
715
- "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.",
715
+ "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.",
716
providerSettingsForm: {
717
control: "select",
718
options: INSTANCE_IDLE_COMPACTION_MODES,