René's URL Explorer Experiment


Title: fix(sidebar): stop the workspace switcher stranding a phantom hover by waleedlatif1 · Pull Request #6096 · simstudioai/sim · GitHub

Open Graph Title: fix(sidebar): stop the workspace switcher stranding a phantom hover by waleedlatif1 · Pull Request #6096 · simstudioai/sim

X Title: fix(sidebar): stop the workspace switcher stranding a phantom hover by waleedlatif1 · Pull Request #6096 · simstudioai/sim

Description: The report In the workspace switcher, a row keeps a hover-looking highlight after the pointer has moved away — so two rows appear hovered at once (the selected workspace, plus a stale one). Cause Not a hover at all. #5893 added keyboard navigation to the switcher, tracked by highlightedId. Three things combine: highlightedId is set from onMouseMove (workspace-header.tsx:578) — deliberately, since mouseenter would hijack the keyboard selection when scrollIntoView slides rows under a stationary cursor. Nothing clears it on the way out. There is no onMouseLeave in the file; it only resets when the whole menu closes. It paints via chipVariants({ active }), and in chip.tsx active: true → bg-[var(--surface-active)] while active: false → hover-hover:bg-[var(--surface-active)]. Identical token (#ececec / #2c2c2c). So the last row the pointer crossed keeps a background indistinguishable from hover, forever — next to the equally---surface-active current workspace. It also happens with no hovering at all: the seeding effect (:214) puts the cursor on row 0 at open, so any user whose current workspace isn't first sees two marked rows immediately. Only reachable above WORKSPACE_SEARCH_THRESHOLD (3 workspaces), which is why it went unnoticed. Fix Paint the cursor only while the user is actually navigating by keyboard. Arrow keys enter that mode; any pointer motion leaves it. In pointer mode the only mark is real CSS :hover, which follows the pointer and leaves with it. highlightedId still tracks the pointer, so Enter keeps targeting the row last touched — only whether it's drawn changes. Why this approach It's the pattern this codebase already has: packages/emcn/src/components/popover/popover.tsx tracks isKeyboardNav under the literal comment "Suppress hover when in keyboard mode to prevent dual highlights", and tag-dropdown.tsx consumes it. It matches how Headless UI models a combobox: one modality-driven focus marker (data-focus, "focused via mouse or keyboard") kept separate from data-selected (the current value). The list carries no aria-activedescendant, aria-selected, or listbox/option roles, so the highlight is purely visual and no a11y contract changes. Why not onMouseLeave It's a normal pattern (19 files use it) but the wrong tool here, and it wouldn't work: the seeding effect at :214 re-seeds highlightedId to filteredWorkspaces[0] whenever the current one is absent, so clearing to null bounces the highlight to row 1 rather than removing it. It would also silently retarget Enter (activeIndex falls back to 0), do nothing for the on-open case, and fire spuriously when a row's ... menu portals out. Testing New workspace-header.test.tsx with 4 tests, deliberately rendering the real @sim/emcn — mocking chipVariants would only assert the stub. All three highlight tests were verified to fail without the fix and pass with it. Two fixture details that matter: The current workspace is intentionally not first, or the row-0 seed masks the on-open double-mark (an earlier draft passed while broken because of this). isMarked matches an exact class token, never a substring — hover-hover:bg-[var(--surface-active)] contains the active class, so a substring check reports every row as marked.

Open Graph Description: The report In the workspace switcher, a row keeps a hover-looking highlight after the pointer has moved away — so two rows appear hovered at once (the selected workspace, plus a stale one). Cause N...

X Description: The report In the workspace switcher, a row keeps a hover-looking highlight after the pointer has moved away — so two rows appear hovered at once (the selected workspace, plus a stale one). Cause N...

Opengraph URL: https://github.com/simstudioai/sim/pull/6096

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:5f5f22fc-39a9-18f9-4531-3cd84a4085e1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB6F0:EE197:B6594A:F9C0CC:6AFB539C
html-safe-nonce7cac0893dcaab9cef5c5a038131618b3b835c591c1d2d66b11ee94c13f52fa2d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkYwOkVFMTk3OkI2NTk0QTpGOUMwQ0M6NkFGQjUzOUMiLCJ2aXNpdG9yX2lkIjoiMjYzMDA4MTQwNTEyNzQ0NzQ1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc768e641d2020ec2575da11b2479a7b916ab4282e6b08ea514839b555cb65e16
hovercard-subject-tagpull_request:4172050501
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6096/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altThe report In the workspace switcher, a row keeps a hover-looking highlight after the pointer has moved away — so two rows appear hovered at once (the selected workspace, plus a stale one). Cause N...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6096/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6096%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6096%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6096/files
Reloadhttps://github.com/simstudioai/sim/pull/6096/files
Reloadhttps://github.com/simstudioai/sim/pull/6096/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
investigate-workspace-hover-statehttps://github.com/simstudioai/sim/tree/investigate-workspace-hover-state
Conversation 12 https://github.com/simstudioai/sim/pull/6096
Commits 3 https://github.com/simstudioai/sim/pull/6096/commits
Checks 27 https://github.com/simstudioai/sim/pull/6096/checks
Files changed https://github.com/simstudioai/sim/pull/6096/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
fix(sidebar): stop the workspace switcher stranding a phantom hover https://github.com/simstudioai/sim/pull/6096/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/6096/files
0a7c150 fix(sidebar): stop the workspace switcher stranding a phantom hover Jul 30, 2026 https://github.com/simstudioai/sim/pull/6096/commits/0a7c150c64a084654d7c6d5b1f12fb35182cab02
634f3d7 test(sidebar): assert the keyboard cursor on a row that isn't selected Jul 30, 2026 https://github.com/simstudioai/sim/pull/6096/commits/634f3d7857ce4ceb2066de246b2aae08e19ba6fd
b9b2efd fix(sidebar): do not arm Enter without a visible target Jul 30, 2026 https://github.com/simstudioai/sim/pull/6096/commits/b9b2efdc7bead7a0f017bfdb8041addd9ffc3e4e
Clear filters https://github.com/simstudioai/sim/pull/6096/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
workspace-header.test.tsx https://github.com/simstudioai/sim/pull/6096/files#diff-b1164e2176995ae4aeaf574f04b55af79b0e6593bd1bdfc5d81ad13401976b44
workspace-header.tsx https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
.../[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.test.tsxhttps://github.com/simstudioai/sim/pull/6096/files#diff-b1164e2176995ae4aeaf574f04b55af79b0e6593bd1bdfc5d81ad13401976b44
View file https://github.com/simstudioai/sim/blob/b9b2efdc7bead7a0f017bfdb8041addd9ffc3e4e/apps/sim/app/workspace/%5BworkspaceId%5D/w/components/sidebar/components/workspace-header/workspace-header.test.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6096/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
...space/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsxhttps://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
View file https://github.com/simstudioai/sim/blob/b9b2efdc7bead7a0f017bfdb8041addd9ffc3e4e/apps/sim/app/workspace/%5BworkspaceId%5D/w/components/sidebar/components/workspace-header/workspace-header.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6096/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
https://github.com/simstudioai/sim/pull/6096/files#diff-5cd2ce39c5a80d2b31ad921d4d2200a91b7272be46f93fa8e6b74058b9edfb6a
Please reload this pagehttps://github.com/simstudioai/sim/pull/6096/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.