Fix selector updater render loop - #1383
Draft
cursor[bot] wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Changes
useHandleSelectorComponent's imperative updater so effects that depend on it do not re-run after the updater's own local state change.TemplateSidebarto include the now-stable updater in its effect dependencies.Testing Criteria
yarn test src/hooks/useHandleSelectorComponent.test.tsx --runInBandpasses and verifies an effect keyed onupdateRenderingItemruns once after calling the updater.yarn lint:checkpasses with existing repository warnings.yarn prettier:check src/hooks/useHandleSelectorComponent.tsx src/hooks/useHandleSelectorComponent.test.tsx src/app/configure-tasks-app/ui/TemplateSidebar.tsxpasses.yarn dev: root and detail routes are reachable but token-gated locally; no valid Copilot token was available to reach the live task detail/sidebar UI.Notes
yarn tscstill fails on the known pre-existing SVG module declaration errors insrc/icons/index.ts; no TypeScript errors referenced the touched files.yarn test --runInBandruns 17 suites successfully, then fails to loadsrc/app/api/tests/utils/authenticate.test.tsbecause Jest cannot parse ESM-onlyp-retryfromnode_modules; this is outside the selector change.Linearreturned 401,Sentryrequires auth), so source confirmation is based on trigger metadata and the Tasks app Sentry configuration.Impact & Surface Area of Change
useHandleSelectorComponent.