fix(react): hydrate search on idle for keyboard shortcuts - #1062
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
avivkeller
approved these changes
Sep 1, 2026
ovflowd
approved these changes
Sep 1, 2026
AugustinMauroy
approved these changes
Sep 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1062 +/- ##
==========================================
+ Coverage 90.57% 90.60% +0.02%
==========================================
Files 217 217
Lines 20755 20802 +47
Branches 1969 1974 +5
==========================================
+ Hits 18799 18847 +48
+ Misses 1949 1948 -1
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
| File | Main | PR | Change |
|---|---|---|---|
orama-db.json |
9.22 MB | 9.22 MB | +1.00 B (+0.0%) |
Performance estimate (single CI run)
- Generation time: 2.8% faster (8.81 s → 8.56 s)
- Peak memory: 0.2% higher (1.81 GB → 1.82 GB)
web Generator
Output size: 61 files changed · net +2.19 KB
File size details
| File | Main | PR | Change |
|---|---|---|---|
assets/SearchBox-B4VQonTj.js |
84.77 KB | — | -84.77 KB (-100.0%) |
assets/SearchBox-DG92TD8s.js |
— | 84.73 KB | +84.73 KB |
assets/dist-DIwsMtEe.js |
30.43 KB | — | -30.43 KB (-100.0%) |
assets/dist-B26NADar.js |
— | 30.43 KB | +30.43 KB |
assets/SideBar-BLamfkFk.js |
25.62 KB | — | -25.62 KB (-100.0%) |
assets/SideBar-CjBadrhw.js |
— | 25.62 KB | +25.62 KB |
assets/client-DRvY8Gzd.js |
21.61 KB | — | -21.61 KB (-100.0%) |
assets/client-4iZeL51X.js |
— | 21.61 KB | +21.61 KB |
assets/config-IkLyzSmT.js |
— | 18.12 KB | +18.12 KB |
assets/Combination-BUcOJ5Y-.js |
16.13 KB | — | -16.13 KB (-100.0%) |
assets/Combination-CxHszNCH.js |
— | 16.13 KB | +16.13 KB |
assets/config-DjBbQymG.js |
16.13 KB | — | -16.13 KB (-100.0%) |
assets/ThemeToggle-1V8NPt7q.js |
13.63 KB | — | -13.63 KB (-100.0%) |
assets/ThemeToggle-BiPwS7Mk.js |
— | 13.63 KB | +13.63 KB |
assets/dist-D1u_tkxL.js |
10.20 KB | — | -10.20 KB (-100.0%) |
assets/dist-CFCFWCOC.js |
— | 10.20 KB | +10.20 KB |
assets/Layout-oYllGoSo.js |
10.13 KB | — | -10.13 KB (-100.0%) |
assets/Layout-CUxkUi7c.js |
— | 10.13 KB | +10.13 KB |
assets/compat-CcIAhA8U.js |
10.12 KB | — | -10.12 KB (-100.0%) |
assets/compat-BfD7Rki1.js |
— | 10.12 KB | +10.12 KB |
assets/Tooltip-DQD8Ewo6.js |
7.93 KB | — | -7.93 KB (-100.0%) |
assets/Tooltip-B1qxbKhZ.js |
— | 7.93 KB | +7.93 KB |
assets/dist-Dj0Sqkvo.js |
6.99 KB | — | -6.99 KB (-100.0%) |
assets/dist-CJIhfaBd.js |
— | 6.99 KB | +6.99 KB |
assets/jsx-runtime-C6QFhwKF.js |
5.67 KB | — | -5.67 KB (-100.0%) |
assets/jsx-runtime-C1lMY1Gc.js |
— | 5.67 KB | +5.67 KB |
assets/dist-mb038oPe.js |
3.94 KB | — | -3.94 KB (-100.0%) |
assets/dist-Be2dd_0a.js |
— | 3.94 KB | +3.94 KB |
assets/CodeTabs-9186pDFN.js |
3.88 KB | — | -3.88 KB (-100.0%) |
assets/CodeTabs-BD_awTKo.js |
— | 3.88 KB | +3.88 KB |
assets/CodeBox-Ym4vlsQj.js |
3.44 KB | — | -3.44 KB (-100.0%) |
assets/CodeBox-rmTAsZ80.js |
— | 3.44 KB | +3.44 KB |
assets/hooks.module-Bk2z4xNO.js |
3.37 KB | — | -3.37 KB (-100.0%) |
assets/hooks.module-DD1kwafY.js |
— | 3.37 KB | +3.37 KB |
assets/FunctionSignature-BpmgMnum.js |
2.28 KB | — | -2.28 KB (-100.0%) |
assets/FunctionSignature-NlwGJqjn.js |
— | 2.28 KB | +2.28 KB |
assets/Banner-XvKbSbln.js |
2.19 KB | — | -2.19 KB (-100.0%) |
assets/Banner-CzZyrjk_.js |
— | 2.19 KB | +2.19 KB |
assets/ChangeHistory-DgDvtNV7.js |
1.75 KB | — | -1.75 KB (-100.0%) |
assets/ChangeHistory-BWtPs3Vy.js |
— | 1.75 KB | +1.75 KB |
assets/DataTag-DjunEPBj.js |
844.00 B | — | -844.00 B (-100.0%) |
assets/DataTag-D0-uPG2c.js |
— | 844.00 B | +844.00 B |
assets/DocumentationIndex-BPC5dV7C.js |
— | 833.00 B | +833.00 B |
assets/DocumentationIndex-DkMj2fAG.js |
821.00 B | — | -821.00 B (-100.0%) |
assets/ArrowUpRightIcon-DxdUI-2m.js |
618.00 B | — | -618.00 B (-100.0%) |
assets/ArrowUpRightIcon-D_vQL-jL.js |
— | 618.00 B | +618.00 B |
assets/Badge-CpY4waKP.js |
607.00 B | — | -607.00 B (-100.0%) |
assets/Badge-CrWNCPt_.js |
— | 607.00 B | +607.00 B |
assets/AlertBox-DyR-D-Wy.js |
591.00 B | — | -591.00 B (-100.0%) |
assets/AlertBox-Cm5aaJjh.js |
— | 591.00 B | +591.00 B |
assets/CodeBracketIcon-BRpToSe8.js |
512.00 B | — | -512.00 B (-100.0%) |
assets/CodeBracketIcon-BjSANaWS.js |
— | 512.00 B | +512.00 B |
assets/dist-y-2gACS_.js |
477.00 B | — | -477.00 B (-100.0%) |
assets/dist-CwHhEqdL.js |
— | 477.00 B | +477.00 B |
assets/ChevronDownIcon-GZzIVrWC.js |
468.00 B | — | -468.00 B (-100.0%) |
assets/ChevronDownIcon-CCMdSGlD.js |
— | 468.00 B | +468.00 B |
all.html |
32.12 MB | 32.12 MB | +236.00 B (+0.0%) |
assets/Blockquote-CREM-fhs.js |
167.00 B | — | -167.00 B (-100.0%) |
assets/Blockquote-CJmAj-5m.js |
— | 167.00 B | +167.00 B |
assets/withIsland-BXXKiqC-.js |
105.00 B | — | -105.00 B (-100.0%) |
assets/withIsland-D2VqDqbr.js |
— | 105.00 B | +105.00 B |
Performance estimate (single CI run)
- Generation time: 1.7% faster (83.76 s → 82.37 s)
- Peak memory: 3.5% higher (5.76 GB → 5.96 GB)
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.
Description
This PR fixes the Cmd/Ctrl+K for the Beta Docs page https://beta.docs.nodejs.org.
The search box currently hydrates only after
pointerover,focusin, ortouchstart. As a result, the Cmd/Ctrl+K listener is not registered until the user interacts with the search button, so the shortcut can appear to work intermittently.Hydrate the search box on idle instead, allowing the shortcut to work without requiring prior interaction. The Orama database remains lazy-loaded until the first search.
Validation
Open the Beta Docs page, and press the Cmd/Ctrl+K immediately. Nothing should have happened until you
pointerover/focusin/touchstartthe search box.Related Issues
None
Check List
node --run testand all tests passed.node --run format:check&node --run lint.