Skip to content

Fix selector updater render loop - #1383

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3962-cursor-automated-triage-response-1b75
Draft

Fix selector updater render loop#1383
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3962-cursor-automated-triage-response-1b75

Conversation

@cursor

@cursor cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Memoized useHandleSelectorComponent's imperative updater so effects that depend on it do not re-run after the updater's own local state change.
  • Added a focused regression test covering the stable-updater behavior.
  • Updated TemplateSidebar to include the now-stable updater in its effect dependencies.

Testing Criteria

  • yarn test src/hooks/useHandleSelectorComponent.test.tsx --runInBand passes and verifies an effect keyed on updateRenderingItem runs once after calling the updater.
  • yarn lint:check passes with existing repository warnings.
  • yarn prettier:check src/hooks/useHandleSelectorComponent.tsx src/hooks/useHandleSelectorComponent.test.tsx src/app/configure-tasks-app/ui/TemplateSidebar.tsx passes.
  • Manual browser smoke with 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 tsc still fails on the known pre-existing SVG module declaration errors in src/icons/index.ts; no TypeScript errors referenced the touched files.
  • Full yarn test --runInBand runs 17 suites successfully, then fails to load src/app/api/tests/utils/authenticate.test.ts because Jest cannot parse ESM-only p-retry from node_modules; this is outside the selector change.
  • Linear and Sentry MCP direct reads were unavailable (Linear returned 401, Sentry requires auth), so source confirmation is based on trigger metadata and the Tasks app Sentry configuration.

Impact & Surface Area of Change

  • Affects task/template workflow-state selector state synchronization through useHandleSelectorComponent.
  • Main regression surface: status selector rendering and local optimistic selector updates in task cards, task detail sidebar, template cards, and template sidebar.
Open in Web View Automation 

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 8, 2026

Copy link
Copy Markdown

OUT-3962

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Jul 8, 2026 7:24pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant