Skip to content

feat(ux): 三个小改进——Esc 立即收起胶囊 / 概览复制按钮 / 历史页 ⌘R 刷新#790

Merged
H-Chris233 merged 4 commits into
Open-Less:betafrom
bigsongeth:feat/ux-polish
Jul 12, 2026
Merged

feat(ux): 三个小改进——Esc 立即收起胶囊 / 概览复制按钮 / 历史页 ⌘R 刷新#790
H-Chris233 merged 4 commits into
Open-Less:betafrom
bigsongeth:feat/ux-polish

Conversation

@bigsongeth

@bigsongeth bigsongeth commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

User description

三个互相独立的小体验改进,打包在一个 PR 里(各一个 commit)。

① Esc / 主动取消时胶囊立即消失

所有终止态原本共用 2000ms 延迟收起。给「主动取消」(Esc / 点 ✕)单开一条零延迟路径(CAPSULE_CANCEL_HIDE_DELAY_MS = 0),按 Esc 立刻回 Idle、由前端淡出动画收尾,观感「按下即消失」。完成 / 出错仍保留 2 秒(需要让用户看清结果 / 错误)。

② 概览「最近识别」每行加复制按钮

Overview.tsxRecentRow 右侧加复制按钮,复用 History 的规则(润色文本为空时回退到识别原文),点击后图标变 ✓ 并显示「已复制」1.5s。顺带把共享 Btnchildren 改为可选以便复用。

③ 历史页 ⌘R 刷新

History.tsx 已有键盘监听,加 ⌘R:preventDefault() 拦掉 webview 整页 reload,改为只重拉 listHistory()

均通过 cargo check / tsc

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com


PR Type

Enhancement, Bug fix


Description

  • Esc / cancel immediately hides capsule (0ms delay)

  • Overview "Recent" rows gain a copy button (fallback to raw transcript)

  • History page ⌘R refreshes list without full reload

  • Fix cancelled processing sessions not properly finishing (session id check)


File Walkthrough

Relevant files
Enhancement
coordinator.rs
Add cancel-specific capsule hide delay constant                   

openless-all/app/src-tauri/src/coordinator.rs

  • Added CAPSULE_CANCEL_HIDE_DELAY_MS = 0 constant for immediate hide on
    cancel
  • Updated comments to distinguish auto-hide vs cancel hide delays
+7/-2     
coordinator_state.rs
Add state function for cancelled processing finish             

openless-all/app/src-tauri/src/coordinator_state.rs

  • Added finish_cancelled_processing_state with session id validation
  • Added unit tests for matching and stale sessions
+58/-0   
History.tsx
Add ⌘R refresh shortcut to history page                                   

openless-all/app/src/pages/History.tsx

  • Added ⌘R key binding to refresh history (preventDefault)
  • Added refresh to useEffect dependency array
+9/-2     
Overview.tsx
Add copy button to recent recognitions                                     

openless-all/app/src/pages/Overview.tsx

  • Added copy button to RecentRow with copied state and timeout
  • Falls back to raw transcript if final text is empty
  • Shows "copied"/"copy" text via Btn component
+29/-3   
_atoms.tsx
Make Btn children optional                                                             

openless-all/app/src/pages/_atoms.tsx

  • Made children prop optional in BtnProps (added ?)
+1/-1     
Bug fix
dictation.rs
Introduce finish_cancelled_processing for clean cancellation

openless-all/app/src-tauri/src/coordinator/dictation.rs

  • Added finish_cancelled_processing helper function
  • Replaced direct set_phase_idle calls with finish_cancelled_processing
    for cancelled paths
  • Used CAPSULE_CANCEL_HIDE_DELAY_MS for cancelled sessions
+24/-13 

bigsongeth and others added 3 commits July 12, 2026 17:49
@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 9a0d230)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233

Copy link
Copy Markdown
Collaborator

开始审核

@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 9a0d230

@H-Chris233 H-Chris233 merged commit 6958130 into Open-Less:beta Jul 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants