Commit Graph
944 Commits
Author SHA1 Message Date
TRIP 32d7c22a8c Merge pull request #519 from Open-Less/feat/frosted-glass-overlays
feat(ui): 划词追问框与语音胶囊磨砂玻璃质感
2026-05-21 23:54:01 +08:00
baiqing a88860cd90 feat(ui): 给划词追问框与语音胶囊加磨砂玻璃质感
webview 无法模糊透明窗口背后的桌面(Tauri 上游限制 #2827/#10064/#6876),原 backdrop-filter 在 qa / capsule 透明浮窗里是死代码。改用纯静态 CSS 的「假毛玻璃」:半透明白底 + 分形噪点颗粒 + 内描边高光 + 柔和阴影,三平台像素一致、零运行时开销。

- tokens.css: 新增 --ol-frost-grain(不透明灰度分形噪点 data URI)
- global.css: 新增 .ol-frost 类,::before 叠噪点颗粒层
- QaPanel / Capsule: 外壳套用 .ol-frost,移除这两个面上死的 backdrop-filter
2026-05-21 23:26:13 +08:00
Chris233 4bfbfcf047 Merge pull request #518 from H-Chris233/fix/issue-517-linux-window-controls
Fix Linux main window controls
2026-05-21 19:51:56 +08:00
H-Chris233 37afec5ee2 Fix Linux main window controls 2026-05-21 19:30:02 +08:00
Chris233 ebc9d47717 Merge pull request #514 from H-Chris233/issue-491-ime-clipboard-followup
Shorten Windows IME submit timeout
2026-05-21 09:56:02 +08:00
H-Chris233 e939e75a19 Shorten Windows IME submit timeout 2026-05-21 09:52:54 +08:00
Chris233 d71f73193a Merge pull request #513 from H-Chris233/issue-491-streaming-sendinput-pacing
Pace Windows streaming SendInput
2026-05-21 09:15:08 +08:00
H-Chris233 2876a2ea14 Pace Windows streaming SendInput 2026-05-21 08:55:22 +08:00
Chris233 62eb78e4a0 Merge pull request #512 from H-Chris233/issue-511-foundry-whisper-models
Add larger Foundry Whisper models
2026-05-21 08:43:35 +08:00
H-Chris233 c2bce10b6c Add larger Foundry Whisper models 2026-05-21 08:25:36 +08:00
Chris233 482984a8f8 Merge pull request #510 from H-Chris233/issue-507-zhipu-asr-url-error-ui
Fix Zhipu ASR endpoint handling
2026-05-20 21:09:21 +08:00
H-Chris233 7b39491a17 Fix Zhipu ASR endpoint handling 2026-05-20 20:55:08 +08:00
baiqingandClaude Opus 4.6 c729fc59e9 fix(ui+network): 更新/登录/网络检测/市场加载四项修复
1. 更新检查:超时从 8s 提至 15s,error 态展示具体错误原因 + 重试按钮
2. GitHub 登录:device flow 两个 HTTP 请求加 15s timeout,防网络差时永远卡住
3. 网络连通性:新增 check_network 命令(HEAD apic.openless.top + github.com),
   PermissionsSection 从硬编码"可用"改为真实探测 + 30s 轮询 + 离线重试
4. Marketplace:加载失败卡片增加重试按钮
5. i18n:五语言新增 networkOffline / settings.about.retryBtn

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 20:49:47 +08:00
Chris233 e889858759 Merge pull request #509 from H-Chris233/issue-508-zhipu-asr-chunking
Fix Zhipu batch ASR chunking
2026-05-20 18:55:28 +08:00
H-Chris233 06d340061c Fix zhipu batch ASR chunking 2026-05-20 18:40:52 +08:00
baiqing ce6818cc6f chore(release): bump version to 1.3.4-11 (Beta) — UI 多语言精简 + SavedToast 统一定位 + Windows 听写后 SendInput 降压
合并 #503(fix(windows): reduce SendInput pressure after dictation):
听写结束后降低 SendInput 调用压力,优化 coordinator/dictation/insertion 路径。

合并 #505(fix(ui): 统一 SavedToast 弹框位置与进出方向):
SavedToast 默认停靠右上角,新增 slideFrom 属性支持 right/top 两种进出方向,
SettingsModal 用 slideFrom="top" + absolute 锚定内容区。

合并 #506(refactor(ui): 精简多语言文案 + 设置/风格/市场界面与图标重构):
精简 en/ja/ko/zh-CN/zh-TW 过长功能描述文案,
风格包卡片与编辑器抽屉改用 framer-motion 进出动效,
Settings/Marketplace/shared/Icon 界面重构。

本次只动版本号,逻辑改动已在 #503 #505 #506 落盘。
2026-05-20 18:23:11 +08:00
Chris233 e2d915e5bd Merge pull request #503 from H-Chris233/issue-491-windows-sendinput-pacing
fix(windows): reduce SendInput pressure after dictation
2026-05-20 16:39:30 +08:00
TRIP 370eaa858e Merge pull request #506 from Open-Less/pr2/ui-i18n-refresh
refactor(ui): 精简多语言文案 + 设置/风格/市场界面与图标重构
2026-05-20 16:31:31 +08:00
TRIP e8f8ac0f59 Merge pull request #505 from Open-Less/fix/saved-toast-position
fix(ui): 统一 SavedToast 弹框位置与进出方向
2026-05-20 16:29:09 +08:00
H-Chris233 96a0ee4d3a chore(windows): clarify copy-only fallback status 2026-05-20 16:27:11 +08:00
baiqing fbeddc5a0a refactor(ui): 精简多语言文案 + 设置/风格/市场界面与图标重构
- i18n: 精简 en/ja/ko/zh-CN/zh-TW 过长的功能描述文案
- Style: 风格包卡片与编辑器抽屉改用 framer-motion 进出动效
- Settings / Marketplace / settings/shared / Icon: 界面重构
- tokens.css 与依赖随之微调
2026-05-20 16:19:27 +08:00
H-Chris233 358c8d41e2 fix(windows): pace Unicode insertion fallback 2026-05-20 16:00:17 +08:00
baiqing 1e4f6a5bed fix(ui): 统一 SavedToast 弹框位置与进出方向
- 默认停靠右上角(fixed top:20 right:28),与页头「风格市场/刷新/导入ZIP」
  按钮同区;淡蓝 pill、0.8s 自动收回
- 新增 slideFrom 属性:'right'(默认,屏幕右侧进出)/ 'top'(上方进出),
  始终"从哪来回哪去"
- SettingsModal 用 slideFrom="top" + absolute 锚内容区,借 overflow:hidden
  裁边实现"从屏幕外上方进出"
- Style 页移除 bottom-right 的 offsetStyle 覆盖,回归统一默认
2026-05-20 14:47:17 +08:00
H-Chris233 5bf197c359 Revert "fix(windows): add Unicode fallback mode"
This reverts commit db6c4bdbda.
2026-05-20 13:03:43 +08:00
H-Chris233 db6c4bdbda fix(windows): add Unicode fallback mode 2026-05-20 12:01:03 +08:00
H-Chris233 6ae3bfc452 fix(windows): reduce SendInput pressure during insert 2026-05-20 10:43:29 +08:00
baiqing b5dddb496a chore(release): bump version to 1.3.4-10 (Beta) — Windows 流式插入 12ms flush
合并 #502(fix(windows): buffer streaming SendInput events):
SSE delta 在 12ms 时间窗内合并后再调用 type_unicode_chunk,
显著降低 Windows 流式输入路径上的 SendInput 调用频率与 CPU 占用。
mpsc 由 tokio unbounded 切到 std sync::mpsc,typer 任务里
用 recv_timeout 实现 flush 窗口,断开/失败后仍能 drain 完剩余 delta,
并把缓冲写入逻辑抽到 flush_streaming_insert_buffer 单元函数。
本次只动版本号,逻辑改动已在 #502 落盘。
2026-05-19 21:28:15 +08:00
Chris233 2996913a3c Merge pull request #502 from H-Chris233/issue-491-windows-sendinput-pacing
fix(windows): buffer streaming SendInput events
2026-05-19 21:15:17 +08:00
H-Chris233 52ea7f5983 fix(windows): buffer streaming SendInput events 2026-05-19 20:53:23 +08:00
baiqing fbcf4993a1 chore(release): bump version to 1.3.4-9 (Beta) — Windows capsule/QA Acrylic 回退
回退 #487 引入的 Windows capsule/QA 浮窗 apply_acrylic 调用 (PR #496),
解决浅色背景下 220×84 胶囊出现深色矩形的视觉 bug。
本次只动版本号,不携带其他逻辑改动。
2026-05-19 14:52:49 +08:00
浩彬(^-^)andCursor 94fe8c7850 Fix/revert windows capsule qa acrylic (#496)
* chore(ci): nudge Actions to index release workflow on fork

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ci): nudge Actions to index release workflow on fork

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ci): nudge Actions to index release workflow on fork

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ci): nudge Actions to index release workflow on fork

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: add CapsWriter to .gitignore for local voice inference reference

