Skip to content

fix: ensure validation for webhook secret input

63411f7
Select commit
Loading
Failed to load commit list.
Open

Refactor: Webhooks page #303

fix: ensure validation for webhook secret input
63411f7
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 27, 2026 in 14m 14s

Code review found 1 important issue

Found 5 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/features/dashboard/settings/webhooks/add-edit-dialog-steps.tsx:135-138 hasCopied state can be set/unset incorrectly across the dialog flow

Annotations

Check failure on line 138 in src/features/dashboard/settings/webhooks/add-edit-dialog-steps.tsx

See this annotation in the file changed.

@claude claude / Claude Code Review

hasCopied state can be set/unset incorrectly across the dialog flow

The new `hasCopied` parent state introduced in this refactor has three bugs that combine to make the Copy / Add button variants misleading.

**(1)** `handleCopy` in `add-edit-dialog-steps.tsx:135-138` does `setTimeout(onCopied, 150)` without storing/clearing the id. The parent `WebhookAddEditDialog` stays mounted across opens, so if the user clicks Copy and closes the dialog within 150ms, `handleDialogChange(false)` resets `hasCopied` to false but the late timeout fires afterward and flips it ba