Repository navigation
feat(action-center): start and skip Getting started, and ask before running it for another brand - #1243
Conversation
… steps from the brand's data New Ansvisor (AC-ALT2 spec, §4), PR 2 of 7: the data behind Getting started, the 17 setup steps that will sit in the Actions page. - Migration 00196: getting_started (one row per brand that runs it; a trigger starts it for every new brand, existing brands have none) and getting_started_steps (what a person did that the data can't show: a page opened, an optional step skipped, KPIs saved), member RLS. - getting_started_facts reads everything the steps need in one call; getting_started_page_opened records an explore page once the brand's first answers are in. - lib/getting-started/steps.ts turns the facts into the 17 steps (New, Done, Waiting for data, Skipped, with progress); unlocks follow the data, not days. - Saving from the KPI screen marks the KPI step (the ready-made set appears on a visit, so it doesn't count). - The dashboard layout records the explore pages however they're opened. Nothing is shown yet; the Actions page list follows in the next PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
New Ansvisor (AC-ALT2 spec, §4), PR 3 of 7, on top of the Getting started data. While a brand runs Getting started: - the first summary card shows "x / 17 · steps done · at your own pace" with a bar, in Highest Priority's place; before the first actions, Top Actions, At Risk and Opportunities show "—" and "Start with your first signals"; - a "Getting started 17" chip opens first (unless the URL names a category) and lists the steps: Action · Stage · Status · Assignee · Ready · Updated, with the live status colours (New, Done, Skipped) and progress under the status; - a step opens its page in a new tab; one still waiting for data says when it opens; the steps are read again when the tab is back in front. A brand that doesn't run it, or skipped it, sees the page exactly as before. The right-side card for each step follows in the next PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d step
New Ansvisor (AC-ALT2 spec, §6), PR 4 of 7, on top of the Getting started
list. A step opens a card beside the list instead of its page:
- status and stage chips, "Optional · recommended" where it applies,
title and summary, "Everyone in the workspace" and when it's ready;
- Why it's important (1–3 reasons) and How to do this: a 16:9 place
saying "Videos coming soon" until the videos are recorded, then the
numbered steps;
- Done when, with progress (e.g. 2/3);
- the button opens the step's page in a new tab; Search Console and
Analytics can be skipped after a last-chance question ("Skip anyway"
/ "Connect now"); a skipped step says it can still be connected.
The card isn't modal: the list stays usable and makes room for it from
1300px; Escape or X closes it. The high-value prompts step opens Prompt
Suggestions on a new "From your data" filter (?source=data: Search
Console or Analytics suggestions, fromYourData()).
Standard actions keep today's drawer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…unning it for another brand
New Ansvisor (AC-ALT2 spec, §5), PR 7 of 7, on top of the step card.
- Existing customers: "Start getting started" at the top right of
Actions ("Only you see this · about 15 min") when the brand's setup is
incomplete (fewer than 3 competitors or topics, no Search Console, or
no content in 30 days), and after a skip. It runs with the steps
already done checked ("Getting started · 4 steps already done").
- "Skip getting started" asks once ("Your actions list goes back to
normal. Steps you finished stay done."); the page is then today's.
- A brand added to an organization that already has one asks "Run
Getting started for [brand]?" (Run / Skip); the first brand, from
onboarding, runs it at once.
- Admins and managers start and skip it.
Migration 00197: getting_started.confirmed_at (null while a later brand
asks; the trigger fills it for an organization's first brand), insert and
update policies for admins and managers, and getting_started_facts adds
confirmed_at and content_recent for the rule.
The page's title moved into ActionsHeader so Start/Skip sit beside it in
every state of the page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk New Ansvisor PR 7/7 (last), stacked on #1236 → #1235 → #1234. Existing customers get "Start getting started" when the setup is incomplete (spec's suggested rule: <3 competitors, <3 topics, no Search Console or no content in 30 days), "Skip getting started" asks once, and a brand added beside others asks "Run Getting started for [brand]?". Migration 00197 (confirmed_at, admin/manager write policies, facts fields) is applied on the dev DB; deploy 00196 → 00197 → web. One decision to confirm: Skip is offered to new users too (the mockup shows it only for existing customers). |
gkhngyk
left a comment
There was a problem hiding this comment.
00197 keeps the function signatures, and starting or skipping is admin and manager only. I'll apply 00196 and 00197 on prod before the merge.
That order matters, because the web deploys on merge. Without 00197:
confirmedAtreads as null, so every running brand asks "Run Getting started for X?".- The modal has no close and no
onOpenChange. - Run fails on the missing
confirmed_atcolumn, and Skip fails because 00196 has no UPDATE policy ongetting_started. - So managers can't close the modal, and with #1238 that is the home page.
Two changes so a failure can't trap anyone:
- Let the second-brand question close. At least for the session, and also when start or skip fails.
- In
switchGettingStarted, ifstartsucceeds but the re-read fails, the oldaskingstatus stays and the modal opens again.
- In
- Read
confirmed_atdefensively:'confirmed_at' in r ? str(r.confirmed_at) : str(r.started_at).
Nit: "Only you see this" isn't accurate, since every admin and manager sees Start.
…rted-data # Conflicts: # supabase/schema.sql
…to feature/getting-started-list
…to feature/getting-started-card
…to feature/getting-started-existing
…ting started step gkhngyk's review: the step policies let any member write any state, so an analyst could skip Search Console and Analytics, or mark a step done through PostgREST. Recording an opened page stays open to every member; skipped and done now need an admin or a manager, as the other Getting started and KPI writes do (insert check, and the update's with check). updated_by is dropped: nothing set it after the first write, so it only ever named whoever opened the page first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…steps once on return gkhngyk's review: - About 15 places link to /dashboard/action-center/actions?action=<id> (Create action, a signal, content, the history drawer, the task-send and export links). On a brand running Getting started, the drawer opened over the steps. A link to an action or to a filtered list (priority, status, assignee, q, sort) now counts as a chosen view, as a category does. - focus and visibilitychange both fire when the tab is back in front: the steps are read once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ted-card # Conflicts: # web/src/app/[locale]/(dashboard)/dashboard/action-center/actions/page.test.tsx # web/src/app/[locale]/(dashboard)/dashboard/action-center/actions/page.tsx
…and leave Escape to an open dialog gkhngyk's review: - Skip on the step card shows only for admins and managers, who are the only ones the step policies let skip (00196). - The card's Escape handler no longer closes it while a dialog is open over the page (its Skip question, or "Skip getting started"), so one press closes only that dialog. - The steps table showed each step's stage twice: the badge under the title goes, the Stage column stays. - panel.nextStep, unused, is gone from en.json. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d read confirmed_at defensively gkhngyk's review: the web deploys on merge, and without 00197 every running brand would ask "Run Getting started for X?" in a modal with no close, whose Run and Skip both fail. - The question closes like any dialog, and stays closed for the visit once answered or closed, even when the answer can't be saved or the steps can't be read back. - Without a confirmed_at in the facts (00197 not applied), a running brand reads as confirmed. - The Start hint says who sees it: "For admins and managers". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closing the question left neither the question nor Start: the brand could no longer run Getting started from the page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk Done in
|
Takes main after the ansvisor#1234, ansvisor#1235 and ansvisor#1236 squashes; only this PR's own changes are applied on top, and schema.sql is rebuilt with build-schema.sh. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks, both changes are in:
- The second-brand question closes like any dialog, and stays closed for the visit even when the answer can't be saved or read back. Start takes its place.
confirmed_atis read defensively.
The Start hint now says who sees it. 00197 is unchanged since my last review, and 00196 and 00197 are both applied to production.
Still open on our side, as a follow-up: Getting started keeps opening by default after ready is done.
Summary
New Ansvisor: Action Center + Getting started, PR 7 of 7 (AC-ALT2 spec, §5). Stacked on #1236 → #1235 → #1234; merge after them. This PR's own change is the last commit (
c2730156).Existing customers
A second brand
Only admins and managers see and use these, as they can set the steps up. Everyone else sees the list as before.
Migration
00197_getting_started_start_skip.sql(applied on the dev DB)getting_started.confirmed_at. The brands trigger leaves it null for a later brand, which then asks first. Rows from 00196 are filled in.getting_startedfor admins and managers, as forkpi_definitions.getting_started_factsaddsconfirmed_atandcontent_recent: content sent to the CMS or completed in 30 days, for the rule.Web
buildGettingStartedreturnsasking,needsSetupandskipped.activenow also needsconfirmed_at.startGettingStarted(upsert, clears a skip) andskipGettingStarted.ActionsHeader, so Start/Skip sit beside it in every state: loading, empty or listed.Decision to confirm
Related issue
New Ansvisor (AC-ALT2). Depends on #1234–#1236.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Deploy order: apply
00196, then00197, then deploy the web.Verified on the dev DB in a rolled-back transaction:
confirmed_atnull; a new organization's first brand is confirmed.Unit tests:
steps.test.ts: asking, the existing-customer rule.page.test.tsx: Start for managers only and only when the setup is incomplete; Skip after the question; the second-brand question runs it.Checked in light and dark, at 1440 and 1024px.
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)yarn test(1820) andyarn buildpass, andschema.sqlis rebuilt withbash supabase/build-schema.sh.🤖 Generated with Claude Code