fix(macos): move Pin off Cmd-P and test menu chords - #174
Conversation
Pin on Top is now Cmd-Option-P. Shortcuts live in a portable catalog so the protocol suite can reject collisions, including a reserved Cmd-,.
61bbeab to
b652a21
Compare
SarthakWade
left a comment
There was a problem hiding this comment.
The shortcut collision itself is fixed, but this PR does not yet satisfy the menu behavior contract and has two user-visible correctness bugs.
The catalog is only used to apply key/modifier values by title. Its menu and selector fields do not drive the actual NSMenuItem action or target, and the protocol test only checks static strings, so wrong selectors, targets, responder-chain behavior, or renamed titles still pass. Issue #160 specifically requires those paths and AppKit behavior to be exercised. The start page also still advertises Cmd-P for Pin even though the menu now uses Cmd-Option-P.
Please wire the catalog to the real menu construction or add a testable representation of the actual built menu, update the start-page shortcut, fix the Help chord, and run the macOS menu E2E. This PR touches main.swift but the WKWebView E2E job was skipped because the macos-e2e label was not present.
GitHub currently reports the PR as mergeable with no conflicts, and all executed required checks passed. I found no security vulnerability in the changed code.
NSMenuItems now take selector, target, and chord from MenuShortcutSpec. Help is Cmd-Shift-/, and the start page advertises Option-Command-P.
|
Addressed the review. Menu items now take selector, target, and modifiers from Protocol tests cover unique titles, Pin/Help/New Window/Quit selectors and targets, and the start-page copy. macOS E2E greps the host source and probes the live Pin/Help menu chords through Accessibility when the process is reachable. Added the |
# Conflicts: # apps/headless/Tests/HeadlessProtocolTests/ProtocolTests.swift
SarthakWade
left a comment
There was a problem hiding this comment.
Re-reviewed the final implementation after integration with current main. The shortcut catalog now constructs the real menu items and covers exact chords, targets, responder-chain editing, window actions, navigation, reload, snapshot isolation, zoom, full screen, history, pin state, and focus restoration. The complete rerun passes protocol/security, runtime, Linux E2E, macOS build, and macOS WKWebView E2E.
Summary
Implements the unblocked part of #160.
Full GUI E2E of every menu item still wants a macOS session. The collision contract is tested without one.
Closes #160