feat: confirm-before-revoke for API keys and webhooks (#10)#32
Merged
mikewheeleer merged 1 commit intoJun 19, 2026
Merged
Conversation
Wire the shared ConfirmDialog into both the API keys and webhooks pages so destructive actions require an explicit confirmation step before the DELETE request is fired. Changes: - api-keys/page.tsx: add pendingRevoke state; Revoke button opens dialog, onConfirm calls onDelete, onCancel dismisses without side-effects - webhooks/page.tsx: add pendingRemove state; Remove button opens dialog, onConfirm calls onDelete, onCancel dismisses without side-effects - api-keys/page.test.tsx: 4 tests covering dialog open, cancel, confirm - webhooks/page.test.tsx: 4 tests covering dialog open, cancel, confirm All 28 tests pass, build clean.
Contributor
|
oh nice, a confirm step before revoking keys and webhooks is a great safety net against fat-finger mistakes. lgtm 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #10.
Adds a confirmation step before any destructive action on the API Keys and Webhooks pages, using the existing shared
ConfirmDialogcomponent — no new dependencies.Changes
src/app/api-keys/page.tsxpendingRevokestate. Revoke button now opensConfirmDialog; confirmed firesonDelete, cancelled is a no-op.src/app/webhooks/page.tsxpendingRemovestate +onDeletehelper. Remove button opensConfirmDialog; confirmed firesonDelete, cancelled is a no-op.src/app/api-keys/page.test.tsxsrc/app/webhooks/page.test.tsxTesting
npm run build— ✅ clean (Turbopack, TypeScript)npm test— ✅ 28 tests, 11 suites, 0 failuresAccessibility
ConfirmDialogalready carriesrole="dialog",aria-modal="true", andaria-labelledby. Both trigger buttons aretype="button"with visible, descriptive labels.