Skip to content

ContributorDashboardPage's Active/Completed tab selection isn't reflected in the URL, so refreshing or sharing a link always resets to the Active tab #260

Description

@chonilius

src/app/dashboard/contributor/page.tsx#ContributorDashboardPage tracks the claims-list
tab purely as local component state:

const [tab, setTab] = useState<"active" | "completed">("active");
...
<Tabs tabs={[...]} active={tab} onChange={setTab} />

There's no synchronization with the URL (no ?tab=completed search param, no route
segment). A contributor who switches to "Completed" to review their paid-out bounties,
then refreshes the page (or copies the URL to reference later, or opens the dashboard in
a new tab from a bookmark), always lands back on "Active" — the tab selection is
invisible to anything outside the current render, including the browser's own back/forward
navigation and any link the user might try to share pointing at their completed work.

Suggested fix: sync tab with a URL search param via useSearchParams/router.replace
(shallow, no full navigation), so the selected tab survives a refresh and can be linked
to directly — e.g. /dashboard/contributor?tab=completed.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions