Skip to content

feat: change review badges to dropdowns on sponsor dashboard sidebar …#1425

Open
espadondutravail wants to merge 1 commit into
SuperteamDAO:mainfrom
espadondutravail:feat/dropdown-review-badges-1420
Open

feat: change review badges to dropdowns on sponsor dashboard sidebar …#1425
espadondutravail wants to merge 1 commit into
SuperteamDAO:mainfrom
espadondutravail:feat/dropdown-review-badges-1420

Conversation

@espadondutravail

@espadondutravail espadondutravail commented Jun 29, 2026

Copy link
Copy Markdown

feat: modify review badges to dropdown input in the submission sidebar (fixes #1420)

What does this PR do?

This PR updates the submission sidebar in the Sponsor Dashboard. The static review badges ("Unreviewed", "Shortlisted", etc.) have been replaced with a Dropdown input similar to the one found in the main submission details panel. Sponsors can now click the badge directly from the sidebar to change the review label. The click propagation is handled correctly so that interacting with the dropdown does not inadvertently open or close the submission details.

Where should the reviewer start?

The reviewer should start by looking at src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx where the DropdownMenu was integrated to replace the static pill. Next, see src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx for how the new interactive label is conditionally rendered (hidden for hackathons/spams/winners).

How should this be manually tested?

  1. Go to the Sponsor Dashboard and navigate to Submissions or Grant Applications.
  2. In the left sidebar listing the submissions, observe that the status badge is now an interactive dropdown.
  3. Click on the badge to change the status (e.g., from Unreviewed to Shortlisted).
  4. Verify that the label updates successfully, and that clicking the dropdown doesn't unintentionally open the submission details modal.

Any background context you want to provide?

This change improves the sponsor's UX by allowing quick triage directly from the sidebar list, removing the need to open every single submission just to change its status.

What are the relevant issues?

Fixes #1420

Screenshots (if appropriate)

(Feel free to add a quick screenshot or GIF showing the working dropdown in the sidebar here).

Summary by CodeRabbit

  • New Features

    • Improved sponsor dashboard labeling so pending applications and submissions can be labeled directly from their list views in more cases.
    • Added broader support for selecting labels across grant and submission pages, with the current item preloaded when available.
  • Bug Fixes

    • Prevented label dropdown clicks from triggering parent row actions.
    • Refined how status and label badges appear for pending, spam, and reviewed items.
  • Chores

    • Updated workspace build permissions for several packages.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@espadondutravail is attempting to deploy a commit to the Superteam Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Both SelectLabel components (Submissions and GrantApplications) gain an optional prop to specify a target submission/application directly, falling back to the atom-selected value. SubmissionList conditionally renders SelectLabel inline for pending non-hackathon rows, and ApplicationList does the same for pending grant applications. pnpm-workspace.yaml adds allowBuilds entries for native packages.

Changes

Inline SelectLabel in Submission and Grant Application List Rows

Layer / File(s) Summary
Submissions SelectLabel prop-driven target
src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx
Extends Props with optional submission, computes targetSubmission from prop or atom, updates styling and dropdown interactions to use targetSubmission, and wraps dropdown in a click-propagation-stopping div.
SubmissionList inline SelectLabel rendering
src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx
Adds isHackathonPage?: boolean prop; conditionally renders SelectLabel with submission and listingSlug for pending, non-hackathon, non-winner, non-spam submissions instead of StatusPill.
GrantApplications SelectLabel prop-driven target
src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx
Extends props with optional application, computes targetApplication from prop or atom, updates styling and dropdown to use targetApplication, stops click propagation.
ApplicationList and ApplicationsTab inline SelectLabel wiring
src/features/sponsor-dashboard/components/GrantApplications/ApplicationList.tsx, src/features/sponsor-dashboard/components/ApplicationsTab.tsx
ApplicationList gains grantSlug?: string prop and renders SelectLabel inline for pending applications; ApplicationsTab passes slug as grantSlug.

pnpm Workspace Build Config

Layer / File(s) Summary
allowBuilds configuration
pnpm-workspace.yaml
Adds allowBuilds block with explicit boolean build permissions for native/compiled packages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • SuperteamDAO/earn#1002: Introduces isHackathonPage prop in sponsor-dashboard submissions UI, the same prop added to SubmissionList in this PR.
  • SuperteamDAO/earn#1011: Modifies Submissions/SelectLabel.tsx label-update mutation behavior, directly overlapping with the same file changed here.
  • SuperteamDAO/earn#1168: Changes Submissions/SelectLabel label/menu option rendering including Spam handling, overlapping with the label rendering logic updated in this PR.

Suggested reviewers

  • a20hek

🐰 A dropdown blooms where badges once stood,
Click the pill, change the label — now you could!
The slug hops along to each pending row,
Submissions and grants get a fresh new glow.
No more static badges, the rabbit's delighted — 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes grant application components and pnpm workspace build settings, which are unrelated to the linked sidebar badge work. Remove or split out the grant-application and workspace-config changes unless they are required for the sidebar dropdown work.
✅ 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 describes the sidebar review badge dropdown change on the sponsor dashboard.
Linked Issues check ✅ Passed The sidebar badges were converted to dropdowns, click propagation is handled, and sidebar/detail label state stays in sync.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (4)
src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx (1)

24-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use explicit | undefined for this prop.

submission?: SubmissionWithUser breaks the repo’s TS prop contract. Prefer submission: SubmissionWithUser | undefined here.
As per coding guidelines, use property: Type | undefined instead of property?: Type for TypeScript type definitions.

🤖 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 `@src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx` at
line 24, The SelectLabel prop type uses optional property syntax for submission,
which breaks the repo’s TypeScript contract. Update the SelectLabel component’s
props definition to use submission: SubmissionWithUser | undefined instead of
submission?: SubmissionWithUser, and keep the rest of the component signatures
consistent with this explicit undefined pattern.

Source: Coding guidelines

src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx (1)

25-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use explicit | undefined for this prop.

application?: GrantApplicationWithUser should follow the repo’s explicit prop typing pattern instead of the optional form.
As per coding guidelines, use property: Type | undefined instead of property?: Type for TypeScript type definitions.

🤖 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 `@src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx`
at line 25, Update the SelectLabel component’s prop typing to follow the repo
convention by replacing the optional application prop syntax with an explicit
union including undefined. Locate the SelectLabel props/type definition and
change the application field from optional form to an explicit
GrantApplicationWithUser | undefined declaration, keeping the rest of the
component unchanged.

Source: Coding guidelines

src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx (1)

42-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use explicit | undefined for isHackathonPage.

isHackathonPage?: boolean is the optional-prop form the repo asks us to avoid. Prefer isHackathonPage: boolean | undefined.
As per coding guidelines, use property: Type | undefined instead of property?: Type for TypeScript type definitions.

🤖 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 `@src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx` at
line 42, The `SubmissionList` type definition uses the optional-prop form for
`isHackathonPage`, which should be expressed explicitly as `boolean | undefined`
instead. Update the prop declaration in `SubmissionList.tsx` to use
`isHackathonPage: boolean | undefined` so it matches the repo’s TypeScript
guideline and keeps the `SubmissionList` interface consistent with the rest of
the codebase.

Source: Coding guidelines

src/features/sponsor-dashboard/components/GrantApplications/ApplicationList.tsx (1)

38-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use explicit | undefined for grantSlug.

grantSlug?: string should be written as grantSlug: string | undefined to match the repo’s TS typing rule.
As per coding guidelines, use property: Type | undefined instead of property?: Type for TypeScript type definitions.

🤖 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
`@src/features/sponsor-dashboard/components/GrantApplications/ApplicationList.tsx`
at line 38, Update the TypeScript type definition for the ApplicationList props
so grantSlug uses the repo’s required explicit undefined form instead of
optional property syntax. In the ApplicationList component type/interface,
change the grantSlug field from optional shorthand to a required property typed
as string | undefined, and keep any references to grantSlug consistent with that
signature.

Source: Coding guidelines

🤖 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 `@pnpm-workspace.yaml`:
- Around line 1-11: The allowBuilds entries still use pnpm-generated
placeholders, so update the pnpm-workspace.yaml allowBuilds block to explicit
boolean values for each listed package. Replace each placeholder in the
allowBuilds section with either true or false so pnpm treats the packages as
approved or blocked during install. Use the allowBuilds key and the package
names shown there to locate and finish the unresolved entries.

In `@src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx`:
- Around line 37-38: The row is reading a stale application because
SelectLabel.targetApplication always prefers propApplication while the label
mutation only updates React Query and selectedGrantApplicationAtom. Update the
same backing data used by ApplicationList/ApplicationsTab (applicationsAtom) or
stop preferring the stale prop object in SelectLabel so the dropdown, sidebar,
and detail state stay in sync after a label change. Make sure the update path
covers the relevant label mutation handlers and any derived application
selection logic in SelectLabel.

---

Nitpick comments:
In
`@src/features/sponsor-dashboard/components/GrantApplications/ApplicationList.tsx`:
- Line 38: Update the TypeScript type definition for the ApplicationList props
so grantSlug uses the repo’s required explicit undefined form instead of
optional property syntax. In the ApplicationList component type/interface,
change the grantSlug field from optional shorthand to a required property typed
as string | undefined, and keep any references to grantSlug consistent with that
signature.

In `@src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx`:
- Line 25: Update the SelectLabel component’s prop typing to follow the repo
convention by replacing the optional application prop syntax with an explicit
union including undefined. Locate the SelectLabel props/type definition and
change the application field from optional form to an explicit
GrantApplicationWithUser | undefined declaration, keeping the rest of the
component unchanged.

In `@src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx`:
- Line 24: The SelectLabel prop type uses optional property syntax for
submission, which breaks the repo’s TypeScript contract. Update the SelectLabel
component’s props definition to use submission: SubmissionWithUser | undefined
instead of submission?: SubmissionWithUser, and keep the rest of the component
signatures consistent with this explicit undefined pattern.

In `@src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx`:
- Line 42: The `SubmissionList` type definition uses the optional-prop form for
`isHackathonPage`, which should be expressed explicitly as `boolean | undefined`
instead. Update the prop declaration in `SubmissionList.tsx` to use
`isHackathonPage: boolean | undefined` so it matches the repo’s TypeScript
guideline and keeps the `SubmissionList` interface consistent with the rest of
the codebase.
🪄 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: fc44a232-bc94-4053-a5d2-f828885015da

📥 Commits

Reviewing files that changed from the base of the PR and between 3d93374 and 22dc8f9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • pnpm-workspace.yaml
  • src/features/sponsor-dashboard/components/ApplicationsTab.tsx
  • src/features/sponsor-dashboard/components/GrantApplications/ApplicationList.tsx
  • src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx
  • src/features/sponsor-dashboard/components/Submissions/SelectLabel.tsx
  • src/features/sponsor-dashboard/components/Submissions/SubmissionList.tsx

Comment thread pnpm-workspace.yaml
Comment on lines +1 to +11
allowBuilds:
'@prisma/engines': set this to true or false
'@reown/appkit': set this to true or false
bufferutil: set this to true or false
core-js: set this to true or false
keccak: set this to true or false
msgpackr-extract: set this to true or false
prisma: set this to true or false
protobufjs: set this to true or false
sharp: set this to true or false
utf-8-validate: set this to true or false

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What value types does pnpm accept for allowBuildsinpnpm-workspace.yaml, and are string placeholders like "set this to true or false" valid?

💡 Result:

In the pnpm-workspace.yaml file, the allowBuilds setting accepts a mapping where keys are package matchers and values are booleans (true to allow, false to disallow) [1][2][3]. Regarding string placeholders like "set this to true or false": Yes, these are valid entries in the context of the file itself [4], but they function as placeholders that pnpm auto-populates when it encounters packages with build scripts that are not yet explicitly defined in allowBuilds [1][5][4]. When pnpm encounters such a package during installation, it adds an entry to your pnpm-workspace.yaml with a placeholder value (e.g., 'set this to true or false') so that you can manually edit it to true or false [1][5][4]. These placeholders behave identically to a missing entry: the package's build scripts will remain disallowed, and pnpm will continue to follow your strictDepBuilds setting (failing with an error if true, or printing a warning if false) until you replace the placeholder with an explicit boolean value [1][5][4]. While internal logic (such as in the createAllowBuildFunction) primarily processes the explicit true and false boolean values [6], these placeholder strings are an intended feature to assist users in managing workspace dependencies [4].

Citations:


Replace the pnpm-generated placeholders with explicit booleans.

These entries are valid placeholder values, but allowBuilds is still unresolved until each package is set to true or false, so pnpm will keep treating them as unapproved during install.

🤖 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 `@pnpm-workspace.yaml` around lines 1 - 11, The allowBuilds entries still use
pnpm-generated placeholders, so update the pnpm-workspace.yaml allowBuilds block
to explicit boolean values for each listed package. Replace each placeholder in
the allowBuilds section with either true or false so pnpm treats the packages as
approved or blocked during install. Use the allowBuilds key and the package
names shown there to locate and finish the unresolved entries.

Comment on lines +37 to +38
const targetApplication = propApplication || selectedApplicationAtomValue;

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.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

This row will keep reading a stale application after label changes.

targetApplication always prefers propApplication, but the mutation only updates React Query and selectedGrantApplicationAtom. ApplicationList rows are rendered from ApplicationsTab’s applications array derived from applicationsAtom, so the inline dropdown keeps showing the old label until that separate store is refreshed. Update the same backing collection used by ApplicationList (or stop preferring the stale prop object) so sidebar and detail state stay in sync.

Also applies to: 61-108, 111-170

🤖 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 `@src/features/sponsor-dashboard/components/GrantApplications/SelectLabel.tsx`
around lines 37 - 38, The row is reading a stale application because
SelectLabel.targetApplication always prefers propApplication while the label
mutation only updates React Query and selectedGrantApplicationAtom. Update the
same backing data used by ApplicationList/ApplicationsTab (applicationsAtom) or
stop preferring the stale prop object in SelectLabel so the dropdown, sidebar,
and detail state stay in sync after a label change. Make sure the update path
covers the relevant label mutation handlers and any derived application
selection logic in SelectLabel.

@RevTpark

RevTpark commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Can you remove the pnpm files committed in this PR?

@RevTpark RevTpark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you remove the pnpm files, everything else is good

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.

Modify Review Badges to Dropdown Input in the Submission Sidebar on Sponsor Dashboard

2 participants