Skip to content

refactor(analytics): declarative SEED_TRIGGERS map for dashboard auto-seeding#778

Draft
zuchka wants to merge 1 commit into
mainfrom
fix/optional-walkthrough-steps
Draft

refactor(analytics): declarative SEED_TRIGGERS map for dashboard auto-seeding#778
zuchka wants to merge 1 commit into
mainfrom
fix/optional-walkthrough-steps

Conversation

@zuchka
Copy link
Copy Markdown
Contributor

@zuchka zuchka commented May 20, 2026

Summary

  • Replaces the hardcoded GA4_CREDENTIAL_KEYS / GA_DASHBOARD_ID / SQL_DASHBOARD_KEY constants and if block in credentials.post.ts with a single SEED_TRIGGERS: Record<string, string> map
  • Behavior is identical — same idempotency check, same silent error handling, same GA4 seed trigger
  • Adding a new auto-seeded dashboard in the future is now one line in SEED_TRIGGERS instead of a copy-pasted 15-line block

Test plan

  • Save GA4_PROPERTY_ID credential → sql-dashboard-google-analytics is created in scoped settings (same as before)
  • Re-saving the same credential → no duplicate dashboard created (idempotent)
  • Saving any non-GA4 credential → no seeding attempted

🤖 Generated with Claude Code

…tive SEED_TRIGGERS map

Adding a new auto-seeded dashboard now requires one line in SEED_TRIGGERS
instead of copy-pasting a 15-line block. Behavior is identical — same
idempotency check, same silent error handling.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant