Skip to content

feat: Add bounty management navigation and CTA components#654

Open
BWM0223 wants to merge 1 commit into
boundlessfi:mainfrom
BWM0223:feat/nav-codegen-verification
Open

feat: Add bounty management navigation and CTA components#654
BWM0223 wants to merge 1 commit into
boundlessfi:mainfrom
BWM0223:feat/nav-codegen-verification

Conversation

@BWM0223

@BWM0223 BWM0223 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Partial implementation for Issue #637

Changes

  • Added BountyManageNav component for management dashboard
  • Added ManageBountyCTA button for bounty list
  • Status-aware navigation
  • Badge support for pending actions

Summary by CodeRabbit

  • New Features

    • Added a bounty management navigation panel with quick access to key sections like Overview, Configure, Applications, Submissions, Winners, Payout, Disputes, and Results.
    • Introduced a direct call-to-action link to open the bounty management area.
  • Bug Fixes

    • Improved navigation clarity by highlighting the current section and disabling unavailable sections based on bounty progress.
    • Added status badges to surface pending payouts and disputes more clearly.

@BWM0223 BWM0223 requested a review from 0xdevcollins as a code owner June 25, 2026 04:15
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@BWM0223 is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a client-side bounty management navigation component with typed props, active-route highlighting, conditional disabled states and badges, plus a direct manage-bounty CTA link.

Changes

Bounty management navigation

Layer / File(s) Summary
Navigation component and CTA
components/bounty/BountyManageNav.tsx
Defines the bounty management nav item list, route availability rules, active link styling, disabled rendering, conditional badges, and the manage bounty CTA.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through links with carrot cheer,
Active paths now gleam so clear.
Disabled trails stay soft and gray,
While bounty gates point the way.
A little nav for rabbit paws,
Hop, hop — with tidy claws!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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 accurately summarizes the main change by naming the new bounty management navigation and CTA components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
components/bounty/BountyManageNav.tsx (1)

91-137: 🎯 Functional Correctness | 🔵 Trivial

Switch to prefix matching for active state detection

The route tree verification confirms that while no nested sub-pages currently exist under /me/bounties/[id]/manage, the BountyManageNav component is explicitly structured to render tabs for configure, applications, and other sub-routes.

Once these nested pages are implemented, the strict pathname === item.href check will fail to highlight the correct parent tab. Switch to pathname.startsWith(item.href) to ensure the active state persists for any child route.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/bounty/BountyManageNav.tsx` around lines 91 - 137, In
BountyManageNav, the active tab logic is too strict because `pathname ===
item.href` only matches the exact route and will stop highlighting parent tabs
for nested sub-routes like configure or applications. Update the `isActive`
check in the `navItems.map` render path to use prefix matching against
`pathname` so the correct tab stays active for child routes, while keeping the
existing `item.href`-based Link rendering and styling logic intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/bounty/BountyManageNav.tsx`:
- Around line 17-22: The BountyManageNavProps.bountyStatus field is duplicating
the bounty lifecycle literals instead of using the shared canonical Bounty
status type. Update BountyManageNav to import and use the backend-shared bounty
status type from the existing shared definitions (for example, a types/bounty.ts
export or the relevant API-shared type) so the nav stays aligned with the source
of truth. If no shared Bounty type exists yet, extract the status union into a
central shared type and reference that from BountyManageNavProps.

---

Nitpick comments:
In `@components/bounty/BountyManageNav.tsx`:
- Around line 91-137: In BountyManageNav, the active tab logic is too strict
because `pathname === item.href` only matches the exact route and will stop
highlighting parent tabs for nested sub-routes like configure or applications.
Update the `isActive` check in the `navItems.map` render path to use prefix
matching against `pathname` so the correct tab stays active for child routes,
while keeping the existing `item.href`-based Link rendering and styling logic
intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0ef7291d-a635-4d47-852d-5f323813c4ff

📥 Commits

Reviewing files that changed from the base of the PR and between 2cb7127 and 69ecd4c.

📒 Files selected for processing (1)
  • components/bounty/BountyManageNav.tsx

Comment on lines +17 to +22
interface BountyManageNavProps {
bountyId: string;
bountyStatus: "draft" | "active" | "submissions" | "judging" | "payout" | "completed" | "cancelled";
hasDisputes?: boolean;
pendingPayouts?: number;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read-only check for a shared bounty status enum/type.
rg -n --glob '*.{ts,tsx,js,jsx}' '\b(BountyStatus|bountyStatus)\b|draft|active|submissions|judging|payout|completed|cancelled' .

Repository: boundlessfi/boundless

Length of output: 50378


Verify this status list matches the shared bounty lifecycle.

The BountyManageNav component hardcodes the bountyStatus type with a specific set of literals. While the codebase contains a types/hackathon/core.ts file with a status type that is similar, it currently appears scoped to Hackathons and includes 'published' while the nav component uses 'draft' in a slightly different structure.

To prevent subtle mismatches where a Bounty type is introduced or modified independently later, please import the canonical Bounty status type directly from the backend-shared type definitions (e.g., pages/api/... or types/bounty.ts if it exists) rather than maintaining a parallel list. If a unified canonical type does not exist yet, it would be safer to centralize these statuses to avoid drift as the dashboard grows.

Currently, the mapping appears to match common expectations, but hardcoding in the component creates a maintenance risk.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/bounty/BountyManageNav.tsx` around lines 17 - 22, The
BountyManageNavProps.bountyStatus field is duplicating the bounty lifecycle
literals instead of using the shared canonical Bounty status type. Update
BountyManageNav to import and use the backend-shared bounty status type from the
existing shared definitions (for example, a types/bounty.ts export or the
relevant API-shared type) so the nav stays aligned with the source of truth. If
no shared Bounty type exists yet, extract the status union into a central shared
type and reference that from BountyManageNavProps.

Source: Coding guidelines

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.

1 participant