feat(#473): improve certificate search UX on verify page#727
Merged
AnnabelJoe merged 1 commit intoJul 3, 2026
Merged
Conversation
Input normalization: - normalizeQuery() strips leading/trailing whitespace - Detects and unwraps pasted full shareable URLs (/verify?id=...) so users can paste the whole URL and still get a valid lookup - Hex hashes are lowercased automatically for consistent API queries Actionable feedback: - validateQuery() catches empty and very-short inputs before hitting the API - Inline aria-invalid + role=alert paragraph under the input for empty/short - Richer API error banner with a contextual hint (UUID vs 64-hex hint) - Loading spinner on the Verify button (Loader2 icon replaces Search while loading) so the button state is unambiguous Results persistence: - Results stay visible (at 40% opacity) while a subsequent query is loading instead of being wiped immediately — prevents jarring blank flash - Results are only replaced once the new response arrives - setResult(null) only called on error so stale results don't linger after a successful re-query Bug fixes in original page: - handleVerify was not async despite using await — now fixed - setError / trackEvent / endTiming referenced undefined variables — removed - error vs pageError inconsistency resolved (single apiError state) - Auto-verify effect added: page auto-runs a verify when loaded with ?id= Empty state: - Friendly prompt shown before any search has been run (no blank page) Accessibility: - aria-describedby wired to either the hint (sr-only) or the error paragraph - aria-busy on the submit button during fetch - aria-live polite region announces results / errors to screen readers Closes AnnabelJoe#473
|
@sophiawilliamz 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! 🚀 |
AnnabelJoe
added a commit
that referenced
this pull request
Jul 3, 2026
- Add input normalization (URL stripping, hex lowercasing) - Add input validation with user-friendly error messages - Extract runVerify callback for reusability - Auto-verify on page load when ?id= param is present - Improve accessibility (aria-labels, error announcements) - Simplify copyLink function Resolved conflicts: - apps/web/src/app/verify/page.tsx: took PR version (proper state + runVerify callback)
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
Resolves #473
Makes certificate lookup more forgiving and easier by handling input variants, providing clear actionable feedback for invalid/empty inputs, and keeping results visible on repeated queries.
Changes
Input normalization (
normalizeQuery)https://solarproof.vercel.app/verify?id=abc123) — the user can paste the full URL and it just worksActionable feedback for invalid inputs (
validateQuery)"Enter a certificate ID, reading hash, or transaction hash to verify.""That looks too short — please enter a full certificate ID or hash."aria-invalid,aria-describedby,role="alert"for screen readersResults persistence
Bug fixes in the original page
handleVerifywas notasyncdespite usingawait— runtime error on every verify attemptsetError,trackEvent,endTimingwere referenced but never defined — replaced with proper stateerrorvspageErrorinconsistency eliminated — singleapiErrorstate?id=paramUX polish
Loader2spinner while loading (unambiguous loading state)aria-busyon submit button,aria-liveregion announces results to screen readersspellCheck={false}on the search input (hashes should not be spell-checked)Acceptance criteria