The best way to control Claude Code, Codex and more from any computer or phone
fix(web): name inherited background activity profiles (#23450)
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Victor Vogel committed
Oct 30, 2026 at 15:50 UTC
6ad082745a5d19e8e5363e537b09d591e2cd0cbe
2 files changed
+35
apps/web/src/components/settings/SettingInheritance.test.ts
+25
@@ -8,6 +8,31 @@ const environmentId = EnvironmentId.make("laptop");
8
const projectId = ProjectId.make("project");
9
10
describe("settingInheritanceLayers", () => {
11
+ it("identifies the background activity profile supplied by each layer", () => {
12
+ const settings = {
13
+ ...DEFAULT_SERVER_SETTINGS,
14
+ backgroundActivity: {
15
+ schemaVersion: 1 as const,
16
+ profile: "performance" as const,
17
+ overrides: {},
18
+ },
19
+ };
20
+ const layers = settingInheritanceLayers(
21
+ {
22
+ environmentId,
23
+ label: "Laptop",
24
+ projectId: null,
25
+ ...resolveProjectSettings(settings, projectId),
26
+ },
27
+ settings,
28
+ "backgroundActivity",
29
+ );
30
+ expect(layers.map((layer) => [layer.key, layer.value, layer.effective])).toEqual([
31
+ ["environment", "Performance", true],
32
+ ["built-in", "Balanced", false],
33
+ ]);
34
+ });
35
+
36
it("shows the checkout's t3.json as a layer for file-backed keys", () => {
37
const file = { defaultThreadEnvMode: "worktree" as const };
38
const fromFile = settingInheritanceLayers(
apps/web/src/components/settings/SettingInheritance.tsx
+10
@@ -37,6 +37,13 @@ const WRITING_STYLE_LABELS: Record<string, string> = {
37
custom: "Custom instructions",
38
};
39
40
+const BACKGROUND_ACTIVITY_PROFILE_LABELS: Record<string, string> = {
41
+ balanced: "Balanced",
42
+ performance: "Performance",
43
+ "battery-saver": "Battery saver",
44
+ custom: "Advanced",
45
+};
46
+
47
function formatValue(key: keyof ServerSettings, value: unknown): string {
48
if (value === null || value === undefined) {
49
return key === "pullRequestMergeMethod"
@@ -75,6 +82,9 @@ function formatValue(key: keyof ServerSettings, value: unknown): string {
82
}
83
if (Array.isArray(value)) return `${value.length} ${value.length === 1 ? "item" : "items"}`;
84
if (typeof value === "object") {
85
+ if (key === "backgroundActivity" && "profile" in value && typeof value.profile === "string") {
86
+ return BACKGROUND_ACTIVITY_PROFILE_LABELS[value.profile] ?? value.profile;
87
+ }
88
if ("model" in value && typeof value.model === "string") return value.model;
89
if ("mode" in value && typeof value.mode === "string") {
90
return WRITING_STYLE_LABELS[value.mode] ?? value.mode;