Skip to content

fix(submissions): improve link validation UX, banner display, and error toasts#547

Merged
Benjtalkshow merged 1 commit into
boundlessfi:mainfrom
Benjtalkshow:fix/submission-form-improvements
May 14, 2026
Merged

fix(submissions): improve link validation UX, banner display, and error toasts#547
Benjtalkshow merged 1 commit into
boundlessfi:mainfrom
Benjtalkshow:fix/submission-form-improvements

Conversation

@Benjtalkshow
Copy link
Copy Markdown
Collaborator

@Benjtalkshow Benjtalkshow commented May 14, 2026

Summary

  • Reconcile frontend link types with the backend enum (github, demo, video, document, presentation, other) so options like Document and Presentation are accepted.
  • Allow up to 5 other links per submission while keeping fixed types unique. Smart-pick the next type on Add Link, and block duplicate-type changes / a 6th other with clear toasts.
  • Add a 500-character cap with a live counter on the optional Introduction field.
  • Pass banner through initialData on submission edit so the saved banner displays (logo was already passing through). Add banner to ParticipantSubmission.
  • Mock-fill now derives participationType from myTeam, so a team leader using the mock-fill no longer hits the backend "submit as team" rejection.
  • Submission error toasts now use title + description with an 8s duration so the backend error is actually readable in the UI.
  • Update SubmissionLinksTab icon mapping for the reconciled link types.

Test plan

  • Create a new submission with up to 5 Other links plus the fixed types. Should succeed.
  • Try changing an existing link to a duplicate fixed type or to a 6th Other. Should toast and block.
  • Pick Document or Presentation in the link type dropdown. Backend should accept.
  • Type past 500 chars in Introduction. Browser caps, counter shows N / 500.
  • Edit an existing submission that has a banner. Banner should display in the form.
  • As a team leader, click Fill mock data. Participation type should be TEAM (not INDIVIDUAL).
  • Trigger a backend error from the form. Toast should show Submission failed with the backend message visible as the description for 8 seconds.

Summary by CodeRabbit

  • New Features

    • Added banner image support for hackathon project submissions
    • Added video, document, and presentation as new link types
    • Introduced 500-character limit for project introduction
    • Added validation to prevent duplicate link types and limit additional links
  • Improvements

    • Enhanced error notifications with improved messaging for submission operations
    • Added visual icons for new link types

Review Change Stack

…or toasts

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

@Benjtalkshow 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
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37b98a53-221d-4840-b499-e3f02b89fb5a

📥 Commits

Reviewing files that changed from the base of the PR and between 3797a08 and 5590bba.

📒 Files selected for processing (5)
  • app/(landing)/hackathons/[slug]/submit/page.tsx
  • components/hackathons/submissions/SubmissionForm.tsx
  • components/organization/cards/ReviewSubmissionModal/SubmissionLinksTab.tsx
  • hooks/hackathon/use-submission.ts
  • lib/api/hackathons.ts

📝 Walkthrough

Walkthrough

This PR extends the hackathon submission system by adding a banner field to the data model, introducing a bounded introduction field, expanding link types (video, document, presentation), implementing validation to enforce per-type uniqueness and "Other" link limits, updating display icons for new link types, and improving error notification formatting with structured toasts.

Changes

Hackathon Submission Form Enhancements

Layer / File(s) Summary
Data Model: Banner Field
lib/api/hackathons.ts, app/(landing)/hackathons/[slug]/submit/page.tsx
ParticipantSubmission interface adds optional banner field; SubmitProjectPage passes existing submission's banner to SubmissionFormContent initial data when editing.
Introduction Field: Schema and UI
components/hackathons/submissions/SubmissionForm.tsx
Submission schema adds optional introduction field with 500-character maximum; form input enforces maxLength={500} and displays character counter helper text.
Link Types and Validation Logic
components/hackathons/submissions/SubmissionForm.tsx
Link type constants expand to video, document, presentation alongside existing types; handleAddLink and handleLinkChange prevent duplicate fixed-type selections, cap "Other" link count, and show toast errors when limits are reached. Validation messages updated to reference new link-type set (Demo, Video, Document, Presentation, Other).
Link Icon Display: Icon Mapping for Review
components/organization/cards/ReviewSubmissionModal/SubmissionLinksTab.tsx
SubmissionLinksTab imports additional icons (Play, Video, FileText, Presentation) and extends getIcon() switch to map new link types to corresponding icons in submission review.
Mock Data: Derive Participation Type
components/hackathons/submissions/SubmissionForm.tsx
handleFillMockData derives participationType from whether the user has a team instead of hardcoded value.
Error Handling: Structured Toast Notifications
hooks/hackathon/use-submission.ts
Create, update, and remove error handlers emit structured error toasts (title, description, duration: 8000) instead of plain error messages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • boundlessfi/boundless#443: Modifies conditional link-type validation (requireGithub, requireDemoVideo, requireOtherLinks) in the same form file—directly related to the expanded link-type set and validation enforcement introduced here.
  • boundlessfi/boundless#458: Updates SubmitProjectPage to build initial data for SubmissionFormContent (adds teamName/teamMembers)—parallel to this PR's banner field passing.
  • boundlessfi/boundless#380: Modifies SubmissionLinksTab icon mapping logic—directly related to the new icon support for expanded link types.

