Repository navigation
feat(admin): onboarding checklist and a status screen that reports only stored state - #165
Merged
Merged
Conversation
…ly stored state The Campaigns screen opens with a first-run checklist: connect and verify Mailchimp, choose a default audience, set up the Brand Kit, publish a template, and create a first campaign. Each step is derived from stored state on every read, so removing a prerequisite reopens it. Mailchimp steps are optional because HTML export needs no provider. GET /onboarding returns the checklist; POST /onboarding/dismiss hides it per user once the required steps are done and refuses with 409 before then. Status drops the placeholder integrations block (a fixed 1.0.0 version and class_exists() as "active") and the unrelated site counts. A new CampaignBridge Health section reports schema currency, connection and last verification, default audience, published templates, and campaign counts by state from a grouped repository count, with a warning that links to Campaigns when any campaign needs reconciliation. Mailchimp verification was never recorded: the Providers tab pinged Mailchimp and discarded the answer, so is_verified() was always false. The check now records a definite answer (success, or a refused credential) on the stored connection, only while the same key is still stored. A timeout or network failure leaves the previous state. Closes #154 Co-Authored-By: Claude Opus 5.5 <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.
Closes #154. Part of #65.
What changes
Onboarding checklist (Campaigns screen)
Onboarding_Checklistre-derives every step from stored state on each read. If a prerequisite is removed, its step reopens. That includes trashing the last published template or losing verification.GET /campaignbridge/v1/onboardingreturns the checklist.POST /onboarding/dismisshides it for the current user (stored in prefixed user meta throughOnboarding_Dismissal_Repository), and only once the required steps are done. Before that it returns409 campaignbridge_onboarding_incomplete. Both routes require campaign access.Status screen
1.0.0version, andclass_exists()reported as "active". Also removed the unrelated site counts (users, posts, pages).Campaign_Repository::state_counts()(GROUP BY state).Mailchimp verification is now recorded
with_verification(), sois_verified()was always false.Evidence (#154)
Browser E2E (
tests/e2e/onboarding.spec.ts): a brand-new administrator sees the open checklist, and its rendered state is checked step by step againstGET /onboarding. The spec runs axe on the checklist, creates a campaign from the checklist, sees "You're set up", dismisses it, and the checklist stays hidden after reload. When no other published template exists (CI), it also checks that the checklist comes back once the template is deleted.Integration (
Onboarding_Checklist_Test): each step follows its stored source:It also covers: the optional Mailchimp steps; the 409 on early dismissal; the checklist reappearing after a step is undone; per-user dismissal; 403 for users without access; capability-gated links; Status counts derived from stored campaigns; and an audit that Status has no fixed version or mock figure.
Integration (
Provider_Verification_Test): a 200 ping records verified (and keeps the audience); a 401 records unverified; a timeout keeps the previous state; a cached check makes no second request.Verification
pnpm qa:fast, plus the unit (1126), integration (428), security (117), accessibility (25), and performance suites: all pass.pnpm buildpasses.onboarding,campaigns, andaccessibility.Notes
.cb-status, not the screen'scampaignbridge-statusclasses; that predates this PR.🤖 Generated with Claude Code