Repository navigation
Record link copies, failed AI drafts and refused publishes #500
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Needs your OK: this adds activity events and changes docs/telemetry.md. Swap pipeline:proposed for pipeline:ready to have it built. Part of #498. Ship it before the review page, so that page's effect can be measured.
What happens
The activity log can't see several of the steps where new organizers stop:
- Copying or sharing the public link records nothing. That applies to
PublicLinkChipand the published banner. So "published but never shared" can't be measured. - Magic Compose failures and refusals only reach the server log. "Tried the AI, it failed, gave up" is invisible.
- A refused publish leaves no trace.
- Organizer events carry no device class. Drafts abandoned on a phone can't be told apart from drafts abandoned on a computer.
signup.draft_starteddoesn't say which form was shown, Magic Compose or the manual one. It fires on every render of the new-signup page.
Fix, in outline
signup.link_copiedandsignup.link_shared(the second is for the phone share sheet). Send them from the browser on thelanding.cta_clickedpattern, but behind the organizer session rather than a per-IP rate limit.magic_compose.failed, carrying the closed error code (not_configured | rate_limited | upstream | invalid_json | schema_mismatch | timeout | aborted, orrefusal). Write it outside a transaction, as other telemetry-only events are.signup.publish_refused, carrying the error code.uaClasson organizer page-view events, as public views already have.mode: 'magic' | 'manual'onsignup.draft_started.- Reserve two events for the review-page checks:
review.notice_shownandreview.notice_accepted, carrying only the kind of notice.
Watch for
- Payloads hold codes and kinds only. No emails, no email domains, and no text the organizer wrote. The separate analytics reader allow-lists payload keys, so any new key has to be added there too.
- Docs: update
docs/telemetry.md. Check whether the privacy page needs a line. - The activity history view (No organizer-facing view of the activity log #243) will want to leave these events out, as it does page views.
Done when
- Each event is written by the action it describes, with a test.
docs/telemetry.mdlists the new events and their payloads.pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass, andpnpm test:dbpasses for the activity writes.
Planned in https://claude.ai/code/session_01AkZbMUc4ej4ed7o5uh6nqr
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
Merge PR 2 (with main's #525 and #526) into the publish button