Skip to content

fix(slack): delete correct notification row instead of the last one [] - #11264

Merged
Lisa White (whitelisab) merged 1 commit into
masterfrom
fix/slack-notification-delete-wrong-item
Aug 10, 2026
Merged

fix(slack): delete correct notification row instead of the last one []#11264
Lisa White (whitelisab) merged 1 commit into
masterfrom
fix/slack-notification-delete-wrong-item

Conversation

@zacharyyankiver

Copy link
Copy Markdown
Contributor

Summary

  • Notification rows in the Slack app's config screen were keyed by array index (key={index}), so deleting a row in the middle of the list caused React to reconcile the last DOM row rather than the one the user clicked delete on. The store logic (removeNotificationAtIndex) already removed the correct item — this was purely a rendering/reconciliation bug.
  • Added a stable id to SlackNotification (generated with uuid), assigned on creation and backfilled on load for notifications persisted before this change, and keyed the list by notification.id instead of index.

Test plan

  • npx tsc --noEmit passes
  • npx eslint passes on changed files
  • npx vitest run — all existing tests pass (8/8)
  • Manually verify in a real installation: add several notifications, delete one from the middle of the list, confirm the correct row disappears and remaining rows keep their own channel/content type selections

🤖 Generated with Claude Code

Notification rows were keyed by array index in NotificationsPanel,
so deleting a middle row caused React to reconcile the wrong DOM
node (always the last row) instead of the one that was clicked,
even though the underlying store removed the correct item. Give
each notification a stable id and key on that instead.
@zacharyyankiver
zacharyyankiver requested review from a team as code owners August 10, 2026 15:48
@zacharyyankiver zacharyyankiver changed the title fix(slack): delete correct notification row instead of the last one fix(slack): delete correct notification row instead of the last one [] Aug 10, 2026
@whitelisab
Lisa White (whitelisab) merged commit 1da195c into master Aug 10, 2026
15 of 16 checks passed
@whitelisab
Lisa White (whitelisab) deleted the fix/slack-notification-delete-wrong-item branch August 10, 2026 16:37
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.

2 participants