Repository navigation
[Fix] New Session shortcut throws on keydown events without a key - #3485
Closed
roomote-roomote[bot] wants to merge 1 commit into
Closed
roomote-roomote[bot] wants to merge 1 commit into
roomote-roomote[bot] wants to merge 1 commit into
Conversation
Contributor
|
No code issues found. See task Reviewed the shortcut guard and regression tests: direct comparisons safely ignore keyless events while preserving Reviewed 7f7c97d |
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
October 15, 2026 05:40
This was referenced Oct 15, 2026
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.
Related issue
Internal maintainer-requested reliability work; no issue opened.
Why this PR exists
The global New Session shortcut calls
toLowerCase()on every keydown event. Compatibility events without akeyvalue throw an uncaught TypeError anywhere the sidebar is mounted.What changed
Compare directly against
nandN, ignoring unrelated or keyless events without calling a string method. Ordinary desktop shortcuts, text-entry exclusion, modifier/composition guards, and mobile behavior stay intact. One conditional change; no new state, dependencies, or rendered UI.How it was tested
50a58ed4: dispatchingnew Event('keydown', { bubbles: true })on the actual authenticated page emitsCannot read properties of undefined (reading 'toLowerCase'). The new error-listener regression fails on that baseline.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changesetRelated PRs