Skip to content

feat(HackathonSelector): add "New Hackathon" option to hackathon swit…#427

Merged
Benjtalkshow merged 2 commits intoboundlessfi:mainfrom
ryzen-xp:feature/new-hackathon-switcher-option
Mar 2, 2026
Merged

feat(HackathonSelector): add "New Hackathon" option to hackathon swit…#427
Benjtalkshow merged 2 commits intoboundlessfi:mainfrom
ryzen-xp:feature/new-hackathon-switcher-option

Conversation

@ryzen-xp
Copy link
Contributor

@ryzen-xp ryzen-xp commented Mar 2, 2026

Closes #418

Adds a "New Hackathon" shortcut at the bottom of the hackathon switcher dropdown.

Changes

  • HackathonSelector.tsx — Added organizationId prop, imported Plus and DropdownMenuSeparator, added conditional "New Hackathon" menu item
  • HackathonSidebar.tsx — Added organizationId to SidebarContentProps, passed derivedOrgId to HackathonSidebarContent and down to HackathonSelector

Behavior

  • "New Hackathon" item appears only when hackathons.length > 0 (no change to empty-state null guard)
  • Clicking navigates to /organizations/[id]/hackathons/new
  • Separated from existing items via DropdownMenuSeparator with bg-[#2B2B2B]
  • Styling matches existing DropdownMenuItem conventions
Screenshot From 2026-03-02 11-19-57 Screenshot From 2026-03-02 11-33-24

Summary by CodeRabbit

  • New Features
    • Added a "New Hackathon" item (with plus icon) to the hackathon selector dropdown, letting users jump directly to the new-hackathon creation flow.
    • The new option appears only when an organization context is available and does not change existing selection or navigation behavior.

@ryzen-xp ryzen-xp requested a review from 0xdevcollins as a code owner March 2, 2026 06:03
@vercel
Copy link

vercel bot commented Mar 2, 2026

@ryzen-xp is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d72fa12 and fde08db.

📒 Files selected for processing (1)
  • components/organization/hackathons/details/HackathonSelector.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/organization/hackathons/details/HackathonSelector.tsx

📝 Walkthrough

Walkthrough

Adds a "New Hackathon" item to the hackathon switcher dropdown and passes an optional organizationId prop through the sidebar to the selector so the menu can navigate to /organizations/{organizationId}/hackathons/new.

Changes

Cohort / File(s) Summary
Hackathon Selector Enhancement
components/organization/hackathons/details/HackathonSelector.tsx
Added optional organizationId?: string prop, imported Plus and DropdownMenuSeparator, and appended a conditional "New Hackathon" DropdownMenuItem (with separator and Plus icon) that navigates to /organizations/{organizationId}/hackathons/new.
Hackathon Sidebar Propagation
components/organization/hackathons/details/HackathonSidebar.tsx
Added optional organizationId to SidebarContentProps and passed organizationId down into HackathonSelector.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • 0xdevcollins

Poem

🐰 A tiny plus hops into the list with glee,
A shortcut to build where new ideas be.
I nibble the menu, click—off we leap,
Straight to a page where fresh hackathons sleep.
Hop on, create, let the countdown be! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a 'New Hackathon' option to the hackathon switcher dropdown, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR successfully implements all requirements from issue #418: renders the 'New Hackathon' item with Plus icon and separator, passes organizationId as a prop, guards against missing organizationId, and maintains existing behavior.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the 'New Hackathon' feature. Modifications to HackathonSelector and HackathonSidebar are minimal and focused on the stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/organization/hackathons/details/HackathonSelector.tsx`:
- Around line 159-168: The New Hackathon menu item currently constructs
router.push(`/organizations/${organizationId}/hackathons/new`) directly and can
navigate to an invalid path when organizationId is undefined; create a named
handler (e.g., handleNewHackathonClick) and move the onClick logic into it, have
the handler first validate organizationId (return early or no-op if falsy), and
update the DropdownMenuItem to use this handler; alternatively conditionally
render or disable the DropdownMenuItem when organizationId is not present to
ensure navigation only occurs with a valid organizationId.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 04c46d6 and d72fa12.

📒 Files selected for processing (2)
  • components/organization/hackathons/details/HackathonSelector.tsx
  • components/organization/hackathons/details/HackathonSidebar.tsx

Copy link
Collaborator

@Benjtalkshow Benjtalkshow left a comment

Choose a reason for hiding this comment

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

LGTM!

@Benjtalkshow Benjtalkshow merged commit 621ffab into boundlessfi:main Mar 2, 2026
1 of 2 checks passed
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.

Feature: Add "New Hackathon" Option to Hackathon Switcher

2 participants