fix(macos): 1.2.11 窗口/胶囊 UI 对齐 + tab cross-fade + polish 纠错#198
Conversation
红绿灯 - trafficLightPosition x=14 y=20(Apple Notes / Safari 视觉), MAC_TITLEBAR_HEIGHT 30→28,paddingTop 30→28,让红绿灯在 titlebar 内对称居中。 胶囊几何回退到 1.2.11 - macOS / Linux 上 capsule_window_bounds 固定 220×110,capsule_visual_height 改回 96,emit_capsule 不再随 translation_active 改 size + 位置。修两个 回归:(a) 录音胶囊 pill 左右被裁;(b) 按 Shift 后窗口高度从 42→110 导致整体下移。 - 单元测试断言同步更新。 emit_capsule macOS show 路径回退到 1.2.11 - show_capsule_window_no_activate macOS 实现删除(合进 cfg(not(windows)) stub 返回 false),fallback 走 window.show() + restore_main_window_key_if_active。 orderFrontRegardless 路径在 webview 未完整初始化时偶发不可见。 Translation 设置页 + i18n 回退到 1.2.12 - 撤回 d7d274f 整页重排,回到 1.2.11/1.2.12 的简洁布局。 tab 切换 cross-fade with blur - FloatingShell.tsx 加 displayTab + tabPhase;点新 tab 触发旧页 ol-page-fadeout(opacity 1→0、blur 0→8px、180ms),结束后挂载 新页走现有 ol-page-slide。修 Windows 徽章 bottom 公式:保留 hostMetrics 路径(pill 不在 win host 中线,calc(50%) 不对)。 Capsule.tsx 动画化简 - 徽章/capsule-in 撤回 motion-soft / motion-spring 别名 + filter blur, 回到 1.2.11 的 ease-out / cubic-bezier。
补 COMMON_RULES 两条: - 规则 3 扩展:在保留原意和语气的前提下,按用户的整体意图把零碎口语 组织成协调、自然的书面表达。 - 规则 5(新增)自动纠错:明显的 ASR 同音 / 形近错字按上下文纠回正确字面, 覆盖"跟目录/根木鹿→根目录"、"代码厂→代码仓"、"编一编→编译"、 "的/得/地"、"做/作"等常见错别字。专有名词、人名、品牌名、不在常见 中文词典里的词原样保留,不强行改字;改动会引起含义变化的不改。 不动 ROLE_BLOCK / OUTPUT_BLOCK / 各 mode 任务段,保持"不要激进改写" 的边界(feedback memory)。translate / qa prompt 与本次诉求无关,未改。 加一个测试 common_rules_include_auto_correction_and_natural_organization 覆盖四个 mode,防止规则被回退或遗漏。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…w-ui # Conflicts: # openless-all/app/src-tauri/src/polish.rs
PR Reviewer Guide 🔍(Review updated until commit 0bf4f7e)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit d39072a |
PR Reviewer (PR Agent) 指出:getCapsuleHostMetrics(os, false) 把 translation 参数硬编码成 false,Windows 端 host 在翻译模式下应该从 84 长到 118,硬编码后徽章 bottom 用更短 host 量出来 → 跟 118pt 实际 窗口尺寸错位、徽章可能溢出或被裁。 修:把 useState<translation> 提到 hostMetrics 之前,调用改回 getCapsuleHostMetrics(os, translation)。macOS / Linux 不受影响 — capsuleLayout 在那两个分支已经忽略 translationActive 返回固定 42。
|
对 PR Agent 的两条 observations 处理如下: 1. Double chrome (Windows) — false positive 2. Stale metrics (Windows) — 已修
|
|
Persistent review updated to latest commit 0bf4f7e |
User description
Summary
平台核查
Rust cfg 块 100% 未动 Windows / Linux 的 cfg(target_os) 分支(git diff 自审)。
Test plan
PR Type
Enhancement, Bug fix, Tests
Description
Restore native macOS chrome and traffic lights
Revert capsule sizing and show behavior
Add cross-fade and shared motion tokens
Improve polish autocorrection and prompt wording
Refresh config assertions and UI tests
Diagram Walkthrough
File Walkthrough
4 files
Switch capsule show path to webview handleRestore main window focus via ns_windowRestore native macOS titlebar spacingFix capsule dimensions on macOS and Linux16 files
Add autocorrection and natural phrasing rulesAdopt shared motion for update progressTune capsule motion and badge anchoringAdd tab cross-fade and simplify sidebarSmooth permission button transitionsBlur modals and refine modal animationsStandardize switch thumb spring motionPolish history filter and row transitionsRemove hotkey badge and soften chartRefine QA loading and status motionUpdate history toggle spring timingRefine settings controls and togglesSmooth master and variant toggle statesAnimate vocab chips with blur transitionsUnify shared button transition timingsAdd window enter keyframes2 files
Introduce shared motion and blur tokensEnable native chrome and traffic lights1 files
Assert updated window and motion config