From b43e214cb5321a554efcb8e79f6fad7f83c837cb Mon Sep 17 00:00:00 2001 From: Delicious233 <101502465+DeliciousBuding@users.noreply.github.com> Date: Tue, 18 Aug 2026 18:42:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20WorkbenchSurfaceScreen=20?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=8D=A2=E8=A1=8C=20+=20settings=20tab=20?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=9F=AD=E9=94=AE=E9=87=8D=E6=9E=84=20+=20vi?= =?UTF-8?q?sual-qa=20=E5=A4=A7=E5=B0=8F=E5=86=99=E4=B8=8D=E6=95=8F?= =?UTF-8?q?=E6=84=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ScreenHeader description numberOfLines 1→2,避免长描述被截断 - WorkbenchSurfaceScreen SurfaceListRow/OverflowListRow subtitle numberOfLines 1→2 - WorkbenchSurfaceScreen PaneTabRail 显示阈值 >4→>3,4 个 pane 起即用 tab rail - settings tab 标签从长键(workspaceSettings/nativeDeviceCapabilities/identityAndSession) 换成短键(settingsTabWorkspace/settingsTabDevice/settingsTabIdentity),en+zh 双语 - visual-qa.mjs expectedText 匹配改 toLowerCase,消除大小写差异导致的假失败 Co-authored-by: Cursor --- app/mobile-rn/scripts/visual-qa.mjs | 2 +- app/mobile-rn/src/components/layout/ScreenHeader.tsx | 2 +- app/mobile-rn/src/i18n/strings.ts | 6 ++++++ app/mobile-rn/src/screens/WorkbenchSurfaceScreen.tsx | 10 +++++----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/mobile-rn/scripts/visual-qa.mjs b/app/mobile-rn/scripts/visual-qa.mjs index fd6e35610..7ce25714f 100644 --- a/app/mobile-rn/scripts/visual-qa.mjs +++ b/app/mobile-rn/scripts/visual-qa.mjs @@ -1304,7 +1304,7 @@ async function run() { } } for (const expectedText of result.expectedTexts ?? []) { - if (!result.probe.bodyText.includes(expectedText)) { + if (!result.probe.bodyText.toLowerCase().includes(expectedText.toLowerCase())) { failures.push(`${result.name}: missing expected text "${expectedText}"`); } } diff --git a/app/mobile-rn/src/components/layout/ScreenHeader.tsx b/app/mobile-rn/src/components/layout/ScreenHeader.tsx index aedab27a5..929e9bf6a 100644 --- a/app/mobile-rn/src/components/layout/ScreenHeader.tsx +++ b/app/mobile-rn/src/components/layout/ScreenHeader.tsx @@ -71,7 +71,7 @@ export function ScreenHeader({ {title} {description ? ( - + {description} ) : null} diff --git a/app/mobile-rn/src/i18n/strings.ts b/app/mobile-rn/src/i18n/strings.ts index 169fbb41d..c4ab36800 100644 --- a/app/mobile-rn/src/i18n/strings.ts +++ b/app/mobile-rn/src/i18n/strings.ts @@ -301,6 +301,9 @@ export const strings = { projectSettingsDescription: 'Members, notifications, and project defaults.', settingsEyebrow: 'AgentHub Settings', settingsDescription: 'Workspace settings stay separate from the avatar profile and TokenDance ID account surface.', + settingsTabWorkspace: 'Workspace', + settingsTabDevice: 'Devices', + settingsTabIdentity: 'Identity', workspaceSettings: 'Workspace settings', workspaceSettingsDescription: 'Project defaults, notification policy, and mobile workspace behavior.', hubSessionSettingsDescription: 'Open the profile/account sheet for TokenDance ID, Hub session, device, and theme controls.', @@ -651,6 +654,9 @@ export const strings = { projectSettingsDescription: '成员、通知和项目默认项。', settingsEyebrow: 'AgentHub 设置', settingsDescription: '工作区设置与头像 Profile、TokenDance ID 账号面板保持独立语义。', + settingsTabWorkspace: '工作区', + settingsTabDevice: '设备', + settingsTabIdentity: '身份', workspaceSettings: '工作区设置', workspaceSettingsDescription: '项目默认值、通知策略和 Mobile 工作区行为。', hubSessionSettingsDescription: '打开 Profile/账号面板,管理 TokenDance ID、Hub 会话、设备和主题。', diff --git a/app/mobile-rn/src/screens/WorkbenchSurfaceScreen.tsx b/app/mobile-rn/src/screens/WorkbenchSurfaceScreen.tsx index 0802f1e34..8adbd67d1 100644 --- a/app/mobile-rn/src/screens/WorkbenchSurfaceScreen.tsx +++ b/app/mobile-rn/src/screens/WorkbenchSurfaceScreen.tsx @@ -427,13 +427,13 @@ function getSurfaceConfig( title: t.settings, description: t.settingsDescription, panes: [ - { label: t.workspaceSettings, value: 'workspace' }, + { label: t.settingsTabWorkspace, value: 'workspace' }, { label: t.appearanceSettings, value: 'appearance' }, { label: t.notifications, value: 'notifications' }, - { label: t.nativeDeviceCapabilities, value: 'device' }, + { label: t.settingsTabDevice, value: 'device' }, { label: t.agentDefaults, value: 'agent-defaults' }, { label: t.localRuntimeState, value: 'runtime' }, - { label: t.identityAndSession, value: 'identity' }, + { label: t.settingsTabIdentity, value: 'identity' }, { label: t.approvalPolicy, value: 'approval' }, ], metrics: [ @@ -930,7 +930,7 @@ function SurfaceListRow({