Suggested reviewers

  • 0xdevcollins

Poem

🐰 Forms grow richer, types expand with care,
Links now dance as video, doc, and flair,
Banners flutter, limits guard each space,
Toasts bloom structured—errors find their place!

🚥 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 accurately summarizes the main changes: link validation UX improvements, banner display fixes, and error toast enhancements, all of which are reflected across the modified files.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@Benjtalkshow Benjtalkshow merged commit f2d3f5c into boundlessfi:main May 14, 2026
5 of 7 checks passed
Benjtalkshow added a commit that referenced this pull request May 14, 2026
…or toasts (#547) (#548)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types
Benjtalkshow added a commit that referenced this pull request May 15, 2026
* fix(submissions): improve link validation UX, banner display, and error toasts (#547)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types

* fix(submissions): correct logo cropping and remove duplicate category badge on submission card (#549)

- Logo overlay on banner uses object-contain so wordmark logos are not cropped
- Render the category badge once instead of twice on the explore submissions card

* feat(blog): add Boundless x Trustless Work hackathon post and fit cover images (#551)

- Add content/blog/boundless-launches-first-hackathon-campaign.mdx for the May 13 hackathon launch announcement.
- BlogCard and BlogPostDetails cover images use object-contain so the full banner is visible (previously object-cover cropped wider banners).
- Update SHARE icons on the blog details page from the old brand color #99FF2D to the current brand primary #2eedaa.
0xdevcollins added a commit that referenced this pull request May 15, 2026
* fix(submissions): improve link validation UX, banner display, and error toasts (#547)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types

* fix(submissions): correct logo cropping and remove duplicate category badge on submission card (#549)

- Logo overlay on banner uses object-contain so wordmark logos are not cropped
- Render the category badge once instead of twice on the explore submissions card

* feat(blog): add Boundless x Trustless Work hackathon post and fit cover images (#551)

- Add content/blog/boundless-launches-first-hackathon-campaign.mdx for the May 13 hackathon launch announcement.
- BlogCard and BlogPostDetails cover images use object-contain so the full banner is visible (previously object-cover cropped wider banners).
- Update SHARE icons on the blog details page from the old brand color #99FF2D to the current brand primary #2eedaa.

* feat(judge): dedicated judge portal, organizer invitations, completeness gate UX (#550)

* feat: implement judge portal with submission evaluation, invitations, and score calculation workflows

* feat: add countdown banner, support read-only score sliders, and integrate submission disqualification into grading modal

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Nnaji Benjamin <60315147+Benjtalkshow@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0xdevcollins added a commit that referenced this pull request May 15, 2026
)

* fix(submissions): improve link validation UX, banner display, and error toasts (#547)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types

* fix(submissions): correct logo cropping and remove duplicate category badge on submission card (#549)

- Logo overlay on banner uses object-contain so wordmark logos are not cropped
- Render the category badge once instead of twice on the explore submissions card

* feat(blog): add Boundless x Trustless Work hackathon post and fit cover images (#551)

- Add content/blog/boundless-launches-first-hackathon-campaign.mdx for the May 13 hackathon launch announcement.
- BlogCard and BlogPostDetails cover images use object-contain so the full banner is visible (previously object-cover cropped wider banners).
- Update SHARE icons on the blog details page from the old brand color #99FF2D to the current brand primary #2eedaa.

* feat(judge): dedicated judge portal, organizer invitations, completeness gate UX (#550)

* feat: implement judge portal with submission evaluation, invitations, and score calculation workflows

* feat: add countdown banner, support read-only score sliders, and integrate submission disqualification into grading modal

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hackathons): add "hidden until results" submission visibility mode (#555)

Surfaces the new HIDDEN_UNTIL_RESULTS option (added in the nestjs PR) in
the organizer settings tab. Reorders the three visibility options so the
recommended "Shortlisted only" leads, the new "Hidden until results are
announced" sits in the middle, and "All submissions" comes last. Rewrites
the copy on the "All submissions" choice that incorrectly claimed
disqualified projects would be shown -- they never were on the backend,
and Phase 2 makes that an explicit guarantee. Aligns the form's default
and API-fallback value with the backend default (ACCEPTED_SHORTLISTED,
not ALL) so organizers don't see a misleading initial selection.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Nnaji Benjamin <60315147+Benjtalkshow@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Benjtalkshow added a commit that referenced this pull request May 15, 2026
* fix(submissions): improve link validation UX, banner display, and error toasts (#547)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types

* fix(submissions): correct logo cropping and remove duplicate category badge on submission card (#549)

- Logo overlay on banner uses object-contain so wordmark logos are not cropped
- Render the category badge once instead of twice on the explore submissions card

* feat(blog): add Boundless x Trustless Work hackathon post and fit cover images (#551)

- Add content/blog/boundless-launches-first-hackathon-campaign.mdx for the May 13 hackathon launch announcement.
- BlogCard and BlogPostDetails cover images use object-contain so the full banner is visible (previously object-cover cropped wider banners).
- Update SHARE icons on the blog details page from the old brand color #99FF2D to the current brand primary #2eedaa.

* feat(judge): dedicated judge portal, organizer invitations, completeness gate UX (#550)

* feat: implement judge portal with submission evaluation, invitations, and score calculation workflows

* feat: add countdown banner, support read-only score sliders, and integrate submission disqualification into grading modal

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hackathons): add "hidden until results" submission visibility mode (#555)

Surfaces the new HIDDEN_UNTIL_RESULTS option (added in the nestjs PR) in
the organizer settings tab. Reorders the three visibility options so the
recommended "Shortlisted only" leads, the new "Hidden until results are
announced" sits in the middle, and "All submissions" comes last. Rewrites
the copy on the "All submissions" choice that incorrectly claimed
disqualified projects would be shown -- they never were on the backend,
and Phase 2 makes that an explicit guarantee. Aligns the form's default
and API-fallback value with the backend default (ACCEPTED_SHORTLISTED,
not ALL) so organizers don't see a misleading initial selection.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hackathons): owner submission visibility, team UX, organizer teams page (#552)

Submission visibility on the public submissions tab
- Surface the user's own submission first on the hackathon submissions tab, regardless of submissionStatusVisibility setting. Team members (non-leader) see their team's submission too.

Find Team tab UX
- Stop replacing the whole tab with MyTeamView when the user has a team. Render MyTeamView at the top and the open-teams list below.
- Filter the user's own team out of the "Other Teams" list to avoid duplication.
- Wire the team count badge on the team-formation tab.

Team details
- New /hackathons/[slug]/teams/[teamId] page with team header, members list (clickable links to profiles), roles needed, leader card, and contact card.
- TeamCard click opens the team details page in a new tab.
- MyTeamView team name is now a clickable link to the same page.
- Add useTeam hook + query key.

Organizer submissions page
- Replace raw Buttons on review actions with BoundlessButton (default / outline / destructive) so colors come from the design system.
- Remove the "Before Deadline" gating on the Approve action; backend organizer override now allows it.

Organizer participants page
- Add Solo Participants and Teams metric cards next to the existing Total Participants and Total Submissions cards.

Organizer submissions page
- Add a metric strip with Total / Solo / Team Submissions sourced from the statistics endpoint.

Organizer Teams page (new)
- New route /organizations/[id]/hackathons/[hackathonId]/teams.
- Stats (Total / Open / Submitted / Not submitted), search by team or leader (server-side), status and submission filters (client-side), server-side pagination matching the participants page pattern, click to view team details in a new tab.
- Add "Teams" entry to the existing organizer hackathon sidebar (HackathonSidebar.tsx).

Image fit fixes for cropped logos/banners
- SubmissionCard banner and logo overlay use object-contain (banner was object-cover, cropping wordmarks and tall banners).
- /me/hackathons/submissions: banner, logo overlay, and small table thumbnail all use object-contain.
- ProjectSidebarHeader logo uses object-contain.

Type changes
- lib/api/hackathons/teams.ts Team interface gains optional hasSubmission flag.

---------

Co-authored-by: Collins Ikechukwu <collinschristroa@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Benjtalkshow added a commit that referenced this pull request May 15, 2026
* fix(submissions): improve link validation UX, banner display, and error toasts (#547)

- Reconcile frontend link types with backend enum (github, demo, video, document, presentation, other)
- Allow up to 5 "other" links per submission with smart type-picking on Add Link and duplicate guards on type change
- Add 500-character cap and live counter on the optional Introduction field
- Pass banner through initialData on submission edit so the saved banner displays
- Add banner field to ParticipantSubmission so the type compiles
- Set mock-fill participation type from myTeam to avoid INDIVIDUAL submissions while on a team
- Switch submission error toasts to title + description with 8s duration so backend messages are readable
- Update SubmissionLinksTab icon mapping for the new link types

* fix(submissions): correct logo cropping and remove duplicate category badge on submission card (#549)

- Logo overlay on banner uses object-contain so wordmark logos are not cropped
- Render the category badge once instead of twice on the explore submissions card

* feat(blog): add Boundless x Trustless Work hackathon post and fit cover images (#551)

- Add content/blog/boundless-launches-first-hackathon-campaign.mdx for the May 13 hackathon launch announcement.
- BlogCard and BlogPostDetails cover images use object-contain so the full banner is visible (previously object-cover cropped wider banners).
- Update SHARE icons on the blog details page from the old brand color #99FF2D to the current brand primary #2eedaa.

* feat(judge): dedicated judge portal, organizer invitations, completeness gate UX (#550)

* feat: implement judge portal with submission evaluation, invitations, and score calculation workflows

* feat: add countdown banner, support read-only score sliders, and integrate submission disqualification into grading modal

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hackathons): add "hidden until results" submission visibility mode (#555)

Surfaces the new HIDDEN_UNTIL_RESULTS option (added in the nestjs PR) in
the organizer settings tab. Reorders the three visibility options so the
recommended "Shortlisted only" leads, the new "Hidden until results are
announced" sits in the middle, and "All submissions" comes last. Rewrites
the copy on the "All submissions" choice that incorrectly claimed
disqualified projects would be shown -- they never were on the backend,
and Phase 2 makes that an explicit guarantee. Aligns the form's default
and API-fallback value with the backend default (ACCEPTED_SHORTLISTED,
not ALL) so organizers don't see a misleading initial selection.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hackathons): owner submission visibility, team UX, organizer teams page (#552)

Submission visibility on the public submissions tab
- Surface the user's own submission first on the hackathon submissions tab, regardless of submissionStatusVisibility setting. Team members (non-leader) see their team's submission too.

Find Team tab UX
- Stop replacing the whole tab with MyTeamView when the user has a team. Render MyTeamView at the top and the open-teams list below.
- Filter the user's own team out of the "Other Teams" list to avoid duplication.
- Wire the team count badge on the team-formation tab.

Team details
- New /hackathons/[slug]/teams/[teamId] page with team header, members list (clickable links to profiles), roles needed, leader card, and contact card.
- TeamCard click opens the team details page in a new tab.
- MyTeamView team name is now a clickable link to the same page.
- Add useTeam hook + query key.

Organizer submissions page
- Replace raw Buttons on review actions with BoundlessButton (default / outline / destructive) so colors come from the design system.
- Remove the "Before Deadline" gating on the Approve action; backend organizer override now allows it.

Organizer participants page
- Add Solo Participants and Teams metric cards next to the existing Total Participants and Total Submissions cards.

Organizer submissions page
- Add a metric strip with Total / Solo / Team Submissions sourced from the statistics endpoint.

Organizer Teams page (new)
- New route /organizations/[id]/hackathons/[hackathonId]/teams.
- Stats (Total / Open / Submitted / Not submitted), search by team or leader (server-side), status and submission filters (client-side), server-side pagination matching the participants page pattern, click to view team details in a new tab.
- Add "Teams" entry to the existing organizer hackathon sidebar (HackathonSidebar.tsx).

Image fit fixes for cropped logos/banners
- SubmissionCard banner and logo overlay use object-contain (banner was object-cover, cropping wordmarks and tall banners).
- /me/hackathons/submissions: banner, logo overlay, and small table thumbnail all use object-contain.
- ProjectSidebarHeader logo uses object-contain.

Type changes
- lib/api/hackathons/teams.ts Team interface gains optional hasSubmission flag.

* fix(blog): use object-cover so card and detail covers fill the frame (#558)

The earlier switch to object-contain was meant to preserve the full image, but it left dark letterbox bands around banners on both the BlogCard grid and the post-details hero. With properly-sized cover banners, object-cover fills the frame without visible cropping. Authors should size cover images for a 2:1 ratio on the card and the responsive heights on the details page.

---------

Co-authored-by: Collins Ikechukwu <collinschristroa@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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