Repository navigation
Show slot values without labels on the Responses tab - #541
Conversation
The Slot column already says what the cell holds, so "Job: Set up tables · Date: Sat, Nov 14" becomes "Set up tables · Sat, Nov 14", the way the Remove question on the same tab reads it. summarizeSlot had no other caller and goes. Fixes #411. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPsfxBKNtSsSaLiSKJ1eUk
Tophat: passedI ran 2eb44af locally with
For the owner (UX): the Responses tab's Slot column now shows just the slot's values, like "Orange slices · Sat, Apr 13 · 1", instead of "What: Orange slices · Date: Sat, Apr 13 · Hours: 1". On a phone, each card's slot line no longer wraps. The Remove question already read this way, so the cell and the question now match. One thing to look at: a Number field's value now shows as a bare number ("· 2"), and the field's unit ( Screenshots are in https://claude.ai/code/session_013ymWVB5TYmhd3Wwbtvrxsi. Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The PR does what #411 asks. The Responses tab's Slot cell now uses summarizeSlotValues, worked out once per row, and Remove's name and question reuse that same string, so the cell and the question can't disagree. The fallbacks are unchanged: the cell still falls back to the slot's ref and then "—", and Remove to the ref and then "this slot", exactly as on main. summarizeSlot is gone, and nothing on the branch still references it (src, tests, docs, scripts, .claude). Its unit tests now run against summarizeSlotValues with the unlabelled results, so the absent/null/empty, order, number, date and unknown-key cases are all still covered. The e2e phone-card test now finds the slot cell by its exact text, which also proves no label is shown. Each "Done when" item holds: values only, matching the Remove question; emails (slotDetails → SlotDetailsText) and the CSV export aren't touched (the tophat found the CSV byte-identical); CI ran lint, types, knip and the tests. The issue's one choice, dropping all labels with numbers included, follows the issue's default.
Blocking (0)
Optional (3):
src/lib/slot-summary.ts:13-15: the doc comment now names the responses table as a caller, but still says "Callers fall back to the signup title, never toslots.ref". The responses table does fall back toslots.ref, as it did onmain. That's fine on an organizer-only page, but the sentence could say it's about what participants see.- A Number field now shows as a bare number ("· 2"), and its unit isn't printed here or on
main. The tophat flagged it, and it's the choice the issue made. If it reads badly in practice, printing the unit is a separate change. responses/page.tsx:48,52andtests/e2e/responses.spec.ts:247carry formatter-only changes (Tailwind class order, line wrapping) on lines the PR doesn't otherwise touch. Harmless, andformat:checkpasses.
Earlier threads: none. Copilot couldn't review (quota used up).
Checks: CI is green on 2eb44af (lint-type-test, e2e, CodeQL). Locally I grepped the branch for summarizeSlot and ran affected-articles.mjs: its only article hits come from CLAUDE.md wording, and "Take someone off a slot"'s one picture is the Remove dialog, which already read the slot without labels. The tophat passed on this exact SHA (desktop and phone), so no runtime code has changed since. Nothing on the review checklist applies: no service, policy guard, schema, public route, MCP or legal page is touched, and there's a CHANGELOG line.
Why the owner: pipeline:ux. The Slot column on the Responses tab reads "Orange slices · Sat, Apr 13 · 1" instead of "What: Orange slices · Date: Sat, Apr 13 · Hours: 1", and on a phone the slot line no longer wraps. Compare the tophat's 541-base-responses-phone with 541-after-responses-phone, and the two desktop shots. Check whether the bare number ("· 1") reads well enough for you.
https://claude.ai/code/session_016Z17JPdZ7KkiPAM4wTZBdf
Generated by Claude Code
|
Approved by the owner at https://claude.ai/code/session_01DXydxGNyVt8sXcDp4XzG84 Generated by Claude Code |
Fixes #411.
The problem
The Responses tab's Slot column put each field's label in front of its value: "Job: Set up tables · Date: Sat, Nov 14". The column is already headed Slot, so the labels repeated the heading and made every cell about twice as long. On a phone, where each row is a card, they made the line wrap. The Remove question on the same tab already reads the slot without labels ("Remove Alex Example from Set up tables · Sat, Nov 14?"), so one page showed a slot two ways.
The fix
src/app/app/(chrome)/signups/[id]/responses/page.tsx: the Slot cell usessummarizeSlotValues, worked out once per row, and Remove's name and question reuse it. The fallback to the slot's ref when no field has a value is unchanged.src/lib/slot-summary.ts:summarizeSlot(the labelled form) had no other caller, so it's removed. Its doc comment moves ontosummarizeSlotValues, which now names the responses table among its users.Label: valuelines, on purpose) and the CSV export (a column per field) are unchanged.summarizeSlot.affected-articles.mjsnames no article. "Take someone off a slot" has one picture, of the confirmation dialog, which already read the slot without labels, so no screenshots need re-taking.Tests
src/lib/slot-summary.test.ts: thesummarizeSlotcases (absent, null, empty values, field order, numbers, dates, unknown keys) now run againstsummarizeSlotValueswith the unlabelled results, so no coverage is lost.tests/e2e/responses.spec.ts: the phone-card test found the slot cell by/^What: /. It now finds it by the exact slot text ("Fruit and water"), which also checks that no label is shown.Run in this session:
pnpm lint && pnpm typecheck && pnpm knip && pnpm test: 1287 passedpnpm build && pnpm budgets: every page is under budgetplaywright testwith the container config ontests/e2e/responses.spec.tsandtests/e2e/help/take-someone-off-a-slot.spec.ts: all 7 chromium tests passed. The mobile-safari project couldn't launch WebKit in this container, so none of its test bodies ran. CI runs chromium.Generated by Claude Code