feat: Webhook settings form resets all fields on validation error#166
Merged
Conversation
Issue dreamgeneX#48 - Copy-to-clipboard for API keys, webhook secrets, wallet addresses: - Add CopyButton component (components/ui/CopyButton.tsx): icon button that copies a value to clipboard and flashes a 'Copied!' tooltip for 2s. Includes execCommand fallback for environments without Clipboard API. Fully accessible with aria-label, aria-live status region, and focus-visible ring. - Add CopyField component (components/ui/CopyField.tsx): read-only monospace field paired with CopyButton, supports optional masking for secrets. - Wire CopyField into settings page API key section (revealed after generate). - Wire CopyField into settings page Stellar address display. - Wire CopyField into webhooks page per-endpoint signing secret field. - Wire CopyButton into wallets page settlement address input (shown when non-empty). - Wire CopyButton onto code snippet headers in developers page. Issue dreamgeneX#64 - Rate limit status indicator on developer settings page: - Add RateLimitIndicator component (components/developers/RateLimitIndicator.tsx): fetches GET /developers/rate-limit (polled every 30s), renders a progress bar with colour coding (violet < 70%, amber 70-89%, coral >= 90%), used/limit counts, percentage, and a human-readable reset countdown. Shows a warning banner when usage >= 90%. Accessible via role=progressbar with aria-valuenow/ min/max. Loading and error states handled gracefully. - Add api.developers.rateLimit() endpoint to lib/api.ts. - Mount RateLimitIndicator in developers page alongside the API key section. Assumptions: - Backend exposes GET /developers/rate-limit returning { used, limit, reset_at }. - Webhook secret is returned as webhook.secret in the list response when available.
|
@Meshmulla is attempting to deploy a commit to the dreamgenex's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Meshmulla Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
closes #5
This PR fixes an issue where submitting an invalid webhook endpoint URL caused the webhook settings form to reset all fields, including the secret and selected event types. The form now preserves user input after validation failures to improve usability and prevent accidental data loss.
Changes Included:
Preserved form state when validation errors occur
Prevented secret and event-type selections from being cleared on invalid URL submission