feat(desktop): start/stop recording from the app menu bar - #43
Merged
Conversation
Add a recording item to the Wisp application menu (and a Cmd+R shortcut) that toggles the session via the same state machine as the in-window Record button. The label flips between "Start Recording" and "Stop Recording" with the session state; the native menu is only rebuilt when that label actually changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
メニューバー(アプリケーションメニュー)から録音を開始/停止できるようにしました。これまではウィンドウ内の Record ボタンからしか操作できませんでしたが、「Wisp」メニューと
Cmd+Rショートカットからもトグルできます。変更点
app_menu.rsToggleRecordingアクションを追加し、ウィンドウ内 Record ボタンと同じtoggle_recording状態機械を再利用。Cmd+Rキーバインドを追加。set_menusはネイティブメニュー全体を再構築するため、ラベルが実際に変化したときだけ(文字起こしの毎ティックではなく)cx.observe経由で再設定。main.rstoggle_recordingをpub(crate)に変更し、configure_app_menuにrecordings_dirを渡すよう更新。メニュー構成:
補足: ステータスバー常駐アイコンについて
当初「メニューバー」には画面右上のステータスバー常駐アイコン(NSStatusItem)も含まれるか確認しましたが、今回は見送りとなりました。理由として、GPUI 0.2.2 には公開のステータスバー API が存在せず(内部に
status_item.rsはあるがmod未登録)、ワークスペースのunsafe_code = "deny"方針下では外部クレート導入か unsafe 緩和が必要になるためです。必要であれば別 PR で対応します。検証
cargo check -p wisp-desktop成功(この環境ではリンク段階でlibxkbcommon不足のため最終リンクのみ失敗。型検査は通過)。cargo clippy -p wisp-desktop --all-targetsで新規 warning ゼロ(残る2件は本変更前から存在するgraceful_stop_session内の既存 warning)。https://claude.ai/code/session_0118Bs8MoeabeihQ7swc9cfc
Generated by Claude Code