From b7463fd2f08fa0c6445393afa3b8bf712e412eb4 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 30 Oct 2026 08:00:24 -0400 Subject: [PATCH] fix: Enable separate editing for current user when enabling workspace setting (#14425) --- app/scenes/Settings/Details.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/scenes/Settings/Details.tsx b/app/scenes/Settings/Details.tsx index c2f5d2a1cb..bfb3d72f05 100644 --- a/app/scenes/Settings/Details.tsx +++ b/app/scenes/Settings/Details.tsx @@ -10,7 +10,7 @@ import { ThemeProvider } from "styled-components"; import { errToString } from "@shared/utils/error"; import { buildDarkTheme, buildLightTheme } from "@shared/styles/theme"; import type { CustomTheme } from "@shared/types"; -import { TOCPosition, TeamPreference } from "@shared/types"; +import { TOCPosition, TeamPreference, UserPreference } from "@shared/types"; import { getBaseDomain } from "@shared/utils/domains"; import { TeamValidation } from "@shared/validations"; import Button from "~/components/Button"; @@ -24,6 +24,7 @@ import Scene from "~/components/Scene"; import Switch from "~/components/Switch"; import Text from "~/components/Text"; import useCurrentTeam from "~/hooks/useCurrentTeam"; +import useCurrentUser from "~/hooks/useCurrentUser"; import usePolicy from "~/hooks/usePolicy"; import useStores from "~/hooks/useStores"; import isCloudHosted from "~/utils/isCloudHosted"; @@ -37,6 +38,7 @@ function Details() { const { dialogs, ui } = useStores(); const { t } = useTranslation(); const team = useCurrentTeam(); + const user = useCurrentUser(); const can = usePolicy(team); const form = useRef(null); @@ -172,9 +174,15 @@ function Details() { async (checked: boolean) => { team.setPreference(TeamPreference.SeamlessEdit, !checked); await team.save(); + + // Enabling separate editing also applies it to the current user. + if (checked) { + user.setPreference(UserPreference.SeamlessEdit, false); + await user.save(); + } toast.success(t("Settings saved")); }, - [team, t] + [team, user, t] ); const isValid = form.current?.checkValidity();