Commit Graph
72 Commits
Author SHA1 Message Date
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
millionart 933e014a80 test: assert nsis uninstall ignores unregister failures 2026-05-05 18:36:17 +08:00
millionart e67755d04e fix: address Windows IME installer review feedback 2026-05-05 18:16:48 +08:00
millionart 753236dd55 fix: register Windows IME from NSIS installer 2026-05-05 17:38:28 +08:00
baiqing a5f1a8f16d chore(release): 1.2.17 — Windows MSI 修 light.exe ICE80 报错
x86/x64 IME DLL 都装进 INSTALLDIR\windows-ime\,32-bit 组件落在 64-bit
Directory 是 ICE80 的硬性报错。本场景路径绝对指向、不依赖 SysWOW64
重定向,按 Microsoft 文档是合法用法,给手动 light.exe 重链加 -sice:ICE80
即可放行。改动同步覆盖 CI workflow 和本地打包脚本。
2026-05-04 22:21:50 +08:00
millionart 6d3af7056d fix: forward fallback hotkey edges 2026-05-04 20:27:05 +08:00
millionart 983b4126d7 fix: stabilize hotkey recorder combos 2026-05-04 20:00:36 +08:00
millionart 104793cf18 merge upstream main into Windows IME PR 2026-05-04 10:23:42 +08:00
millionart 2554259d80 fix: harden Windows IME review edge cases 2026-05-04 10:17:56 +08:00
H-Chris233 c8ccff0669 Avoid macOS updater asset collisions across architectures
Intel and Apple Silicon macOS jobs produced the same updater bundle filename,
which let one matrix job overwrite the other release asset and could point
both architecture manifests to a single binary. Rename macOS updater bundles
per architecture before release upload and prefer arch-specific artifact lookup
when generating updater manifests.

Constraint: Keep existing updater manifest format and release action usage
Rejected: Split macOS uploads into separate release jobs | larger workflow churn
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any new macOS updater lane must keep unique asset names to preserve manifest correctness
Tested: release-tauri.yml YAML parse; diff audit for rename+manifest path alignment
Not-tested: End-to-end tagged GitHub Actions release run
2026-05-04 01:02:44 +08:00
millionart 8cb289ea8c fix: move Word caret after IME commit 2026-05-03 23:53:29 +08:00
millionart 152e38c843 fix: support async Word IME commits 2026-05-03 23:38:35 +08:00
millionart cb10e0d39c fix: register 32-bit Windows IME 2026-05-03 22:59:38 +08:00
millionart f497cd4eb5 merge Windows TSF IME support 2026-05-03 19:24:21 +08:00
millionart 865e432fb7 fix: package and register Windows TSF IME 2026-05-03 19:03:43 +08:00
baiqing 91f1c5fae8 fix(macos): keep native traffic lights visible 2026-05-03 09:56:47 +08:00
baiqing 420c5425e6 fix(macos): tune window chrome motion 2026-05-03 09:43:19 +08:00
baiqing f89a285877 fix(macos): restore native window chrome and capsule focus 2026-05-03 09:29:59 +08:00
Cooper-X-Oak 802ee653c9 fix(windows): 收紧主窗口 shell 外观契约 2026-05-02 12:12:46 +08:00
baiqing 9fd726ec87 test(windows): 对齐 capsule geometry 新契约断言 2026-05-02 12:06:22 +08:00
Cooper-X-Oak 9875e089d8 fix(windows): 收紧 capsule 几何契约 2026-05-02 12:05:09 +08:00
TRIP 68298d253c Merge pull request #138 from Cooper-X-Oak/codex/auto-update-download-acceleration
fix(tauri): 加速自动更新下载
2026-05-02 09:51:13 +08:00
TRIP 124778036d Merge pull request #145 from Cooper-X-Oak/codex/windows-cold-start-ui-pr
fix(windows): 收口 startup visible-ready 生命周期并进入评审观察
2026-05-02 09:48:13 +08:00