* fix(windows): revert capsule/qa Acrylic to remove dark host rect

Reverts the apply_acrylic blocks from #487. Full-window Acrylic
tinted the 220×84 capsule hitbox, causing a visible dark rectangle
around the pill on light backgrounds.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 14:31:06 +08:00
baiqing bd5dcb8a57 chore(release): bump version to 1.3.4-8 (Beta) + fcitx5 路径抓取/安装前缀修复
v1.3.4-7 显示:fcitx5 包名替换后构建本身已成功([100%] Built target openless),
但下一步立刻 exit 1。根因有两个:

1) cmake -LA 抓不到值
   fcitx5 5.0.14 把 FCITX_INSTALL_ADDONDIR / FCITX_INSTALL_PKGDATADIR
   设为普通变量而非 CACHE,cmake -LA 看不到 → grep 退码 1 → set -e -o pipefail
   触发整步退出。
   改从 configure 阶段 message(STATUS ...) 的输出抓(CMakeLists.txt 已经打印)。

2) CMAKE_INSTALL_PREFIX 默认 /usr/local 路径错
   fcitx5 在 Ubuntu 上运行时只扫 /usr/lib/<arch>/fcitx5/,默认 prefix=/usr/local
   会让 .deb 把插件安到 /usr/local/lib/fcitx5/,运行时找不到。
   显式 -DCMAKE_INSTALL_PREFIX=/usr 强制 Debian 系标准路径。
   历史 v1.3.4-3 其实也是这条 bug 路径,只是 cmake -LA 那行先挂掉没人意识到。

提取失败时打印 cmake-configure.log 末 50 行作为诊断。
2026-05-18 21:34:38 +08:00
baiqing 9bae92b4df chore(release): bump version to 1.3.4-7 (Beta) + Linux fcitx5 包名拆分修复
v1.3.4-6 加的 apt-cache search 诊断揭示真因:Ubuntu 22.04 universe 在
v1.3.4-3 (Apr 2026) 之后把 fcitx5-dev 这个 meta 包移除了,源里只剩拆分后的
libfcitx5{core,utils,config}-dev 等子包。这也解释了 -4/-5/-6 为何连挂同样错误
"Unable to locate package fcitx5-dev":根本就找不到这个 umbrella 包了。

CMakeLists.txt 实际只 find_package(Fcitx5Core / Fcitx5Utils / Fcitx5Module),
对应:
  libfcitx5core-dev
  libfcitx5utils-dev
  fcitx5-modules-dev
另外 fcitx5 CMake config 文件依赖 KDE 的 extra-cmake-modules (ECM),
和 libfcitx5config-dev 作为传递依赖一起补上。

诊断块保留(apt-cache search / os-release / sources.list.d),未来若再变包名
能立刻拿到证据。
2026-05-18 21:22:43 +08:00
baiqing 1960e0d602 chore(release): bump version to 1.3.4-6 (Beta) + 修 Linux CI fcitx5-dev 安装
v1.3.4-4 / -5 的 Linux 构建在 "Build fcitx5 plugin" 步骤连挂两次,
错误一致:"E: Unable to locate package fcitx5-dev"。同一 job 前面的
"Install Linux bundle deps" 步骤明明已经 apt-get update + 装好了一堆
universe 包,到 fcitx5 这步突然找不到 —— 表象与 GitHub Actions
ubuntu-22.04 runner 镜像弃用过渡期里 apt 元数据漂移的现象一致。

