Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Needs your OK: this changes the columns of the file organizers download with Export. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
GET /api/signups/[id]/export.csv is the Export button in the signup's header, and Export responses in the phone's ⋯ menu. It writes these columns: slot_ref, slot_values, slot_at, participant_name, participant_email, status, quantity, notes, created_at.
- The organizer's own fields are all in one JSON cell.
slot_valuesisJSON.stringify(slot.values), for example{"date":"2026-11-14","what":"Fruit and water"}. In a spreadsheet there's no What or Date column to sort or filter by, so answering "who's bringing what on the first Saturday" means reading every row. The Responses tab shows the same slot as "What: Fruit and water · Date: Sat, Nov 14" (summarizeSlot). slot_atis a time the organizer never set. A slot with a date and no time exports as2026-11-14T12:00:00.000Z. That's the noon-UTC anchor the reminder job schedules from (see "Jobs" in CLAUDE.md). A spreadsheet may show it as a time, or move it into the local timezone.- Someone the organizer took off shows as
cancelled. The Responses tab says "removed" or "moved" (howCommitmentsEnded). The file uses the rawstatus, so it can't tell "they cancelled" from "I took them off". - The headers are code names (
slot_ref,participant_email). The file is called<slug>-commitments.csv, but the app calls them responses.
Fix, in outline
- One column per signup field, in field order, headed by the field's label. Then Name, Email, Status, Spots, Notes and Signed up.
- Write field values as data a spreadsheet understands. Dates as
YYYY-MM-DD, times asHH:MM, numbers as numbers, text as text. Don't userenderFieldValue's "Sat, Nov 14", which sorts alphabetically. - Take the status from
howCommitmentsEnded, as the Responses tab does: confirmed, cancelled, removed or moved. - Drop
slot_refandslot_at, and name the file<slug>-responses.csv. - Keep
csvEscape's formula guard on every cell, including the new headers, since an organizer can name a field=SUM(A1).
Watch for
- Scripts may already read this file. Anything that reads
participant_emailorslot_valuesbreaks. Say so in the CHANGELOG. - Pages that describe the download should stay true. They tell organizers to sort the file by email, and that each person's notes are in it. Keep an Email column and a Notes column.
- Labels can repeat. Two fields with the same label need distinct headers, such as "Time" and "Time (2)".
- Old values. A slot's
valuescan still hold a field that was since deleted. Leave it out, as the Responses tab does. - Tests that call this route:
deleted-signup.db.test.ts, andtests/e2e/response-headers.spec.tsfor its headers. - Excel and accented names. The file has no UTF-8 byte-order mark, so Excel on Windows may misread accented names. It's out of scope unless adding the mark is a one-line change, but say what you found in the PR.
Choices this makes
- Raw values, not display text, for dates and times, so the file sorts. Default: raw.
- Plain-English headers instead of snake_case. The person opening the file is an organizer. Default: plain English.
- The file name changes from
-commitmentsto-responses. Default: change it.
Done when
- The downloaded file has one column per signup field, headed by its label, and a spreadsheet can sort it by day or by item.
- A participant the organizer removed shows as "removed", as on the Responses tab.
- There's no
slot_reforslot_atcolumn. - A DB test pins the header row and one row's values for a signup with a date field and a text field.
pnpm lint && pnpm typecheck && pnpm knip && pnpm test && pnpm test:dbpass.
Found by the UX walkthrough, scenario O3, on opensignup-prod main at af849ab. Checked against a downloaded file (example data) and the route's code at that commit. https://claude.ai/code/session_01HHuRRYTPRnzKY6grKwPaFY
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity