Skip to content

feat(recording): 支持在 Toggle 模式按 Enter 结束录音 - #1235

Open
HKLHaoBin wants to merge 9 commits into
Open-Less:betafrom
HKLHaoBin:feat/1214-enter-stop-toggle
Open

HKLHaoBin wants to merge 9 commits into
Open-Less:betafrom
HKLHaoBin:feat/1214-enter-stop-toggle

Conversation

@HKLHaoBin

@HKLHaoBin HKLHaoBin commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

摘要

Fixes #1214.

为桌面端 Toggle 录音模式增加可选的 Enter 停止录音并开始转写能力。用户需在「设置 → 录音」主动开启「按 Enter 结束录音」;默认关闭,避免改变现有用户的回车习惯。

修复 / 新增 / 改进

  • Windows、macOS 和 Linux 接入与当前录音 SessionId 绑定的停止请求,处理 Starting / Recording 阶段,防止过期按键请求停止新的录音。
  • 保留原录音快捷键停止、Esc 取消,以及没有活动录音时 Enter 的正常行为。
  • 处理主 Enter / 小键盘 Enter、按键重复及释放、修饰键组合和合成输入边界;排除快捷键录制、QA 和 VoiceEdit 场景。
  • 新增默认关闭的 enterStopEnabled 设置,覆盖偏好持久化、旧配置兼容、同步、React / Linux egui 设置界面及多语言文案。
  • 补充设置开关、会话隔离、原生按键状态、Linux 全局 / 聚焦窗口输入及相关启动回归测试。

兼容

  • 不包含:移动端 Enter 停止录音交互、Hold / Auto 模式下的 Enter 停止、录音快捷键或 Esc 行为变更。
  • 对现有用户:新安装与缺少此字段的旧配置均默认关闭;切换录音模式保留设置值,仅 Toggle 活动录音时生效。
  • 对本地环境 / 构建流程:无新增依赖或 CI 工作流变更;移动端共享类型与 stub 保持兼容。

测试计划

当前验证提交:416985c982efd97a7d611ec1e0e0f00a86d223bc(合并上游 beta 的 93d40bf9)。唯一文本冲突位于 E2EE 文档测试,已保留 Enter 设置同步测试与上游凭据端点安全测试,未删除任一方覆盖。GitHub 已确认没有合并冲突。

所有编译、测试和打包均在 GitHub Actions 执行,未在本机运行。当前尚在等待 fork 的 macOS 重试结果,不宣称完整构建全部通过。

当前提交已就绪产物

🤖 Generated with Claude Code

HKLHaoBin and others added 9 commits October 19, 2026 16:28
Add a default-off recording setting and session-bound Enter stop handling
across Windows, macOS, and Linux while preserving normal Enter behavior.
Cover preference sync, native gestures, and focused Linux UI routing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move the settings handler regression into the existing Node script suite
and use Clippy-compliant Rust test initialization and boolean assertions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clone the parsed match rule within the format string lifetime, keeping
startup error handling and signal registration unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Construct the captured session through its public UUID constructor and
finish test frames through the existing texture-safe egui helper.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the hotkey module's EnterStopState in Windows and macOS test contexts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Skip native effects only for actual Enter preference-only changes, not
for equal targets that explicitly request startup reapplication.
Cover equal targets with Enter stop both disabled and enabled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collect visible recording rows before and after scrolling while retaining
all existing label checks and asserting the new Enter stop setting.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Preserve both Enter-stop preference regression tests and the upstream credential endpoint safety test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@H-Chris233 H-Chris233 added area:hotkey Hotkey area area:recording Recording area enhancement New feature or request large-change Large or risky change needs-review Needs review P3 Low priority platform:linux Linux-specific platform:macos macOS-specific platform:windows Windows-specific labels Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:hotkey Hotkey area area:recording Recording area enhancement New feature or request large-change Large or risky change needs-review Needs review P3 Low priority platform:linux Linux-specific platform:macos macOS-specific platform:windows Windows-specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Enter to stop recording in Toggle mode

2 participants