Skip to content

Persist solver identity after registration and link to the solver's own detail page #239

Description

@james2177

Description: After a successful registration in SolvePageClient's register tab, useSolverRegistration reaches status === "success" but the UI only shows a static "Registered" button state — there's no link to the solver's own /solve/[address] detail page, and no persisted indicator elsewhere in the app (e.g. in Nav) that the connected wallet is a registered solver.

Problem Statement & Context: A freshly-registered solver has no obvious next step to see their own leaderboard position or fill history, and returning users who are already solvers get no acknowledgment of that status anywhere outside the register tab itself.

Scope & Acceptance Criteria:

  • On successful registration, show a link to the new solver's own /solve/[address] page using the registered address.
  • On the /solve page, if the connected wallet address matches an existing entry in useSolvers()'s list, surface a "You're a registered solver — view your profile" affordance (e.g. in the leaderboard tab or page header) rather than requiring the user to scroll/search the leaderboard for themselves.
  • Out of scope: adding solver-specific account settings/editing (e.g. updating supported chains) — this issue is about visibility/navigation, not solver profile management.

Implementation Guidelines:

  1. Key files: src/app/solve/SolvePageClient.tsx, src/hooks/useSolverRegistration.ts, src/hooks/useSolvers.ts, src/store/wallet.ts (for the connected address).
  2. Derive "is this wallet a registered solver" by matching useWalletStore's address against useSolvers()'s returned list client-side — no new backend endpoint should be required.
  3. Edge cases: address casing/comparison (Stellar public keys are uppercase-only by format, but compare defensively), and the moment right after registration where the new solver may not yet appear in a cached useSolvers() SWR response (the existing mutate("/solvers") call in useSolverRegistration.ts should already trigger a refetch — confirm this actually surfaces the new entry in time, or add a short polling fallback).
  4. Testing: extend src/app/solve/solver-registration.integration.test.tsx to assert the post-success link appears with the correct address; add a case in SolvePageClient tests for the "already a registered solver" banner appearing when wallet address matches a leaderboard entry.

Definition of Done:

  • Code written, tested, documented.
  • Acceptance criteria met; verified via test output and screenshots.
  • PR passes CI.
  • Reviewed and approved.

Resources: src/app/solve/solver-registration.integration.test.tsx, src/hooks/useSolverRegistration.ts, src/hooks/useSolvers.ts

Complexity: High (200 points)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions