From 1933fd619200a31fd886d394c00854d0e28a51b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 17 Apr 2026 21:08:49 -0400 Subject: [PATCH] refactor(settings): relocate profile-path + secret-backend diagnostics into Data tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Profile path and secret backend are **read-only diagnostic facts** — they tell you which directory the profile lives in and which keystore ciphertexts are stored against. They are not preferences; they do not belong in the General tab alongside the theme / language / auto-update controls. Moved both into a new "Profile" group inside the Data tab, rendered via a small `ReadOnlyRow` helper so both pieces of information share consistent bordered-card styling and get a clear label/value split. General tab now contains only the three actual preferences (theme, language, updater) + the inline updater hint. The previous General rendering dropped profile path as raw mono text under the updater checkbox — visually tangled with the preference control. With diagnostics in Data and preferences in General, each tab reads with a single purpose. No new i18n keys required — reused `exec.profile` / `exec.profilePath` / `exec.secretBackend`, which were already translated in zh + en. Follow-up polish; no behavioral change. Typecheck + lint pass. --- .../components/execution/SettingsShell.tsx | 1 - .../execution/settings-sections/DataSection.tsx | 16 +++++++++++++--- .../settings-sections/GeneralSection.tsx | 5 ----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/renderer/components/execution/SettingsShell.tsx b/src/renderer/components/execution/SettingsShell.tsx index 7e47a63c..777cc6a3 100644 --- a/src/renderer/components/execution/SettingsShell.tsx +++ b/src/renderer/components/execution/SettingsShell.tsx @@ -96,7 +96,6 @@ export function SettingsShell({ snapshot, secrets, companyId, onSaved }: Setting
{activeTab === "general" ? (
- {t("exec.secretBackend")} -
- {snapshot.backend.secretBackend} + {t("exec.profile")} +
+ +
); } + +function ReadOnlyRow({ label, value, mono }: { label: string; value: string; mono?: boolean }) { + return ( +
+ {label} + {value} +
+ ); +} diff --git a/src/renderer/components/execution/settings-sections/GeneralSection.tsx b/src/renderer/components/execution/settings-sections/GeneralSection.tsx index aa6a8760..d294412e 100644 --- a/src/renderer/components/execution/settings-sections/GeneralSection.tsx +++ b/src/renderer/components/execution/settings-sections/GeneralSection.tsx @@ -5,7 +5,6 @@ import { Eyebrow, Select } from "../../ui"; import { useT } from "../../../i18n"; interface GeneralSectionProps { - snapshot: ProfileSnapshot; theme: ProfileSnapshot["theme"]; setTheme: (theme: ProfileSnapshot["theme"]) => void; selectedLocale: AppLocale; @@ -22,7 +21,6 @@ interface GeneralSectionProps { * individually as soon as the user changes it. */ export function GeneralSection({ - snapshot, theme, setTheme, selectedLocale, @@ -84,9 +82,6 @@ export function GeneralSection({ className="h-4 w-4 accent-[color:var(--primary)]" /> -
- {t("exec.profilePath")}: {snapshot.profilePath} -