Commit Graph
94 Commits
Author SHA1 Message Date
TRIPandsim e3e63cad04 fix(security): harden remote pairing PIN persistence (#821)
* fix(security): harden remote pairing PIN persistence

* fix(security): harden pairing PIN persistence

* test(ci): accept Windows line endings in PIN contract

* fix(linux): declare libc for secure PIN opens

---------

Co-authored-by: sim <sim@local>
2026-07-15 14:46:06 +08:00
TRIPandsim 9991b325b8 test(windows): repair UI config contract (#829)
Co-authored-by: sim <sim@local>
2026-07-15 13:53:09 +08:00
TRIPandsim d6ca07a6b2 fix(android): break IPC settings barrel cycle (#827)
Co-authored-by: sim <sim@local>
2026-07-15 13:20:57 +08:00
Chris233 c645b16851 Disable background scrolling when settings open (#776)
Fixes #580: prevent background thin-scroll areas from scrolling/bleeding through when the Settings modal is open. Adds data-ol-settings-open={settingsOpen ? 'true' : undefined} to the main FloatingShell div and corresponding CSS in tokens.css to set overflow:hidden and hide WebKit scrollbars when the attribute is present. Also adds settings-modal-scroll-isolation.test.mjs to assert the attribute placement and CSS selectors.
2026-07-14 19:34:11 +08:00
TRIP cfb09b14f8 fix(capsule): 胶囊跟随鼠标光标所在屏,修复多屏/多 Space 只在第一块屏显示 (#714)
新增 CGEventGetLocation 取鼠标光标位置(零权限),focused_input_target_monitor → capsule_target_monitor,定位与去重快照统一走光标优先选屏,消除「定位用 AX caret、去重用 current_monitor」两套选屏不一致导致的锁屏。

Claude 审核:5 个核心确认点(坐标系一致/选屏逻辑/快照统一/零权限/平台隔离)全部通过,可合并。
2026-06-21 00:05:45 +08:00
TRIP fbe40ab583 feat(android): 集成 #704 安卓自动更新 + 同步 PC updater 修复(#705/#708)到安卓 (#712)
合并 #704(安卓应用内自动更新 + JNI 修复)并把 PC updater 修复同步到安卓:①安卓公钥回退 6F4B5994→1DEAA803(同步#705)②installError 安装失败兜底+去 throw(同步#708)③还原被自动合并误删的桌面 logClientError。桌面机制零变更。CI 全绿 + @claude 审核通过。取代 #704 及 #694 安卓部分。
2026-06-19 13:55:53 +08:00
TRIP 121bb11447 fix: audit batch 1 — critical Android updater + security hardening + bug fixes (#695)
14 confirmed audit findings: critical Android auto-update fix (SUPPORTED_ABIS), security hardening (exe allowlist, window-scoped approval, update-URL validation, remote PIN rate-limit/entropy, mirror order, prompt sanitization), correctness bugs (prefs race, hotkey spawn race, voice-agent focus clear), build-hygiene, and Android robustness. All-platform CI green; 446 tests pass.
2026-06-17 11:13:27 +08:00
TRIP 0eb69fc0f4 chore: codebase cleanup + behavior-preserving refactor (#693)
Audit-driven cleanup: 6 issue fixes (#689/#686/#680/#691/#678/#612), Aura skin removal (visually-neutral), dead-code cleanup (98→87 warnings), behavior-preserving modularization (coordinator.rs 6961→3083 + LocalAsr/ + polish/ submodules), and RELEASING.md (admin-only release policy). Gates: cargo test --lib 446 passed, tsc, all-platform build + contract checks green. Supersedes #685/#687/#690/#692/#682/#681.
2026-06-16 23:22:21 +08:00
HKLHaoBinandCursor 63040b2028 feat(ui): 深色模式与主题 token 及选中态修复
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 19:03:02 +08:00
Chris233 8e8f5fdeb5 Merge pull request #658 from HKLHaoBin/feat/android-release-pipeline
feat(android): 对齐移动端构建与发布流水线
2026-06-14 14:12:03 +08:00
Chris233 3cc4576b12 Merge pull request #659 from HKLHaoBin/feat/mobile-portrait-ui
feat(ui): 移动端竖屏 UI 适配
2026-06-14 13:38:11 +08:00
Andy Jiang 12fa110795 fix(macos): raise capsule window level to 25 so it overlays fullscreen apps
v1.3.6-5 fixed cross-desktop following but not fullscreen: FULL_SCREEN_AUXILIARY only lets the capsule JOIN the fullscreen Space; at alwaysOnTop's floating level (~3) it still renders behind the fullscreen window. setLevel(25) (above the menu bar, matching show_less_computer_glow which does overlay fullscreen) makes it render on top. Add a contract assertion to lock it in.

Runtime-verify on macOS: enter a fullscreen app, trigger dictation, capsule should now appear over it.
2026-06-13 23:59:43 +08:00
HKLHaoBinandCursor 452dca0a13 fix(scripts): improve android-ui-verify uninstall and screencap on Windows
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 23:34:54 +08:00
Andy Jiang 35831499e3 fix(a11y): restore --ol-ink-4 WCAG AA contrast; trim stale aura-skin contract
AURA->beta-3 revert lowered light --ol-ink-4 alpha 0.58->0.42 (muted text 2.88:1, fails WCAG AA); restore 0.58 (~5.1:1). Trim aura-skin contract: drop assertions for revert-deleted theme switching / solid tokens / .ol-aura-* classes. Dark-mode-only guards parked pending the post-revert dark-mode decision.
2026-06-13 23:18:13 +08:00
Andy Jiang 33b0e5ea38 perf(backend)+fix(macos): perf quick-wins, capsule across Spaces, drop dead coordinator files
Backend perf: add [profile.release] (lto=thin/codegen-units=1/strip); tray mic watcher 1.5s->10s; global-hotkey dispatcher blocks on recv() instead of 250ms poll; coding_agent supervisor exits on non-macOS instead of 5s poll; cache+reuse reqwest client across utterances (net.rs) in OpenAI/Codex/Gemini providers (kills per-utterance cold TLS handshake).

fix(macos): capsule joins all Spaces + fullscreen via an absolute setCollectionBehavior(273) matching show_less_computer_glow; drop the racy Tauri set_visible_on_all_workspaces that deferred-overwrote the manual FullScreenAuxiliary bit.

chore: remove 12 orphaned coordinator/*.rs (never mod-declared -> not compiled); repoint macos-capsule-spaces contract test to the live coordinator.rs.
2026-06-13 23:18:13 +08:00
HKLHaoBinandCursor 5e2663b26b feat(ui): add mobile portrait shell with bottom nav and responsive pages
Replace fixed sidebar on narrow/Android with top bar, bottom tabs, and more sheet; adapt Overview, History, Vocab, and Settings for portrait; add android-ui-verify.ps1.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 23:13:39 +08:00
HKLHaoBinandCursor 0fe5fbfdcf feat(android): align release pipeline with desktop updater rules
Add signed release APK builds on v*-tauri tags, minisign manifests per ABI, custom Android in-app updater, and CI cargo check for aarch64-linux-android.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 19:48:07 +08:00
HKLHaoBinandCursor 356e8ad480 Fix Style page dark mode readability with style tokens.
Replace hardcoded light card backgrounds with --ol-style-* tokens and strengthen dark subtle/input contrast.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 00:47:53 +08:00
HKLHaoBin 012cb77cea 统一卡片 UI 设计,优化主题切换与背景样式 2026-06-12 23:15:12 +08:00
HKLHaoBinandCursor 00fd21d78e Add system/light/dark theme switching in settings.
Apply theme before first paint via main.tsx, persist preference locally, and expose a segmented control in General settings with aura-skin contract coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 22:10:53 +08:00
HKLHaoBin e330edef14 重构样式与组件以提高一致性并优化设计
• 更新了 Card 组件样式,采用新的变量来实现玻璃拟态效果和阴影。
• 修改了 Btn 组件中的按钮样式,以符合新的颜色令牌(tokens)。
• 调整了 Collapsible 组件样式,以获得更好的边框和背景一致性。
• 统一了各设置组件的边框圆角和背景颜色。
• 增强了 AboutSection、CheckUpdateButton 及其他板块,以利用新的设计令牌。
• 优化了应用外壳(app shell)和 aura 表面的全局样式,确保视觉效果的一致性。
• 引入了新的颜色令牌,以实现更好的主题管理和无障碍性。
• 更新了多个组件的 CSS,以反映设计系统的变更,包括按钮状态和背景。
2026-06-12 21:14:16 +08:00
HKLHaoBin 1ea467a001 feat(android): port Android APK runtime onto beta 2026-06-12 18:13:12 +08:00
TRIP 5da5445a10 Merge pull request #615 from Open-Less/refactor/srp-split-dedup
refactor: coordinator.rs/commands.rs 单一职责拆分 + 重复函数合并(机械式·零回归)
2026-06-08 13:26:09 +08:00
吕柏青andClaude Opus 4.8 7a5ae5fbe2 test(coordinator): capsule-spaces 契约测试改读 ime_insertion.rs
show_capsule_window_no_activate 随 SRP 拆分搬到 coordinator/ime_insertion.rs,
契约函数本身未改;测试路径与 pub(crate) 前缀同步更新。npm run check:macos-capsule-spaces 通过。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:44:18 +08:00
Ltdaaa dc3f40ccac test: tighten aura class token matching 2026-06-05 21:54:17 +08:00
Ltdaaa 239d19e595 test: tighten aura class contract 2026-06-05 21:50:30 +08:00
Ltdaaa 849ed6c205 test: add aura skin contract 2026-06-05 21:44:27 +08:00
H-Chris233 a5970f8c12 fix(macos): avoid gated AppKit collection type 2026-05-31 11:29:43 +08:00
H-Chris233 0a66f3e50e fix(macos): show capsule in fullscreen Spaces 2026-05-30 15:14:08 +08:00
H-Chris233 57f186f054 test: make capsule Spaces contract cross-platform 2026-05-29 11:07:07 +08:00
H-Chris233 40b8c0ce13 fix(macos): show capsule across Spaces 2026-05-29 10:59:58 +08:00
weikeyi 58c229dace fix(windows-ci): WiX 工具按 WixTools* 通配查找,避免 Tauri 升级后路径失效
Windows MSI Repair 之前硬编码 `C:\Users\22933\AppData\Local\tauri\WixTools314\light.exe`,Tauri 升级到新 WiX 版本(如 WixTools315)后路径不存在,Repair 步骤直接挂。

改为 WixTools* glob,按数字后缀降序回退到名称降序,取最新可用版本。同步更新 windows-package-msvc.ps1::Find-WixTool 和 release-tauri.yml 的 Repair 步骤;保留 -sice:ICE80、NSIS/MSI 两轮 build、bash shell 等 Windows CI 红线不变。

补 4 条 windows-package-msvc.test.mjs 防回归断言:禁止 WixTools314 出现在脚本/workflow,要求两边都按 WixTools* glob 查找。

Refs: #298
2026-05-11 16:50:20 +08:00
TRIPandbaiqing 58a0ad9e62 fix(release): use tagged URL in beta manifest, not releases/latest (#344)
修复 v1.2.24-1-beta-tauri release verification 时发现的 latent bug:
Beta manifest 里 url 字段指向 https://github.com/.../releases/latest/download/<asset>,
但 releases/latest 永远是最新非-prerelease(即 Stable),Beta 用户按这个 url
auto-update 会拉到 Stable 包:

- macOS Beta: 文件名 OpenLess_aarch64.app.tar.gz 跟 Stable 重名 → 下载 Stable 包,
  装上的是 1.2.23 但 manifest 声称 1.2.24-1,version drift
- Windows/Linux Beta: 文件名带版本号 OpenLess_1.2.24-1_x64-setup.exe / .AppImage,
  releases/latest 路径下没这个文件 → 直接 404

Stable 渠道沿用 releases/latest 是对的(latest = Stable)。

修法:write-updater-manifest.mjs 多读一个 OPENLESS_RELEASE_TAG env,beta 时
url 拼成 releases/download/<tag>/<asset>(指定具体 tag,不被 prerelease 折叠
影响);stable 不变。脚本对 beta 缺 tag 做 fail-fast。

release-tauri.yml 在 manifest step 多注入 OPENLESS_RELEASE_TAG: ${{ github.ref_name }}。

为什么不重发 v1.2.24-1:当前走 Path A 手动下载式 opt-in,前端调
fetch_latest_beta_release 拿 GitHub release 页 html_url,用户跳浏览器手动选包,
不消费 manifest.url。所以 v1.2.24-1 已发布的 manifest 里 url 错也是 dormant。
下一轮 Beta tag(v1.2.24-2-beta-tauri 或 stable cut 后再做 Beta)会用修复后
的脚本产出正确 URL。

本地 smoke test:
- channel=beta + 缺 OPENLESS_RELEASE_TAG → fail-fast 抛 "is required"
- channel=beta + 有 tag → env 检查通过,进入 artifact 解析
- channel=stable + 不传 tag → 维持原行为
- python yaml.safe_load() 解析 release-tauri.yml 通过

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-08 09:04:14 +08:00
TRIPandbaiqing ec9584ea0c feat(release): split updater manifest by channel from tag suffix (#330)
让 release pipeline 根据 tag 名后缀区分 Beta / 正式版渠道,是 opt-in beta
机制的服务端基础。客户端读取的 endpoint 在 PR-B-2 接入。

约定:
- `v<v>-tauri`           = 正式版渠道(stable)
- `v<v>-beta-tauri`      = Beta 渠道(beta)

release-tauri.yml 改动:
- 在 jobs.build 顶层加 OPENLESS_RELEASE_CHANNEL job-env,由
  endsWith(github.ref_name, '-beta-tauri') 决定;workflow_dispatch 与
  非 tag 触发回退为 stable,不改变现有 dispatch 行为。
- Write updater manifest step 把 OPENLESS_RELEASE_CHANNEL 透传给脚本。
- Upload-artifact 的 manifest path 改为 `latest-{tgt}-{arch}*.json` glob,
  让 stable 和 beta 两种文件名(或 mirror 变体)都能被收集,避免
  if-no-files-found 在 beta release 时挂掉。
- Create release 的 prerelease 改为
  `${{ env.OPENLESS_RELEASE_CHANNEL == 'beta' }}`:beta tag 自动标
  GitHub prerelease(UI 折叠 + 默认不算 latest),stable 保持不变。

write-updater-manifest.mjs 改动:
- 读取 OPENLESS_RELEASE_CHANNEL(默认 stable);非 stable / beta 时
  fail-fast,避免拼错 env 静默走错路径。
- beta 渠道时 manifest 文件名加 `-beta` 后缀:
    latest-{tgt}-{arch}-beta.json
    latest-{tgt}-{arch}-beta-mirror.json
  正式版用户的 endpoint 永远指向不带后缀的旧文件名,不会被 beta release 覆盖。

向后兼容:
- 现有 v1.2.23-tauri 等 stable release 行为完全不变(文件名、prerelease=false 沿用旧逻辑)。
- workflow_dispatch 不打 tag 时也照常构建 + 不上传 release。

发版后 checklist(PR-B-2 文档段会写进 CLAUDE.md):
- 推 v<v>-beta-tauri tag → GitHub Release 应标 prerelease 且只含
  latest-*-beta.json
- 推 v<v>-tauri tag → 正式 release 且只含 latest-*.json(不带后缀)

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-05-07 22:00:08 +08:00
millionart a15e6f256e merge main and preserve Foundry selection 2026-05-07 11:44:56 +08:00
millionart b3c5554da7 merge upstream main into windows local asr 2026-05-07 09:34:39 +08:00
Chris233 69e566277d Merge pull request #264 from weikeyi/capsule-windows-shadow-inset
fix(capsule): center Windows pill within shadow inset
2026-05-07 00:04:25 +08:00
weikeyi 62005a6391 test(capsule): tighten host centering regex 2026-05-06 23:32:28 +08:00
weikeyi 94e9686a45 fix(capsule): restore non-windows box sizing contract 2026-05-06 23:18:16 +08:00
millionart a1d6e59a1c fix: address Foundry ASR review feedback 2026-05-06 21:18:15 +08:00
millionart 4fa34b486e merge upstream main into windows local asr 2026-05-06 20:55:25 +08:00
millionart 19977bc52e test(windows): add local ASR smoke mode 2026-05-06 18:14:21 +08:00
H-Chris233 1d04131bed Preserve strict credential gate for real regression mode
Real regression runs that explicitly pass -RequireCredentials should still fail fast when credentials cannot be confirmed. This keeps the real-ASR signal strict while leaving the default runtime smoke suite decoupled from legacy credentials.json.\n\nConstraint: default smoke suite must not depend on migrated plaintext JSON.\nRejected: Keep warning-only behavior in real regression mode | allows credential-missing runs to appear as valid real-ASR regressions.\nConfidence: high\nScope-risk: narrow\nDirective: Keep -RequireCredentials in windows-real-regression as a hard gate unless credential-vault probing is added.\nTested: git diff --check\nNot-tested: Running Windows PowerShell regression scripts in Linux environment.\nRelated: #230
2026-05-06 15:49:28 +08:00
H-Chris233 c06db84d3e Keep Windows smoke gates compatible with vault storage
Windows smoke scripts should no longer fail solely because credentials.json was migrated into the OS credential vault. The default suite now runs runtime startup without the obsolete JSON gate, and explicit legacy JSON checks warn instead of blocking vault-backed test machines.\n\nConstraint: Provider credentials now live in the OS credential vault after migration.\nRejected: Query Windows Credential Manager from smoke scripts | larger platform-specific parsing surface for a smoke gate that only needs to avoid the obsolete JSON blocker.\nConfidence: high\nScope-risk: narrow\nDirective: Do not make Windows smoke defaults depend on migrated plaintext credentials.json.\nTested: git diff --check\nTested: Python sanity check for conflict markers in edited PowerShell scripts\nNot-tested: PowerShell parser unavailable in this Linux environment.\nRelated: #230
2026-05-06 15:21:29 +08:00
H-Chris233 13ccf85a48 Store credentials in the system vault
Provider credentials should follow the platform credential-store threat model instead of continuing normal plaintext JSON writes. The vault now stores the existing multi-provider credentials payload in the OS credential store, migrates the legacy JSON file only when the vault has no entry, removes the legacy file after a successful write, and keeps raw credential IPC restricted to the main settings window.

Constraint: User explicitly chose Keychain/Credential Manager/Linux keyring for issue #230.

Constraint: Preserve the existing provider schema and active-provider routing with minimal frontend churn.

Rejected: Keep plaintext JSON as the documented product choice | user rejected this direction.

Rejected: Split every credential field into separate vault entries | larger migration surface and risks losing active provider state.

Confidence: medium

Scope-risk: moderate

Directive: Security-model and storage-strategy choices must be confirmed with the user before implementation.

Tested: cargo check --manifest-path src-tauri/Cargo.toml; npm run -s build; git diff --check; grep for stale plaintext/Keychain fallback wording.

Not-tested: Manual migration on macOS Keychain, Windows Credential Manager, or Linux desktop keyring.

Related: https://github.com/appergb/openless/issues/230
2026-05-06 14:39:40 +08:00
baiqing 3414e1ff5e chore(release-prep): 修 P2 + 清理 noop bundle.resources override
完整审查 CI 流程后发现两类问题:

1. windows-build-gnu.ps1 不 build OpenLessIme.dll 也不 export
   OPENLESS_IME_DLL_X64 / _X86 env,但 NSIS hook (nsis/openless-ime-hooks.nsh)
   PREINSTALL 用 File "$%OPENLESS_IME_DLL_X64%" / _X86 引用 dll,
   makensis 编译时 env 为空 → File 路径无效 → NSIS bundle 失败。
   补 IME dll 双平台 (x64 / Win32) build + Set-Item Env:。
   (Codex PR #280 P2 review)

2. build-mac.sh 之前为绕过 bundle.resources 占位 dll 加的
   --config '{"bundle":{"resources":{}}}' override,
   PR #280 已删除 bundle.resources,此 override 退化为 noop,删除让命令更干净。

release-tauri.yml 还有 2 处同源遗留("复制 dll 到 openless-ime-payload"
死步骤、Linux build 同样的 noop override)需要 workflow scope 才能动,
留待下一个 PR。
2026-05-06 11:20:24 +08:00
TRIP b84b0bdae3 Merge pull request #279 from appergb/fix/local-asr-release-flow
fix(windows): NSIS 安装包注册 TSF DLL + local-asr RAM 真正归还
2026-05-06 11:07:27 +08:00
baiqing 5aec74653b fix(windows): NSIS 安装包注册 OpenLess TSF DLL — 修"输入法后端:不可用"
## 现象
1.2.15 起在 Settings 页"Windows 输入法后端"出现 Pill「不可用」。`get_windows_ime_status()`
查 HKLM 注册表四件套(COM CLSID + TSF LanguageProfile + 三个 Category),缺一即报 NotInstalled。

## 根因
- MSI 通过 wix/openless-ime.wxs 的 RegisterOpenLessIme* CustomAction 跑 regsvr32 → 注册齐全。
- NSIS 包既没把 OpenLessIme.dll 打进去(wxs.componentRefs 是 MSI-only),也没 hook 跑
  regsvr32 → 用 setup.exe 安装的用户、走 updater 自动升级的存量用户全部命中"不可用"。
- 由于 updater latest-windows-x86_64.json 是 NSIS pass 写的,老 MSI 用户每次更新后也
  会被替换为没 TSF 的 NSIS 版本。

## 修复
- 加 src-tauri/installer.nsh:NSIS_HOOK_POSTINSTALL/PREUNINSTALL 跑 regsvr32 注册/反注册。
- bundle.resources map 把 OpenLessIme.dll 拷贝到 $INSTDIR\tsf-ime\OpenLessIme.dll
  (target 路径避开 wxs File 已声明的 windows-ime\x64\,避免 MSI component 路径冲突)。
- bundle.windows.nsis.installMode = "perMachine",让 NSIS 以管理员身份运行(写 HKLM 必需)。
- CI 在 build native dll 后把真 dll 复制到 src-tauri/openless-ime-payload/x64/OpenLessIme.dll;
  仓库 commit 0 字节占位文件,让本地 mac 端 tauri build 也能 resolve resources 路径。
- build-mac.sh 与 Linux build 步骤加 --config '{"bundle":{"resources":{}}}' 跳过 Windows-only
  的 dll 占位,避免污染 mac .app / Linux .deb/.rpm/.AppImage。

## Trade-off
- NSIS perMachine 升级需要 UAC,老 currentUser 用户首次升级时多一次 UAC 提示。
- MSI 包里 dll 会有两份(wxs File + bundle.resources),磁盘冗余 ~几百 KB,无功能影响。
2026-05-06 10:41:07 +08:00
millionart ec9f658a1d fix: harden Windows IME installer smoke 2026-05-05 19:31:49 +08:00
millionart 4a7a1b6b8c test: cover nsis ime edge cases 2026-05-05 18:51:29 +08:00