UX overhaul of market-detail flow (critique 19→33/40)#7
Merged
Conversation
Drives the prediction page from a "Poor/blocking" critique to "Good/ production-acceptable" via six fix passes plus the social-loop and empty-state gaps the re-score flagged. All extractable logic is TDD'd (35 unit tests in lib/predictionForm.js, red→green); UI integration verified by build + source review. Stakes-moment integrity - replace alert()/silent failures with inline branded .message.error + retry and friendly, specific copy (predictionErrorMessage) - persist the Yes/No choice with check/cross icons + .button-predict-active + aria-pressed (no longer color-alone; WCAG 1.4.1), and a pre-commit confirm - stable idempotency key so a double-tap can't double-predict Speed - drop router.reload() after place/resolve; optimistic update + in-place reconcile (applyOptimisticPrediction) - gate the 5s poll on tab visibility and pause while a confirm is pending Layout / input - collapse the creator's resolve form behind a disclosure + summarizing confirm (resolveSummary) - clamp the stake to [1,balance], inputMode=numeric, quick-stake presets, inline validation Accessibility - focus-visible rings on all interactive controls (was inputs only) - prefers-reduced-motion block; 44px nav targets; navigator.share guard Social loop / empty state - "Share market" invite on open markets (inviteText: URL + take-a-side copy) - "Be the first to take a side" empty state instead of a misleading 50/50 bar Design-system alignment - tokenize the resolved view (.choice-pill, .chip, .resolution-headline); odds bar animates transform: scaleX (GPU) instead of width (layout) - fix support chatbot hardcoded outcome:true (now sends the chosen side) Adds PRODUCT.md (product register, principles, a11y target) and the critique snapshots documenting the 19→33 trend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Drives the prediction page from a "Poor/blocking" critique to "Good/ production-acceptable" via six fix passes plus the social-loop and empty-state gaps the re-score flagged. All extractable logic is TDD'd (35 unit tests in lib/predictionForm.js, red→green); UI integration verified by build + source review.
Stakes-moment integrity
Speed
Layout / input
Accessibility
Social loop / empty state
Design-system alignment
Adds PRODUCT.md (product register, principles, a11y target) and the critique snapshots documenting the 19→33 trend.