Repository navigation
fix(app): press the settings shortcut the modifier the page expects - #190
Merged
Merged
Conversation
Both tests in remote-session-settings.spec.ts chose Meta or Control from the Node-side `process.platform`, but the app resolves `mod` from `navigator.platform` (IS_MAC in context/command.tsx) and Playwright's `devices["Desktop Chrome"]` profile ships a Windows user agent, so the page reports Win32 on every host. On macOS that meant the suite pressed Meta while the app was listening for Control: the keymap had `comma:1`, the event produced `comma:2`, no match, the settings dialog never opened and both tests failed at the first `toBeVisible`. Linux CI stayed green because there the host branch happened to pick Control anyway — so this was invisible in CI and broken for every macOS developer. Ask the page the same question the app asks. A real macOS browser reports MacIntel, so the app was right and only the test was wrong; nothing in src changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The two
remote-session-settings.spec.tsfailures that every recent PR has been reporting as "pre-existing". After this the app e2e suite is 123 passed, 0 failed.What was happening
Both tests open the settings dialog with a keyboard shortcut, and chose the modifier from the Node-side
process.platform:The app resolves
modfrom the browser'snavigator.platform(IS_MACinsrc/context/command.tsx), and Playwright'sdevices["Desktop Chrome"]profile ships a Windows user agent — so the page reportsWin32on every host, macOS included.On a macOS machine the suite therefore pressed Meta while the app was listening for Control. Instrumenting the keydown handler showed it exactly:
The command was registered and enabled; the keymap simply held
comma:1(ctrl) while the event producedcomma:2(meta). No match, no dialog, and both tests died at the firsttoBeVisible— with a screenshot of a perfectly healthy session page and no dialog on it, which is what made this look like an app bug rather than a test bug.Linux CI stayed green because there the host branch happens to pick Control too. So it was invisible in CI and broken for every macOS developer.
The fix
Ask the page the same question the app asks:
Nothing in
srcchanges. A real macOS browser reportsMacIntel, somod→ ⌘ is correct for actual users; only the test was reading the wrong platform. Hardcoding Control would also have worked today but would silently rot if the device profile ever changes.I checked the rest of the suite — this spec was the only place branching on
process.platformfor input.Divergences
packages/app/e2e/regression/remote-session-settings.spec.tsis an upstream file, so it gets aDIVERGENCES.mdrow. No CHANGELOG entry: this is test-only and not user-facing.Worth submitting upstream — it breaks the suite for every macOS developer there too.
Verification
bun test:e2e:local— 123 passed, 0 failed (was 121 passed, 2 failed)bun test(packages/app) — 630 passbun typecheck(packages/app) — cleanbun lint— 4746 warnings + 1 error, identical tomain🤖 Generated with Claude Code