Skip to content

feat: add quests feature with onboarding and loading states - #32

Merged
iflames1 merged 1 commit into
devfrom
feat/introduce-quest
Sep 1, 2026
Merged

feat: add quests feature with onboarding and loading states#32
iflames1 merged 1 commit into
devfrom
feat/introduce-quest

Conversation

@iflames1

@iflames1 iflames1 commented Sep 1, 2026

Copy link
Copy Markdown
Member
  • Introduced new quests functionality, including actions for claiming quests and retrieving user quests.
  • Added QuestOnboardingDialog for user onboarding related to quests.
  • Implemented loading states for quests, profile, settings, wallet, and leaderboard pages using skeleton components.
  • Updated sitemap to include a route for quests.
  • Refactored loading components to utilize new skeleton structures for improved UI consistency.

- Introduced new quests functionality, including actions for claiming quests and retrieving user quests.
- Added QuestOnboardingDialog for user onboarding related to quests.
- Implemented loading states for quests, profile, settings, wallet, and leaderboard pages using skeleton components.
- Updated sitemap to include a route for quests.
- Refactored loading components to utilize new skeleton structures for improved UI consistency.
Copilot AI lite review requested due to automatic review settings September 1, 2026 22:02
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
stacks-wars Ready Ready Preview Sep 1, 2026 10:02pm UTC

@iflames1
iflames1 merged commit df87db4 into dev Sep 1, 2026
3 checks passed
@iflames1
iflames1 deleted the feat/introduce-quest branch September 1, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The quests React Query cache key is not scoped by user, which can leak a previous user’s quest data across logout/login.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new Quests surface area to the app (API types + server actions + client UI), introduces quest onboarding/referral prompting, and expands route-level loading UX with a shared skeleton system while extending the leaderboard to support quests/all boards.

Changes:

  • Introduced quests domain types, server endpoints, server actions, and client hooks/mutations for fetching/claiming quests.
  • Added new Quests route/UI (including Getting Started rail + onboarding dialog) and wired quest updates through the WS protocol.
  • Refactored/standardized loading states across multiple routes using new skeleton components and updated navigation/sitemap.
File summaries
File Description
lib/ws/protocol.ts Adds quest.updated to the server message kind union.
lib/quests.ts Adds quest helper utilities (progress formatting, next quest selection, claim application).
lib/api/types.ts Introduces quest-related API types and adds leaderboard board support.
lib/api/server.ts Adds quests/referral endpoints and supports leaderboard board query param.
hooks/use-quests-me.ts Adds React Query hook for fetching the current user’s quests.
hooks/use-leaderboard.ts Extends leaderboard scope to include board and updates cache keying.
hooks/use-claim-quest.ts Adds mutation hook to claim quests and update cached quest state.
components/ws/app-ws-provider.tsx Invalidates quests query on quest.updated websocket messages.
components/wallet/transaction-list.tsx Updates wallet transaction loading UI to a richer skeleton list layout.
components/ui/button.tsx Adjusts base button styling (adds cursor-pointer).
components/shell/app-header.tsx Adds Quests nav item and repositions nav to centered layout on large screens.
components/shell/app-footer.tsx Adds Quests link to footer navigation.
components/room/room-skeleton.tsx Replaces room loading UI with a more structured skeleton layout.
components/quests/quests-view.tsx New main quests screen UI and state handling (empty/loading/loaded).
components/quests/quests-skeleton.tsx Adds a route/component-level skeleton for quests.
components/quests/quest-step.tsx Adds quest row UI with progress, CTA, and claim handling.
components/quests/getting-started-rail.tsx Adds “Getting Started” progress rail for the landing page.
components/quests/bonus-mission.tsx Adds UI for bonus mission quest rendering and claiming.
components/profile/match-history.tsx Improves match history loading skeleton layout.
components/leaderboard/leaderboard-view.tsx Adds board switcher (Game/Quests/All) and updates filters/copy accordingly.
components/leaderboard/leaderboard-table.tsx Adds board-aware empty states and option to hide match stats for quest board.
components/common/page-container.tsx Updates max-width sizing classes for page layout containers.
components/common/list-skeleton.tsx Major expansion/refactor of shared skeleton components used by multiple routes.
components/auth/quest-onboarding-dialog.tsx Adds referral prompt + quest intro dialog flow for signed-in users.
app/sitemap.ts Adds /quests to sitemap.
app/provider.tsx Wires QuestOnboardingDialog into the app provider stack.
app/auth/reset-password/page.tsx Refines suspense fallback skeleton for reset password UI.
app/(app)/wallet/page.tsx Uses shared WalletPageSkeleton for unauthenticated loading state.
app/(app)/wallet/loading.tsx Adds route-level wallet loading skeleton.
app/(app)/settings/page.tsx Uses shared SettingsPageSkeleton for unauthenticated loading state.
app/(app)/settings/loading.tsx Adds route-level settings loading skeleton.
app/(app)/quests/page.tsx Adds the Quests page route with SSR initial fetch.
app/(app)/quests/loading.tsx Adds route-level quests loading UI.
app/(app)/profile/[username]/loading.tsx Switches profile loading UI to shared ProfilePageSkeleton.
app/(app)/page.tsx Adds GettingStartedRail to the landing page.
app/(app)/lobbies/page.tsx Uses shared LobbyBrowserSkeleton as Suspense fallback.
app/(app)/lobbies/loading.tsx Switches lobbies route-level loading to shared LobbiesPageSkeleton.
app/(app)/leaderboard/page.tsx Updates leaderboard metadata/copy to reflect new boards.
app/(app)/leaderboard/loading.tsx Switches leaderboard loading to shared LeaderboardPageSkeleton.
app/(app)/games/loading.tsx Switches games loading to shared GamesPageSkeleton.
app/(app)/games/[gameId]/loading.tsx Switches game detail loading to shared GameDetailSkeleton.
AGENTS.md Updates embedded Next.js agent guidance block text.
actions/quests.ts Adds server actions for quests/referral/intro flows.
Review details
  • Files reviewed: 43/43 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread hooks/use-quests-me.ts
Comment on lines +12 to +16
const user = useSessionUser()
return useQuery({
queryKey: QUESTS_ME_KEY,
queryFn: getMyQuestsAction,
enabled: Boolean(user),
Comment on lines 109 to +110
type="button"
onClick={() => setTab(item.id)}
onClick={() => setBoardKind(item.id)}
Comment on lines +133 to +134
type="button"
onClick={() => setTab(item.id)}
Comment thread hooks/use-claim-quest.ts
Comment on lines +19 to +23
queryClient.setQueryData<QuestMe>(QUESTS_ME_KEY, (current) =>
current ? applyQuestClaim(current, result) : current
)
void queryClient.invalidateQueries({ queryKey: QUESTS_ME_KEY })
if (!result.alreadyClaimed) playSfx("success")
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