feat: expand event types for reuse (waitlist, addon_cancel, consoleErrors)#6
Merged
Merged
Conversation
…rors) Three additive, backward-compatible expansions of existing event types — no new types or categories, everything reusable across products: - signup.kind: 'signup' | 'waitlist' — waitlist joins render with a 📝 + "Waitlist signup" title (a waitlist is just a signup, not a new type) - subscription.kind: + 'addon_cancel' — pairs with the existing 'addon' so add-on activation vs cancellation are distinct (➖) - feedback.consoleErrors: string[] — captured client console errors render as a "Console errors" sub-section and are included in auto-filed GitHub issues Wired end-to-end: client types → zod schema → renderer → issue builder, with unit tests for each. "Free signup" intentionally needs no new kind — it's a signup routed to the revenue channel via the existing category override. Console previews: samples refactored from a type-keyed record to a SampleEntry list so variant kinds are first-class. Added waitlist + addon-cancel sample cards, enriched the feedback sample with consoleErrors, and made the fire-all button count dynamic. Docs: documented the new fields in both READMEs and corrected the stale client README notes — the digest cron and idempotency dedup are live, not pending. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…plumbing Review feedback: the previews refactor loosened the send-action + button props from EventType to `string`. Restore type safety by making SAMPLE_ENTRIES the source of truth (`as const satisfies readonly SampleEntry[]`) and deriving `SampleId = Sample['id']` — the same as-const→derived-union pattern the package already uses for LOOP_CATEGORIES et al. sendPreview, SendLiveButton, FireAllResult, sampleById, and PreviewCard now use the precise SampleId/Sample types. This is stricter than the pre-refactor code, which typed these as EventType and couldn't express the variant ids (signup-waitlist, subscription-addon-cancel) at all. The published package contract was never loosened — this only ever affected the internal operator-console plumbing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Poyse is migrating off direct Slack onto Loop. While scoping it, three Poyse notification cases had no representation in Loop. Rather than add narrow one-off types, these are additive expansions of existing types — nothing here is Poyse-specific; any product reuses them.
No new event types, no new categories, no new base-envelope fields.
Changes
signup.kind: 'signup' | 'waitlist'subscription.kind: + 'addon_cancel''addon'so activate vs cancel are distinct (➖)feedback.consoleErrors: string[]Wired end-to-end: client types → zod schema → renderer → GitHub issue builder, each with unit tests.
Deliberately not added
signuprouted to the revenue channel via the existingcategoryoverride (loop.signup(..., { category: 'revenue' })). No new kind earns its place.cron(summary/bullets/table) orgeneric(fields/subSections/table).Console previews (operator app)
Record→ aSampleEntrylist so variant kinds are first-class.consoleErrors, and made the "Fire all" button count dynamic.tests/samples.test.tsguards that every preview sample parses + renders (the previews page only surfaced bad samples at runtime before).Docs
0 */6 * * *) and idempotency dedup are live, not "pending".Verification
tsc --noEmitclean · eslint cleanClient package bumped
0.5.0 → 0.6.0(additive, backward-compatible).🤖 Generated with Claude Code