Fix Cmd-W for Task Manager and auxiliary windows
Summary:
- Register Task Manager and other standalone cmux windows as close-shortcut owners.
- Add a CI lint that requires cmux window identifiers to be listed in the auxiliary close-owner set.
- Add an identifier for the Feed Text Editor debug window so it participates in the same rule.
Testing:
- python3 scripts/lint_auxiliary_window_close_shortcuts.py
- ./tests/test_ci_auxiliary_window_close_shortcuts.sh
- CMUX_SKIP_ZIG_BUILD=1 ./scripts/reload.sh --tag tmcmdw
Notes:
- User dogfooding confirmed the Task Manager Cmd+W path is fixed.
- The first commit adds the lint guard; the second commit registers the windows so the guard passes.
[!NOTE]
Low Risk
Low risk: changes are limited to window identifier registration and adds a CI lint/test guard, with minimal runtime impact outside Cmd+W behavior for auxiliary windows.
Overview
Ensures standalone auxiliary cmux windows reliably own the standard close shortcut (Cmd+W) by expanding the cmuxAuxiliaryWindowIdentifiers registry (including Task Manager and several debug/lab windows).
Adds a new Python lint (lint_auxiliary_window_close_shortcuts.py) plus CI coverage to fail PRs when a Swift window.identifier = NSUserInterfaceItemIdentifier("cmux.*") assignment isn’t registered (with an explicit ignore for cmux.bootstrap).
Assigns a concrete window.identifier to the Feed Text Editor debug window so it participates in the same shortcut-ownership rule.
Reviewed by Cursor Bugbot for commit d844e04f89c529df12ea2b8fe0f09147bc8638da. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes Cmd+W for Task Manager and other standalone cmux windows by registering them as close-shortcut owners. Adds a CI lint that enforces this rule, handles comments and multiline assignments, reports file:line, and ignores cmux.bootstrap.
-
Bug Fixes
- Registered Task Manager and other auxiliary windows in
cmuxAuxiliaryWindowIdentifiersso Cmd+W closes them; setcmux.feedTextEditorDebugon the Feed Text Editor debug window.
- Registered Task Manager and other auxiliary windows in
-
New Features
- Added
scripts/lint_auxiliary_window_close_shortcuts.pywith file:line reporting; wired into CI viatests/test_ci_auxiliary_window_close_shortcuts.sh. Lint strips line and block comments, ignores commented-out owners, handles multilinewindow.identifier, and allows an explicit ignore forcmux.bootstrap.
- Added
Summary by CodeRabbit
-
Tests
- Added a CI test that validates auxiliary window close-shortcut handling.
-
Chores
- Added a linter to enforce which auxiliary windows may claim the standard close shortcut.
- Added a CI validation step to run the new linter.
-
Bug Fixes
- Improved auxiliary/debug window identification and initialization so close-key behavior (Cmd+W) is handled more consistently.