fix: v1.3.1-4 Windows 字号/顶栏色/玻璃 + Vocab 大圈 + polish 回滚#422
Conversation
5 个用户反馈一次性收: 1. Windows 默认字号放大 fontScale.ts readFontScale() 检测 navigator UA 含 Windows 时新装默认 返回 'large'(1.1x zoom),已存 localStorage 偏好的用户不受影响。 2. Windows 顶栏白色,与左侧 sidebar 视觉统一 lib.rs 重新引入 apply_windows_caption_color,用 DWM API DwmSetWindowAttribute DWMWA_CAPTION_COLOR=35 (Win11 22H2+) 把原生标题栏底色刷成 0x00FFFFFF。 pre-22H2 Win 静默失败仅 warn。 3. 全平台玻璃效果统一 & 略浊 WindowChrome.tsx 撤销 PR #419 留下的"Windows 100% opaque background + 去 backdropFilter"分支(那是 Win sidebar 完全无玻璃感的根因)。两个 平台改用同一份半透明 background(alpha 从 0.92 降到 0.78)+ blur var(--ol-glass-blur-strong) saturate(190%),让 sidebar 透过磨砂底板。 Windows 配合 apply_mica + tauri.conf transparent:true 透出 Mica。 4. Vocab 词条大圈再次尝试根治 global.css button reset 在 appearance:none 基础上再加 outline:none / min-width:0 / min-height:0 / box-sizing:border-box。Windows Chromium user-agent style 包含上述四项默认值,单一个 appearance:none 不够覆盖 全部。键盘焦点指示走 .ol-focus-ring + :focus-visible box-shadow, 不被 outline:0 影响。 5. polish.rs ROLE_BLOCK 撤回 b2325a2 回滚 用户确认 13:08 之前最近的 polish.rs commit(20756f7e,含 7e60bdb refine)表现正常。我之前 b2325a2 误以为 7e60bdb 是问题源把 ROLE_BLOCK 改回 v1.2.24-9-beta 状态,反而离用户认可的版本更远。改回 7e60bdb 8-条 ROLE_BLOCK 状态。
旧版(7e60bdb5 引入):"意图难以判断 → 只做句子层面整理(标点、断句、 口癖去除)"——这条 safety net 在 Structured 模式下会让 LLM 退回 Light/Raw 行为,导致"清晰结构"模式对意图不明的输入不输出双层 list。 新版(用户拍板):意图难判时**强制结构化整理**,输出必须与当前 mode 的 结构要求一致,同时贴近原意不扩写。这样: - Structured 模式:意图模糊也强制归类成双层 list - Light / Raw 模式:仍按各自 task block 走(不会强制结构化,因为它们的 task block 明确写了"保留原句顺序"等约束) ROLE_BLOCK 其他 7 条规则不动。
PR Reviewer Guide 🔍(Review updated until commit 76a4a41)Here are some key observations to aid the review process:
|
PR #422 合并后 bump。本版本相对 v1.3.1-3-beta 累积修复: - Windows 默认字号 'large'(fontScale.ts UA 检测) - Windows 原生标题栏底色刷成白色,与 sidebar 视觉统一(DWM CAPTION_COLOR) - 全平台玻璃统一:WindowChrome 撤销 PR #419 留下的"Windows 100% opaque + 无 backdropFilter"分支,两平台用同一半透明 background + blur saturate(190%), alpha 0.92 → 0.78 让玻璃感更明显但不过透 - Vocab 词条大圈再次根治:global.css button reset 补加 outline:none / min-width:0 / min-height:0 / box-sizing:border-box - polish ROLE_BLOCK 撤销 b2325a2 回滚,恢复 7e60bdb 8-条规则状态 - polish ROLE_BLOCK 「意图难判」规则改为强制结构化(用户拍板的新版)
|
Persistent review updated to latest commit 76a4a41 |
review 阶段标的 4 个 High 全部处理,加上用户在 v1.3.1-4 装机后新报的 2 个 Windows 视觉问题,本 commit 一次性收: [review-capsule High] - Capsule.tsx 抽 EXIT_ANIM_MS / INITIAL_VISIBLE_STATE 两个 const,去掉 `240` magic number + `isTauri ? 'idle' : 'recording'` 字面量重复 - 修正退出动画调度的 race 描述注释(cleanup clearTimeout 阻止 fire, 不是"定时器仍会触发") [review-qwen3 High] - LocalAsr.tsx Windows Qwen3 disabled wrapper 加 `inert` HTML5 属性, 让键盘 Tab 也跳过 disabled 区域(仅靠 pointerEvents:none 不挡键盘 + aria-disabled 不传给后代)。两个 wrapper 都加。@ts-expect-error 注释解释为何这里需要绕过 TS lib.dom 旧版未收录 inert 属性。 [review-icons 2 High] - Icon.tsx `overview`: 在三个 dashboard tile 顶部加 sparkline 数据线 区分 layout icon(之前几乎一样,14px nav 视觉无法分辨) - Icon.tsx `selectionAsk`: 气泡尾巴 y=24 → y≈23,避免 strokeLinecap round + strokeWidth 1.5 出 viewBox 底边被裁 [用户新 surface — Vocab 词条大椭圆] - Vocab.tsx VocabChip 加 `alignSelf: 'flex-start'`。真根因(之前 PR Open-Less#422 误判为 button user-agent appearance):父 flex 容器 minHeight: 80 让 flex item 默认 align-self: stretch 把单个 chip 拉伸到 80px 高, borderRadius:999 渲染成超大椭圆。alignSelf:flex-start 阻止拉伸。 [用户新 surface — 顶栏 vs 玻璃色差] - lib.rs DWMWA_CAPTION_COLOR 从纯白 0xFFFFFF → 0x00F7F5F5 (rgb 245,245,247) 跟 WindowChrome glass linear-gradient 起始色一致 - WindowChrome.tsx glass alpha 0.78 → 0.92(PR Open-Less#422 为加强玻璃感降的, 现在为压缩色差升回去,玻璃感由 backdrop-filter blur+saturate 提供) 后续:用户希望调研"完全取消 Windows 原生顶栏(像微信那样自绘)"—— 属于 v1.3.1-6 级别 large rewrite,单独追。
User description
v1.3.1-3 用户验证后 surface 5 件事,一次性收。合并后 bump 1.3.1-4 + 发新 Beta tag。
5 件事
1. Windows 默认字号放大
fontScale.ts检测 navigator UA 含 Windows 时新装默认'large'(1.1x zoom)。已存 localStorage 偏好的老用户不受影响。2. Windows 顶栏白色,与 sidebar 统一
lib.rs重新引入apply_windows_caption_color,DWMDWMWA_CAPTION_COLOR=35(Win11 22H2+) 把原生标题栏底色刷成0x00FFFFFF。pre-22H2 Win 静默 warn 不阻塞。3. 全平台玻璃统一 & 玻璃感更明显
关键发现:PR #419 留下了一个"Windows 100% opaque background + 去 backdropFilter"分支——这就是 Windows sidebar 完全无玻璃感的根因。
WindowChrome.tsx两平台改用同一份半透明 background(alpha 0.92 → 0.78 略浊但不过透)+blur(var(--ol-glass-blur-strong)) saturate(190%)。Windows 配合apply_mica透 Mica。4. Vocab 词条大圈再次尝试根治
PR #421 加的
appearance: none不够。global.cssbutton reset 补加outline:none / min-width:0 / min-height:0 / box-sizing:border-box——Windows Chromium UA style 给 button 多种默认值叠加才造成大圈。键盘焦点走.ol-focus-ring+:focus-visible box-shadow不被outline:0影响。5. polish ROLE_BLOCK 撤回 b2325a2 回滚
用户确认 13:08 之前最近的 polish.rs commit (20756f7,含 7e60bdb refine) 表现正常。
b2325a27把 ROLE_BLOCK 改回 v1.2.24-9-beta 状态反而离用户认可的版本更远。改回 7e60bdb 的 8-条 ROLE_BLOCK 状态。Test plan
PR Type
Enhancement, Bug fix
Description
Set Windows default font scale to 'large' for better readability
Tint native Win11 title bar white to match sidebar
Unify glass background and backdrop-filter across macOS and Windows
Extend button reset to fully neutralize Chromium user-agent styles
Revert polish ROLE_BLOCK prompt to restore detailed guidance
Diagram Walkthrough
File Walkthrough
fontScale.ts
Windows default font scale to largeopenless-all/app/src/lib/fontScale.ts
'large'by default on Windows using UA/platform detectionlib.rs
White native title bar on Windows 11openless-all/app/src-tauri/src/lib.rs
apply_windows_caption_colorto set native title bar white via DWMWindowChrome.tsx
Unify glass effect on macOS and Windowsopenless-all/app/src/components/WindowChrome.tsx
platforms
polish.rs
Restore detailed polish system promptopenless-all/app/src-tauri/src/polish.rs
ROLE_BLOCKprompt to a more detailed version with explicitrules
global.css
Fully reset Windows button user-agent stylesopenless-all/app/src/styles/global.css
outline: none,min-width: 0,min-height: 0,box-sizing: border-boxappearance: noneand-webkit-appearance: none.ol-focus-ringand:focus-visible