Skip to content

feat(crew): move volunteer CSV import to dedicated wizard page - #614

Draft
zacjones93 wants to merge 2 commits into
mainfrom
crew-import-wizard
Draft

feat(crew): move volunteer CSV import to dedicated wizard page#614
zacjones93 wants to merge 2 commits into
mainfrom
crew-import-wizard

Conversation

@zacjones93

@zacjones93 zacjones93 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What changed

  • replace the volunteer import dialog with a dedicated three-step wizard route at /events/$eventId/volunteers/import
  • add drag-and-drop CSV upload, field mapping, and review/apply steps while preserving the existing import server contract
  • keep single-volunteer entry and pasted-email imports as modals on the volunteers page
  • update the generated route tree and Crew architecture documentation

Why

The CSV workflow needs more space and clearer progression than a dialog can provide. A dedicated page makes upload, mapping, validation, and application easier to understand without changing the existing backend behavior.

Impact

Organizers now launch CSV imports from the volunteers page and complete them in a focused wizard. Existing manual-add and pasted-email workflows remain unchanged.

Validation

  • pnpm --filter crew type-check
  • targeted Biome check for changed Crew source files
  • lat check

The package-wide pnpm --filter crew check still reports 231 existing Biome errors in unrelated files.


Summary by cubic

Moved volunteer CSV import from a modal to a dedicated three-step wizard at /events/$eventId/volunteers/import for clearer upload, mapping, and review. Adds validation and guard rails while reusing the existing import API; single-add and paste flows stay unchanged.

  • New Features

    • Wizard: Upload CSV (drag-and-drop, optional label) → Map fields (auto-infer, saved presets) → Review & Apply (summary, preview table, confirm).
    • “Import volunteers” on the volunteers page now links to the wizard; after apply, the app invalidates and returns to the roster.
    • Removed the old dialog and volunteer-import-flow.tsx; added volunteer-import-wizard.tsx and route routes/events/$eventId/volunteers_.import.tsx (route tree updated). Reuses /api/crew/import, mapping suggestion/preset server functions, and applyCrewImportFn.
  • Bug Fixes

    • Validate CSV type and size before reading; shared MAX_CREW_IMPORT_BYTES and isCrewImportCsvUpload in file-validation.ts, used by the server and /api/crew/import.
    • Require all required mappings before preview; preserve explicit “Not mapped” choices so the server doesn’t re-infer them.
    • Disable apply when no rows are ready; protect against losing work with a navigation blocker; keep apply success even if post-apply refresh/navigation fails.
    • Added tests for file validation and wizard interactions.

Written for commit 4d0d394. Summary will update on new commits.

Review in cubic

Replace the Import volunteers dialog with a three-step wizard page at
/events/$eventId/volunteers/import (Upload CSV with drag-and-drop → Map
fields → Review & apply). Single-add and paste-emails stay as modals on
the volunteers page. Reuses the existing import server contract
(/api/crew/import preview, mapping presets, applyCrewImportFn).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 2a35186cc852
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 437cbe98-9f4a-4b3f-a510-1e25d1cc8bd0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch crew-import-wizard

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.

Entire-Checkpoint: 2a35186cc852
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