Skip to content

refactor(client): overhaul gating selection UX, accessibility, and hook stability#29

Merged
Oba-One merged 2 commits intorelease/3.2.0from
enhancement/gating-selection-ux
Feb 12, 2026
Merged

refactor(client): overhaul gating selection UX, accessibility, and hook stability#29
Oba-One merged 2 commits intorelease/3.2.0from
enhancement/gating-selection-ux

Conversation

@Oba-One
Copy link
Member

@Oba-One Oba-One commented Feb 11, 2026

Summary

  • Phase 1: Migrate useJarCreation from manual useState to React Hook Form + Zod schema validation, extract jarCreationSchema.ts with METHOD_TO_ACCESS_TYPE mapping
  • Phase 2: Redesign ProtocolSelector UX — merge duplicate ConfigurationPanels, consolidate NFTGateInput 11 useState calls into typed useReducer, add rate limit countdown
  • Phase 3: Fix useHats infinite re-render loop — wrap async functions in useCallback with AbortSignal, add AbortController cleanup to all effects
  • Phase 4: Add ARIA accessibility across all protocol config inputs — role="button", tabIndex, aria-pressed, keyboard handlers, aria-invalid/aria-describedby, semantic <button> elements
  • Phase 5: NFTSelector accessibility — keyboard navigation, view toggle aria-label, skip unnecessary virtualization (pagination already bounds DOM nodes)

Test plan

  • Verify TypeScript compiles cleanly (tsc --noEmit)
  • Verify jar creation form still works end-to-end with React Hook Form
  • Verify protocol selector method switching works on desktop and mobile
  • Verify NFT gate input validation, rate limiting, and collection preview
  • Verify keyboard navigation on ProtocolSelector method cards and NFTSelector cards
  • Verify screen reader announces errors via aria-describedby on all protocol config inputs
  • Verify POAP search results are keyboard-navigable (now <button> elements)

🤖 Generated with Claude Code

…ok stability

Phase 1: Migrate useJarCreation from manual useState to React Hook Form + Zod
- Extract jarCreationSchema.ts with METHOD_TO_ACCESS_TYPE mapping
- Replace ~15 useState calls with useForm + zodResolver
- Simplify StepContent bridge with lookup instead of 6-case switch

Phase 2: Redesign ProtocolSelector UX and consolidate NFTGateInput state
- Merge duplicate ConfigurationPanels into one using real protocol components
- Add visibleMethods, recommendedMethod props
- Replace 11 useState calls in NFTGateInput with typed useReducer
- Enhanced useRateLimit with countdown timer and amber UI banner

Phase 3: Fix useHats race condition and parallelize ERC detection
- Wrap async functions in useCallback with AbortSignal to prevent infinite
  re-render loops caused by unstable function references in useEffect deps
- Add AbortController cleanup to all effects
- Remove duplicate cache check in useEnhancedNFTValidation

Phase 4: Add ARIA accessibility across all protocol config inputs
- ProtocolSelector: role="button", tabIndex, aria-pressed, keyboard handlers
- POAPConfig: Convert div onClick to semantic button for search results
- ProtocolConfigBase: Add errorId prop + role="alert" on error alerts
- All protocol configs: aria-invalid + aria-describedby on inputs
- NFTGateInput: aria-label on sliders, remove redundant aria-disabled

Phase 5: NFTSelector accessibility and Coming Soon features
- NFTCard: role="button", tabIndex, aria-pressed, keyboard handlers
- View toggle: aria-label, aria-pressed, role="group"
- Skip @tanstack/react-virtual (pagination already bounds DOM nodes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
cookie-jar Ready Ready Preview, Comment Feb 12, 2026 1:23am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enhancement/gating-selection-ux

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Oba-One Oba-One merged commit d955e2b into release/3.2.0 Feb 12, 2026
9 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.

1 participant