-
Notifications
You must be signed in to change notification settings - Fork 190
revert(ui): 回退 AURA 界面大改到 beta-3 外观,保留功能与今日修复#656
Conversation
把 #650 引入的 AURA / 玻璃拟态界面大改回退到 beta-3 (v1.3.6-3) 的外观,同时保留 AURA 期间合入的功能与今日两处行为修复。 回退到 beta-3: - 外壳 FloatingShell、概览 / 历史页、卡片按钮 _atoms、设置弹窗、tokens.css / global.css - 移除随 AURA 加入的主题切换(themeMode.ts / ThemeSection.tsx) - 设置关闭按钮去掉圆形底(beta-3 本就透明) 保留:Apple 语音、手机远程录入、安卓、划词追问等功能,后端不动。 今日行为修复: - 风格页切换不再卡顿(prefs:changed 监听只订阅一次 + motion layoutDependency 限制 layout 重测) - ASR 本地引擎不再锁死,可在 provider 页直接切换(Apple 语音 macOS 直接可选) 为划词追问页补回其引用的 6 个 solid / radius token,避免回退后丢色。
|
Claude finished @appergb's task in 3m 47s —— View job PR #656 审核报告
1. 回退完整性 / AURA 残留结论:回退干净,无 AURA 组件类残留。
可接受的残留(tokens.css): 2. 保留功能页 token 兼容性✅ QaPanel(划词追问)6 个 compat token
--ol-accent-solid-bg: var(--ol-blue); --ol-accent-solid-ink: var(--ol-on-accent); --ol-danger-solid-bg: var(--ol-err); --ol-danger-solid-ink: #ffffff; --ol-control-radius: 8px; --ol-bubble-radius: var(--ol-r-lg); 通过
|
| 审核维度 | 结论 |
|---|---|
| AURA 回退完整性 | ✅ 完整,无 AURA 组件类残留 |
| QaPanel 6 个 compat token | ✅ 正确补回,深浅模式自动跟随 |
| Style.tsx 暗色模式 | |
| prefs:changed 修复 | ✅ 逻辑正确 |
| ASR 下拉解锁修复 | ✅ 逻辑正确 |
| 死 token 清理 | i️ 建议后续清理,不阻塞 |
| Android guard 移除 |
主要阻塞点:Style.tsx 的 inputStyle/textareaStyle 和编辑器 textarea 在暗色模式下的白色底;其余问题不影响浅色模式正常使用,可按优先级后续处理。
PR Reviewer Guide 🔍
(Review updated until commit 760f662)
Here are some key observations to aid the review process:
🎫 Ticket compliance analysis 🔶
650 - Partially compliant
Compliant requirements:
- (none directly – this PR reverts UI and does not modify Android runtime files)
Non-compliant requirements:
- Frontend adaptation: the revert removes
useMobileLayout,getPlatformCapabilitiescalls, and mobile‐specific navigation/markup, which may break Android frontend conditional rendering.
Requires further human verification:
- The Android frontend adaptation relies on
getPlatformCapabilitiesand mobile layout detection; the revert removes these inFloatingShell.tsxandOverview.tsx, so Android behavior must be tested on a real device.
Possible Android regression
The revert removes the getPlatformCapabilities check that previously prevented the provider setup prompt from appearing on Android. Without this guard, Android users will see the provider setup prompt, which is inappropriate for that platform. The PR claims to retain Android support, but this removal may break the expected behavior. A concrete scenario: an Android user installs the debug APK and immediately sees a provider setup overlay that cannot be dismissed properly because the Android code path expects no such prompt.
getPlatformCapabilities check that previously prevented the provider setup prompt from appearing on Android. Without this guard, Android users will see the provider setup prompt, which is inappropriate for that platform. The PR claims to retain Android support, but this removal may break the expected behavior. A concrete scenario: an Android user installs the debug APK and immediately sees a provider setup overlay that cannot be dismissed properly because the Android code path expects no such prompt.useEffect(() => { let cancelled = false; (async () => { const credentials = await getCredentials(); const promptDeferredValue = window.sessionStorage.getItem(PROVIDER_SETUP_PROMPT_DEFERRED_KEY); if (!cancelled && shouldShowProviderSetupPrompt(credentials, promptDeferredValue)) { setProviderPromptOpen(true); } })(); return () => { cancelled = true; }; }, []); useEffect(() => { const acknowledgedValue = window.localStorage.getItem(HOTKEY_MODE_MIGRATION_ACK_KEY); const deferredValue = window.sessionStorage.getItem(HOTKEY_MODE_MIGRATION_DEFERRED_KEY); if (shouldShowHotkeyModeMigrationPrompt(acknowledgedValue, deferredValue)) { setHotkeyModePromptOpen(true); } }, []);
Lost functionality – retranscribe and search
The revert removes the search bar (issue #612) and the "retranscribe" button (issue #613) from the history page. While this is part of the UI revert to beta‐3, the PR description says "保留功能" (retain features). These two features were added after beta‐3, so reverting them loses genuine user‐facing functionality. If the intent is to keep all non‐UI features, these should have been preserved.
// History.tsx — 接 Tauri 后端 list_history / delete_history_entry / clear_history。 // 真实数据来自 ~/Library/Application Support/OpenLess/history.json。 import { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Icon } from '../components/Icon'; import { detectOS } from '../components/WindowChrome'; import { formatComboLabel } from '../lib/hotkey'; import { clearHistory, deleteHistoryEntry, listHistory, readAudioRecording } from '../lib/ipc'; import type { DictationSession, PolishMode } from '../lib/types'; import { useHotkeySettings } from '../state/HotkeySettingsContext'; import { Btn, Card, PageHeader, Pill } from './_atoms'; function useFilters(): Array<{ id: 'all' | PolishMode; label: string }> { const { t } = useTranslation(); return [ { id: 'all', label: t('history.filterAll') }, { id: 'raw', label: t('style.modes.raw.name') }, { id: 'light', label: t('style.modes.light.name') }, { id: 'structured', label: t('style.modes.structured.name') }, { id: 'formal', label: t('style.modes.formal.name') }, ]; } function useModeLabel(): Record<PolishMode, string> { const { t } = useTranslation(); return { raw: t('style.modes.raw.name'), light: t('style.modes.light.name'), structured: t('style.modes.structured.name'), formal: t('style.modes.formal.name'), }; } export function History() { const { t } = useTranslation(); const os = detectOS(); const FILTERS = useFilters(); const MODE_LABEL = useModeLabel(); const [filter, setFilter] = useState<'all' | PolishMode>('all'); const [items, setItems] = useState<DictationSession[]>([]); const [selectedId, setSelectedId] = useState<string | null>(null); const [loading, setLoading] = useState(true); const [loadError, setLoadError] = useState<string | null>(null); const [actionError, setActionError] = useState<string | null>(null); const [justCopied, setJustCopied] = useState(false);
beta-3 的 Style.tsx 把输入/文本域背景写死 #fff,回退后在系统暗色模式下 会显示刺眼白底。改回 var(--ol-style-input-bg)(浅色 rgba(255,255,255,.86)、 暗色 rgba(255,255,255,.04)),随主题自动跟随。Claude 审核指出。
Persistent review updated to latest commit 760f662
Uh oh!
There was an error while loading. Please reload this page.
User description
背景
#650(android-beta-to-beta 合并)把 AURA / 玻璃拟态界面大改带进了 beta,整体外观从 beta-3(
v1.3.6-3)的 PageHeader 简洁风变成了 AURA 卡片风。本 PR 把外部界面回退到 beta-3 外观,同时保留 AURA 期间合入的功能与后端,并带上今天的两处行为修复。改了什么
回退到 beta-3 外观(前端):
FloatingShell(外壳/侧栏/磨砂框,aura 标记 45→1)pages/Overview(回 PageHeader,移除「AURA OVERVIEW」卡片大改)、pages/Historypages/_atoms(Card / Btn / PageHeader / Collapsible)、components/SettingsModal、ui/Row、ui/SelectLitestyles/tokens.css、styles/global.csslib/themeMode.ts、pages/settings/ThemeSection.tsx保留(不回退): Apple 语音、手机远程录入、安卓、划词追问(QaPanel)等功能;
src-tauri/后端完全不动;WindowChrome(OS 类型含 android)保持当前。今日两处行为修复(重新打上):
prefs:changed监听只订阅一次(避免每次点击重复 unlisten/listen 两次 IPC)+ motionlayoutDependency限制只在包列表增减时重测 layout。disabled,可在本页直接切到其它供应商(切走自动停用本地引擎);Apple 语音在 macOS 直接作为常规可选项。兼容性补丁: 为划词追问页补回它引用的 6 个
solid/radiustoken(--ol-accent-solid-bg/-ink、--ol-danger-solid-bg/-ink、--ol-control-radius、--ol-bubble-radius),用var()间接引用基础色,深浅模式自动跟随,避免回退后该页丢色。不在本 PR 范围
bump-version.sh)。src-tauri/未改。测试
tsc --noEmit通过vite build通过(552 modules)build-mac.sh本地出包(arm64,ad-hoc 签名,codesign 校验通过),已安装试运行Overview/History/_atoms与 beta-3 完全一致(0 diff);FloatingShellaura=1;Overview无「AURA OVERVIEW」PR Type
Enhancement, Bug fix
Description
Revert AURA UI overhaul to beta-3 appearance
Keep AURA-introduced features (Apple speech, remote input, Android, QaPanel)
Fix style page switching stutter (prefs:changed subscription, motion layoutDependency)
Fix ASR local engine lock, enable direct provider switching
Diagram Walkthrough
File Walkthrough
6 files
Revert FloatingShell to beta-3 sidebar layoutRevert Overview to beta-3 two-column heroFix style page stutter and revert tokensRevert History to beta-3 layout, remove search and retranscribeRevert atoms (Card, Pill, Btn, PageHeader) to beta-3 tokensUnlock ASR dropdown, remove 'taken over' notice1 files
Revert SettingsModal rail, remove mobile layout, add external links12 files
Revert border-radius and token usageRevert border-radius and token usageRevert border-radius and color tokensRevert color tokens for marketplace sectionRevert border-radius and color tokensRevert border-radius and color tokensRevert border-radius and color tokensRevert styling tokensRevert border-radius and color tokensRevert styling tokensRevert styling tokensRevert styling tokens25 files