René's URL Explorer Experiment


Title: improvement(react): replace unnecessary useEffect patterns with better React primitives by waleedlatif1 · Pull Request #3675 · simstudioai/sim · GitHub

Open Graph Title: improvement(react): replace unnecessary useEffect patterns with better React primitives by waleedlatif1 · Pull Request #3675 · simstudioai/sim

X Title: improvement(react): replace unnecessary useEffect patterns with better React primitives by waleedlatif1 · Pull Request #3675 · simstudioai/sim

Description: Summary Fix ColorGrid focus-stealing bug in color picker (hex input lost focus on every keystroke) Replace ~25 unnecessary useEffects across the codebase with better React patterns: Derived state via useMemo/inline computation (auth forms, document tags, combobox) Event handler callbacks instead of effects (chat scroll reset, modal resets, sidebar nav, voice interface ref sync) Render-time state adjustment for prop-to-state sync (date picker, time picker, credentials, profile picture) Lazy initializers for initial state from URL params (login, signup) Audited all changes with 10 parallel agents for correctness and safety Type of Change Bug fix Refactor Testing Tested manually. TypeScript passes with 0 errors. Lint passes clean. 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 Fix ColorGrid focus-stealing bug in color picker (hex input lost focus on every keystroke) Replace ~25 unnecessary useEffects across the codebase with better React patterns: Derived state...

