Commit Graph
172 Commits
Author SHA1 Message Date
millionart d4655b7cb9 feat: add Windows IME IPC client 2026-05-01 19:43:17 +08:00
millionart 6b50b0fe7c fix: capture TSF keyboard layout profile 2026-05-01 19:23:30 +08:00
millionart d48fad6387 fix: query active keyboard TIP profile 2026-05-01 19:17:18 +08:00
millionart 975d63385a feat: manage Windows TSF input profiles 2026-05-01 19:08:54 +08:00
millionart 45aae5e7cd fix: validate Windows IME profile snapshots 2026-05-01 18:52:12 +08:00
millionart 6d088508fa feat: add Windows IME profile state 2026-05-01 18:45:35 +08:00
millionart 83426bc057 feat: add Windows IME IPC protocol 2026-05-01 18:41:09 +08:00
millionart 271a51ad79 docs: plan temporary TSF IME implementation 2026-05-01 18:20:01 +08:00
millionart 14cacc646d chore: ignore local worktrees 2026-05-01 18:19:41 +08:00
millionart 7005a060b0 docs: design temporary TSF IME flow 2026-05-01 18:05:39 +08:00
TRIP 39c4633fbd Merge pull request #115 from appergb/chore/release-1.2.8
chore: release 1.2.8 + zh-CN Access Key label 精简
2026-05-01 11:29:29 +08:00
baiqing 1992647040 chore: release 1.2.8 + i18n cleanup
火山引擎 ASR Access Key 字段 zh-CN label 从 "Access Key(访问密钥)"
精简为 "Access Key",与英文版统一、与 App ID 改名风格一致,
去掉对用户的视觉干扰。后端 keychain account 名 volcengine.access_key 不变,
老用户凭据保留。

