Skip to content

fix(dashboard): validate tab query param to active or completed - #727

Open
dezzy-music wants to merge 1 commit into
MergeFi:mainfrom
dezzy-music:fix/contributor-dashboard-validate-tab-692
Open

dezzy-music wants to merge 1 commit into
MergeFi:mainfrom
dezzy-music:fix/contributor-dashboard-validate-tab-692

Conversation

@dezzy-music

Copy link
Copy Markdown

Fixes #692

Summary

ContributorDashboardClient previously cast searchParams.get("tab") directly to "active" | "completed". Visiting /dashboard/contributor?tab=foo (or any mistyped/unrecognized tab parameter) caused no tab in Tabs to be selected, resulting in broken keyboard navigation (tabIndex=0 missing) and neither panel rendering.

Changes

  • Validated the tab search parameter against the supported set (completed vs active), falling back safely to active.
  • Added unit tests in ContributorDashboardClient.test.tsx covering fallback on missing tab, selection on ?tab=completed, and safe degradation to active on invalid/unknown ?tab=foo values.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@dezzy-music is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

ContributorDashboardClient trusts ?tab= without validation — ?tab=foo selects no tab and renders nothing

1 participant