X Description: Summary Fix ColorGrid focus-stealing bug in color picker (hex input lost focus on every keystroke) Replace ~25 unnecessary useEffects across the codebase with better React patterns: Derived state...

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

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:25884a9f-1f60-1ebe-81a9-598095cf496d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF5C:19E560:8D97E:CBB42:6AFB454F
html-safe-nonce0c3dc8c461a045b069d94cbd4a862ea61aec50dacd2f42b0094cf4500cfd9522
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjVDOjE5RTU2MDo4RDk3RTpDQkI0Mjo2QUZCNDU0RiIsInZpc2l0b3JfaWQiOiI4NDU4OTgwMDcwMjc3MjAzMjc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3fc4b909b5963f58df7485fc740fa88f08e40e0fb200a44db9eab0f635b35df0
hovercard-subject-tagpull_request:3421362226
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/3675/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:altSummary Fix ColorGrid focus-stealing bug in color picker (hex input lost focus on every keystroke) Replace ~25 unnecessary useEffects across the codebase with better React patterns: Derived state...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
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
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/3675/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F3675%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%2F3675%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/3675/files
Reloadhttps://github.com/simstudioai/sim/pull/3675/files
Reloadhttps://github.com/simstudioai/sim/pull/3675/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)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
waleedlatif1/fix-changecolor-ref-detachhttps://github.com/simstudioai/sim/tree/waleedlatif1/fix-changecolor-ref-detach
Conversation 57 https://github.com/simstudioai/sim/pull/3675
Commits 7 https://github.com/simstudioai/sim/pull/3675/commits
Checks 11 https://github.com/simstudioai/sim/pull/3675/checks
Files changed https://github.com/simstudioai/sim/pull/3675/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/3675/files
improvement(react): replace unnecessary useEffect patterns with better React primitives https://github.com/simstudioai/sim/pull/3675/files#top
Show all changes 7 commits https://github.com/simstudioai/sim/pull/3675/files
3afc09d improvement(react): replace unnecessary useEffect patterns with bette… waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/3afc09d99fb983e6831826db5dd1edb60b928389
50b3987 fix(react): revert unsafe render-time side effects to useEffect waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/50b3987ef1e79fab0b00215cffd47c806642ca75
350f113 fix(react): restore useEffect for modals, scroll, and env sync waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/350f113afbf30be9abb1271384413e34b03676a7
c56ff7a fix(react): restore useEffect for help/invite modals, combobox index … waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/c56ff7a97edadd9d84a122f93a5c69d5171b46f0
f8e8f7f fix(context-menu): use requestAnimationFrame for ColorGrid focus, rem… waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/f8e8f7fd740b9cbc77d95088d4435e38fa1da41c
7dc680e fix(files): restore filesRef pattern to prevent preview mode reset on… waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/7dc680e32ccf7053796e09df7d2709c60f11bb45
4860ff8 fix(add-documents-modal, combobox): restore useEffect for modal reset… waleedlatif1 Mar 19, 2026 https://github.com/simstudioai/sim/pull/3675/commits/4860ff862d9eb893bafac0c927031af1c626fe20
Clear filters https://github.com/simstudioai/sim/pull/3675/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/3675/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/3675/files
login-form.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
reset-password-content.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
signup-form.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-90e65a3217ad66bfba43f265a92bfd109d75ce4337450e5433fa2090160360d4
input.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
voice-interface.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
add-documents-modal.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-52c26653847242e9d797680c23028548fff1a57a86186b5e6d8074c3b80e84d8
credentials-manager.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-de57d1d374ddd902a8984e4eda692909b0fcd33072d0fdd9ecc40053d1a8bead
help-modal.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-834f78801e155b9e40f40c5cd3264b8bf525d06f4ccd0b4c1e6a9b0b3ea9efe7
context-menu.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-ab5db9bc6369208f083b7703827f2b7b9292d71b5decbd7a7a4864bd2d0ecf82
create-workspace-modal.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-d0cf34b88df924746856ca5577873f78c36ea6ba30124ee956e0a3c8d0354c85
permissions-table.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-ae8e1402f15c62636c4ace9a1f6d48a18ffaedda6c2b82f20771363aae7ffdfd
sidebar.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-fe0f9ef26aae01478e9790a231ce91eaa9af5ccb0acd5656ead6f12ef7f332c3
combobox.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-250b456531c971c9f696d2c20bd91c3fa0562703a3ff4462a56c459922211d3d
date-picker.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-b9bf2a866a7d180b75280bc96484f76056c270b6ee9a0b61647a3552fdc034ab
popover.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-3b0cc6c195119f057dbdc3a34fa008ca9bf73da36efb0b251a27fa3e41a6d6bc
time-picker.tsx https://github.com/simstudioai/sim/pull/3675/files#diff-ccf65eea51a49863663611e565441d90355e4ea7a6645fb88bcc107046cb987a
apps/sim/app/(auth)/login/login-form.tsxhttps://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
View file https://github.com/simstudioai/sim/blob/4860ff862d9eb893bafac0c927031af1c626fe20/apps/sim/app/(auth)/login/login-form.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/3675/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
https://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
https://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
https://github.com/simstudioai/sim/pull/3675/files#diff-8f33cf65aa4f8ccd888b483a11efba139a8f3961adfe2e974cfa9b2df0506ee1
apps/sim/app/(auth)/reset-password/reset-password-content.tsxhttps://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
View file https://github.com/simstudioai/sim/blob/4860ff862d9eb893bafac0c927031af1c626fe20/apps/sim/app/(auth)/reset-password/reset-password-content.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/3675/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
https://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
https://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
https://github.com/simstudioai/sim/pull/3675/files#diff-9a6ca493607aa03a47dd6825a701c23cb9ffba26a25688fd69b4e5ade65ab9ec
apps/sim/app/(auth)/signup/signup-form.tsxhttps://github.com/simstudioai/sim/pull/3675/files#diff-90e65a3217ad66bfba43f265a92bfd109d75ce4337450e5433fa2090160360d4
View file https://github.com/simstudioai/sim/blob/4860ff862d9eb893bafac0c927031af1c626fe20/apps/sim/app/(auth)/signup/signup-form.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/3675/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/3675/files#diff-90e65a3217ad66bfba43f265a92bfd109d75ce4337450e5433fa2090160360d4
https://github.com/simstudioai/sim/pull/3675/files#diff-90e65a3217ad66bfba43f265a92bfd109d75ce4337450e5433fa2090160360d4
https://github.com/simstudioai/sim/pull/3675/files#diff-90e65a3217ad66bfba43f265a92bfd109d75ce4337450e5433fa2090160360d4
apps/sim/app/chat/components/input/input.tsxhttps://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
View file https://github.com/simstudioai/sim/blob/4860ff862d9eb893bafac0c927031af1c626fe20/apps/sim/app/chat/components/input/input.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/3675/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
https://github.com/simstudioai/sim/pull/3675/files#diff-2f10c432349cef3ac6d1f6ab5e452643039dc52662335438392ab194a585753c
apps/sim/app/chat/components/voice-interface/voice-interface.tsxhttps://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
View file https://github.com/simstudioai/sim/blob/4860ff862d9eb893bafac0c927031af1c626fe20/apps/sim/app/chat/components/voice-interface/voice-interface.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/3675/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
https://github.com/simstudioai/sim/pull/3675/files#diff-e7779b7d6d58152e94f8af5cc518a471a4a080666a5c51922f9f42f6e8f23f6e
Please reload this pagehttps://github.com/simstudioai/sim/pull/3675/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/3675/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.