TRIP
d3aa3c5cbd
Merge pull request #1051 from Open-Less/feat/ui-2.0-model-settings-page
...
2.0 模型设置页与使用页:目录元数据、使用中模型选择、残留清理
2026-09-10 19:50:13 +08:00
sim
3b93d7421a
feat(models): 2.0 模型设置页与使用页——目录元数据、使用中模型选择与残留清理
...
模型设置页:新增 settings/models/LocalModelsSection 替换旧 LocalModelSection,
管理看板条目接入 Core 目录元数据快照(displayName / languages / sizeBytes),
基础信息展示不再依赖实时访问 HuggingFace;详情面板新增「清理未完成下载」
(local_asr_cleanup_incomplete,仅在有 staging 残留时出现)。
模型使用页:渠道编辑器本地引擎分支内嵌 LocalModelPicker——直接切换使用中的
模型(qwen/whisper 切换后预载引擎;sherpa/foundry 走各自 set 接口),显示引擎
可用性与残留清理入口;通过 ServicesTab 提供的 LocalModelsNavContext 一键跳到
「服务 → 本地模型」管理页(复用此前闲置的 localAsrManage 文案键)。
八语文案补齐(activeModelLabel / partialDownloads* / cleanupIncomplete /
languagesLabel / partialBytesLabel 等 7 键)。tsc 0 错误,前端全套通过。
2026-09-10 18:17:36 +08:00
TRIP
fe95354e25
Merge pull request #1050 from Open-Less/feat/ui-2.0-model-settings
...
2.0 模型设置界面 + macOS 修复批次(合入 beta 最新四项)
2026-09-10 17:47:28 +08:00
sim
4ec44b2b0b
merge: 汇入 origin/beta 第二轮(#1048 根证书指纹核验、#1049 录音保亮屏)
...
- 五语 PC/手机页文案取云端指纹核验版;de/es/fr 全套补译(指纹 6 键、保亮屏 4 键、恢复 4 键、中断/离线 2 键)
- index.html:帮助块改为指纹核验流程 + 录音屏新增保亮屏开关(默认开)
- RemoteInputStatus 补 caFingerprintSha256;Linux egui 面板移植指纹显示与复制
- remote-input-audio-queue 测试取云端(#1049 音频队列改造),我方仅格式差异
2026-09-10 17:16:58 +08:00
sim
576592f221
style(app): 合并后统一 prettier 格式(i18n/设置页/热键录制/凭据草稿等 22 处)
2026-09-10 16:59:07 +08:00
sim
3ff3df1626
fix(merge): 落实合并后的契约与目录对齐
...
- build-mac.sh 移除 hdiutil DMG 兜底:bundle contract 测试显式禁止手搓 DMG
绕过签名/公证链路;DMG 缺失即失败(保留 qwen3-asr-rs 剪枝与 BUILD_START_TS
新鲜度校验)
- 红绿灯 y=26 契约:tao 几何下视觉顶距≈y-14,x==y 并不相等(实测左 21.5px)
- 胶囊几何契约同步 typeless 206×57(原 460×128 的 1/5 面积)
- LLM_LABELS 补 tencentTokenHub 静态目录项(ASR_LABELS 已含 tencent-cloud)
2026-09-10 16:54:34 +08:00
sim
0ac0fbd391
merge: 汇入 origin/beta(#1037 远程输入持久 CA、#1040 F13-F20/Mac 听写键、#1020 腾讯云实时语音、#1044 统一模型字段与异步保存隔离)并完成 2.0 UI 适配
...
冲突解决原则:2.0 重写的界面以本地为准,云端功能语义全部移植——
- ProviderForm 离开收敛接入 SettingsModal / ChannelList / LlmProtocolFields / CredentialField(关闭、切节、换供应商前冲掉防抖写入并等待在途写完成)
- 腾讯云三段式密钥 + 固定模型档分支移植进 2.0 ChannelCredentialFields;OAuth 静态模型走描述符
- Mac 听写键进入 ShortcutRecorder(allowMacDictationKey)并改用 refresh 拉新偏好
- 远程输入手机页新证书信任流程(持久本地 CA + 描述文件/CA 下载 + 复制链接),de/es/fr 补齐全套新文案
- 纯格式分歧文件取云端后 prettier 归一;双方新增内容(i18n、测试)两侧保留
2026-09-10 16:47:30 +08:00
sim
786e4b4d07
feat(local-asr): 模型状态透出目录元数据、新增中断下载清理命令与 Zipformer 目录项
...
LocalAsrModelStatus 补齐 display_name/family/mode/languages/size_bytes,
前端无需为基础元数据实时访问 HuggingFace;新增 local_asr_cleanup_incomplete
命令(LocalAsrApi 默认实现 + Service 实现 + 前端包装)清理 staging 目录;
sherpa 目录新增 zipformer-bilingual-zh-en-streaming 流式中英模型并补齐八语文案。
修复测试里 LocalAsrTarget::parse 的 .into() 类型推断歧义。
2026-09-10 16:09:00 +08:00
zhou zhichao
f39a68a795
修复远程录音息屏丢失并默认保持亮屏 ( #1049 )
2026-09-10 16:01:55 +08:00
zhou zhichao
b72ec9671a
远程输入:补充首次信任前的根证书指纹核验 ( #1048 )
2026-09-10 16:01:29 +08:00
sim
bd5656b5fc
build(macos): 构建前清理重复的 qwen3-asr-rs 目录;新鲜度基准改为构建开始时间
...
- 本地混跑 cargo check/test/build 会按 feature 上下文生成多份 qwen3-asr-rs
构建目录,多份 metallib 会让暂存脚本拒绝猜测
- 打包后原始二进制还会被签名触碰,bundle 新鲜度不能与它比,改与本构建
开始时间比
2026-09-10 13:46:19 +08:00
sim
7204c282f1
feat(capsule): typeless 放大到原版 1/5 面积、黑底白波纹;Siri 预览改用真实光效舞台
...
- 窗口 174×48 → 206×57,CSS zoom 0.378 → 0.447(面积 = 原版 460×128 的 1/5)
- typeless 配色改为黑色胶囊 + 白色波纹(深色主题同调)
- VoiceOrbStage 提取为独立组件;设置页 Siri 预览直接渲染缩放 0.5 的真实
SiriGL 光条,与实际胶囊样式一致
2026-09-10 13:15:49 +08:00
sim
105fb99dc0
fix(core): volcengine 配置判定不再要求 resource id——运行时留空会回落默认资源
...
听写运行时对空 resource id 回落 volc.seedasr.sauc.duration(resolve_resource_id),
但 volcengine_configured 把它当硬门槛:合法的「密钥齐全、资源 id 留空」配置被误报
「语音识别未配置」并每次启动弹配置提示。认证是否就绪只取决于密钥本身。
2026-09-10 13:15:49 +08:00
sim
e3f63e97fc
build(macos): 兜底校验加新鲜度——打包失败时旧 bundle 不允许再通过校验
2026-09-10 12:15:03 +08:00
zhou zhichao and Chris233
882fac63f0
fix(remote-input): preserve phone trust across restarts and IP changes ( #1037 )
...
* fix(remote-input): preserve phone trust with a persistent local CA
* fix(remote-input): disclose LAN certificate MITM risk
---------
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-10 06:36:12 +08:00
Eclock2000 and Chris233
7584091464
fix(hotkeys): support F13–F20 and the native Mac Dictation key ( #1040 )
...
* fix(hotkeys): 支持专用 F20 与 Mac 原生听写键
* fix(hotkeys): make the Mac Dictation key a single trigger option
* refactor(hotkeys): remove optional Dictation key status UI
* fix(hotkeys): re-enable disabled Mac Dictation event tap
---------
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-10 02:00:30 +08:00
sim
ce43e1b11b
build(macos): DMG 兜底(hdiutil + Applications 替身)并按第一性原则收紧注释
...
- tauri build 退出码非零不再夭折脚本:.app 已生成时用 hdiutil 兜底打包 DMG,
内容含 /Applications 替身,保留拖拽安装
- Cargo.toml Xcode 27 beta 构建注释压缩为一行事实 + 对策
2026-09-10 00:27:19 +08:00
sim
417ad38ce9
fix(macos): 四项修复——typeless 胶囊 1/7 缩放贴底、红绿灯对齐、ASR 误报、Keychain 节流
...
- typeless 胶囊窗口 460×128 → 174×48(面积 1/7),内容 CSS zoom 0.378 同步缩放;
底部间距按样式区分,typeless 贴紧工作区底边(Dock 可见时贴其上沿,自动隐藏时贴屏幕底)
- 红绿灯 trafficLightPosition y 16→26:实测左间距 21.5、上间距 12,下移 9.5px 后两边距相等
- 启动时把偏好 active ASR 同步进凭据库(原仅 Windows):get_credentials 按凭据库
active 渠道取密钥,脱钩会误报「语音识别未配置」并弹设置提示
- Keychain 节流:credentials.v2 补写与旧版逐账户扫描每进程只做一次并缓存结果,
失败重放同一错误;新增凭据来源一次性日志
2026-09-10 00:26:36 +08:00
kevinlin and Chris233
bf1237c6b1
feat(provider): 增加腾讯云实时语音处理链路 ( #1020 )
...
* feat: add Tencent TokenHub and realtime ASR
Rebase onto Core 2.0: Hunyuan realtime ASR and TokenHub polish now live
in openless-core with the shared provider registry, credentials, and
cloud transcription session lifecycle.
* fix: harden Tencent ASR and TokenHub
---------
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-09 23:39:11 +08:00
Chris233
5113eaf245
feat(providers): 统一模型字段、搜索与异步保存隔离 ( #1044 )
...
* feat(providers): unify model fields and isolate asynchronous updates
* fix(providers): preserve pending credential drafts
2026-09-09 14:57:35 +08:00
sim
68f94b788b
fix(tauri): 重建 settings.rs 合并——保留 2.0 effect-plan 架构并应用 set_settings 返回保存后 prefs 的契约
...
首次合并遗留的未解决冲突:以 1d29f8a6 干净版为底(2.0 SettingsRuntime
effect-plan 架构),叠加 fix/settings-experimental-consistency 的返回值
契约(桌面 set_settings 返回 UserPreferences,与前端 setSettings 对齐)。
2026-09-09 13:34:07 +08:00
sim
e9185e48ce
fix(i18n): 补齐 de/es/fr 的 OrcaRouter 与实验性徽标键,统一实验性措辞
...
- de/es/fr(2.0 新增语言)补 common.experimental、providers.orcarouter、
searchModels/noMatchingModels/orcarouterCatalogHint/orcarouterAsrCatalogHint
- streamingInsertTitleLinux/sherpaTitle 等按 experimentalTitles 测试统一措辞
- 移除 locale 强制同步输出语言的 effect:2.0 设计为 UI 语言独立于输出/
识别语言(locale-lifecycle 测试守护),保留偏好写入门控本身
2026-09-09 13:28:48 +08:00
sim
cd18fe7174
Merge fix/settings-experimental-consistency into codex/ui-2.0-details(偏好写入门控 + 语言区域同步与 2.0 布局偏好并存)
2026-09-09 13:22:00 +08:00
sim
0fa21daaf0
Merge origin/beta into codex/ui-2.0-details(汇入 #1022/#1023/#1041/#1042,保留 2.0 渠道卡片结构并整合 OrcaRouter 目录选择)
2026-09-09 13:14:35 +08:00
sim
1d29f8a6cd
feat(app): finalize 2.0 channel settings UI, 8-language alignment and cloud-sync groundwork
...
- 渠道设置界面:ChannelList/LlmProtocolFields/ProvidersSection 渠道级协议与模型配置
- 8 种界面语言 1711 项文案对齐(de/en/es/fr/ja/ko/zh-CN/zh-TW)
- Core 协议层 llm_protocol 与 provider_service 配套、云同步准备
- linux-egui 后端与 Android updater 配套调整
2026-09-09 13:04:10 +08:00
sim
9a88bee5c6
feat(app): polish desktop UI, expand languages and prepare cloud sync
2026-09-09 01:13:16 +08:00
AnKaifeng and Chris233
66915405fd
feat(providers): add OrcaRouter model catalog, LLM, and ASR support ( #1022 )
...
* feat(providers): add OrcaRouter model catalog integration
* fix(providers): harden OrcaRouter catalog integration
---------
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-09 00:41:55 +08:00
a3fc7171d2
feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash ( #1023 )
...
* feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash
Dictation polish uses OpenAI-compatible chat/completions. For OpenCode Go, change the Base URL to /zen/go/v1.
* fix(macos): 避免 Fn 长按与功能键误触发听写 (#1008 )
Auto 和 Toggle 模式只在 Fn 短按松开且未叠加功能层操作时触发听写;长按及亮度、音量等 systemDefined 事件留给 macOS。
保留显式 Hold 模式的按住说话语义,并跳过 Fn 短按释放后的冗余仲裁延迟。
Co-authored-by: Chris233 <h-chris233@outlook.com >
* fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 (#1036 )
* fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞
dashscope 的 AAAA 在部分 Windows 双栈网上 TCP 443 会挂死,connect_async 先试 IPv6 会卡满 5 秒超时,听写进不了 Listening。
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(asr): preserve websocket ports and retry handshake addresses
---------
Co-authored-by: Cursor <cursoragent@cursor.com >
Co-authored-by: Chris233 <h-chris233@outlook.com >
* fix(updater): Beta 构建默认跟随 Beta 渠道 (#1041 )
* fix(updater): default beta builds to beta channel (#1034 )
* fix(updater): persist channel switches atomically
* feat(llm): 支持渠道级 Chat Completions、Responses 和 Messages (#1042 )
* feat(llm): add channel request formats and compatibility presets
* fix(llm): harden channel protocol handling
* feat(llm): integrate OpenCode Zen with shared request formats
---------
Co-authored-by: Mark <shawninjuly@gmail.com >
Co-authored-by: Chris233 <h-chris233@outlook.com >
Co-authored-by: 浩彬(^-^) <146098469+HKLHaoBin@users.noreply.github.com >
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-08 20:54:01 +08:00
Chris233
2b7c9d13c1
feat(llm): 支持渠道级 Chat Completions、Responses 和 Messages ( #1042 )
...
* feat(llm): add channel request formats and compatibility presets
* fix(llm): harden channel protocol handling
2026-09-08 18:52:45 +08:00
Chris233
a9ee22f334
fix(updater): Beta 构建默认跟随 Beta 渠道 ( #1041 )
...
* fix(updater): default beta builds to beta channel (#1034 )
* fix(updater): persist channel switches atomically
2026-09-08 15:41:36 +08:00
sim
ee002a15bd
test(core): 限定沙箱权限段的路径断言
2026-09-08 14:42:05 +08:00
sim
4519f19c92
style(app): 统一前端与平台源码格式
2026-09-08 14:35:28 +08:00
sim
d686406a70
refactor(app): 清理废弃代码并明确模块注释
2026-09-08 14:27:29 +08:00
sim
7ae366e2aa
Merge remote-tracking branch 'origin/beta' into codex/ui-2.0-details
2026-09-08 14:21:03 +08:00
sim
a6ed77c0d0
feat(ui): 完善设置子页与自定义风格图标
2026-09-08 14:16:24 +08:00
af9eaa3e16
fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 ( #1036 )
...
* fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞
dashscope 的 AAAA 在部分 Windows 双栈网上 TCP 443 会挂死,connect_async 先试 IPv6 会卡满 5 秒超时,听写进不了 Listening。
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(asr): preserve websocket ports and retry handshake addresses
---------
Co-authored-by: Cursor <cursoragent@cursor.com >
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-08 12:47:09 +08:00
sim
69f454bd68
feat(ui): integrate 2.0 interface and agent work
...
Consolidate the current 2.0 sidebar, overview, settings, vocabulary editing, correction rules page, and first-launch splash with their Core and Tauri adapters. Include the accompanying source and architecture documentation updates.
Validation: npm test (build and 73 discovered test files); cargo test -p openless-core --locked; Core/Linux and Tauri rustfmt checks.
2026-09-08 11:12:05 +08:00
Mark and Chris233
6a7cd5f4cd
fix(macos): 避免 Fn 长按与功能键误触发听写 ( #1008 )
...
Auto 和 Toggle 模式只在 Fn 短按松开且未叠加功能层操作时触发听写;长按及亮度、音量等 systemDefined 事件留给 macOS。
保留显式 Hold 模式的按住说话语义,并跳过 Fn 短按释放后的冗余仲裁延迟。
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-08 01:39:55 +08:00
sim
9d03bae349
test(linux-egui): host_contract 按有效目标语义更新 Windows 键盘断言
...
#1021 重构后 WindowsKeyboardRuntimeTarget 由插入模式派生:默认 TSF 模式下
翻转 keyboard-list 偏好不产生有效目标变化,Linux 接受并广播 PreferencesChanged;
将插入模式切到 SendInput 且隐藏键盘列表会真正驱动 Windows 语言 profile,
合同仍要求显式拒绝(Unsupported)。旧断言只翻转原始字段,与新语义冲突。
2026-09-07 14:31:36 +08:00
sim
b1370b5d40
chore(docs): 删除已无引用的火山控制台截图
...
volcengine-setup.md 重写为以 descriptor 为锚后,旧指南的 4 张控制台
截图不再被任何文档引用。
2026-09-07 14:24:16 +08:00
sim
34cab16fce
docs: 以源码为准重写 1-app 文档系统(19 篇)
...
保留目录骨架与文件名,内容全部以当前源码为依据重写:范围与版本锚点
(2.0.0-Beta.1 / crate 0.1.0 / com.openless.app)、架构分层与 Core 模块地图、
桌面验收清单(功能域→源码入口→证据)、Linux 交接 8 篇(沿用 L01-L12 登记体系,
锚点落到 settings.rs/audio.rs/ports.rs 等)、后端接口契约、Android 计划、
运营指南 5 篇(以 provider descriptor 与实际 CSP/.gitmodules 为锚)。
原过程中的计划叙述、截图与历史收口记录不再保留。
2026-09-07 13:48:29 +08:00
sim
639c2fbf9b
chore: 删除未使用死文件与零引用依赖
...
前端:chat 桶文件、SegSimple、SwitchLite、androidMicrophonePermission 转发
shim、SelectionPolishSection 孤儿分区、autostart 环境类型声明;依赖移除
@formkit/auto-animate 与 @tauri-apps/plugin-autostart npm 包装层(Rust 插件
与 capability 保留,autostart 经原生 invoke 字符串调用)。
Rust:polish 旧副本两文件、android/types.rs、remote_server/lan_addresses.rs
(均为 Core 2.0 整合遗留,模块树未引用,编译行为不变)。
npm test 构建与全部测试通过;三 crate cargo fmt --check 干净。
2026-09-07 13:36:08 +08:00
sim
6608f66b44
chore: 将 .mimosa 运行状态目录移出版本库并加入 .gitignore
...
修正 92da4fbf 中误随 git add -A 提交的 Mimosa 安全钩子运行状态文件;
该目录为插件会话状态,不属于版本库,已忽略以防再次混入。
2026-09-07 13:36:08 +08:00
sim
92da4fbf9b
docs: 清理已了结的规划过程文档并同步引用
...
删除已完成/已收口任务的规划与过程记录(2.0 UX 收口、Core 2.0 计划、
PR#1019 复核与桌面复审、平台边界审计、Linux 引导知识快照、
Linux 共享后端阶段计划、供应商渠道计划、Windows sherpa 规划、
PR#711 评审截图、应用内测试计划),保留规范性文档、验收清单、
Linux 交接目录与运营指南,并修复全部引用链接。
2026-09-07 13:29:55 +08:00
sim
be1118bc2a
style(src-tauri): 应用 rustfmt 默认风格统一格式
2026-09-07 13:29:55 +08:00
sim
11d9aa4b29
merge: Core 2.0 前端 UI 整理(feat/core-2-ux-linux → beta)
2026-09-07 12:51:39 +08:00
sim
30e580fc37
feat(ui): Core 2.0 入口、设置与布局整理,Linux 引导与视觉改进
...
- 主页前置下一步与真实服务状态,服务卡直达对应设置;概览与热力图排布调整
- 设置按任务分类并支持搜索、焦点返回与 Escape 语义;旧 section ID 保持稳定
- AI 分区拆分语言模型/语音识别/本地模型/连接;渠道列表与表单重构,设置实底
- 本地模型管理与下载目录重排,补空态、主操作与窄屏布局
- Core 生成 provider descriptor 公开目录供浏览器预览懒加载,原生 IPC 合同不变
- Linux egui 按开始/听写/AI 服务/模型/工具/手机输入/历史/设置组织页面并加环境引导
- 五语言文案与文档(体验梳理、架构、计划收口)同步
2026-09-07 12:51:24 +08:00
Tearice and tonyzaca7755963
82aa33ffd6
fix(windows-ime): 避免 TSF 预检导致文本重复插入 ( #1021 )
...
Co-authored-by: tonyzaca7755963 <tonyzaca7755963@users.noreply.github.com >
2026-09-07 08:29:07 +08:00
823a6a14cd
fix(windows): 修复剪贴板 sentinel 竞争导致划词追问与划词编辑无法抓取选区 ( #1024 ) ( #1025 )
...
* fix(selection-voice): auto-hide capsule when begin fails without selection
Schedule the standard 2s capsule idle timer after no-selection begin errors so the Siri-style prompt does not stay on screen indefinitely.
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): log why selection capture missed for voice/polish
Distinguish clipboard sentinel unchanged, empty copy, shortcut failure, and prefetch vs live capture so user-exported logs can diagnose false no-selection reports.
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): fix capture diag logging compile errors
Format optional front_app in prefetch miss logs and gate the NoCapturePath fallback to non-desktop targets so macOS/Windows/Linux builds compile cleanly.
Co-authored-by: Cursor <cursoragent@cursor.com >
* debug(selection): add sentinel/post_copy DEBUG logs to diagnose Chrome capture
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): Windows content-change check instead of sentinel for Ctrl+C validation
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): settle clipboard after sentinel for Windows history race
Clipboard History async listeners can hold the clipboard after we write the
sentinel, so target-app Ctrl+C silently fails. Wait for settle, poll, and
optionally resend Ctrl+C. Bump to 1.3.18-Beta.10.
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): parenthesize duration cast comparisons for Rust parse
Bare `as u64 <` is parsed as a generic; cfg(windows) code still must parse on Linux CI.
Co-authored-by: Cursor <cursoragent@cursor.com >
* fix(selection): handle GetOpenClipboardWindow Result and type key_down
windows 0.58 returns Result<HWND>; annotate VIRTUAL_KEY for GetAsyncKeyState.
Co-authored-by: Cursor <cursoragent@cursor.com >
* chore(selection): 从 PR 中移除 fork 专用版本号与 release workflow
上游 PR 只保留选区捕获 / 剪贴板 sentinel 修复。版本号仍由上游发布流程管理。
Co-authored-by: Cursor <cursoragent@cursor.com >
---------
Co-authored-by: Cursor <cursoragent@cursor.com >
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-07 08:24:36 +08:00
4c45a938ce
fix(floating-windows): 浮窗跟随鼠标所在的屏,多显示器下不再被钉死在主屏 ( #1028 )
...
* fix(floating-windows): 浮窗跟随鼠标所在的屏,多显示器下不再被钉死在主屏
接了外接屏时,Less Computer 的全屏彩虹描边(跑马灯)、Less Computer 聊天浮窗和
QA 浮窗都只出现在主屏上,胶囊却在你正在用的那块屏 —— 两边分家。
原因是这三个浮窗选屏时问的是「我自己现在在哪块屏」(window.current_monitor)。
它们都是懒创建 + 常驻隐藏的窗口:隐藏时停在上一次出现的屏,而这辈子第一次出现
就在系统默认(主)屏,于是每次 show 都算出主屏、又铺回主屏,永久钉死。
胶囊自己踩过并修好过同一个坑 —— 改成跟随鼠标光标所在的屏(capsule_target_monitor
的注释写着「不能用窗口自己的 current_monitor」),这三个浮窗漏掉了。这里抽出共用的
floating_window_monitor_frame,让浮窗和胶囊看同一块屏;非 macOS 没有这条
CGEvent/AX 通路,仍走 current_monitor,行为不变。
顺带把选屏的纯逻辑抽成 pick_monitor_for_anchor_point 并补单测:光标在哪块屏就选
哪块、落在所有屏之外时退到最近的屏。
注:QA 浮窗只在首次 show 时定位(之后有意保留用户拖动后的位置),所以这条对它只
影响第一次出现的位置。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
* test(macos): fix mixed-DPI monitor fixture
* ci: rerun with updated Linux gate
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com >
Co-authored-by: Chris233 <h-chris233@outlook.com >
2026-09-07 00:19:52 +08:00