mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* fix: prevent Shift+Tab from changing a backgrounded agent's mode The New Workspace mode-cycle shortcut (Shift+Tab) could reach a still-mounted background agent's mode control and silently change that running agent's execution mode — including into a permissive/bypass mode — with no feedback in the New Workspace UI. Root cause is in useKeyboardActionHandler: it re-registered its handler on every render (a fresh inline `actions` array plus a changing `handle` identity). The dispatcher runs the most-recently-registered matching handler first, so a frequently re-rendering control climbed ahead of the active one and consumed the key. The registered `handle`/`enabled` were also captured per registration and read stale by the native keydown listener. Fix: register once per (handlerId, priority, actions); read `handle` and `isActive` live from a ref; fold `enabled` into a fresh `isActive` so the dispatcher re-checks it at dispatch time. Registration order stays stable and callbacks stay current for all six consumers of the hook. Add an e2e regression test that opens a live agent, opens New Workspace, and presses Shift+Tab. It asserts the running agent's mode is unchanged: its daemon-committed mode, plus no set_agent_mode_request on the wire. It fails on the previous code (the mode was flipped to a more permissive mode) and passes with this change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(app): restore workspace pin shortcut build The shortcut change landed with an import path removed by the workspace tabs reshape, breaking app typecheck and web builds. Import the canonical workspace tab model. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>