Skip to content

feat(bitrefill): cover image upload, submission terms + feedback, program page sections#178

Merged
sacha-l merged 3 commits into
developfrom
feat/bitrefill-submission-and-page-updates
Jun 15, 2026
Merged

feat(bitrefill): cover image upload, submission terms + feedback, program page sections#178
sacha-l merged 3 commits into
developfrom
feat/bitrefill-submission-and-page-updates

Conversation

@sacha-l

@sacha-l sacha-l commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Four UI/UX updates for the PROMPT x PURCHASE Bitrefill hackathon (bitrefill-2026):

  1. Cover image upload. Admins can upload a banner image instead of only pasting a URL. New public Supabase Storage bucket program-assets + admin-gated POST /programs/:slug/cover-image (multer, mime + 5MB validation, returns the public URL). ProgramFormModal keeps the URL field and adds an Upload button with a live preview (enabled once the program exists). Mock mode falls back to a data URL.
  2. Submission terms. Required "I agree to the submission terms" checkbox with a "Read terms" modal that opens/closes without disturbing the in-progress submission. Agreement stamped in agreed_to_terms_at.
  3. Feedback questions (required). The 6-question feedback form is collected on submit and blocks submission until answered (Q5 free-text optional). Stored in a new program_submissions.feedback JSONB column; server validates structure/bounds and drops unknown keys.
  4. Program page sections. New markdown content section type (react-markdown + remark-gfm) rendered on-brand (new-tab links, code blocks, bold, lists, checklist marks). Hackathon pages now render content directly above Submit (schedule filtered out so KEY INFO isn't duplicated). Authored all spec sections (build directions, what to submit, how it's judged, FAQ, etc.) into the mock fixture and a content migration generated from the same source.

Files of note

  • Client: MarkdownBody.tsx, ProgramContent.tsx, SubmitProjectModal.tsx, ProgramFormModal.tsx, ProgramDetailPage.tsx, api.ts, new bitrefillContent.ts / submissionTerms.ts / submissionFeedback.ts, mockPrograms.ts.
  • Server: new program-asset.service.js, program.controller.js + program.routes.js (upload), submission.validator.js + program-submission.repository.js (feedback/terms).
  • Migrations: program-assets bucket, feedback + agreed_to_terms_at columns, bitrefill-2026 content.
  • Deps: client react-markdown + remark-gfm; server multer 2.x.

Deploy steps (apply in Supabase per docs/PRODUCTION_DEPLOYMENT.md)

  • 20260614000000_program_assets_bucket.sql must be applied before cover uploads work in production.
  • 20260614000200_bitrefill_2026_content.sql sets the public page content (it overwrites the program's current content for that row).

Test plan

  • cd server && npm test414 passing (added cover-upload controller cases + feedback-validator cases).
  • cd client && npm run build (tsc typecheck) and npm run lint --max-warnings 0 — both clean.

Runtime verification (dev server, mock mode, headless Chromium)

Scenario Result
/programs/bitrefill-2026 renders all new sections in order above Submit PASS (DESCRIPTION, KEY INFO, BUILD DIRECTIONS … FAQ, then SUBMIT)
Links are real anchors opening new tabs; MCP endpoint in a code block; checklist marks render PASS (30 new-tab links, code block + ▢ marks present)
"Read terms" opens the terms modal and closes without clearing the form PASS (form state preserved)
Submit blocked until feedback answered PASS ("Select at least one Bitrefill surface…")
Submit blocked until terms checkbox ticked PASS
Valid submission with an eligible email + feedback + terms succeeds PASS ("·SUBMISSION RECEIVED")
Console errors None new (only the pre-existing CRT-theme canvas effect)

Notes

🤖 Generated with Claude Code

Additional changes (landing page)

  • Removed the ·INDEX / LIVE stats panel from the home page, along with the now-unused project-stats fetch and helpers (HomePage now only loads programs).
  • Refreshed the WebZero / Stadium intro copy in program-spaces.tsx to the new framing ("WebZero creates vibrant spaces … Stadium is the entry point …").

Runtime re-checked (mock mode): INDEX/LIVE gone, both new sentences render, Explore section intact, no new console errors.

…gram page sections

- Admin cover image upload to a new public Supabase Storage bucket
  (program-assets) via an admin-gated POST /programs/:slug/cover-image,
  alongside the existing URL field with a live preview.
- Required submission terms checkbox + "Read terms" modal that preserves
  the in-progress submission; agreement stamped in agreed_to_terms_at.
- Required 6-question feedback form on the submission flow, stored in a new
  program_submissions.feedback JSONB column (server validates structure).
- New markdown content section type (react-markdown + remark-gfm) rendered
  on hackathon pages above Submit; authored the bitrefill-2026 page sections
  in mock + a generated content migration.
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 14, 2026 12:34pm

…tro copy

- Drop the ·INDEX / LIVE stats section on the landing page and the now-unused
  project-stats fetch + helpers (HomePage only loads programs now).
- Update the program-spaces intro to the new WebZero + Stadium framing.
@sacha-l sacha-l marked this pull request as ready for review June 15, 2026 23:12
@sacha-l sacha-l merged commit 382209d into develop Jun 15, 2026
2 checks passed
sacha-l added a commit that referenced this pull request Jun 15, 2026
Resolved SubmitProjectModal conflict: re-applied the verifying-check-in
button label + reassurance line onto #178's restructured submit form
(main form footer, not the terms modal). Verified auto-merged api.ts,
program.controller, program.routes, submission.controller + test keep
BOTH the luma gate and #180's editable-scores logic. 428 server tests +
client build + lint pass.
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