Conversation
Use stable React keys on custom ChatOption slots to prevent unmount/remount when the backing button is deleted. Add render-time state reset to sync local state when a different button shifts into the same slot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
WalkthroughStabilizes React reconciliation for two custom chat slots by using static keys and adds per-instance identity tracking in ChatOption to sync state from a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run journeys-admin-e2e:e2e |
❌ Failed | 6m 17s | View ↗ |
nx run-many --target=vercel-alias --projects=jo... |
✅ Succeeded | 2s | View ↗ |
nx run-many --target=upload-sourcemaps --projec... |
✅ Succeeded | 9s | View ↗ |
nx run-many --target=deploy --projects=journeys... |
✅ Succeeded | 2m 23s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-04-10 04:17:44 UTC
|
The latest updates on your projects.
|
…ars-url-and-icon-selection-when
…ars-url-and-icon-selection-when
…ars-url-and-icon-selection-when
…ars-url-and-icon-selection-when
…ars-url-and-icon-selection-when
…8940) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

Summary
keyprop on customChatOptioncomponents changes when the button is deleted, causing React to unmount/remount and destroy localuseStatestate"custom-0","custom-1") to preserve the component instance, plus a render-time state reset to handle the shift case (2 custom buttons where the first is deleted)Changes
Chat.tsxChatOptionslotsChatOption.tsxtrackedIdstate + render-time sync guard to handle button identity changesChatOption.spec.tsxTest plan
Chat.spec.tsx+ChatOption.spec.tsx)Post-Deploy Monitoring & Validation
No additional operational monitoring required: UI-only change scoped to the Chat Widget editor panel. No backend, API, or data model changes.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
Documentation