Skip to content

The responses download puts the signup's own fields in one JSON cell, so it can't be sorted by day or item #474

Closed

Description

@richshaw

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_values is JSON.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_at is a time the organizer never set. A slot with a date and no time exports as 2026-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 raw status, 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 as HH:MM, numbers as numbers, text as text. Don't use renderFieldValue's "Sat, Nov 14", which sorts alphabetically.
  • Take the status from howCommitmentsEnded, as the Responses tab does: confirmed, cancelled, removed or moved.
  • Drop slot_ref and slot_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_email or slot_values breaks. 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 values can 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, and tests/e2e/response-headers.spec.ts for 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 -commitments to -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_ref or slot_at column.
  • 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:db pass.

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

Activity

  1. added
    enhancement
    pipeline:ux
    pipeline:working
    and removed
    pipeline:working
    on Oct 18, 2026
  2. removed
    pipeline:ux
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions