Repository navigation
Move the responses download onto the Responses tab as Download CSV - #562
Conversation
The header's Export sat on every tab, away from the table it downloads.
The Responses tab now has a summary line ("5 sign-ups · 1 cancelled ·
1 removed") and a Download CSV link above the table, shown only once
someone has signed up. Export leaves the header and the phone's ⋯ menu,
and the ⋯ button is hidden for a closed or archived signup, whose menu
would now be empty.
Fixes #559.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N2PuyFrrvptSz3zh2EXtmX
Tophat: passedI ran 1408a7c locally with
For the owner (UX): organizers now download responses from the Responses tab, through a Download CSV button next to a line like "2 sign-ups · 1 cancelled · 1 removed". The header's Export button and the phone menu's Export responses are gone, everywhere, drafts included. With no sign-ups there's no button. On a phone a closed or archived signup no longer shows the ⋯ button, because nothing would be left in its menu. Compare Screenshots are in https://claude.ai/code/session_015b9fVFzh46bDFcFB7sxXRX. Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The PR does what #559 asks. The Responses tab now has a bar above the table, outside the table's box. It holds a summary line and a plain <a href> Download CSV link to the unchanged /api/signups/[id]/export.csv. The bar only shows when there's at least one row, so an empty signup still gets just the existing empty-state box. summarizeResponses is a pure function over the commitments and ended the page already loads, so there's no new query. Its sign-up count uses ACTIVE_COMMITMENT_STATUSES, the same rule countActiveCommitmentsForSignup uses for the tab badge in layout.tsx, so the two numbers can't disagree. Cancelled rows are split by howCommitmentsEnded into removed and cancelled, and moved rows are skipped, which matches the table's status pills. Export is gone from SignupHeader (the grid is now 2 columns, or 1 when there's no Publish or Close) and from MobileMoreMenuSheet. MobileSignupHeader hides ⋯ unless the signup is a draft or open, which matches exactly what the sheet can show. Nothing in src still links the header export. The only other reference is the API's exportCsv link, which stays. Every "Done when" item is done.
Blocking (0): none.
Optional (0): none.
Earlier threads: none. Copilot couldn't review because its quota is used up.
Checks: CI is green on 1408a7c (lint-type-test, e2e, CodeQL). The tophat passed on 1408a7c, which is the current head, so no runtime code has changed since. I read the full diff, the Responses page, countActiveCommitmentsForSignup, howCommitmentsEnded and listCommitmentsForSignup, and the new unit and e2e tests. On the checklist: no service, route, schema, policy guard or query changed, and no client JavaScript was added. There's a CHANGELOG line under Changed. No help article mentions Export, and the PR's walkthrough runs cover the Responses tab.
Why owner: pipeline:ux. The download moves from the header (and the phone ⋯ menu) to a Download CSV button on the Responses tab, next to a line like "2 sign-ups · 1 cancelled · 1 removed". It's hidden when there are no sign-ups. On a phone, a closed or archived signup no longer shows ⋯. Compare the tophat's 562-base-build-header and 562-base-responses with 562-head-build-header, 562-head-responses and 562-head-phone-responses.
https://claude.ai/code/session_0135VETqGwB4Kft9ZGEmV9Yy
Generated by Claude Code
|
Approved by the owner at https://claude.ai/code/session_01Ga7vyEoy6hrHo2caTyqqAk Generated by Claude Code |
|
Not merged: the PR conflicts with https://claude.ai/code/session_01Ga7vyEoy6hrHo2caTyqqAk Generated by Claude Code |
Resolve the MobileMoreMenuSheet conflict with #507: keep main's StatusActionScope forms that show a refusal, and drop the Export responses link and the top border that separated it, as this PR does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S2gRpBAByqo81TkLboV4UJ
Without the header's Export link the builder page comes to 150.9 kB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S2gRpBAByqo81TkLboV4UJ
|
I merged
The conflict was in runtime code, so this goes back through tophat, and the owner's approval at https://claude.ai/code/session_01S2gRpBAByqo81TkLboV4UJ Generated by Claude Code |
|
Not merged: CI is red on Every other gate passed on this head. Moved to https://claude.ai/code/session_01FGRcD1xKZ6wL67VKSCbbVC Generated by Claude Code |
The merge from main brought in #544, which put the builder page at 151.1 kB, over the 151 kB this branch had lowered it to. Main measures 151.2 kB under 152, and this branch comes in a little under main, so it keeps main's number rather than one the next merge can tip over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGRcD1xKZ6wL67VKSCbbVC
|
Fixed the red
There's no runtime change of the PR's own. It's a commit of the PR's own, though, so the owner's approval at https://claude.ai/code/session_01FGRcD1xKZ6wL67VKSCbbVC Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 3)
Since round 2 (at 9f7b554), the PR picked up two merges from main (52215c1, 2fad0aa, bringing in #544 and #563) and one commit of its own, d3d8715, which puts the /app/signups/[id]/build budget back to 152, the same as main. budgets.json now has no diff against main, so nothing is raised. The runtime diff against main is unchanged from what rounds 1 and 2 reviewed: the Responses bar with summarizeResponses and the plain Download CSV link, Export gone from SignupHeader and MobileMoreMenuSheet (with #507's StatusActionScope forms kept), and ⋯ hidden on a phone unless the signup is a draft or open. The head merges cleanly into current main.
Blocking (0): none.
Optional (0): none.
Earlier threads: none open. Copilot couldn't review because the quota is used up.
Checks: CI is green on d3d8715 (lint-type-test including pnpm budgets, e2e, CodeQL). The tophat passed at 9f7b554, and the shared check prints 0 runtime hunks since then. I read the full diff against main again.
Why owner: pipeline:ux. Your approval at 52215c1 doesn't carry over by the rule, because d3d8715 is a commit of the PR's own. That commit only changes budgets.json, back to main's value, and touches no screen. The UX is the same as what you approved: see the tophat's 562b-head-responses, 562b-head-phone-responses and 562b-head-phone-viewer-refused.
https://claude.ai/code/session_01RLY4k28ct66HAHrTaCqPxT
Generated by Claude Code
|
Approved by the owner at Session: https://claude.ai/code/session_014Zo1eizoiYtzTbeo28XM5B Generated by Claude Code |
Resolves conflicts with #553, #562 and #563: - PublicLinkChip keeps this PR's signupId and drops the compact prop that #563 removed. - The Responses page keeps #562's Download icon and drops the `after` import that trackOrganizerView replaced. - signups.ts takes main's row types alongside recordActivityBestEffort. - MobileSignupHeader gets back the signupId prop #562 dropped, since the link chip records copies against it. - The preview page test from #561 mocks trackOrganizerView, which replaced recordOrganizerView here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Zo1eizoiYtzTbeo28XM5B
Fixes #559.
The problem
The responses download was an Export button in the signup header, next to Preview and Publish / Close. On a phone it was Export responses in the ⋯ menu. It showed on the Build and Settings tabs and on drafts, and the Responses tab had to tell people where it was ("Export to CSV from the header.").
The fix
Responses tab (
responses/page.tsx): when there's at least one row, a bar above the table holds a summary line on the left and an outlined Download CSV link with a download icon on the right. It's a plain<a href="/api/signups/[id]/export.csv">, notnext/link, because the route already sends the file as an attachment. On a phone the summary and the button sit on separate rows, and the button is full width and 44px tall. The bar sits outside the table's box, and the table markup is unchanged. With no sign-ups there's no bar, only the existing empty-state box. The sentence "Everyone who's signed up so far. Export to CSV from the header." is gone.The summary comes from
summarizeResponses(responses/responses-summary.ts), a small pure function that works from thecommitmentsandendedthe page already loads, so there's no new query. It reads "5 sign-ups · 1 cancelled · 1 removed":howCommitmentsEndedmarksremovedcount as removed. Unmarked ones count as cancelled.The count is semibold in ink, and the rest is muted.
Header (
SignupHeader): Export is gone. The button grid now holds Preview plus Publish or Close, or Preview alone.Phone ⋯ menu: Export responses is gone from
MobileMoreMenuSheet. Publish and Close lost the top border that separated them from it.MobileSignupHeaderhides the ⋯ button when the signup is neither a draft nor open, because the sheet would open empty. The now-unusedsignupIdprop was dropped from both.The design board says "5 signed up". I followed the issue's wording, "5 sign-ups", because the issue says why: one person can hold several spots.
I left the touched files' existing (non-Prettier) formatting alone, so the diff only shows the change.
CHANGELOG line under Unreleased › Changed. The
responses-csv.tsdoc comment now names the new button.Tests
responses-summary.test.tschecks the singular and plural, that zero parts are left out, that cancelled and removed are counted apart, that a move isn't counted, and that the line reads "0 sign-ups · 2 cancelled" when everyone has dropped out.tests/e2e/responses.spec.ts:<slug>-responses.csv.pnpm lint && pnpm typecheck && pnpm knip && pnpm test(1322 tests)pnpm build && pnpm budgets: Responses page at 124.3 kB of 125. Every page's budget still holds, and none came in a whole kB under its budget.responses,organizer,response-headers,a11yand the threehelp/walkthroughs, 29 passed.affected-articles.mjsflags only "More actions" increate-and-publish-a-signup. That article covers a draft, which still has the ⋯ menu, and its walkthrough passes. No article screenshot shows the header buttons or the Responses bar, so I didn't re-take any.https://claude.ai/code/session_01N2PuyFrrvptSz3zh2EXtmX
Generated by Claude Code