@@ -322,7 +322,7 @@ const rotateViewport = (
322322
323323function BrowserViewportSetting ( { disabled } : { readonly disabled : boolean } ) {
324324 const viewport = useClientSettings ( ( settings ) => settings . browserDefaultViewport ) ;
325- const updateSettings = useUpdatePrimarySettings ( ) ;
325+ const updateSettings = useUpdateScopedSettings ( ) ;
326326
327327 const sized = viewport . _tag === "fill" ? null : viewport ;
328328 const presentedSize = {
@@ -472,7 +472,7 @@ function BrowserViewportSetting({ disabled }: { readonly disabled: boolean }) {
472472
473473function BrowserZoomSetting ( { disabled } : { readonly disabled : boolean } ) {
474474 const zoomFactor = useClientSettings ( ( settings ) => settings . browserDefaultZoomFactor ) ;
475- const updateSettings = useUpdatePrimarySettings ( ) ;
475+ const updateSettings = useUpdateScopedSettings ( ) ;
476476
477477 return (
478478 < SettingsRow
@@ -515,7 +515,7 @@ function BrowserZoomSetting({ disabled }: { readonly disabled: boolean }) {
515515
516516function BrowserAppearanceSetting ( { disabled } : { readonly disabled : boolean } ) {
517517 const appearance = useClientSettings ( ( settings ) => settings . browserDefaultAppearance ) ;
518- const updateSettings = useUpdatePrimarySettings ( ) ;
518+ const updateSettings = useUpdateScopedSettings ( ) ;
519519
520520 return (
521521 < SettingsRow
@@ -562,7 +562,7 @@ function BrowserAppearanceSetting({ disabled }: { readonly disabled: boolean })
562562function BrowserRecordingInputSettings ( { disabled } : { readonly disabled : boolean } ) {
563563 const showKeys = useClientSettings ( ( settings ) => settings . browserRecordingShowKeyPresses ) ;
564564 const showMouse = useClientSettings ( ( settings ) => settings . browserRecordingShowMousePresses ) ;
565- const updateSettings = useUpdatePrimarySettings ( ) ;
565+ const updateSettings = useUpdateScopedSettings ( ) ;
566566 return (
567567 < >
568568 < SettingsRow
@@ -599,7 +599,7 @@ function BrowserRecordingInputSettings({ disabled }: { readonly disabled: boolea
599599
600600function BrowserRecordingFrameRateSetting ( { disabled } : { readonly disabled : boolean } ) {
601601 const frameRate = useClientSettings ( ( settings ) => settings . browserRecordingFrameRate ) ;
602- const updateSettings = useUpdatePrimarySettings ( ) ;
602+ const updateSettings = useUpdateScopedSettings ( ) ;
603603
604604 return (
605605 < SettingsRow
@@ -653,7 +653,7 @@ const LINK_TARGET_LABELS: Readonly<Record<BrowserLinkTarget, string>> = {
653653
654654function BrowserLinkTargetSetting ( { disabled } : { readonly disabled : boolean } ) {
655655 const linkTarget = useClientSettings ( ( settings ) => settings . browserLinkTarget ) ;
656- const updateSettings = useUpdatePrimarySettings ( ) ;
656+ const updateSettings = useUpdateScopedSettings ( ) ;
657657
658658 return (
659659 < SettingsRow
@@ -706,7 +706,7 @@ const SEARCH_ENGINE_LABELS: Readonly<Record<BrowserSearchEngine, string>> = {
706706function BrowserSearchEngineSetting ( ) {
707707 const engine = useClientSettings ( ( settings ) => settings . browserSearchEngine ) ;
708708 const customUrl = useClientSettings ( ( settings ) => settings . browserCustomSearchUrl ) ;
709- const updateSettings = useUpdatePrimarySettings ( ) ;
709+ const updateSettings = useUpdateScopedSettings ( ) ;
710710
711711 return (
712712 < >
@@ -1075,7 +1075,7 @@ function AgentBrowserAccessSetting() {
10751075
10761076function BrowserAutoShowFloatingPreviewSetting ( { disabled } : { readonly disabled : boolean } ) {
10771077 const autoShow = useClientSettings ( ( settings ) => settings . browserAutoShowFloatingPreview ) ;
1078- const updateSettings = useUpdatePrimarySettings ( ) ;
1078+ const updateSettings = useUpdateScopedSettings ( ) ;
10791079
10801080 return (
10811081 < SettingsRow
@@ -1111,7 +1111,9 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
11111111 const userProfiles = useClientSettings ( ( settings ) => settings . browserProfiles ) ;
11121112 const defaultProfileId = useClientSettings ( ( settings ) => settings . browserDefaultProfileId ) ;
11131113 const settingsHydrated = useClientSettingsHydrated ( ) ;
1114+ // Profile edits pair with profile data on disk, so they save for this device in every scope.
11141115 const updateSettings = useUpdatePrimarySettings ( ) ;
1116+ const updateDefaultProfile = useUpdateScopedSettings ( ) ;
11151117 const { environments, isReady : environmentsReady } = useEnvironments ( ) ;
11161118 const primaryEnvironment = usePrimaryEnvironment ( ) ;
11171119 // Cookie import runs on this desktop, whose policy the primary environment reports.
@@ -1422,7 +1424,7 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
14221424 disabled = { ! settingsHydrated || isDefault }
14231425 onClick = { ( ) => {
14241426 if ( settingsHydrated ) {
1425- updateSettings ( { browserDefaultProfileId : profile . id } ) ;
1427+ updateDefaultProfile ( { browserDefaultProfileId : profile . id } ) ;
14261428 }
14271429 } }
14281430 >
0 commit comments