Title: fix(search): restore cmd+k autofocus on the search input by waleedlatif1 · Pull Request #6347 · simstudioai/sim · GitHub
Open Graph Title: fix(search): restore cmd+k autofocus on the search input by waleedlatif1 · Pull Request #6347 · simstudioai/sim
X Title: fix(search): restore cmd+k autofocus on the search input by waleedlatif1 · Pull Request #6347 · simstudioai/sim
Description: Summary Cmd+K opened the search palette without focusing the input, so you had to click it before typing Regressed in #6196 (5ab5f2c7e): the dialog's visibility gate moved to visuallyOpen (open && nativeSurfaceReady), but the focus effect stayed on a separate focusReady gate that is just open off the desktop app nativeSurfaceReady starts false and only flips inside a useLayoutEffect, so the focus effect ran in the commit where the panel still carried invisible — .focus() on a visibility: hidden element is a silent no-op, and nothing re-focused it afterwards Fix is one gate: focus off visuallyOpen, so it runs on the first commit where the panel is actually visible. Desktop (atomic browser panel occlusion) already waited for that same signal, so its behavior is unchanged Type of Change Bug fix Testing Typecheck and lint pass. Not yet verified in a running browser — needs a manual Cmd+K check before merge. No unit test: the failure depends on visibility: hidden making an element unfocusable, which jsdom does not model (it applies no Tailwind CSS), so a test here would pass with or without the fix. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Cmd+K opened the search palette without focusing the input, so you had to click it before typing Regressed in #6196 (5ab5f2c7e): the dialog's visibility gate moved to visuallyOpen (ope...
X Description: Summary Cmd+K opened the search palette without focusing the input, so you had to click it before typing Regressed in #6196 (5ab5f2c7e): the dialog's visibility gate moved to visuallyOpen ...
Opengraph URL: https://github.com/simstudioai/sim/pull/6347
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f19796e8-07a4-93c3-c1bb-47118beba18a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D33C:CB99F:7F14D6:B3EDF9:6AFB4D59 |
| html-safe-nonce | e85564b7860f8a441da0768a875480bd7dd2f9388c844f90816e67ef0444678e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzNDOkNCOTlGOjdGMTRENjpCM0VERjk6NkFGQjRENTkiLCJ2aXNpdG9yX2lkIjoiMzUxNzY5MjY5MDk4MjE5NDUyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4215cafd7613c51f82c82d99c92058d506dd842cc08828f49676b07187723beb |
| hovercard-subject-tag | pull_request:4224285254 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6347/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Cmd+K opened the search palette without focusing the input, so you had to click it before typing Regressed in #6196 (5ab5f2c7e): the dialog's visibility gate moved to visuallyOpen (ope... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width