release-tauri.yml "Build fcitx5 plugin" 步骤增加三层防御:
  1) sudo add-apt-repository -y universe(已启用则 no-op)
  2) 本步骤内重新 sudo apt-get update,独立于上游 step 缓存
  3) 安装失败时打印 apt-cache policy / search / os-release / sources.list.d
     便于以后排查

同 commit 同时 bump 五处版本到 1.3.4-6 重发,让 PR #487/#488/#489
三个 Windows P0 修复带上 Linux 包一起进 Beta 通道。
2026-05-18 20:56:58 +08:00
baiqing 801bc0089b chore(release): bump version to 1.3.4-5 (Beta) — Windows P0 三连修
包含 PR #487 / #488 / #489 三个修复,供 Windows 实机验证:

- #489 快捷键二次按键失效(toggle/stop 失灵,只能 ESC)
  → coordinator.rs hotkey_bridge_loop 改 block_on 顺序 await
- #487 capsule/qa 透明遮罩看不清
  → lib.rs Windows 下追加 apply_acrylic 兜底
- #488 autostart catch fall-through 复活主窗口(#468 残留)
  → App.tsx catch 加 return + 改善 warn 诊断
2026-05-18 20:23:18 +08:00
TRIPandbaiqing a1d9549db2 fix(startup): autostart catch 块缺 return 导致复活主窗口 (#468) (#488)
* fix(startup): autostart catch 块缺 return 导致复活主窗口 (#468)

PR #474 引入的"前端兜底"useEffect 在 webview ready 后读
prefs.startMinimized,true 则跳过 currentWindow.show()。但 catch 块只
console.warn 没有 return,控制流继续走到 show()——等于"prefs 读失败 = 强 show"。
autostart 早期 IPC 抖动时 getSettings() 偶发失败,旧逻辑让用户明明开了
静默启动仍把主窗口弹出来。

修复: catch 块加 return,安全侧默认 = 当作 startMinimized=true 保持隐藏。
宁可让用户从 tray 手动唤起,也不要在 autostart 抖动时强 show 一个白色
/ 透明主窗口。

LSUIElement 不在本 PR 范围: 那是全局 macOS UX 决策,会影响 Finder
双击 / Spotlight / Launchpad 启动场景,应单独 PR + 单独评审。
正确做法是 Rust 端动态切 activationPolicy 而非 plist 静态写死。

Refs #468

* docs(startup): clarify catch rationale + improve warn diagnostics

Both local review and PR-Agent bot flagged the "fallback when settings
read fails" semantic reversal. Re-analysis confirms the change is
correct, but the rationale needs to be explicit in the code:

- Rust `get_settings` signature is `pub fn -> UserPreferences` (not
  Result), so this catch is unreachable from a normal first-launch
  scenario (returns defaults). Only Tauri IPC infrastructure failures
  (e.g. __TAURI_INTERNALS__ not ready during autostart early-mount)
  reach this branch.
- Tray is registered by Rust setup() before webview ready, so it remains
  the universal fallback entry point — no "user locked out" risk.
- Improved console.warn to include err.message for diagnostics, since
  raw err objects serialize as [object Object] in Tauri devtools.

No behavior change; comment + log improvement only.

Refs review of #488

---------

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-18 19:00:28 +08:00
TRIPandbaiqing 6e55e3059b fix(windows): capsule/qa 透明窗口 Acrylic 兜底 (#487)
* fix(windows): capsule/qa 透明窗口 acrylic 兜底 + CSS 可读性兜底

根因: tauri.conf.json 三个窗口都 transparent: true,但 lib.rs 只对 main
窗口调用 apply_mica。capsule / qa 在 Windows 上是裸 transparent,
Webview2 的 backdrop-filter 只能模糊页面内部 DOM 不能模糊 OS 桌面,
导致用户看到的胶囊 / QA 浮窗几乎完全透出桌面壁纸。

macOS 上 NSVisualEffectView (HudWindow vibrancy) 直接由系统合成器
混合桌面,所以 macOS 不需要额外处理。

修复:
1. lib.rs 在 setup 时对 capsule / qa webview 调用 apply_acrylic(
   color=(30,32,38,140)) — 选 Acrylic 而非 Mica 因为 Acrylic 支持
   Win10,更适合小浮窗。失败仅 log::warn 不 panic。
2. global.css 末尾追加 @supports not (backdrop-filter) 和
   @media (prefers-reduced-transparency: reduce) 兜底,给 html/body
   设实色背景。组件层 inline style 无法被覆盖,这只是二级防护。

Note: Capsule.tsx 和 FloatingShell.tsx 的 inline alpha 保留不动;
Acrylic 兜底通常足够。如果 Win10 实测仍偏透(Mica 不支持 Win10),
后续 PR 可考虑给 main 也加 Acrylic 作为 Mica fallback。

* style(windows): drop global html/body fallback rules from acrylic PR

Local code review flagged that `html, body { background: ... }` applies
to ALL windows including `main`, which would clobber the macOS
NSVisualEffectView vibrancy in `prefers-reduced-transparency: reduce`
mode.

Re-analysis confirms both rules are speculative:
- @supports never fires on modern Webview2 / WKWebView / Chromium
  (all support backdrop-filter)
- prefers-reduced-transparency triggers OS-level vibrancy neutralization
  on macOS already, but the CSS rule would still wrongly land on main

Acrylic in lib.rs is the canonical fix for the user-reported P0
(capsule/qa 透明遮罩看不清). The CSS layer is dropped to keep the PR
scoped to a single concern and avoid the cross-window collateral.

Refs review of #487

---------

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-18 18:57:43 +08:00
TRIPandbaiqing f30a787227 fix(windows): hotkey toggle 二次按键失效 - 串行化 Pressed/Released edge (#489)
根因: hotkey_bridge_loop 和 combo_hotkey_bridge_loop 把每条 Pressed/Released
边沿独立 async_runtime::spawn 成两个 task,被 tokio work-stealing 调度器
并行执行。Windows WH_KEYBOARD_LL 边沿间隔微秒级,Released task 经常先
swap(true→false),导致下一次 Pressed 看到 was_held=true → toggle 被静默吞掉。

macOS 上 CGEventTap 边沿间隔几十毫秒,race window 极窄,肉眼不可见,
所以仅 Windows 必现。ESC 走 HotkeyEvent::Cancelled 不经过 latch,
是用户唯一能逃出 stuck-latch 的路径。

修复: 用 tauri::async_runtime::block_on 顺序 await 两个 handler,
bridge 线程的 mpsc::Receiver::recv() FIFO 保证 swap 顺序正确。
bridge 在独立 OS 线程而非 tokio worker,block_on 安全。

代价: Hold 模式短按 stop 多 ≤500ms 延迟,被 request_stop_during_starting
覆盖,可接受。qa / translation bridge 不走 handle_*_edge 不受影响。

附带清理 coordinator.rs unreachable_code warning。

Refs #468

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-18 18:54:53 +08:00
baiqing cb2c233ebe chore(release): bump version to 1.3.4-4 (Beta) — Windows #468 静默启动前端兜底
合并 PR #474 后随版本号一起出 Beta 包,供 Windows 端验证
startMinimized 兜底是否彻底关掉 #468 漏窗最后一公里。
2026-05-18 15:37:24 +08:00
TRIPandbaiqing b4e806e3ca fix(windows): 静默启动 #468 最后一公里 - 前端兜底 (#474)
* fix(windows): 修复 #466 #468 #469 IME 切回 / 静默启动 / QA 焦点 + #470 capsule 诊断 (#471)

集中修复 4 个 Windows-only bug:

- #469 IME 切不回 — restore_profile 对称补 legacy TSF ChangeCurrentLanguage + ActivateLanguageProfile,回归点是 c3b59329 升级激活路径时漏改恢复路径。现代 ActivateProfile 失败降为 warn(legacy 已完成视觉切回)。
- #468 Win11 静默启动失效 — single-instance 回调读 start_minimized,true 时跳过 show_main_window;托盘 / CLI intent 路径不受影响。
- #466 QA 弹窗 X/ESC 关不掉 — Win 上从 SW_SHOWNOACTIVATE 切到 Tauri window.show + set_focus,让 webview 拿键盘焦点。配套 focus-dance:begin_qa_session 抓选区前临时把焦点还给用户原 app,抓完再 refocus QA;多轮场景下用 GetWindowThreadProcessId 区分本进程窗口,刷新 qa_focus_target,避免 stale HWND。
- #470 录音胶囊不显示 — 加 per-process 一次性诊断 log(CapsuleState 用 capsule_state_log_name 显式短名,不走 Debug 防字段扩展时泄露),下次能直接定位 prefs / state / Win32 哪一环失败。

pr_agent 五轮迭代到 No major issues + No security concerns;Cloud 评审建议的 begin_qa_session 双锁 TOCTOU 已合并为单 scope。三平台 build + pr_agent CI 全绿。

#470 没标 closes,是 refs—需要真机日志才能定位真因,先 ship 诊断手段。

* chore(release): bump version to 1.3.4-3 (Beta) — Windows #466 #468 #469 修复

* fix(settings-ui): 权限页徽章不换行 + 本地 ASR 区块 Win 灰显

权限页 (Settings → 快捷键 → 权限):
- Pill 组件加 whiteSpace:nowrap + flexShrink:0 → "已安装"徽章在 Win
  窄宽下不再被挤成 3 行(每个汉字一行)。
- 行内 message span 加 whiteSpace:nowrap + overflow:hidden +
  textOverflow:ellipsis + minWidth:0 → 长文本("Windows 低层键盘 hook
  已安装")超宽时省略号收尾,徽章保持完整。
- zh-CN 描述大段精简:descAcc / descNoAcc / micDesc / accDesc /
  hotkeyDesc / networkDesc / windowsImeDesc / windowsIme.* 都改短,
  减少 Win 上拥挤感(用户反馈 zh 文案过长)。

高级页 (Settings → 高级 → 本地 ASR):
- Windows 上把"本地 ASR 模型(实验性)"标题区 + 警告小字 + Qwen3 行
  整组 opacity:0.45 灰显 —— Qwen3 在 Win 是 stub 不支持,那条"实验性"
  主线在 Win 没意义;用户视觉关注点应落到下方独立的 Foundry 行(Foundry
  保持正常颜色)。Toggle 的 disabled 行为已经在原 onToggle 条件里,本次
  纯加视觉灰显。

* fix(windows): 前端 App.tsx 在 show 主窗口前读 startMinimized 兜底

#471 在 Rust 端 setup() / single-instance callback 都加了 start_minimized
suppression,本机日志确认 Rust 路径完全正确("[main] start_minimized=true
→ 跳过初始 show")。但用户在 Win11 1.3.4-3 上仍然「重启进桌面那一刻主
窗口就出来了」。

定位到最后一条遗漏路径在前端:App.tsx 里 mount 时一条 useEffect 无条件
通过 IPC 调 `getCurrentWindow().show()`,把 Rust 端已经 suppress 的窗口
又拉出来 —— 这条路径 Rust log 完全看不见(走的是 plugin-window 的
showWindow IPC,不经过我们的 show_main_window helper)。

那条 useEffect 当初是给 issue #163 引入的:Windows 权限探测可能死锁让
首屏卡灰,所以前端兜底 force show 一次。

修法:show 前先读 prefs.startMinimized,true 就 return。读 prefs 失败
(极少数情况)保持原 show 行为,不让 #163 的兜底语义丢失。

closes #468 (the actual one this time, Rust + JS 双端都收敛了)

---------

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-18 15:29:33 +08:00
TRIP ceda87f64f fix(settings-ui): 权限页徽章不换行 + 本地 ASR 区块 Win 灰显 (#473)
Windows 真机反馈的两条 UI 问题,纯 frontend:

- 权限页徽章 3 行 wrap — Pill 加 whiteSpace:nowrap + flexShrink:0;message span 加 ellipsis 五件套;zh-CN 描述大段精简
- 本地 ASR 区块 Win 灰显不完整 — Win 上标题区 + 警告 + Qwen3 行整组 opacity:0.45,Foundry 保持正常色

cherry-pick from main (be24bb7),PR base=beta 保持双线同步。pr_agent 一轮 clean、Claude LGTM、三平台 CI 全绿。
2026-05-18 13:35:20 +08:00
baiqing a4ef68237b fix(test): Linux 加入 capsule_show_strategy NoActivate 测试断言
PR #451 (fcitx5 plugin) 把 Linux 加进 capsule_show_strategy_for_platform
的 NoActivate 分支,但漏改单元测试 capsule_show_strategy_matches_
platform_activation_contract 的 cfg —— 测试断言 Linux 还应该是
FallbackShow,结果 Linux CI red(Run Rust backend unit tests
panicked at coordinator.rs:3617)。

修法:测试的两组 #[cfg] 同步 Linux。同时在实现函数前加显式提示
注释:改 cfg 列表必须同步更新对应测试,防止下次再漏。

cargo test --lib capsule_show_strategy 本地通过。
2026-05-18 11:51:25 +08:00
TRIP c4bbec9cef Merge pull request #451 from aeoform/beta
feat(linux): fcitx5 plugin for Wayland input + deb packaging
2026-05-18 09:07:13 +08:00
aeoformandClaude Opus 4.7 39ce12c8e9 Merge remote-tracking branch 'origin/beta' into beta — resolve coordinator.rs conflict
- Accept upstream's show_capsule_window_for_recording wrapper + CapsuleShowStrategy
  (our Linux fallback logic is subsumed by the upstream strategy pattern)
- Keep Linux on NoActivate strategy; show_capsule_window_no_activate returns true
  on Linux to suppress capsule window (no popup on Wayland/fcitx5)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:50:58 +08:00
baiqing d1aff0f97c Merge remote-tracking branch 'origin/main' into beta
# Conflicts:
#	openless-all/app/package-lock.json
#	openless-all/app/package.json
#	openless-all/app/src-tauri/Cargo.lock
#	openless-all/app/src-tauri/Cargo.toml
#	openless-all/app/src-tauri/tauri.conf.json
2026-05-17 18:18:23 +08:00
TRIPandbaiqing fe56eb3038 fix(ci): detach HEAD before claude-code-action on fork PR (#464)
PR #451 (来自 fork aeoform/openless, head ref 也叫 beta) 触发 @claude 时,
claude-code-action 执行 `git fetch origin pull/451/head:beta` 把 PR head
拉到本地 beta 分支,但此时 worktree 正 checkout 在 refs/heads/beta,
git 拒绝 fetch 到已 checkout 的分支:

    fatal: refusing to fetch into branch 'refs/heads/beta' checked out at ...
    Action failed with error: Command failed: git fetch origin --depth=20 pull/451/head:beta

修复: 在 actions/checkout 后立即 git checkout --detach,释放
refs/heads/<default-branch> 这个本地分支名,让 action 自己 fetch 不撞名.
仅在 fork head ref == base ref name 的 corner case 才会触发问题,
detach 对其他场景无副作用.

失败 run: https://github.com/Open-Less/openless/actions/runs/25978532215

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-17 14:09:58 +08:00
baiqing 5d050d6121 refactor(insertion): 注释改写为 位置+用途+机制 结构
按新约定重写:删除 issue 号、Swift 原版对照、历史 trade-off 故事;
保留每段「这一段在哪里 / 做什么 / 怎么做」的最简说明。

作为后续核心代码注释统一清理的 calibration 样本。
2026-05-17 13:46:00 +08:00
baiqing 468b8bcbcb fix(persistence): atomic_write 用唯一 tmp 文件名修 macOS 并发测试 race
并行 cargo test 时多个 Coordinator::new() 同时进入 StylePackStore/PreferencesStore
写流程:固定 tmp 文件 `preferences.tmp` 被互相覆盖,先 rename 的赢,后到的 rename 找
不到源文件 → ENOENT,macOS CI 偶发 `style pack store init: rename failed` panic。

改用 `<filename>.tmp-<uuid>` 让每个写者独占自己的 tmp;rename 失败时主动清理孤儿 tmp。

验证:本机 cargo test --lib(默认并行)连续 5 轮 270/0/0。
2026-05-17 13:45:46 +08:00
TRIPandbaiqing 859fd5370f feat(updater): Beta 渠道接通 auto-update(Builder.endpoints runtime 切换) (#465)
* feat(updater): Beta 渠道接通 auto-update(Builder.endpoints runtime 切换)

CLAUDE.md 之前的论断「tauri-plugin-updater 2.10 Builder 不暴露 endpoints()」在
2.10.1 已不成立 —— Builder 现在有 .endpoints(Vec<Url>) -> Result<Self>,build()
里 self.endpoints.unwrap_or_else(|| self.config.endpoints.clone()) 走 runtime 覆盖。

实现 channel-aware 自动更新(不 fork plugin、不写自定义下载/签名校验):

Rust(~100 行新增)
- commands.rs::app_check_update_with_channel:
  Stable → webview.updater_builder().build()?.check()(默认 endpoints 从 tauri.conf)
  Beta   → fetch_latest_beta_release() → 拼镜像 + 直连两份 -beta manifest URL
         → builder.endpoints(urls)?.build()?.check()
- AppUpdateMetadata 字段形状对齐 plugin 的 UpdateMetadata(rid + currentVersion
  + version + body + rawJson),前端 new Update(metadata) 即可复用 plugin 的
  download / install / close。
- lib.rs 注册新 command。

前端(~30 行改动)
- AutoUpdate.tsx::checkForUpdates 从 import('@tauri-apps/plugin-updater').check
  改为 invoke('app_check_update_with_channel');其余 download / install / close
  全走 plugin 原生 JS API(new Update(metadata) 后链式调用)。
- SettingsModal::BetaChannelControl 删掉「打开 GitHub 下载」按钮 ——
  auto-update 接管了,手动下载路径冗余;保留「最新 Beta 版本号 + 刷新」做信息透明。
- i18n 5 个 locale 改 betaChannelDesc 文案,把「需要手动下载安装」改成
  「自动接收最新 Beta 版本」。betaChannelDownloadBtn 等 i18n key 暂留(无用但无害)。

物理隔离仍生效:Beta tag 的 manifest 文件名带 -beta 后缀,跟 Stable 的
latest-{tgt}-{arch}.json 在 GitHub Release assets 里是分开两份;即使代码逻辑
错把 Beta URL 给 Stable 用户也是 HTTP 404,不会拿到错档。

验证:cargo test --lib serial 270 / 0 / 0;tsc clean;vite build clean。

* feat(settings): BetaChannelControl 加版本比对 + 「立即更新」按钮

之前 BetaChannelControl 在 toggle 打开后,只机械显示「最新 Beta: vX-beta-tauri」,
不管本机版本是不是已经等于那个 tag。用户报告:「显示有最新 Beta,但应该比对版本号」。

修复:
- parseVersionFromBetaTag("v1.3.4-1-beta-tauri") → "1.3.4-1"
- semverGreater(remote, local) 做 SemVer 风格比对(支持 X.Y.Z 和 X.Y.Z-N,覆盖
  本仓库实际版本格式;prerelease 按 SemVer 规则 lower than no-prerelease)
- 本机 >= 最新 → 「最新 Beta: vX」 + 蓝色「已是最新」chip
- 本机 < 最新 → 「最新 Beta: vX」 + 「立即更新」按钮(蓝色高亮)
- 「立即更新」点击 → useAutoUpdate.checkForUpdates → 走和全局「检查更新」按钮
  完全相同的 download/install 流程,UpdateDialog 直接挂在 BetaChannelControl 内部
- 用户的第二个 feature 诉求:「在 Beta 渠道旁边一键检查 + 自动更新」 = 这个按钮

i18n 5 个 locale 加 4 个 key:betaChannelUpToDate / betaChannelUpdateNow /
betaChannelUpdateNowTitle / betaChannelChecking。

* chore(release): bump 1.3.4-1 → 1.3.4-2 for Beta channel

`-2` 后缀让 appVersion.ts 的 IS_BETA_BUILD 仍判为 Beta,UI BETA 标签照常显示。
配本 PR 的 Beta auto-update + BetaChannelControl「立即更新」按钮,1.3.4-1 用户
切到 Beta 渠道后点检查会发现 1.3.4-2 并走 auto-update 流程一键升上来。

发布 tag:v1.3.4-2-beta-tauri。

---------

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-17 11:15:06 +08:00
TRIPandbaiqing 061558a0fa fix(shell): sidebar 底部翻回两行(版本在上、设置在下) (#463)
PR #462 把底部折成一行,结果在窄 sidebar 下「设置」被挤成两行
竖字、版本 chip 糊在旁边,可读性大幅退化。改回两行但反过来:
- 上行:[BETA] 版本 v1.3.4-1(容下 BETA 标 + 完整版本号)
- 下行:⚙ 设置(真正落到最底,符合最初诉求)

设置按钮恢复 display:flex + label flex:1 跟上面 nav 按钮统一风格。

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-17 10:27:41 +08:00