mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-23 16:02:27 +00:00
The action was registered only on `Tty7App`'s render root, so it reached nothing in the one state a New Window chord exists for. `show_tray_icon` defaults to on, and `on_window_should_close` retires to the tray instead of quitting when the icon is up: process alive, menu bar still tty7's, nothing on screen. On macOS that is where the shipped default lands — Cmd+N with no window did nothing at all, because `App::dispatch_action` falls through to the global listeners when no window is active and there was no global listener to fall through to. Registered on the app in `keymap::init`, beside `Quit`, which is the same kind of action for the same reason. The window-level listener stays and still wins wherever there is a window: gpui runs the window's bubble phase first and returns before the global one (`dispatch_action_on_node_ inner` sets `propagate_event = false` for any matching action type), so the two never both fire and no window opens twice. Covered by `new_window_answers_with_no_window_to_dispatch_it`, which dispatches through `App` with an empty registry and asserts a window came out of it — the existing test drives the window path, so the two together pin both halves. Also lists Cmd+N in `docs/reference/keyboard-shortcuts.mdx`, whose own description is "every default binding"; a dash off macOS, the same way Keyboard Shortcuts is written.