Repository navigation
Description
Needs your OK: this adds a History list to each signup's Settings tab, saying what changed, when, and whether you or a connected app made the change. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
Every change to a signup writes an activity row (recordActivity in src/lib/activity.ts). A change made through a connected AI assistant also carries viaClientId in its payload (activityActor). Nothing in the app shows these rows. The only reader is the API route GET /api/signups/[id]/activity, through listActivityForSignup.
So an organizer who gives an assistant write access can't see what it changed. docs/connect-ai-assistant.md says as much: "There is no page that shows you that history yet."
Three things make a plain list of the rows useless:
- Most rows aren't changes. The same table, under the same
signupId, gets page-view telemetry:signup.viewedfrom the Build tab and from every public visit (recordPublicViewinsrc/lib/view-tracker.ts),signup.editor_openedfrom Settings and Responses,signup.previewedfrom Preview, andsignup.link_copiedandsignup.link_sharedfrom the share panel. It also gets participants' sign-ups, edits and cancellations, and a row for each email sent. Newest first, page opens would push the changes out of any limit. - The Build tab writes many rows per edit. It saves a slot 800 ms after the last keystroke (
DEBOUNCE_MSinsrc/components/build-shared/useBuildState.ts), and renaming a group heading saves each slot in the group (renameGroup), oneslot.updatedeach. A few minutes of editing makes dozens ofslot.updatedrows. - The reader has no guard.
listActivityForSignupselects bysignupIdalone. The API route runsgetSignupRowForOrganizer(src/services/locks.ts) first.
Fix, in outline
- A guarded read. A service function,
listSignupHistory(db, actor, signupId), that:- runs
getSignupRowForOrganizerfirst, so viewers can read it and other workspaces can't - selects only the event types in
HISTORY_EVENTS, in SQL, withworkspace_idmatched (inWorkspace), newest first, limit 100 - is wrapped in
cache()insrc/services/signups.cached.ts, next toloadSignupForOrganizer, turningforbiddenintonot_foundthe same way
- runs
- One module for the list and its lines,
src/lib/signup-history.ts:HISTORY_EVENTS, the event types shown- a typed table from each event type to its catalog key, written as literals the way
EMPTY_KEYinresponses/responses-summary.tsis, withsatisfies Record<HistoryEvent, …>. A shown type without a message then failspnpm typecheck, and the catalog check sees every key in use. - a pure function that turns rows into lines, each
{ key, count, who, at }. It works out who made each change and collapses runs (see below). It returns no words. Unit-test it.
- Every word is a catalog message, in
src/messages/en.jsonunderorganizer.signupSettings.history: the section's heading ("History"), each event's label, "You", "Another organizer", "{domain} (connected app)", "Just now" and "{duration} ago". Labels with a number are one ICU message each with acountplural, never English joined in code. Translate them into Swedish in the same PR with thetranslateskill (to-translate.mjs sv --audience organizer), and commit the rewrittensrc/messages/en.d.json.ts. - Who made it. When the payload has
viaClientId: the app's domain, fromdescribeClient(viaClientId, null).domaininsrc/oauth/client-display.ts, in the "{domain} (connected app)" message, so a language can put the domain where it reads right. Otherwise "You" when the row'sactorIdis the organizer viewing (actor.id), and "Another organizer" when it isn't. - When, in the organizer's language (
localeOfOrganizer(session)). "Just now" under a minute. Otherwise "{duration} ago", with the amount fromformatDuration(minutes, locale)insrc/lib/format-duration.ts("5 minutes", "2 days 3 hours"), which writes the number and its plural throughIntlin that language. Put the exact time in a<time dateTime>, with atitleformatted byIntl.DateTimeFormatin the organizer's language. - Where. A "History" section on the Settings tab (
src/app/(organizer)/app/(chrome)/signups/[id]/settings/page.tsx), between the tab's form (Sign-up form and Language, with its Save) and "Delete this signup". Server-rendered: no client component. - Docs. Change the sentence in
docs/connect-ai-assistant.mdto say where the history is. Add the same to theconnect-an-ai-assistanthelp article, following thehelp-pagesskill: one sentence naming the Settings tab and its History section, both names added to its.ui.tswith their catalog keys inFROM_CATALOG, and its walkthrough (tests/e2e/help/connect-an-ai-assistant.spec.ts) opening a signup's Settings tab and finding History.
Choices this makes
- Only the organizer's changes are history. Shown:
signup.created,signup.updated,signup.published,signup.closed,signup.reopened,signup.archived,slot.created,slot.updated,slot.deleted,slot.reordered,field.created,field.updated,field.reordered,field.deletedandcommitment.removed. Each is written by an organizer action on main today. Left out:- telemetry: page views, link copies and shares, refused publishes, Magic Compose events
- participants' own sign-ups, edits and cancellations, which the Responses tab already shows
- emails sent (confirmations, reminders, time-change emails)
slot.rescheduled, which always comes with aslot.updatedfor the same editsignup.deleted, since a deleted signup has no Settings tab
- Collapse runs. Rows next to each other with the same event type and the same person or app, within 10 minutes of each other, show as one line with a count. Without this, one editing session fills the list.
- On the Settings tab, not a fourth tab. The tab bar is Build, Responses and Settings. On a phone, a signup's page has two links called "Settings" that go to different places #589 noted a phone has no room for a longer one, and The Swedish signup tabs don't fit at 320 px, so Inställningar is half off-screen #1022 shows the Swedish tabs already don't fit at 320 px.
- Apps are named by domain only. The row stores only
viaClientId. The app's own name is self-reported (the consent screen shows it second for that reason), and it lives on the grant, which disconnecting the app destroys. The domain is the part that can't be forged. - Plain labels, no values. Payloads carry ids and refs, not the words the organizer typed, so a line says what kind of change it was. The English:
- "Created this signup", "Changed the signup's details", "Published", "Closed", "Reopened", "Archived"
- "Added a slot", "Changed a slot", "Deleted a slot", "Reordered the slots"
- "Added a field", "Changed a field", "Reordered the fields", "Deleted a field"
- "Removed someone from a slot"
- with a count above one: "Added N slots" (a bulk add counts its payload's
count), "Changed slots N times", "Deleted N slots", "Reordered the slots N times", the same for fields, "Changed the signup's details N times" and "Removed N people from slots"
- The newest 100 matching rows, no paging. The original issue left paging, filters and export out of scope.
Watch for
- Filling in a new field on existing slots takes one AI tool call per slot #725 (
pipeline:ready) adds anupdate_slotsAI tool that writes oneslot.updatedrow for many slots, with payload{ slotIds, changed, bulk: true }. That row reads "Changed N slots" (N fromslotIds) on a line of its own, never collapsed with single changes. Whichever of the two lands second adds that line and its test. - Translate OpenSignup into German, not switched on yet #1060 (open PR) adds a German catalog, not shipped yet. If it lands first, German is a test language, so translate the new messages into German too with the
translateskill. - Older rows. Rows from before
viaClientIdwas recorded (feat(mcp) 1/5: attribute connected-app changes in the activity log #229) show as "You" or "Another organizer", even if an assistant made them. Nothing can tell them apart now. - No new data is stored.
/privacyalready describes the activity log and says it exists so an organizer can audit their own workspace. Other organizers show only as "Another organizer", never by name, so the legal pages stay as they are. - Help screenshots. "Create and publish a signup" has two pictures of the Settings tab (
email-setting.png,signup-language.png). Run thehelp-pagesskill'sscripts/affected-articles.mjs, and re-take them withpnpm help:screenshotsonly if the new section shows in them. - Help writing rules.
docs/writing-help.mdandsrc/help/articles.test.tsxapply to the article text.src/help/ui-names.test.tschecks each newUIname againsten.json. - JavaScript budget.
/app/signups/[id]/settingsis capped at 131 KB inbudgets.json. A server-rendered list adds nothing to it. - CHANGELOG line under Added.
Done when
- The Settings tab of a signup lists its changes newest first, in the organizer's language, and a change made through a connected app shows the app's domain.
- Unit tests cover the line builder: every type in
HISTORY_EVENTSmaps to a message, runs collapse within 10 minutes and not across a different person or app, a bulkslot.createdcounts its slots, and an app's change shows its domain. The words come from the catalog through the test translator, not typed English. - A DB test: the read refuses an organizer from another workspace, and a signup with 200
signup.viewedrows and 3 changes returns the 3 changes. - A Playwright check:
tests/e2e/translated-organizer.spec.ts, after its signup is built and published, opens the Settings tab and finds the History section with its "Created this signup" and "Published" lines in the test language, and its no-English check passes there. to-translate.mjs sv --audience organizerreports nothing missing or stale.docs/connect-ai-assistant.mdand the help article say where the history is, and the help walkthrough passes.pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test && pnpm test:dbpass.
Rewritten from the original issue for the pipeline, and checked against src/lib/activity.ts, src/db/schema/activity.ts, src/app/api/signups/[id]/activity/route.ts, src/services/locks.ts, src/oauth/client-display.ts, the Settings tab page and docs/connect-ai-assistant.md on main at 2d4fdfe. https://claude.ai/code/session_016YZ9SUWWJa1udHCjU5fUma
Revised against main at d8787e9: every word is now a catalog message, in the organizer's language. https://claude.ai/code/session_016YZ9SVTB9qLweVn9KzZpdf
Activity
richshaw commentedon Nov 18, 2026
Revised the brief against
mainat d8787e9 so it can be approved as written:organizer.signupSettings.history, with ICU plurals for the counts and Swedish in the same PR. The TypeScript label map is gone. A typed table maps each event to its key, so a missing message still fails the type check.formatDurationin the language fromlocaleOfOrganizer, and so does the exact time on hover. "{domain} (connected app)" is one message, so a language can place the domain itself.slot.updatedrow for many slots reads "Changed N slots" on its own line. Whichever of the two lands second adds that.(organizer), and the Settings tab now has one form, so History goes between it and Delete. Show a "We can’t find this signup" card, not a server error, for a signup in another workspace #717 has landed, so it's no longer listed as an overlap. A drag now writes one reorder row; renaming a group heading is what writes many rows. The read also matchesworkspace_id.recordActivitycall. All fifteen shown events are written today.signup.deletedis now named as left out.https://claude.ai/code/session_016YZ9SVTB9qLweVn9KzZpdf
Generated by Claude Code