fix(react): use stable keys for dynamic lists - #6840
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Identity strategies added: generated Component contracts: Editor stability: PII custom patterns and data-retention policy editors track row ids and remount stage panels with Reviewed by Cursor Bugbot for commit 67fd9ab. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR replaces positional React keys with stable identities across dynamic lists in the Sim UI, documentation site, and shared component packages.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defects identified. The changed list keys are derived from stable IDs, source positions, or deterministic domain signatures, and the updated component contracts and consumers remain aligned.
|
| Filename | Overview |
|---|---|
| packages/emcn/src/components/tag-input/tag-input.tsx | Makes stable identity part of the TagItem contract and uses it when rendering editable tags. |
| packages/emcn/src/components/chip-modal/chip-modal.tsx | Requires IDs for secondary footer actions and replaces positional fragment keys. |
| apps/sim/components/pii/custom-patterns-editor.tsx | Tracks row identities through local add and remove operations while preserving controlled pattern values. |
| apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx | Derives option-group keys from block and option identity instead of render position. |
| apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx | Assigns content-derived identities to inline and special-tag render groups during streaming. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/use-chat-file-upload.ts | Gives each upload error a generated identity so duplicate messages reconcile independently. |
Reviews (1): Last reviewed commit: "fix(react): use stable keys for dynamic ..." | Re-trigger Greptile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 63337d3. Configure here.
- assign generated IDs to externally appended PII pattern rows - cover editing appended rows without remounting
- assign generated IDs to externally appended PII pattern rows - cover editing appended rows without remounting
0965452 to
56e83f5
Compare
0ace85a to
67fd9ab
Compare

Summary
Dynamic lists now keep each row's identity through duplicate values, deletion, filtering, and redaction-stage changes. This prevents focus, entered text, or submitted data from moving to the wrong row after React reconciles a changed list.
Type of Change
Testing
npx react-doctor@latest --verbose:no-array-index-as-keyis 0stagingChecklist
Screenshots/Videos
Not captured. The behavior is covered by focused tests that add, remove, and rerender controlled rows.
Post-Deploy Monitoring & Validation