Skip to content

feat: add loyalty token redemption drawer - #47

Merged
meshackyaro merged 1 commit into
workman-labs:devfrom
charlesbarleyman:feat/loyalty-redemption-drawer
Aug 27, 2026
Merged

feat: add loyalty token redemption drawer#47
meshackyaro merged 1 commit into
workman-labs:devfrom
charlesbarleyman:feat/loyalty-redemption-drawer

Conversation

@charlesbarleyman

Copy link
Copy Markdown
Contributor

Summary

Implements #29, Loyalty Token Balance & Redemption Drawer.

  • Adds a responsive, accessible loyalty drawer mounted once from the global Navbar.
  • Shows token balance and redeemable rewards with insufficient-balance gating.
  • Adds confirmation, pending, success, failure, and retry-capable state transitions.
  • Gates redemption on a connected wallet and the expected Stellar network.
  • Adds focus handling, focus restoration, Escape/backdrop close, tab containment, and scroll locking.
  • Isolates the current preview adapter behind src/lib/loyalty.ts; it is clearly labelled because no loyalty balance/redemption backend endpoint exists yet.
  • Adds reducer coverage for successful redemption, affordability, and failure recovery.

Verification

  • npm test -- src/lib/test/loyalty.test.ts
  • npm run typecheck
  • npm run lint (passes with 9 pre-existing warnings outside this change)
  • npm run build

npm test currently has pre-existing storage-dependent failures in this local Node/jsdom environment (window.localStorage is unavailable); the new loyalty test passes.

Closes #29

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@charlesbarleyman is attempting to deploy a commit to the Meshack Yaro's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
guildworkman-web Ready Ready Preview Aug 27, 2026 10:37am

@meshackyaro meshackyaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work on this one — the scope here goes well beyond the ticket in the right ways. The accessibility details (focus restoration, tab containment, Escape/backdrop close, scroll locking) are easy to skip on a drawer component and you didn't. Gating redemption on both wallet connection and the correct Stellar network is the right defensive check for anything touching token balances. And isolating the preview adapter behind src/lib/loyalty.ts with a clear label is exactly the right way to land UI ahead of a backend — makes the eventual swap-over a contained change instead of a hunt through the codebase. Appreciate the reducer coverage for the failure-recovery path too, since that's the branch people usually forget to test. Thanks for flagging the pre-existing localStorage/lint issues explicitly rather than folding them in quietly.

Good job!

@meshackyaro
meshackyaro merged commit f806c2e into workman-labs:dev Aug 27, 2026
3 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.

Loyalty Token Balance & Redemption Drawer

2 participants