From edf7d46edf94b90fdb9977394cdec8b1d761e889 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 11:37:23 -0700 Subject: [PATCH 1/7] Add auxiliary window close shortcut lint --- .github/workflows/ci.yml | 3 + .../lint_auxiliary_window_close_shortcuts.py | 123 ++++++++++++++++++ ...est_ci_auxiliary_window_close_shortcuts.sh | 59 +++++++++ 3 files changed, 185 insertions(+) create mode 100755 scripts/lint_auxiliary_window_close_shortcuts.py create mode 100755 tests/test_ci_auxiliary_window_close_shortcuts.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 366379320e23..6db70293b865 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,9 @@ jobs: - name: Validate Swift file length budget guard run: ./tests/test_ci_swift_file_length_budget.sh + - name: Validate auxiliary window close shortcut lint + run: ./tests/test_ci_auxiliary_window_close_shortcuts.sh + - name: Validate CircleCI auto approval run: python3 tests/test_circleci_auto_approve.py diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py new file mode 100755 index 000000000000..58c8d7ad6d40 --- /dev/null +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +"""Require standalone cmux windows to own the standard close shortcut.""" + +from __future__ import annotations + +import argparse +import pathlib +import re +import sys + + +DEFAULT_ROOTS = ("Sources",) +OWNER_LIST_PATH = pathlib.Path("Sources/cmuxApp.swift") +OWNER_LIST_NAME = "cmuxAuxiliaryWindowIdentifiers" + +# Hidden/internal bootstrap windows should not take Cmd+W away from the active +# main window. Add to this set only when a window is intentionally not user +# closable. +IGNORED_IDENTIFIERS = { + "cmux.bootstrap", +} + +IDENTIFIER_ASSIGNMENT_RE = re.compile( + r"""\b[A-Za-z_][A-Za-z0-9_]*\.identifier\s*=\s*NSUserInterfaceItemIdentifier\("(?Pcmux\.[^"]+)"\)""" +) +STRING_LITERAL_RE = re.compile(r'"(?Pcmux\.[^"]+)"') + + +def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: + path = repo_root / OWNER_LIST_PATH + try: + text = path.read_text(encoding="utf-8") + except FileNotFoundError: + raise ValueError(f"missing {OWNER_LIST_PATH}") from None + + marker = f"private let {OWNER_LIST_NAME}" + marker_index = text.find(marker) + if marker_index < 0: + raise ValueError(f"missing {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") + + list_start = text.find("[", marker_index) + list_end = text.find("]", list_start) + if list_start < 0 or list_end < 0: + raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") + + list_body = text[list_start:list_end] + return {match.group("identifier") for match in STRING_LITERAL_RE.finditer(list_body)} + + +def collect_window_identifier_assignments( + repo_root: pathlib.Path, + roots: tuple[str, ...], +) -> dict[str, list[str]]: + assignments: dict[str, list[str]] = {} + for root in roots: + root_path = repo_root / root + if not root_path.exists(): + continue + for path in sorted(root_path.rglob("*.swift")): + rel_path = path.relative_to(repo_root).as_posix() + with path.open("r", encoding="utf-8", errors="replace") as handle: + for line_number, line in enumerate(handle, start=1): + for match in IDENTIFIER_ASSIGNMENT_RE.finditer(line): + identifier = match.group("identifier") + assignments.setdefault(identifier, []).append(f"{rel_path}:{line_number}") + return assignments + + +def main(argv: list[str]) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--repo-root", + default=pathlib.Path.cwd(), + type=pathlib.Path, + help="repository root to scan", + ) + parser.add_argument( + "--roots", + nargs="+", + default=list(DEFAULT_ROOTS), + help="repo-relative Swift roots to scan", + ) + args = parser.parse_args(argv) + + repo_root = args.repo_root.resolve(strict=False) + try: + close_owners = load_close_owner_identifiers(repo_root) + except ValueError as exc: + print(f"Auxiliary window close-shortcut lint could not run: {exc}", file=sys.stderr) + return 2 + + assignments = collect_window_identifier_assignments(repo_root, tuple(args.roots)) + missing = { + identifier: locations + for identifier, locations in assignments.items() + if identifier not in close_owners and identifier not in IGNORED_IDENTIFIERS + } + + if missing: + print("Auxiliary window close-shortcut lint failed.") + print("") + print( + "These cmux window identifiers are assigned to NSWindow/NSPanel " + f"but are missing from {OWNER_LIST_NAME}:" + ) + for identifier in sorted(missing): + print(f"- {identifier}") + for location in missing[identifier]: + print(f" {location}") + print("") + print( + f"Add each user-closable window to {OWNER_LIST_NAME} in {OWNER_LIST_PATH}, " + "or add a documented lint ignore for internal windows that must not own Cmd+W." + ) + return 1 + + print("Auxiliary window close-shortcut lint passed.") + print(f"Checked {len(assignments)} cmux window identifier(s).") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv[1:])) diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh new file mode 100755 index 000000000000..4bb43201f04c --- /dev/null +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT_DIR" + +python3 scripts/lint_auxiliary_window_close_shortcuts.py + +TMP_DIR="$(mktemp -d)" +trap 'rm -rf "$TMP_DIR"' EXIT + +mkdir -p "$TMP_DIR/Sources" + +cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' +private let cmuxAuxiliaryWindowIdentifiers: Set = [ + "cmux.settings", +] +SWIFT + +cat > "$TMP_DIR/Sources/NewWindow.swift" <<'SWIFT' +import AppKit + +func makeWindow() { + let window = NSWindow() + window.identifier = NSUserInterfaceItemIdentifier("cmux.newWindow") +} +SWIFT + +if python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" >"$TMP_DIR/missing.out" 2>&1; then + echo "Expected missing auxiliary-window close owner to fail" >&2 + exit 1 +fi +grep -q "cmux.newWindow" "$TMP_DIR/missing.out" + +cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' +private let cmuxAuxiliaryWindowIdentifiers: Set = [ + "cmux.newWindow", + "cmux.settings", +] +SWIFT + +python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" + +cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' +private let cmuxAuxiliaryWindowIdentifiers: Set = [ + "cmux.settings", +] +SWIFT + +cat > "$TMP_DIR/Sources/NewWindow.swift" <<'SWIFT' +import AppKit + +func makeWindow() { + let window = NSWindow() + window.identifier = NSUserInterfaceItemIdentifier("cmux.bootstrap") +} +SWIFT + +python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" From 856f65a88d146ab9bd12b29711822cfa15aed295 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 11:37:35 -0700 Subject: [PATCH 2/7] Register auxiliary windows for Cmd-W close --- Sources/Feed/FeedTextEditorDebugWindowController.swift | 1 + Sources/cmuxApp.swift | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Sources/Feed/FeedTextEditorDebugWindowController.swift b/Sources/Feed/FeedTextEditorDebugWindowController.swift index 2999642ca2e7..5ea8d6e73377 100644 --- a/Sources/Feed/FeedTextEditorDebugWindowController.swift +++ b/Sources/Feed/FeedTextEditorDebugWindowController.swift @@ -16,6 +16,7 @@ final class FeedTextEditorDebugWindowController: NSWindowController, NSWindowDel localized: "feed.textEditorDebug.windowTitle", defaultValue: "Feed Text Editor Lab" ) + window.identifier = NSUserInterfaceItemIdentifier("cmux.feedTextEditorDebug") window.center() window.contentView = NSHostingView(rootView: FeedTextEditorDebugView()) super.init(window: window) diff --git a/Sources/cmuxApp.swift b/Sources/cmuxApp.swift index d40991cd69ed..f765b1ba5dc7 100644 --- a/Sources/cmuxApp.swift +++ b/Sources/cmuxApp.swift @@ -1142,6 +1142,16 @@ private let cmuxAuxiliaryWindowIdentifiers: Set = [ "cmux.about", "cmux.licenses", "cmux.browser-popup", + "cmux.browserProfilePopoverDebug", + "cmux.configEditor", + "cmux.feedButtonStyleDebug", + "cmux.feedPreview", + "cmux.feedTextEditorDebug", + "cmux.fileExplorerStyleDebug", + "cmux.pdfPreviewChromeDebug", + "cmux.splitButtonLayoutDebug", + "cmux.tabBarBackdropLab", + "cmux.taskManager", "cmux.aboutTitlebarDebug", "cmux.debugWindowControls", "cmux.browserImportHintDebug", From bd617d8667e5e3dc43190497a7acfe8cdb235d0a Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 11:57:14 -0700 Subject: [PATCH 3/7] Harden auxiliary window lint parser --- scripts/lint_auxiliary_window_close_shortcuts.py | 16 ++++++++++++++-- .../test_ci_auxiliary_window_close_shortcuts.sh | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py index 58c8d7ad6d40..a165d45dabe4 100755 --- a/scripts/lint_auxiliary_window_close_shortcuts.py +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -39,8 +39,20 @@ def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: raise ValueError(f"missing {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") list_start = text.find("[", marker_index) - list_end = text.find("]", list_start) - if list_start < 0 or list_end < 0: + if list_start < 0: + raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") + + depth = 0 + list_end = -1 + for index in range(list_start, len(text)): + if text[index] == "[": + depth += 1 + elif text[index] == "]": + depth -= 1 + if depth == 0: + list_end = index + break + if list_end < 0: raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") list_body = text[list_start:list_end] diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh index 4bb43201f04c..c62daf3c8d4d 100755 --- a/tests/test_ci_auxiliary_window_close_shortcuts.sh +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -34,6 +34,7 @@ grep -q "cmux.newWindow" "$TMP_DIR/missing.out" cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [ + // MARK: - Main Windows [user-closable] "cmux.newWindow", "cmux.settings", ] From 05942190b5f5516c62bdc1888e49939cabb34c0d Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 12:04:53 -0700 Subject: [PATCH 4/7] Cover lint comment and multiline cases --- .../lint_auxiliary_window_close_shortcuts.py | 17 +++++++---- ...est_ci_auxiliary_window_close_shortcuts.sh | 28 ++++++++++++++++++- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py index a165d45dabe4..b05ae7778408 100755 --- a/scripts/lint_auxiliary_window_close_shortcuts.py +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -24,6 +24,11 @@ r"""\b[A-Za-z_][A-Za-z0-9_]*\.identifier\s*=\s*NSUserInterfaceItemIdentifier\("(?Pcmux\.[^"]+)"\)""" ) STRING_LITERAL_RE = re.compile(r'"(?Pcmux\.[^"]+)"') +LINE_COMMENT_RE = re.compile(r"//[^\n]*") + + +def strip_line_comments(text: str) -> str: + return LINE_COMMENT_RE.sub("", text) def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: @@ -55,7 +60,7 @@ def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: if list_end < 0: raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") - list_body = text[list_start:list_end] + list_body = strip_line_comments(text[list_start:list_end]) return {match.group("identifier") for match in STRING_LITERAL_RE.finditer(list_body)} @@ -70,11 +75,11 @@ def collect_window_identifier_assignments( continue for path in sorted(root_path.rglob("*.swift")): rel_path = path.relative_to(repo_root).as_posix() - with path.open("r", encoding="utf-8", errors="replace") as handle: - for line_number, line in enumerate(handle, start=1): - for match in IDENTIFIER_ASSIGNMENT_RE.finditer(line): - identifier = match.group("identifier") - assignments.setdefault(identifier, []).append(f"{rel_path}:{line_number}") + text = strip_line_comments(path.read_text(encoding="utf-8", errors="replace")) + for match in IDENTIFIER_ASSIGNMENT_RE.finditer(text): + identifier = match.group("identifier") + line_number = text.count("\n", 0, match.start()) + 1 + assignments.setdefault(identifier, []).append(f"{rel_path}:{line_number}") return assignments diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh index c62daf3c8d4d..3516bfb3ab9d 100755 --- a/tests/test_ci_auxiliary_window_close_shortcuts.sh +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -22,7 +22,8 @@ import AppKit func makeWindow() { let window = NSWindow() - window.identifier = NSUserInterfaceItemIdentifier("cmux.newWindow") + window.identifier = + NSUserInterfaceItemIdentifier("cmux.newWindow") } SWIFT @@ -32,6 +33,19 @@ if python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DI fi grep -q "cmux.newWindow" "$TMP_DIR/missing.out" +cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' +private let cmuxAuxiliaryWindowIdentifiers: Set = [ + // "cmux.newWindow", + "cmux.settings", +] +SWIFT + +if python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" >"$TMP_DIR/commented-owner.out" 2>&1; then + echo "Expected commented-out auxiliary-window close owner to be ignored" >&2 + exit 1 +fi +grep -q "cmux.newWindow" "$TMP_DIR/commented-owner.out" + cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [ // MARK: - Main Windows [user-closable] @@ -42,6 +56,18 @@ SWIFT python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" +cat > "$TMP_DIR/Sources/NewWindow.swift" <<'SWIFT' +import AppKit + +func makeWindow() { + let window = NSWindow() + // window.identifier = NSUserInterfaceItemIdentifier("cmux.commentOnly") + _ = window +} +SWIFT + +python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DIR" + cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [ "cmux.settings", From b12b6f8a8be310b9d4498f3e93276e683cb5c72c Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 12:12:17 -0700 Subject: [PATCH 5/7] Strip comments before owner list parsing --- scripts/lint_auxiliary_window_close_shortcuts.py | 13 +++++++------ tests/test_ci_auxiliary_window_close_shortcuts.sh | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py index b05ae7778408..c492e23b7bde 100755 --- a/scripts/lint_auxiliary_window_close_shortcuts.py +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -38,21 +38,22 @@ def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: except FileNotFoundError: raise ValueError(f"missing {OWNER_LIST_PATH}") from None + parse_text = strip_line_comments(text) marker = f"private let {OWNER_LIST_NAME}" - marker_index = text.find(marker) + marker_index = parse_text.find(marker) if marker_index < 0: raise ValueError(f"missing {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") - list_start = text.find("[", marker_index) + list_start = parse_text.find("[", marker_index) if list_start < 0: raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") depth = 0 list_end = -1 - for index in range(list_start, len(text)): - if text[index] == "[": + for index in range(list_start, len(parse_text)): + if parse_text[index] == "[": depth += 1 - elif text[index] == "]": + elif parse_text[index] == "]": depth -= 1 if depth == 0: list_end = index @@ -60,7 +61,7 @@ def load_close_owner_identifiers(repo_root: pathlib.Path) -> set[str]: if list_end < 0: raise ValueError(f"could not parse {OWNER_LIST_NAME} in {OWNER_LIST_PATH}") - list_body = strip_line_comments(text[list_start:list_end]) + list_body = parse_text[list_start:list_end] return {match.group("identifier") for match in STRING_LITERAL_RE.finditer(list_body)} diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh index 3516bfb3ab9d..513e99e2207e 100755 --- a/tests/test_ci_auxiliary_window_close_shortcuts.sh +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -49,6 +49,7 @@ grep -q "cmux.newWindow" "$TMP_DIR/commented-owner.out" cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [ // MARK: - Main Windows [user-closable] + // This comment intentionally contains a lone ] bracket. "cmux.newWindow", "cmux.settings", ] From c150a48ee431c89c672f1b83067777c63f61bf44 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 12:17:19 -0700 Subject: [PATCH 6/7] Ignore block comments in window lint --- scripts/lint_auxiliary_window_close_shortcuts.py | 2 ++ tests/test_ci_auxiliary_window_close_shortcuts.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py index c492e23b7bde..945144df8e3b 100755 --- a/scripts/lint_auxiliary_window_close_shortcuts.py +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -24,10 +24,12 @@ r"""\b[A-Za-z_][A-Za-z0-9_]*\.identifier\s*=\s*NSUserInterfaceItemIdentifier\("(?Pcmux\.[^"]+)"\)""" ) STRING_LITERAL_RE = re.compile(r'"(?Pcmux\.[^"]+)"') +BLOCK_COMMENT_RE = re.compile(r"/\*.*?\*/", re.DOTALL) LINE_COMMENT_RE = re.compile(r"//[^\n]*") def strip_line_comments(text: str) -> str: + text = BLOCK_COMMENT_RE.sub("", text) return LINE_COMMENT_RE.sub("", text) diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh index 513e99e2207e..3fc0bd55d910 100755 --- a/tests/test_ci_auxiliary_window_close_shortcuts.sh +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -36,6 +36,9 @@ grep -q "cmux.newWindow" "$TMP_DIR/missing.out" cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [ // "cmux.newWindow", + /* + "cmux.newWindow", + */ "cmux.settings", ] SWIFT @@ -62,6 +65,9 @@ import AppKit func makeWindow() { let window = NSWindow() + /* + window.identifier = NSUserInterfaceItemIdentifier("cmux.blockCommentOnly") + */ // window.identifier = NSUserInterfaceItemIdentifier("cmux.commentOnly") _ = window } From d844e04f89c529df12ea2b8fe0f09147bc8638da Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 8 May 2026 12:30:14 -0700 Subject: [PATCH 7/7] Preserve window lint line numbers --- scripts/lint_auxiliary_window_close_shortcuts.py | 2 +- tests/test_ci_auxiliary_window_close_shortcuts.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lint_auxiliary_window_close_shortcuts.py b/scripts/lint_auxiliary_window_close_shortcuts.py index 945144df8e3b..cda59ae88329 100755 --- a/scripts/lint_auxiliary_window_close_shortcuts.py +++ b/scripts/lint_auxiliary_window_close_shortcuts.py @@ -29,7 +29,7 @@ def strip_line_comments(text: str) -> str: - text = BLOCK_COMMENT_RE.sub("", text) + text = BLOCK_COMMENT_RE.sub(lambda match: "\n" * match.group(0).count("\n"), text) return LINE_COMMENT_RE.sub("", text) diff --git a/tests/test_ci_auxiliary_window_close_shortcuts.sh b/tests/test_ci_auxiliary_window_close_shortcuts.sh index 3fc0bd55d910..96b99fb73fb7 100755 --- a/tests/test_ci_auxiliary_window_close_shortcuts.sh +++ b/tests/test_ci_auxiliary_window_close_shortcuts.sh @@ -20,6 +20,10 @@ SWIFT cat > "$TMP_DIR/Sources/NewWindow.swift" <<'SWIFT' import AppKit +/* +window.identifier = NSUserInterfaceItemIdentifier("cmux.blockCommentOnly") +*/ + func makeWindow() { let window = NSWindow() window.identifier = @@ -32,6 +36,7 @@ if python3 scripts/lint_auxiliary_window_close_shortcuts.py --repo-root "$TMP_DI exit 1 fi grep -q "cmux.newWindow" "$TMP_DIR/missing.out" +grep -q "Sources/NewWindow.swift:9" "$TMP_DIR/missing.out" cat > "$TMP_DIR/Sources/cmuxApp.swift" <<'SWIFT' private let cmuxAuxiliaryWindowIdentifiers: Set = [