From 1e89e0534a43379d7b5b37b17923399ed00bf888 Mon Sep 17 00:00:00 2001 From: capJavert Date: Wed, 8 Apr 2026 13:21:44 +0000 Subject: [PATCH 1/2] feat(settings): add browsingContextEnabled flag for companion consent Add browsingContextEnabled to SettingsFlags type, SettingsFlagsPublic pick type, GraphQL schema (type + input), and flags transform with default false. This stores the user's explicit consent for browsing-based personalization in the existing JSONB flags column (zero migration). Co-Authored-By: Claude Opus 4.6 --- src/common/flags.ts | 1 + src/entity/Settings.ts | 2 ++ src/schema/settings.ts | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/common/flags.ts b/src/common/flags.ts index 2d31cf94bb..4a8171079a 100644 --- a/src/common/flags.ts +++ b/src/common/flags.ts @@ -9,6 +9,7 @@ export const transformSettingFlags = ({ flags }: Pick) => { sidebarBookmarksExpanded: flags?.sidebarBookmarksExpanded ?? true, clickbaitShieldEnabled: flags?.clickbaitShieldEnabled ?? true, noAiFeedEnabled: flags?.noAiFeedEnabled ?? false, + browsingContextEnabled: flags?.browsingContextEnabled ?? false, ...flags, }; }; diff --git a/src/entity/Settings.ts b/src/entity/Settings.ts index c13e107e6e..d2848e8e38 100644 --- a/src/entity/Settings.ts +++ b/src/entity/Settings.ts @@ -34,6 +34,7 @@ export type SettingsFlags = Partial<{ sidebarBookmarksExpanded: boolean; clickbaitShieldEnabled: boolean; noAiFeedEnabled: boolean; + browsingContextEnabled: boolean; prompt: object; timezoneMismatchIgnore: string; lastPrompt: string; @@ -49,6 +50,7 @@ export type SettingsFlagsPublic = Pick< | 'sidebarBookmarksExpanded' | 'clickbaitShieldEnabled' | 'noAiFeedEnabled' + | 'browsingContextEnabled' | 'prompt' | 'timezoneMismatchIgnore' | 'lastPrompt' diff --git a/src/schema/settings.ts b/src/schema/settings.ts index 00738a0a7c..54b2da9dad 100644 --- a/src/schema/settings.ts +++ b/src/schema/settings.ts @@ -73,6 +73,7 @@ export const typeDefs = /* GraphQL */ ` sidebarBookmarksExpanded: Boolean clickbaitShieldEnabled: Boolean noAiFeedEnabled: Boolean + browsingContextEnabled: Boolean timezoneMismatchIgnore: String lastPrompt: String defaultWriteTab: DefaultWriteTab @@ -86,6 +87,7 @@ export const typeDefs = /* GraphQL */ ` sidebarBookmarksExpanded: Boolean clickbaitShieldEnabled: Boolean noAiFeedEnabled: Boolean + browsingContextEnabled: Boolean prompt: JSONObject timezoneMismatchIgnore: String lastPrompt: String From c08b6d53b96cad9f7e8d91139197f880098e8836 Mon Sep 17 00:00:00 2001 From: capJavert Date: Wed, 8 Apr 2026 13:52:33 +0000 Subject: [PATCH 2/2] fix(test): add browsingContextEnabled to boot settings assertion The transformSettingFlags function now returns browsingContextEnabled in its output, so the boot test expectation must include it. Co-Authored-By: Claude Opus 4.6 --- __tests__/boot.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/__tests__/boot.ts b/__tests__/boot.ts index c5910cf572..fae16a969e 100644 --- a/__tests__/boot.ts +++ b/__tests__/boot.ts @@ -1365,6 +1365,7 @@ describe('boot misc', () => { sidebarBookmarksExpanded: true, clickbaitShieldEnabled: true, noAiFeedEnabled: false, + browsingContextEnabled: false, }, }); });