Feat/crowdfunding#640
Conversation
…rchestration and API client architecture.
…eceipts/send Winners: new task-first Winners section (pick winner per prize with engine default, inline stacking confirm, deliberate 'Don't award' + unawarded-funds acknowledgement); /rewards redirects to /winners; staged Pick -> Confirm -> Pay. Judging: slimmed Results tab to read-only standings + 'Go to Winners'; criterionId name fix; AI scorecards, recommendation thresholds, CSV judge import, tracks + custom questions wizard sections; validation + empty-state polish. Public: private + password access gate, community links, card private badge. Treasury: receipts + Send funds. Removed the stacking toggle from prize setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…599) (#611) The net-new bounty UI with no hackathon analog: the two-axis mode picker and the mode-conditional submission settings that drive all six combinations. - modeSchema.ts: plain taxonomy unions (entryType x claimType), the computeBountyModeLabel helper, and getModeFields — the mode -> field matrix derived functionally from the publish gate (validateTwoAxisMode) so it cannot drift from the backend. - submissionModelSchema.ts: makeSubmissionModelSchema(mode), a mode-aware Zod factory whose required fields and the >=2 floors (maxApplicants for open competition, shortlistSize for application competition) mirror the server gate. - ModeTab.tsx: entry x claim picker, a winners stepper (1-3) for competitions, and a live computed mode label. - SubmissionModelTab.tsx: renders each field per the matrix (required / optional / hidden) and shows submissionVisibility read-only, forced by the mode (HIDDEN_UNTIL_DEADLINE for competitions). Standalone components (props: mode, onSave, onContinue, initialData, isLoading); they wire into the wizard shell + routes in #597 / #598.
…ow) (#596) Adds the features/bounties/ data layer for the v1 app, mirroring features/hackathons/. REST-only via the typed openapi-fetch client; every server shape is aliased from the backend-generated schema so it cannot drift. - types.ts: aliases the generated draft + escrow DTOs (BountyDraft, UpdateBountyDraftBody, the four section types, BountyEscrowOpResponse, PublishBountyEscrowRequest, ...). Derives the two-axis taxonomy from the generated mode DTO, superseding the local stubs in the ModeTab. - api/keys.ts: bountyKeys factory. - api/draft-client.ts + use-draft.ts: imperative CRUD plus the useDraft / useDraftList / useCreateDraft / useUpdateDraft / useDeleteDraft hooks against /organizations/{organizationId}/bounties/draft[/{id}] + /drafts. - api/escrow-client.ts + use-escrow.ts: organizer escrow calls (publish / cancel / select-winners / submit-signed / poll) plus useEscrowOp + useEscrowOpRunner, mirroring the hackathon machinery (MANAGED polls; EXTERNAL signs -> submit -> poll) bounty-scoped. - index.ts: public surface. Regenerates lib/api/generated/schema.d.ts from the v2 backend so the bounty draft paths/DTOs are present.
…ow) (#596) (#612) Adds the features/bounties/ data layer for the v1 app, mirroring features/hackathons/. REST-only via the typed openapi-fetch client; every server shape is aliased from the backend-generated schema so it cannot drift. - types.ts: aliases the generated draft + escrow DTOs (BountyDraft, UpdateBountyDraftBody, the four section types, BountyEscrowOpResponse, PublishBountyEscrowRequest, ...). Derives the two-axis taxonomy from the generated mode DTO, superseding the local stubs in the ModeTab. - api/keys.ts: bountyKeys factory. - api/draft-client.ts + use-draft.ts: imperative CRUD plus the useDraft / useDraftList / useCreateDraft / useUpdateDraft / useDeleteDraft hooks against /organizations/{organizationId}/bounties/draft[/{id}] + /drafts. - api/escrow-client.ts + use-escrow.ts: organizer escrow calls (publish / cancel / select-winners / submit-signed / poll) plus useEscrowOp + useEscrowOpRunner, mirroring the hackathon machinery (MANAGED polls; EXTERNAL signs -> submit -> poll) bounty-scoped. - index.ts: public surface. Regenerates lib/api/generated/schema.d.ts from the v2 backend so the bounty draft paths/DTOs are present.
Adds the bounty Configure wizard orchestrator and its step + draft state, mirroring the hackathon wizard. No AI assist. - components/organization/bounties/new/constants.ts: StepKey (scope/mode/submission/reward/review), STEP_ORDER, BountyFormData, and isBountyStepDataValid. - hooks/use-bounty-steps.ts: URL ?step= navigation (free-roam) with a presentational step-status map. - hooks/use-bounty-draft.ts: lazy create (ensureDraftId) then per-section PATCH, resume via useDraft, and transformBountyFromApi (sections -> form state; winnerCount derived from prize tiers, ISO dates trimmed for the inputs). - components/organization/bounties/new/NewBountyTab.tsx: orchestrator wiring steps + draft + per-step save, persisting ?draftId= for resume, and threading the chosen mode from ModeTab into SubmissionModelTab. Scope/Reward/Review tabs (#600) and the publish + funding flow (#601) are left as marked placeholders with their save/navigate/draftId seams in place; this satisfies the acceptance criteria (navigate, autosave, resume) without speculative publish UI that depends on the unbuilt publish hook.
* feat(bounty): features/bounties data layer (types, keys, draft + escrow) (#596) Adds the features/bounties/ data layer for the v1 app, mirroring features/hackathons/. REST-only via the typed openapi-fetch client; every server shape is aliased from the backend-generated schema so it cannot drift. - types.ts: aliases the generated draft + escrow DTOs (BountyDraft, UpdateBountyDraftBody, the four section types, BountyEscrowOpResponse, PublishBountyEscrowRequest, ...). Derives the two-axis taxonomy from the generated mode DTO, superseding the local stubs in the ModeTab. - api/keys.ts: bountyKeys factory. - api/draft-client.ts + use-draft.ts: imperative CRUD plus the useDraft / useDraftList / useCreateDraft / useUpdateDraft / useDeleteDraft hooks against /organizations/{organizationId}/bounties/draft[/{id}] + /drafts. - api/escrow-client.ts + use-escrow.ts: organizer escrow calls (publish / cancel / select-winners / submit-signed / poll) plus useEscrowOp + useEscrowOpRunner, mirroring the hackathon machinery (MANAGED polls; EXTERNAL signs -> submit -> poll) bounty-scoped. - index.ts: public surface. Regenerates lib/api/generated/schema.d.ts from the v2 backend so the bounty draft paths/DTOs are present. * feat(bounty): wizard shell + step/draft machinery (#598) Adds the bounty Configure wizard orchestrator and its step + draft state, mirroring the hackathon wizard. No AI assist. - components/organization/bounties/new/constants.ts: StepKey (scope/mode/submission/reward/review), STEP_ORDER, BountyFormData, and isBountyStepDataValid. - hooks/use-bounty-steps.ts: URL ?step= navigation (free-roam) with a presentational step-status map. - hooks/use-bounty-draft.ts: lazy create (ensureDraftId) then per-section PATCH, resume via useDraft, and transformBountyFromApi (sections -> form state; winnerCount derived from prize tiers, ISO dates trimmed for the inputs). - components/organization/bounties/new/NewBountyTab.tsx: orchestrator wiring steps + draft + per-step save, persisting ?draftId= for resume, and threading the chosen mode from ModeTab into SubmissionModelTab. Scope/Reward/Review tabs (#600) and the publish + funding flow (#601) are left as marked placeholders with their save/navigate/draftId seams in place; this satisfies the acceptance criteria (navigate, autosave, resume) without speculative publish UI that depends on the unbuilt publish hook.
Completes the editable surface of the bounty Configure wizard, dropping the three remaining tabs into the seams the shell (#598) left. - tabs/schemas/scopeSchema.ts: title, description, optional GitHub issue url/number, optional project/window. - tabs/schemas/rewardSchema.ts: makeRewardSchema(claimType) — exactly one tier for single claim, 1-3 for a competition; amounts > 0, unique positions including position 1 (mirrors the publish gate's deriveWinnerDistribution). - lib/utils/bounty-escrow.ts: adapts the bounty reward shape to reuse the hackathon prize-pool math (getTotalPrizePoolForFunding, buildWinnerDistribution, 2.5% PLATFORM_FEE) rather than duplicating it. - tabs/ScopeTab.tsx: scope form. - tabs/RewardTab.tsx: currency + mode-driven prize tiers (field array sized to the winner count) with a live prize-pool / fee / total preview. - tabs/ReviewTab.tsx: per-section summary, validation summary, funding totals, and a publish CTA disabled until every section validates. - NewBountyTab.tsx + constants.ts: wire the three tabs into the wizard; the form snapshot now uses the per-tab form schema types. Reward currency is collected in the Reward step (the backend section that persists it) rather than Scope, so it round-trips. The publish action is a placeholder pending the escrow publish flow (#601); the disabled-until-valid gate is wired here.
…601) (#615) * feat(bounty): Scope + Reward + Review tabs and Zod schemas (#600) Completes the editable surface of the bounty Configure wizard, dropping the three remaining tabs into the seams the shell (#598) left. - tabs/schemas/scopeSchema.ts: title, description, optional GitHub issue url/number, optional project/window. - tabs/schemas/rewardSchema.ts: makeRewardSchema(claimType) — exactly one tier for single claim, 1-3 for a competition; amounts > 0, unique positions including position 1 (mirrors the publish gate's deriveWinnerDistribution). - lib/utils/bounty-escrow.ts: adapts the bounty reward shape to reuse the hackathon prize-pool math (getTotalPrizePoolForFunding, buildWinnerDistribution, 2.5% PLATFORM_FEE) rather than duplicating it. - tabs/ScopeTab.tsx: scope form. - tabs/RewardTab.tsx: currency + mode-driven prize tiers (field array sized to the winner count) with a live prize-pool / fee / total preview. - tabs/ReviewTab.tsx: per-section summary, validation summary, funding totals, and a publish CTA disabled until every section validates. - NewBountyTab.tsx + constants.ts: wire the three tabs into the wizard; the form snapshot now uses the per-tab form schema types. Reward currency is collected in the Reward step (the backend section that persists it) rather than Scope, so it round-trips. The publish action is a placeholder pending the escrow publish flow (#601); the disabled-until-valid gate is wired here. * feat(bounty): use-bounty-publish (escrow publish via shared runner) (#601) Wires the bounty publish action, mirroring use-hackathon-publish. - hooks/use-bounty-publish.ts: builds PublishBountyEscrowDto (ownerAddress, tokenAddress via getTokenAddress('USDC'), budget = sum of tier amounts, submissionDeadline as unix from the draft deadline, applicationCreditCost, winnerDistribution via the shared buildBountyWinnerDistribution, fundingMode) and drives it with useEscrowOpRunner: MANAGED returns PENDING_CONFIRM then polls; EXTERNAL signs the returned XDR via signXdrWithKit then submits + polls. On COMPLETED the bounty has moved draft_awaiting_funding -> open. Pre-flight resumes an in-flight op, short-circuits an already-published bounty, and runs a MANAGED USDC balance check (pool + 2.5% fee). - NewBountyTab.tsx: replace the Review placeholder with the real publish() and wire isPublishing into the CTA. Treasury funding (sourceWalletId) is omitted until the backend treasury-parity issue (boundless-nestjs #314) lands; MANAGED + EXTERNAL are supported. The funding-source picker + progress modal remain a follow-up; the hook exposes the escrow phase/error/txHash they need.
Adds the organizer bounty routes, mirroring the hackathon route tree, and the
published-list data needed by the list page.
- app/(landing)/organizations/[id]/bounties/page.tsx: list page with a Drafts
section (resume links + status badges + mode label / section count) and a
Published section (status badges + reward), plus a "Host a bounty" CTA.
- .../bounties/new/page.tsx: renders <NewBountyTab organizationId={id} />.
- .../bounties/drafts/[draftId]/page.tsx: renders
<NewBountyTab organizationId={id} draftId={draftId} />.
- features/bounties/api/core.ts + use-bounties.ts: listOrganizationBounties +
useOrganizationBounties for the root list (the backend root GET has no
response DTO, so the row shape is projected to OrganizationBountyListItem).
The pages mount the existing wizard shell (#598); the list separates drafts
(draft / draft_awaiting_funding) from published bounties so they don't
double-list.
Adds a Bounties menu item (/organizations/{orgId}/bounties) and a Post Bounty
quick action (/organizations/{orgId}/bounties/new) to OrganizationSidebar, so
organizers can reach the bounty list + Configure wizard.
Codegen reconcile: re-ran npm run codegen against the v2 backend; the committed
lib/api/generated/schema.d.ts already matches (BountyDraftResponseDto +
UpdateBountyDraftDto present, no drift), so no schema change is needed.
…cking - Redesigned public listing (ProjectCard) and detail page with proper lifecycle states, voting panel, contributor list, and fully-funded detection - Added public milestone list + detail pages under /crowdfunding/[slug]/milestones - Builder per-campaign management: tabbed layout (overview / milestones / contributions) with shared header showing milestone X/Y progress and Fully Funded badge once fundingRaised >= fundingGoal - Milestone status sourced from milestoneState() utility: claimedAt-based "paid out" detection replaces stale reviewStatus === 'completed' checks - CampaignStatusBanner: shows milestone delivery bar and Fully Funded label during the FUNDING phase when goal is reached - milestones-metrics: completedAmount correctly sums paid-out milestones; inProgress checks SUBMITTED/UNDER_REVIEW enum values - ProjectCard: switches from funding bar to milestone X/Y bar on fully funded; footer and status badge update to Fully Funded (green) - lib/crowdfunding/status.ts: single source of truth for all campaign and milestone status copy and tone Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…618) * feat(bounty): wizard enhancements (resources step, currency, reputation, nav) - Resources: new optional Resources step (links + PDF/DOC/PPT/MD uploads), mirroring the hackathon resources tab; never blocks publish. Reuses a now configurable ResourceFileUpload (folder/tags/accepted types props; unique input id per row). - Reward currency: dropdown of USDC (default) / XLM (disabled) with real token logos, replacing the free-text field. - Reputation: per-category minimum floor (development highest); the organizer can raise it but not drop below the category baseline. - Navigation: Back button on every step after the first. - Scope: category chips + searchable country dropdown with flags + markdown description; GitHub issue URL required only for development. - Publish: redirect to the organizer's bounty list once publish finalizes. - Dev-only "Fill with mock" button to populate every section at once. * feat(bounty): hackathon-style org bounty list + delete-draft confirm - Rebuild the organization bounty list page in the hackathon style: sticky header with stats, Published/Drafts tabs, search + sort, and a banner-less reward-focused card grid (draft cards show a progress bar + resume link). - Deleting a draft now opens a confirmation modal (DeleteBountyDraftDialog) instead of deleting on the first click. - Expose `_count.submissions` on the org bounty list item for the cards.
…ces/review tabs, publish flow) Merge feat/t-replace into feat/crowdfunding. Conflict resolution: all 6 bounty wizard files took the feat/t-replace version (more complete) over our stubs: - constants.ts: added resources step, proper per-section TypeScript schemas - NewBountyTab.tsx: replaced SectionPlaceholder stubs with real ScopeTab, RewardTab, ResourcesTab, ReviewTab; wired publish flow + dev mock helper - types.ts: added resources to DRAFT_SECTIONS + BountyFormData - use-bounty-draft.ts: added saveAllSections, resources hydration, scopeExtra for category/country fields (pre-codegen cast) - use-bounty-steps.ts: added resources step to initial state - features/bounties/index.ts: added useOrganizationBounties + core exports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sages across crowdfunding components
…d update campaign wizard validation logic
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 292 files, which is 142 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (292)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
No description provided.