bump version 1.2.7 → 1.2.8(package.json / tauri.conf.json / Cargo.toml / Cargo.lock)。
2026-05-01 11:24:16 +08:00
TRIP b7e934a8b9 Merge pull request #113 from appergb/fix/translation-mode-and-codex-fixes
feat: 翻译模式 + Codex 后审修复 + 胶囊翻译指示器
2026-05-01 10:18:29 +08:00
baiqing bf335da697 feat: 翻译模式 + Codex 后审修复 + 胶囊翻译指示器
翻译模式(issue #4)
  按住录音键时随时按一下 Shift(任一侧)→ 录音结束后走"翻译输出"管线,
  按"翻译"页中选定的目标语言翻译后插入到光标。
  - hotkey.rs 三平台(CGEventTap / Win32 hook / rdev)都监听 Shift down 边沿,
    通过新增的 HotkeyEvent::TranslationModifierPressed 上报
  - coordinator.rs 加 translation_modifier_seen 标志位(begin_session 重置);
    end_session 路径根据它 + 非空 target_language 选 polish 或 translate
  - polish.rs 抽 chat_completion 共享通道;新增 translate_to + translate_system_prompt;
    working_languages 作为 system prompt 头部前提注入两条管线
  - types.rs::UserPreferences 加 working_languages(默认 ["简体中文"])+
    translation_target_language(默认空)
  - Settings.tsx 删除原来的录音 section 翻译配置;新建 Translation.tsx 一级页(在风格下面),
    含工作语言多选 + 目标语言下拉 + 5 步使用指南
  - 新增 capsule.tsx 翻译徽章:"● 正在翻译" 蓝色药丸,绝对定位在 pill 上方 8px,
    opacity + translateY transition 平滑出入;CapsulePayload 加 translation: bool
  - capsule 窗口高度 96 → 110 给 badge 让出空间
  - 内置 SUPPORTED_LANGUAGES 列表(15 种自然语言原生名)

Codex 后审修复(基于 4f45dee main 上跑的整体审查)
  - tauri.conf.json 主窗口 decorations 由 #108 设的 false 还原为 true,
    Windows-only 在 lib.rs::setup 里 set_decorations(false),让 macOS 拿回原生红黄绿
  - coordinator.rs::SessionState 加 session_id;spawn_recorder_error_monitor
    捕获当前 id,迟到的 cpal 错误若 id 不匹配直接 drop,不会误中止后续 session
  - volcengine.rs 把 spawn-per-chunk 模式改成单 mpsc worker 串行 send,
    彻底消除跨 consume 调用的 writer 锁 race(之前的 fix 仅在 burst flush 内部有效)

附带修复
  - insertion.rs Windows/Linux 粘贴后剪贴板恢复加用户开关 restore_clipboard_after_paste
    (issue #111),默认 true 保留现行行为;关掉后听写文本留剪贴板,paste 失败时可手动 Ctrl+V 找回
  - SettingsModal 内容区改为 flex column + overflow:hidden,X 按钮 + 标题固定,
    只 section 内容区滚动;Settings.tsx 嵌入模式右栏独立 scroll
  - Settings → 提供商:火山引擎 "App Key" 文案改为 "App ID"
    (keychain account name 不变,老用户凭据不丢)
  - i18n 增加 capsule.translating / nav.translation / translation.* 完整命名空间
2026-05-01 10:10:23 +08:00
TRIP 4f45dee2d0 Merge pull request #109 from H-Chris233/main
[谨慎发布,需要测试]fix(recorder): 上报录音流运行期错误
2026-05-01 08:14:14 +08:00
TRIP 769fbdffde Merge pull request #108 from Cooper-X-Oak/codex/windows-ui-fixes
fix(windows): polish capsule and custom titlebar shell
2026-05-01 08:14:09 +08:00
TRIP 27aa005bec Merge pull request #106 from Cooper-X-Oak/codex/fix-windows-gnu-export-ordinal
fix(windows-gnu): 禁止 MinGW 为 cdylib 自动导出符号
2026-05-01 08:14:03 +08:00
TRIP 8beeb3ce72 Merge pull request #110 from appergb/fix/asr-seq-race-and-ui-rework
fix(asr): 修 Volcengine 序号竞态 + UI 重做
2026-05-01 08:12:32 +08:00
baiqing 48f21341c1 fix(asr): 修 Volcengine 序号竞态 + UI 重做(毛玻璃 / 滑动 / 字体设置 / History 双列滚动)
ASR 稳定性
  volcengine.rs::consume_pcm_chunk 不再每块一个 spawn——每次 consume 调用一次 spawn、
  内部串行 send;BufferingAudioConsumer 启动时一次性 flush 15KB 缓冲不再触发
  "autoAssignedSequence (N) mismatch sequence in request (N+1)" 断连。

UI 重做
  - sidebar 整体改透明,让 LOGO/导航/快捷键/BETA + footer 共用外层一片磨砂玻璃
  - 内容卡圆角与外层窗口对齐 (mac 20 / win 14)
  - 标签页切换换成 cubic-bezier(0.32,0.72,0,1) 横向 14px 滑入(0.32s)
  - 主窗口加 acceptFirstMouse: true,后台单击即激活并触发交互
  - footer 问号点开版本说明 popover;齿轮恢复直接打开 Settings

自动更新统一
  抽出 components/AutoUpdate.tsx:useAutoUpdate hook + UpdateDialog;
  Settings 关于 + footer 检查更新共用同一套状态机和对话框。

字体大小设置
  挂在 SettingsModal 现有"个性化"section(与语言 / 玻璃强度并列),
  通过 documentElement.style.zoom 三档缩放 + localStorage 持久化。

History 列独立滚动
  把 padding + overflow:auto 合到 key={currentTab} 的 wrapper 上,
  History 根的 height:100% 终于能解析到固定高度,左右两列各自独立 scroll;
  Overview/Vocab/Style 自然高度溢出仍走 wrapper 滚条,行为不变。
2026-05-01 07:55:47 +08:00
H-Chris233 944c77013b Surface recorder stream failures to the capsule
Runtime cpal stream errors used to stop at the recorder log line, leaving the coordinator in an active recording phase until it processed empty audio. Add a small runtime-error channel from Recorder to the coordinator and abort only Starting/Listening sessions with an error capsule.

Constraint: Issue #59 asks for minimal handling of recorder runtime failures.

Rejected: Reworking recorder/coordinator ownership model | broader than needed for a single runtime error path.

Confidence: high

Scope-risk: narrow

Tested: cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml

Tested: cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml recorder_runtime_error_aborts_active_session

Tested: git diff --check
2026-05-01 07:44:06 +08:00
Cooper-X-Oak ed504c1a9f fix(windows): polish capsule and custom titlebar shell 2026-05-01 00:46:31 +08:00
Chris233 d8d341f781 Merge pull request #107 from H-Chris233/main
chore(i18n): 补齐剩余可见文案翻译
2026-05-01 00:15:57 +08:00
Cooper-X-Oak d2074173b7 fix(windows-gnu): suppress MinGW auto-exports for cdylib 2026-05-01 00:00:47 +08:00
H-Chris233 cc1ef0a9e7 Route remaining visible labels through i18n
Settings credential labels, capsule control aria labels, and duration suffixes still used inline literals after the i18n framework landed. Move those user-visible strings behind existing locale resources without changing provider or history behavior.

Constraint: Issue #65 asks for minimal i18n alignment only.

Rejected: Broad text audit or component refactor | unnecessary for the reported literals.

Confidence: high

Scope-risk: narrow

Tested: npm run build

Tested: git diff --check
2026-04-30 23:28:50 +08:00
Cooper-X-Oak 920a31fa0f fix(windows): 收敛插入焦点与剪贴板副作用 2026-04-30 23:23:47 +08:00
Chris233 ddcf8fc48e Merge pull request #101 from H-Chris233/main
fix(credentials): 串行化凭证文件写入
2026-04-30 22:53:57 +08:00
Chris233 893707984c Merge branch 'appergb:main' into main 2026-04-30 21:54:12 +08:00
H-Chris233 70eca3525a Serialize credentials file updates
Credentials writes use a load-modify-save JSON path, so concurrent Settings debounce saves could read the same stale root and overwrite each other. Guard the CredentialsVault file accessors with one process-wide mutex to keep read-modify-write operations ordered.

Constraint: Issue #61 asks for minimal protection around the existing JSON vault path

Rejected: Atomic compare-and-swap rewrite | broader than needed for current single-process Tauri writes

Confidence: high

Scope-risk: narrow

Tested: cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml

Tested: git diff --check
2026-04-30 21:50:09 +08:00
TRIP 884455a99a Merge pull request #94 from appergb/codex/windows-recording-fixes
fix: stabilize Windows recording startup
2026-04-30 21:38:36 +08:00
baiqing f937f586ee chore: bump version to 1.2.6 2026-04-30 21:33:28 +08:00
Chris233 9d92500252 Merge pull request #93 from H-Chris233/main
fix(ui): 清理卸载后的延迟状态更新
2026-04-30 21:27:46 +08:00
baiqing 2002890a39 fix: stabilize Windows recording startup 2026-04-30 21:23:52 +08:00
H-Chris233 0d949a3cda Clear frontend timeout callbacks on unmount
Store the remaining transient UI timeout handles in refs so Settings About copy feedback and Onboarding delayed permission refresh do not call setState after their components unmount.

Constraint: Issue #64 asks for minimal setTimeout handle cleanup without changing UI behavior

Confidence: high

Scope-risk: narrow

Tested: npm run build

Tested: git diff --check
2026-04-30 21:21:29 +08:00
Chris233 cf702d9d99 Merge pull request #92 from H-Chris233/main
fix(insertion): 修正 macOS 无权限时插入状态
2026-04-30 20:54:07 +08:00
H-Chris233 3282e1e5d9 Avoid false inserted history without macOS accessibility
Before posting Cmd+V on macOS, check the current Accessibility trust state. If permission has been revoked, keep the transcript on the clipboard and reuse the existing CopiedFallback path instead of recording a successful insertion.

Constraint: Keep issue #62 fix minimal and avoid adding unreliable target-control paste verification

Rejected: AX focused-value readback with timeout | broader and brittle across apps/web editors

Confidence: medium

Scope-risk: narrow

Tested: cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml

Tested: git diff --check

Not-tested: Live macOS Accessibility revoke flow on this host
2026-04-30 20:42:24 +08:00
baiqing 9b2f65fe71 fix: harden Windows hotkey release handling 2026-04-30 19:26:31 +08:00
baiqing 6801f29e05 fix: start recorder before ASR handshake
Closes #91
2026-04-30 19:18:21 +08:00
baiqing f456516f69 chore: release 1.2.5 2026-04-30 18:58:35 +08:00
baiqing 42dc4fe989 merge: integrate PR 90 windows foreground hotkey
# Conflicts:
#	openless-all/app/src-tauri/src/coordinator.rs
#	openless-all/app/src/App.tsx
2026-04-30 18:57:08 +08:00
baiqing e86edd13c2 merge: integrate PR 86 windows foreground hotkey 2026-04-30 18:52:01 +08:00
baiqing e6ec4935e0 feat: add dense request polish example 2026-04-30 18:44:39 +08:00
baiqing d1ae8479ba fix: let macOS position traffic lights 2026-04-30 18:41:44 +08:00
Chris233 9654cde893 Merge branch 'appergb:main' into main 2026-04-30 18:38:12 +08:00
baiqing a853b592a1 chore: release 1.2.4 mac titlebar polish 2026-04-30 18:27:35 +08:00
H-Chris233 67bb14ec40 Restore foreground Windows hotkey edges
Windows can deliver modifier-only key events to the focused WebView without the low-level hook seeing the same edge, so the main window now forwards only hotkey-relevant DOM key events to the coordinator. Both native hook and window-forwarded events share the same coordinator edge gate so a working hook does not double-trigger toggle sessions.

Constraint: Issue #85 requires OpenLess foreground Right Control to reuse existing pressed/released/cancel semantics without changing global hook behavior

Rejected: Start dictation directly in the frontend | would duplicate coordinator state-machine semantics

Rejected: Keep a separate window-held flag | review found it can double-trigger toggle mode when both DOM and low-level hook report the same physical press

Confidence: medium

Scope-risk: moderate

Tested: cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml

Tested: cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml window_key_matcher_mirrors_windows_trigger_aliases

Tested: npm run build

Tested: git diff --check

Not-tested: Physical Windows foreground Right Control on this Linux host
2026-04-30 18:16:59 +08:00
baiqing 0378dd15ce fix: restore team updater signing key 2026-04-30 18:09:37 +08:00
baiqing ef9db9645d fix: polish 失败有感知 + 词汇启停失败回滚 (closes #57 #60)
#57: polish 失败静默回退原文 → 用户感知'风格设置没生效'
- polish_or_passthrough 返回类型 String → (String, Option<String>)
  失败时第二个返回值是 reason,let _ = drop 用不到
- end_session: polish_error.is_some() 时 done_message='润色失败,已插入原文'
  + history.error_code='polishFailed'。文本仍插入(保留'用户的话不丢'语义)

#60: 词汇启停乐观更新无回滚
- Vocab.tsx::onToggle try { await setVocabEnabled } catch { setEntries 回滚 + 显示错误 }
  避免 UI 显示已禁用但 ASR/polish 仍注入
2026-04-30 17:55:23 +08:00
baiqing 1683224403 docs(readme): 更新到 v1.2 — 双语 / auto-update / single-instance;清理 Swift 遗留
- Status (v1.1) → (v1.2);加 i18n / 自动更新 / 单实例锁 / push-to-talk / vocab hits 累计
- Whisper 已上线,从 roadmap 移到当前状态
- 移除 Swift legacy build / 发版指引(Swift 整套已在 commit 34d2823 删除)
- Architecture 段从'Sparkle for legacy users'改为'Tauri updater 签名 artifact'
- Roadmap 加上 #43(翻译模式)+ #46(风格记忆);都是当前 open feature issue
- 维护者发版检查加 TAURI_SIGNING_PRIVATE_KEY secret 提示

中英 README 同步改。
2026-04-30 17:53:11 +08:00
Cooper-X-Oak 85fc5b8d5a fix(windows): 修复前台主窗口热键失效 2026-04-30 17:43:27 +08:00
baiqing 1efc20b2b2 chore(release): bump 1.2.2 -> 1.2.3 + 自有 updater pubkey + 重启前 strip xattr
修复 Codex audit 对 main HEAD a9c81e6 的 2 条 HIGH + 把 macOS auto-update 的
"重启后 Gatekeeper 拦截"问题封死。

## HIGH #2: 版本号不一致
PR #84 没顺手 bump 版本,main 仍自报 1.2.2,下次直接打 v1.2.3-tauri 会让 updater
manifest 自报 1.2.2,已安装的 1.2.2 客户端永远拿不到 "有新版本"。

修:package.json + tauri.conf.json + Cargo.toml 全部改 1.2.3。

## HIGH #1: updater pubkey 所有权
PR #84 使用的 pubkey 是外部贡献者本地生成的,appergb 不掌握对应 private key。
任何持有那把私钥的人都能签发更新 -> 客户端 OTA 装上恶意版本。

修:
- 用 npx @tauri-apps/cli signer generate --ci 生成 appergb 自己的 keypair
- 新 pubkey: F0FCDE68E08E6D4E (写入 tauri.conf.json plugins.updater.pubkey)
- 私钥已通过 gh secret set TAURI_SIGNING_PRIVATE_KEY 配到 GitHub repo secret
- 私钥本地副本只在 /tmp,不进 git,commit 后会清除

## macOS auto-update 后 strip xattr
restart_app 在 app.restart() 前对 .app bundle 跑 /usr/bin/xattr -cr。这是
Tauri auto-updater + 未公证应用的组合下唯一让"自动更新对用户零摩擦"的解法 —
否则 Gatekeeper 在重启时会拦说"OpenLess 已损坏",用户必须开终端 xattr 才能
继续用,违反 auto-update 的本意。

未来发版逻辑必须保留这一步。release-tauri.yml 上一次 PR (#83) 已经在 CI 侧
strip 过一次,本次在 client 侧重启时再 strip 一次,双保险覆盖
"下载 -> 解压 -> 安装 -> 重启"全链路。
2026-04-30 17:41:50 +08:00