Files
llink/js/desktop
Claude 4f7fee538b fix(desktop): keep Escape inside compose instead of exiting the stream
While recording or reviewing a compose, Escape both cancelled the compose
and exited the stream. The stream's window-level navigation handler skips
keys when an input is focused (isTypingTarget), which is why the text path
was unaffected, but recording/reviewing have no focused input so Escape
leaked through to the exit handler.

Fix it at the compose layer rather than teaching the navigation pipe about
compose: the compose key handler now consumes (preventDefault +
stopPropagation) any key it handles and listens in the capture phase, so it
reliably wins over the stream's bubble-phase navigation/action handlers
regardless of listener registration order. Pure pause states (hold-space)
are untouched, so Escape still exits the stream there.

This leaves the typing/task/configuring paths equivalent (their onCancel is
the same cancel() the handler invokes) while ⌘+Enter / ⌘+M still fall
through to the text editor.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DapjFX1MhYPZeJv4s56K5L
2026-06-21 01:23:09 +00:00
..
2026-05-26 15:37:35 -07:00
2026-05-26 15:37:35 -07:00
2026-05-26 15:41:54 -07:00
2026-05-26 15:37:35 -07:00
2026-06-09 09:12:03 -07:00
2026-05-26 15:37:35 -07:00

Notes

CORS for desktop app

In dev: each renderer process has its own localhost port. The renderer process passes this in the Origin header for requests, and expects appropriate ACAO headers in the response.

In packaged app: the renderer process does not include Origin header, so expects no extra ACAO headers from the server, otherwise the client would fail to accept responses.