diff --git a/packages/webui/src/components/layout/sidebar.tsx b/packages/webui/src/components/layout/sidebar.tsx
index e92f30dd..bffdd7e3 100644
--- a/packages/webui/src/components/layout/sidebar.tsx
+++ b/packages/webui/src/components/layout/sidebar.tsx
@@ -170,6 +170,7 @@ export function Sidebar({ collapsed = false, onItemClick }: SidebarProps) {
('appearance');
+ // Active tab lives in the URL (`?tab=`) so it's deep-linkable — e.g. the
+ // sidebar update banner jumps straight to 关于. Default tab omits the param.
+ const { tab: urlTab } = settingsRoute.useSearch();
+ const navigate = settingsRoute.useNavigate();
+ const tab: SettingsTab = urlTab ?? 'appearance';
+ const setTab = (t: SettingsTab) =>
+ void navigate({ to: '/settings', search: t === 'appearance' ? {} : { tab: t }, replace: true });
const active = TABS.find((t) => t.key === tab);
return (
diff --git a/packages/webui/src/router/index.tsx b/packages/webui/src/router/index.tsx
index 238f1edc..e5dd108b 100644
--- a/packages/webui/src/router/index.tsx
+++ b/packages/webui/src/router/index.tsx
@@ -64,9 +64,21 @@ const logsRoute = createRoute({
),
});
-const settingsRoute = createRoute({
+/** Settings sub-tabs — also the contract for the `?tab=` deep link. */
+export const SETTINGS_TABS = ['appearance', 'data', 'advanced', 'account', 'about'] as const;
+export type SettingsTab = (typeof SETTINGS_TABS)[number];
+
+export const settingsRoute = createRoute({
path: '/settings',
getParentRoute: () => appLayoutRoute,
+ // `?tab=` deep-links a settings sub-tab (e.g. the sidebar update banner jumps
+ // straight to 关于). Unknown/missing → omitted (the page falls back to 外观).
+ validateSearch: (search: Record): { tab?: SettingsTab } => {
+ const t = search.tab;
+ return typeof t === 'string' && (SETTINGS_TABS as readonly string[]).includes(t)
+ ? { tab: t as SettingsTab }
+ : {};
+ },
component: lazyRouteComponent(
() => import('@/components/pages/settings-page'),
'SettingsPage',