Skip to content

UX overhaul of market-detail flow (critique 19→33/40)#7

Merged
f1shyfang merged 1 commit into
mainfrom
port/supabase-to-neon-betterauth
Jun 1, 2026
Merged

UX overhaul of market-detail flow (critique 19→33/40)#7
f1shyfang merged 1 commit into
mainfrom
port/supabase-to-neon-betterauth

Conversation

@f1shyfang
Copy link
Copy Markdown
Owner

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.

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>
Copilot AI review requested due to automatic review settings June 1, 2026 02:21
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
betcha Ready Ready Preview, Comment Jun 1, 2026 2:21am

@f1shyfang f1shyfang merged commit 9f211dd into main Jun 1, 2026
2 of 3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants