Skip to content

No organizer-facing view of the activity log #243

Open

Description

@richshaw

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.viewed from the Build tab and from every public visit (recordPublicView in src/lib/view-tracker.ts), signup.editor_opened from Settings and Responses, signup.previewed from Preview, and signup.link_copied and signup.link_shared from 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_MS in src/components/build-shared/useBuildState.ts), and renaming a group heading saves each slot in the group (renameGroup), one slot.updated each. A few minutes of editing makes dozens of slot.updated rows.
  • The reader has no guard. listActivityForSignup selects by signupId alone. The API route runs getSignupRowForOrganizer (src/services/locks.ts) first.

Fix, in outline

  • A guarded read. A service function, listSignupHistory(db, actor, signupId), that:
    • runs getSignupRowForOrganizer first, so viewers can read it and other workspaces can't
    • selects only the event types in HISTORY_EVENTS, in SQL, with workspace_id matched (inWorkspace), newest first, limit 100
    • is wrapped in cache() in src/services/signups.cached.ts, next to loadSignupForOrganizer, turning forbidden into not_found the same way
  • 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_KEY in responses/responses-summary.ts is, with satisfies Record<HistoryEvent, …>. A shown type without a message then fails pnpm 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.json under organizer.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 a count plural, never English joined in code. Translate them into Swedish in the same PR with the translate skill (to-translate.mjs sv --audience organizer), and commit the rewritten src/messages/en.d.json.ts.
  • Who made it. When the payload has viaClientId: the app's domain, from describeClient(viaClientId, null).domain in src/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's actorId is 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 from formatDuration(minutes, locale) in src/lib/format-duration.ts ("5 minutes", "2 days 3 hours"), which writes the number and its plural through Intl in that language. Put the exact time in a <time dateTime>, with a title formatted by Intl.DateTimeFormat in 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.md to say where the history is. Add the same to the connect-an-ai-assistant help article, following the help-pages skill: one sentence naming the Settings tab and its History section, both names added to its .ui.ts with their catalog keys in FROM_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.deleted and commitment.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 a slot.updated for the same edit
    • signup.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 an update_slots AI tool that writes one slot.updated row for many slots, with payload { slotIds, changed, bulk: true }. That row reads "Changed N slots" (N from slotIds) 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 translate skill.
  • Older rows. Rows from before viaClientId was 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. /privacy already 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 the help-pages skill's scripts/affected-articles.mjs, and re-take them with pnpm help:screenshots only if the new section shows in them.
  • Help writing rules. docs/writing-help.md and src/help/articles.test.tsx apply to the article text. src/help/ui-names.test.ts checks each new UI name against en.json.
  • JavaScript budget. /app/signups/[id]/settings is capped at 131 KB in budgets.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_EVENTS maps to a message, runs collapse within 10 minutes and not across a different person or app, a bulk slot.created counts 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.viewed rows 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 organizer reports nothing missing or stale.
  • docs/connect-ai-assistant.md and 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:db pass.

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

  1. added
    enhancement
    on Sep 19, 2026
  2. added
    pipeline:ux
    on Oct 30, 2026
  3. richshaw commented on Nov 18, 2026

    @richshaw
    OwnerAuthor

    Revised the brief against main at d8787e9 so it can be approved as written:

    • Every word is now a catalog message. That covers the event labels, "You", "Another organizer", "(connected app)", "Just now" and "… ago". They go under 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.
    • Times are in the organizer's language. "… ago" uses formatDuration in the language from localeOfOrganizer, and so does the exact time on hover. "{domain} (connected app)" is one message, so a language can place the domain itself.
    • Filling in a new field on existing slots takes one AI tool call per slot #725's bulk tool is covered. Its single slot.updated row for many slots reads "Changed N slots" on its own line. Whichever of the two lands second adds that.
    • Updated to current code. Paths are under (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 matches workspace_id.
    • Checked the event list against every recordActivity call. All fifteen shown events are written today. signup.deleted is now named as left out.
    • Help and tests. The help article change is spelled out (its UI names, catalog keys and walkthrough step). The Playwright check now runs in the translated-organizer walk, so the no-English check reads the new lines. Translate OpenSignup into German, not switched on yet #1060 (German) is noted under Watch for.

    https://claude.ai/code/session_016YZ9SVTB9qLweVn9KzZpdf


    Generated by Claude Code

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

    enhancementpipeline:proposedpipeline:ux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions