Commit Graph
159 Commits
Author SHA1 Message Date
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
baiqing a9c81e6e0e feat(updater): 增加应用自动更新入口 (#84)
H-Chris233: closes #33。

实现 Tauri 内置 updater 集成:
- Cargo: tauri-plugin-updater v2
- tauri.conf.json: 加 updater 配置(pubkey + endpoint 指向 GitHub Releases latest)
- capabilities/default.json: 授予 updater:default 能力
- lib.rs: 注册 updater 插件 + restart_app 命令
- src/pages/Settings.tsx + i18n: 关于区域加'检查'按钮、检查/下载/安装/重启对话框流
- 新脚本 scripts/write-updater-manifest.mjs: release 侧从 build artifact 拉签名生成 manifest
- workflow: TAURI_SIGNING_PRIVATE_KEY env + 各平台 build 时 createUpdaterArtifacts true

注意:下次 v*-tauri tag 必须配 TAURI_SIGNING_PRIVATE_KEY secret,否则 CI 硬失败。
2026-04-30 17:20:32 +08:00
baiqing 786bc574a7 chore(release): bump 1.2.1 → 1.2.2 — 含 PR #82 凭据加载竞态修复 2026-04-30 15:00:00 +08:00
Chris233 df8846913a fix(settings): 避免凭据加载前被空值覆盖 (#82)
* Prevent untouched credential fields from clearing secrets

Settings credential inputs can mount empty while readCredential is still pending. The field now waits for a successful read before enabling saves, tracks whether the user actually edited the value, and surfaces read failures without writing an empty credential back to storage.

Constraint: Issue #34 requires preserving existing credentials when the settings page is opened or blurred without edits.

Constraint: Keep secrets out of logs and UI.

Rejected: Add full E2E coverage now | larger test harness work than needed for the minimal bug fix.

Confidence: high

Scope-risk: narrow

Tested: npm install

Tested: npm run build

Tested: cargo check

Tested: git diff --check

* Keep credential fields recoverable after read errors

Review feedback identified that read failures left fields disabled while the temporary status disappeared. Read errors now leave the field interactive with a persistent readError status, and the credential-field status union is named explicitly for safer helper signatures.

Constraint: Preserve the issue #34 guard that only dirty loaded fields save credentials.

Rejected: Broader state-machine rewrite | unnecessary for this targeted review fix.

Confidence: high

Scope-risk: narrow

Tested: npm run build

Tested: cargo check

Tested: git diff --check
2026-04-30 14:58:53 +08:00
TRIPandbaiqing e3f91e849c ci(release): 显式 strip macOS bundle xattr 作为 defense-in-depth (#83)
GitHub Actions 输出本来就不带 com.apple.quarantine (actions/upload-artifact
不跨机器持久化 xattr, softprops/action-gh-release 上传 binary stream 也不带),
但加这一步让 "云端 artifact 一定干净" 变成可验证的承诺, 未来 release 不会因
runner 环境变化退化.

用户下载到本地后浏览器/LaunchServices 仍会加 quarantine, 依赖 release notes
里的 xattr -cr 指引或一行安装命令处理.

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-04-30 14:56:22 +08:00
TRIP 90141e2731 Merge pull request #81 from appergb/develop
release(v1.2.1): 累积外部 PR + 终审 HIGH 修复
2026-04-30 14:31:30 +08:00
baiqing ca31264b44 chore(release): bump v1.2.0 → v1.2.1
包含本轮所有合并:
- Codex 终审两条 HIGH (cancel race) 修复 (PR #79)
- 6 个 Cooper-X-Oak/Codex bot PRs 自动合并 (#44 #49 #53 #68 #72 #73)
- 2 个有冲突 PR 本地 rebase 后合并 (#66 cancel + 空转写并存 / #67 Windows docs)
- README 破图修复 (PR #80)
- workflow-scope 受限的 #48 + #75 由用户在 GitHub UI 直接合并

3 处版本字段同步:package.json + tauri.conf.json + Cargo.toml
2026-04-30 14:31:05 +08:00
TRIPandbaiqing 7a3a51a1ed fix(readme): 修复 README 中破损的图片引用 (#80)
Resources/AppIcon.png 已在 commit 170283e(清理 Swift 残留)中删除,但 README.md
和 README.zh.md 顶部的 hero 图片仍然指向它,GitHub 上显示破图。

改为指向 Tauri 自身的图标:openless-all/app/src-tauri/icons/128x128@2x.png

Co-authored-by: baiqing <lbx12309@icloud.com>
2026-04-30 14:27:46 +08:00
Cooper OakandCooper-X-Oak 7797d1479a docs(windows): 补齐上游交付与测试工作流 (#67)
Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:25:51 +08:00
Cooper OakandCooper-X-Oak 848cfc35c8 fix(windows): 收口录音会话失败态 (#66)
Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:25:43 +08:00
Cooper OakandCooper-X-Oak 61177eafc3 ci(release): 补齐 macOS Tauri 产物发布 (#75)
Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:21:54 +08:00
Cooper OakandCooper-X-Oak ff694c07c1 fix(windows): 收敛启动和开发产物路径 (#48)
* fix(windows): 收敛启动和开发产物路径

* ci(windows): 校验运行时 smoke 脚本

---------

Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:21:35 +08:00
Cooper OakandCooper-X-Oak 96ff66eb80 test(windows): 增加真机回归 smoke 矩阵 (#73)
Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:19:29 +08:00
Cooper OakandCooper-X-Oak b8988c3330 fix(windows): 缺失托盘图标时继续启动 (#72)
Co-authored-by: Cooper-X-Oak <Cooper-X-Oak@users.noreply.github.com>
2026-04-30 14:18:54 +08:00