Skip to content

feat: Webhook settings form resets all fields on validation error#166

Merged
dreamgeneX merged 4 commits into
dreamgeneX:mainfrom
Meshmulla:webhook_settings
May 29, 2026
Merged

feat: Webhook settings form resets all fields on validation error#166
dreamgeneX merged 4 commits into
dreamgeneX:mainfrom
Meshmulla:webhook_settings

Conversation

@Meshmulla
Copy link
Copy Markdown
Contributor

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

Meshmulla added 3 commits May 28, 2026 13:46
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.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@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.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@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! 🚀

Learn more about application limits

@dreamgeneX dreamgeneX merged commit 7475864 into dreamgeneX:main May 29, 2026
0 of 2 checks passed
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.

Webhook settings form resets all fields on validation error

2 participants