Skip to content

[#479] Fix member and hacker dashboard routing#480

Merged
DVidal1205 merged 1 commit into
mainfrom
blade/profile-routing-fix
Jun 27, 2026
Merged

[#479] Fix member and hacker dashboard routing#480
DVidal1205 merged 1 commit into
mainfrom
blade/profile-routing-fix

Conversation

@DVidal1205

Copy link
Copy Markdown
Contributor

Why

Blade sends normal sign-ins to /dashboard, but that surface previously only considered year-round member profiles. Hacker-only users could be funneled toward membership because the hackathon prompt was nested inside the member dashboard and only appeared after the event started.

Hackers also need access to application status, admission, confirmation, and profile management before the event begins. The shared current-hackathon definition therefore needs to cover the full participant lifecycle.

What

Closes: #479

  • Changed getCurrentHackathon to cover applicationOpen through endDate.
  • Aligned the default hacker lookup with the same lifecycle.
  • Selects the earliest applicationOpen when multiple hackathons are eligible, using start and end dates as deterministic tie-breakers.
  • Replaced the member-only banner/dialog with a responsive dashboard-level audience chooser.
  • Routes users explicitly to /hackathon/{slug} or the existing member dashboard/onboarding surface.
  • Ensures the Discord-membership dialog opens only after the routing choice closes into the member flow.
  • Added not-yet-open, registration-open, and applications-closed hacker landing states.
  • Redirects existing applicants, duplicate submissions, and the post-submission CTA to the event dashboard.
  • Updated /hackathon to resolve upcoming events during their participant lifecycle.

No database schema, migration, environment variable, dependency, authentication, or persisted-preference changes are included.

Test Plan

Completed locally:

  • pnpm format
  • pnpm lint
  • pnpm typecheck
  • Targeted Blade and API formatting, linting, and typechecks
  • Blade production build with the repository-compatible pinned Node runtime
  • Verified the public current-hackathon API resolves bloomknights before its start date
  • Verified the local selector reports BloomKnights as upcoming with applications open
  • Manually exercised the authenticated /dashboard chooser and /hackathon/bloomknights destination
  • Manually verified the responsive dialog after correcting long-button overflow
  • git diff --check

Reviewer scenario matrix:

  1. Member without a hacker application: member action stays on the member dashboard; hackathon action opens registration.
  2. Hacker without a member profile: hackathon action opens application status; member action reveals membership onboarding.
  3. User with both profiles: both dashboard destinations are available.
  4. User with neither profile: both onboarding paths are available.
  5. Before applicationOpen and after endDate: no dashboard chooser appears.
  6. If two eligible hackathons overlap: the one with the earlier applicationOpen is selected.
  7. Closing the chooser must not stack it with the Discord-membership dialog.

Screenshots are not attached; the dialog was reviewed interactively against the local Blade server.

Checklist

  • Database: No schema changes, OR I ran pnpm db:generate and committed the generated files in packages/db/drizzle/
  • Environment Variables: No environment variables changed, OR I have contacted the Development Lead to modify them on Coolify BEFORE merging.

Co-authored-by: Codex <codex@openai.com>
@DVidal1205 DVidal1205 added Bug Something isn't working Major Big change - 2+ reviewers required Blade Change modifies code in Blade app API Change modifies code in the global API/tRPC package labels Jun 27, 2026
@DVidal1205 DVidal1205 self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DVidal1205, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 40 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 7deab7c2-faf8-4878-9282-dd52bdba8a66

📥 Commits

Reviewing files that changed from the base of the PR and between 96cf3b1 and d66921d.

📒 Files selected for processing (11)
  • apps/blade/src/app/_components/dashboard/dashboard-entry-dialogs.tsx
  • apps/blade/src/app/_components/dashboard/hacker-dashboard/hacker-dashboard.tsx
  • apps/blade/src/app/_components/dashboard/hacker/hacker-application-form.tsx
  • apps/blade/src/app/_components/dashboard/member-dashboard/current-hackathon-notice.tsx
  • apps/blade/src/app/_components/dashboard/member-dashboard/member-dashboard.tsx
  • apps/blade/src/app/_components/user-interface.tsx
  • apps/blade/src/app/dashboard/page.tsx
  • apps/blade/src/app/hackathon/page.tsx
  • apps/blade/src/app/hacker/application/[hackathon-id]/page.tsx
  • packages/api/src/routers/hackathon.ts
  • packages/api/src/routers/hackers/queries.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blade/profile-routing-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alexanderpaolini alexanderpaolini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if it works it works

Comment on lines +19 to +24
interface DashboardHackathon {
applicationsOpen: boolean;
displayName: string;
isLive: boolean;
name: string;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are we redefining this

@DVidal1205 DVidal1205 marked this pull request as ready for review June 27, 2026 19:28
@DVidal1205 DVidal1205 added this pull request to the merge queue Jun 27, 2026
Merged via the queue into main with commit a5218cf Jun 27, 2026
11 checks passed
@DVidal1205 DVidal1205 deleted the blade/profile-routing-fix branch June 27, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Change modifies code in the global API/tRPC package Blade Change modifies code in Blade app Bug Something isn't working Major Big change - 2+ reviewers required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate member and hacker dashboard routing

2 participants