Repository navigation
Launch readiness: player/queue/purchase a11y, color contrast, route audit, onboarding tests - #875
Merged
Akatenvictor merged 10 commits intoNov 25, 2026
Conversation
- PlayerControls: expose shuffle/repeat toggle state via aria-pressed instead of color alone. - QueueDrawer: the per-row Remove button relied on group-hover but its row never had the `group` class, so it was invisible to everyone and unreachable by keyboard focus; add the class and reveal on focus-within too. - PlayerActions: close the More-options and playback-speed popovers on Escape and return focus to their trigger, matching the rest of the player's menu behavior. - BuyButton: mark the purchase error message as role="alert" so it's announced to screen reader users. - AuctionBidDialog/ListNFTDialog: replace the hand-rolled, non-trapping modal markup with the shared accessible Modal component (focus trap, Escape to close, aria-modal, focus restore on close), matching BuyButton's existing confirm dialog.
getStellarContractUrl had two unresolved implementations spliced together (a plain env-based builder and a newer one that validates the contract ID before building a URL), which was a syntax error that failed tsc for the entire project. Keep the validating version, default to the env-configured network when no explicit network is passed, and let callers pass a network explicitly (as OnChainInfo already did). ExplorerLink rendered contract links assuming the builder always returns a string; it can now return null for a malformed ID, so skip rendering the link instead. Also drop lib/__tests__/stellarExplorer.test.ts, a stale pre-validation duplicate of tests/lib/stellarExplorer.test.ts whose fixture contract IDs contain characters outside the StrKey alphabet and only passed before validation was added.
An earlier merge of the "split playback contexts" refactor left two conflicting implementations in PlaybackProvider: a pre-refactor useMemo that built the whole context value under the name `value`, and the refactor's own tail that expects a separate `actions` object feeding PlaybackActionsContext. The result was `const value` declared twice in the same scope, `useCallback` used without being imported, and references to action creators (addToQueue, recordPlay, etc.) that only ever existed as properties of the stray first object. This wasn't just a type error: the duplicate `const` is invalid JS, so Next.js, Vite and every test file that imports PlaybackContext (directly or transitively through the Player, the queue, auth, etc.) failed to even transform. Renamed the first block to `actions` (typed as `PlaybackActions`, which already exists for exactly this purpose), pointed its crossfade/normalize/gapless members at the standalone useCallbacks defined just above instead of re-creating them inline, trimmed its dependency array down to what it actually closes over, and added the missing `useCallback` import. Also added two imports (`demoOr`, `demoPlaylist`) the default-playlist line needed but never had. Verified with `tsc --noEmit` (previously failed on this file) and the test suite: 987 passing tests went from unable to run at all to passing unchanged.
… dropping
Audited the design tokens behind every color utility class in
components/ and app/. Two whole families were referenced everywhere
but never defined in app/globals.css, so Tailwind v4 silently drops
the class with no build error:
- bg-surface / bg-surface-input / bg-surface-elevated / bg-surface-hover:
84 occurrences across 32 files (modals, dropdowns, inputs, cards,
the player bar). Every one of those panels was rendering with no
background at all. Added a fixed dark panel hierarchy, since all of
it is already paired with literal text-white/border-border-dark
rather than the theme-aware --foreground.
- The shadcn/ui semantic set (primary, secondary, accent, destructive,
muted-foreground, input, ring, card, card-foreground) that
components.json's cssVariables: true implies and that
components/ui/{button,badge,card,input,tooltip}.tsx depend on.
Button in particular renders on real pages (transactions,
all-artists, all-collections, the session-expiry modal) and had no
intentional color in any variant.
Chose values with verified WCAG AA contrast against the white/gray
text already used alongside them (white-on-surface ~15-19:1,
gray-400-on-surface ~6.8:1, white-on-destructive ~4.8:1,
white-on-primary ~5.4:1).
Also fixed a typo, hover:border-border-muted, the one place that
diverged from the border-border-dark used everywhere else in the
dashboard — it referenced a token that never existed, so the hover
state never showed.
- app/(home)/search/page.tsx: the loading fallback used literal text-gray-400 against the page's theme-toggled background, which fails AA (~2.5:1) in light mode. Switched to the project's own theme-aware text-on-muted token, already used for this purpose elsewhere. - Added COLOR_CONTRAST_AUDIT.md documenting the audit method, the token-definition failures fixed in the previous commits, and what was checked but left alone (175 other gray-400/500 usages, all already on dark backgrounds that clear AA; the dashboard's inconsistent-but-individually-fine hardcoded panel colors).
docs/api-contract.md already tracks merch/events/community voting as unfinished and gated behind flags (AudioBitsStellar#637), but marketplace buying, bidding, and listing had no flag at all despite being just as unfinished: useSorobanRelay unconditionally throws "Wallet signing not yet implemented" right after prepare, and the path it's documented to call doesn't match any mounted backend route. It was worse than un-flagged, though: AuctionBidDialog and ListNFTDialog called useSorobanRelay() with zero arguments and destructured `relay`/`isPending`, neither of which exists on the hook (confirmed via tsc — this was a hard compile error). Only BuyButton called the hook the way it's actually implemented (pass prepare/submit functions, get back run/status/error). Rewrote both dialogs to the real API, matching BuyButton's pattern, so they at least fail with a catchable, user-visible error instead of a TypeError on first click. Added a `marketplaceTrading` flag (same shape and default behavior as the existing merch/events/communityVoting flags: off in production, on in development) and gated all three entry points behind it: BuyButton renders a disabled "Coming soon" button, the NftCollections bid button and the collection page's "List for sale" button disable themselves with an explanatory title instead of opening a dialog that can only ever error.
- tests/app/OnboardingPage.test.tsx: the onboarding flow's six defined steps (auth guard, listener save + redirect, returnTo default, artist confirmation step, retry-after-failure, skip) had no test coverage at all, only the redirect guard and the localStorage flag did. 7 new tests pass against the page's existing behavior. - components/ui/EmptyState.tsx was never imported anywhere despite having illustrations for scenarios already handled elsewhere (recently played, followers, collections). Fixed its tokens to match the app's actual design system (it used Tailwind's OS-driven dark: variant, which this app doesn't configure, and a teal accent instead of the brand color) and a pre-existing JSX-namespace tsc error, so it's no longer broken if it gets adopted later. - Added ONBOARDING_EMPTY_STATES_AUDIT.md documenting both the steps covered and what was checked and left alone (RecentlyPlayed and FollowedPlaylistsList correctly hide rather than show a message when empty; notifications' empty state is a backend gap, not a UI one).
|
@d-plug 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! 🚀 |
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
Closes #850, Closes #851, Closes #852, Closes #853
Working through these four pre-launch hardening items turned up two
build-breaking, pre-existing bugs on
mainthat blocked verifying any ofthe actual fixes (
tsc, the dev server, and the whole test suite), sothose are fixed first; the rest of the PR is the four issues themselves.
Found and fixed along the way (blocking everything else)
context/PlaybackContext.tsxhad an unresolved "split playbackcontexts" refactor: two conflicting
const valuedeclarations in thesame scope, which is invalid JS, not just a type error — it broke
Next.js, Vite, and every test that imports the Player, the queue, or
auth (directly or transitively).
lib/stellarExplorer.tshad two unresolvedgetStellarContractUrlimplementations spliced together, a syntax error that failed
tscforthe whole project.
#850 — Screen-reader and keyboard pass on the player, queue, and purchase flow
group-hoverwith no
groupclass on the row) — to everyone, not just keyboardusers.
aria-pressed.return.
role="alert"added).AuctionBidDialogandListNFTDialogwere hand-rolled, non-trappingdialogs; replaced with the shared accessible
Modalcomponent.A11Y_PLAYER_QUEUE_PURCHASE_AUDIT.md.#851 — Color contrast audit
bg-surface/bg-surface-input/bg-surface-elevated/bg-surface-hover(84 occurrences, 32 files) and the shadcn/ui semantic token set
(
primary,secondary,accent,destructive,card,ring, …)were referenced everywhere but never defined — Tailwind v4 silently
drops an undefined utility, so every one of those panels, inputs, and
buttons rendered with no color at all. Defined both token families
with contrast verified against the text already paired with them.
border-border-mutedtypo (should've beenborder-border-dark)and one literal
text-gray-400that fails AA in light mode.COLOR_CONTRAST_AUDIT.md.#852 — Launch scope audit (marketplace, community voting, merch, events)
Marketplace trading (buy/bid/list) was not, despite being just as
unfinished —
useSorobanRelayhas no wallet-signing implementation,and
AuctionBidDialog/ListNFTDialogcalled hook methods that don'texist on it (confirmed via
tsc). Added amarketplaceTradingflag(same default behavior as the existing flags) and gated all three
entry points; fixed the two dialogs to call the hook's real API so a
failure is a readable error instead of a crash.
docs/api-contract.md:LAUNCH_SCOPE_AUDIT.md.#853 — Onboarding and first-run experience with empty states
tests/app/OnboardingPage.test.tsx(7 tests) against its existingbehavior.
components/ui/EmptyState.tsxwas dead code (never imported) anddidn't match the app's design tokens or theming strategy; fixed its
tokens and a pre-existing
JSXnamespace error so it isn't broken ifit gets adopted.
library, playlists, search, notifications) for empty-state handling:
ONBOARDING_EMPTY_STATES_AUDIT.md.Test plan
npx tsc --noEmit— error count reduced; remaining errors arepre-existing and unrelated (
wagmi/msw/@playwright/testnot inpackage.json,@creit.tech/stellar-wallets-kitAPI mismatch,etc. — flagged in
LAUNCH_SCOPE_AUDIT.md, not touched here).npx vitest run— 997/1082 passing (up from 987/1072 before thisbranch, i.e. the whole suite could not even execute until the
PlaybackContext.tsxfix); the 85 remaining failures arepre-existing and unrelated (confirmed via
git stashbefore/aftercomparison on each one touched by this PR).
(
QueueDrawer,stellarExplorer,featureFlags,CollectionPage,the new
OnboardingPagetests).PlayerControls/PlayerActions/BuyButton/AuctionBidDialog/ListNFTDialoghave no existingtest files to extend — verified by reading the resulting
markup/behavior directly, noted in the audit docs rather than
claiming coverage that doesn't exist.