Skip to content

fix: v1.3.1-4 Windows 字号/顶栏色/玻璃 + Vocab 大圈 + polish 回滚#422

Merged
appergb merged 2 commits into
betafrom
fix/v1.3.1-4-multi-tweaks
May 12, 2026
Merged

fix: v1.3.1-4 Windows 字号/顶栏色/玻璃 + Vocab 大圈 + polish 回滚#422
appergb merged 2 commits into
betafrom
fix/v1.3.1-4-multi-tweaks

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 12, 2026

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,DWM DWMWA_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.css button 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

  • Windows 全新安装:默认字号 large(明显比 macOS medium 大);老安装升级保留之前偏好
  • Windows: 原生标题栏底色白色,与 sidebar 颜色统一
  • Windows: sidebar 能透出 Mica 磨砂玻璃感
  • macOS: sidebar 玻璃感比 v1.3.1-3 略浊,对比 background 更明显
  • Windows: Settings → 词汇表 词条无大灰圈
  • macOS / Windows: "清晰结构"模式对结构化输入输出双层 list

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

flowchart LR
  A["fontScale.ts: default 'large' on Windows"]
  B["lib.rs: white caption color"]
  C["WindowChrome.tsx: unified glass background"]
  D["global.css: extended button reset"]
  E["polish.rs: revert prompt simplification"]
  A -- "larger text" --> F["Improved readability"]
  B -- "DWM caption color" --> G["Visual consistency"]
  C -- "shared translucent bg + blur" --> G
  D -- "min-width/height, outline" --> H["Removed gray button circle"]
  E -- "restored detailed instructions" --> I["Structured polish output"]
Loading

File Walkthrough

Relevant files
Enhancement
fontScale.ts
Windows default font scale to large                                           

openless-all/app/src/lib/fontScale.ts

  • Return 'large' by default on Windows using UA/platform detection
  • Preserve existing user preference from localStorage
+5/-0     
lib.rs
White native title bar on Windows 11                                         

openless-all/app/src-tauri/src/lib.rs

  • Add apply_windows_caption_color to set native title bar white via DWM
  • Update comment explaining mica + transparent background interaction
+41/-4   
WindowChrome.tsx
Unify glass effect on macOS and Windows                                   

openless-all/app/src/components/WindowChrome.tsx

  • Remove platform-specific opaque background for Windows
  • Apply same semi-transparent glass gradient and backdrop-filter to both
    platforms
  • Lower background alpha from 0.92 to 0.78 for more visible glass effect
+11/-9   
polish.rs
Restore detailed polish system prompt                                       

openless-all/app/src-tauri/src/polish.rs

  • Revert ROLE_BLOCK prompt to a more detailed version with explicit
    rules
  • Add instructions to preserve original wording and avoid rewriting
  • Default to structural organization when user intent is unclear
+9/-4     
Bug fix
global.css
Fully reset Windows button user-agent styles                         

openless-all/app/src/styles/global.css

  • Extend button reset with outline: none, min-width: 0, min-height: 0,
    box-sizing: border-box
  • Keep existing appearance: none and -webkit-appearance: none
  • Focus ring preserved via .ol-focus-ring and :focus-visible
+9/-4     

baiqing added 2 commits May 12, 2026 16:39
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 条规则不动。
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

PR Reviewer Guide 🔍

(Review updated until commit 76a4a41)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

419 - Partially compliant

Compliant requirements:

  • None visible in this diff.

Non-compliant requirements:

  • SelectLite migration for settings, local ASR, translation, and language sections.
  • Duplicate interface-language entry removal.
  • Windows capsule size reduction.
  • Related test updates.

Requires further human verification:

  • Windows/macOS visual parity checks.

421 - Partially compliant

Compliant requirements:

  • Fix the Windows Vocab button circle caused by native button styling.
  • Simplify the polish prompt wording.

Non-compliant requirements:

  • Version bump / release tagging.

Requires further human verification:

  • Native Windows chrome behavior on Windows 11 and pre-22H2.
  • Visual confirmation that the Vocab button styling is unchanged elsewhere.
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Focus Loss

Removing outline globally from every button means any button that does not also get the new custom focus styles will have no visible keyboard focus indicator. A missed trigger or future button added without .ol-focus-ring will become inaccessible to keyboard users.

outline: none;
min-width: 0;
min-height: 0;
box-sizing: border-box;
Prompt Drift

If ROLE_BLOCK is still shared by all polish modes, this new fallback can push ambiguous transcripts toward forced structural output instead of preserving the original sentence flow. That risks reintroducing the over-structuring regression this rollback is trying to avoid.

- 当用户意图难以判断或无法确认时,\u{4E0D}要强行推断,改为只做结构和句子化的强制整理,直接整理成结构化输出,确保实际输出与用户想要的结构一致,并尽量贴近用户的原意。\n\
- \u{4E0D}引用任何会话历史、上一段语音、项目上下文、外部知识或模型记忆;每次请求都是独立任务。";

@appergb appergb merged commit ec55d9e into beta May 12, 2026
4 checks passed
@appergb appergb deleted the fix/v1.3.1-4-multi-tweaks branch May 12, 2026 08:59
appergb pushed a commit that referenced this pull request May 12, 2026
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 「意图难判」规则改为强制结构化(用户拍板的新版)
@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit 76a4a41

pull Bot pushed a commit to yimmy23/openless that referenced this pull request May 12, 2026
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,单独追。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant