Repository navigation
feat(action-center): list Getting started's steps in the Actions page - #1235
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]>
|
@gkhngyk New Ansvisor PR 3/7, stacked on #1234 (merge after it). The Actions page lists the 17 steps while a brand runs Getting started: the first card becomes Getting started x/17, a "Getting started 17" chip opens first, and the steps table uses the live status colours. A brand without Getting started (or that skipped it) sees today's page exactly — covered in page.test.tsx. The right-side step card comes next. |
gkhngyk
left a comment
There was a problem hiding this comment.
One change:
Action deep links open on top of the steps table (actions/page.tsx, categoryChosen). Getting started opens whenever the URL has no category. But about 15 places link to /dashboard/action-center/actions?action=<id>:
- Create action on Insights, Mentions and Traffic;
- signal detail;
- content opportunity and basket;
- the history drawer;
- the task-send and export links.
On a new brand, which is exactly the one running Getting started, the drawer opens over the steps, and closing it leaves the user on the steps instead of the actions. Treat ?action= and the filter params (priority, status, assignee, q, sort) as a choice already made, e.g. categoryChosen.current = readUrlParam('category') !== '' || readUrlParam('action') !== ''.
A product question too: Getting started never ends on its own. active doesn't look at the ready step. So a brand at 17/17, or one stuck at 14/17 waiting on the snippet, opens on the steps every visit, and with #1238 that is the home page. Picking All doesn't stick either, since the default stays out of the URL. My suggestion is to stop opening the steps by default once ready is done. I'll confirm and come back to you.
Nit: focus and visibilitychange both fire on return to the tab, so the facts read runs twice. A short debounce fixes it.
…rted-data # Conflicts: # supabase/schema.sql
…to feature/getting-started-list
…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]>
|
@gkhngyk Done in
|
Takes main after ansvisor#1234's squash; 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 are fixed. A link to an action or to a filtered list now opens the actions, and coming back to the tab reads the steps once.
The product question is still open on our side: Getting started doesn't stop opening by default once ready is done. That can be a follow-up and doesn't hold this PR.
Takes main after the ansvisor#1234 and ansvisor#1235 squashes; only this PR's own changes are applied on top. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
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
Summary
New Ansvisor: Action Center + Getting started, PR 3 of 7 (AC-ALT2 spec, §4). Stacked on #1234 (merge after it); this PR's own change is the second commit (
069871b8).The Actions page lists Getting started's steps while a brand runs it:
Guardrail (spec §2):
The right-side card for each step ("Why it's important", "How to do this", "Done when", Skip) is the next PR; until then a step opens its page directly.
Related issue
New Ansvisor (AC-ALT2). Depends on #1234.
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
With
00196applied (#1234):getting_startedrow for one) and open/dashboard/action-center/actions.dismissed_aton the row, or use a brand without one. The page is today's: Highest Priority card, no chip.Checked in light and dark, at 1440 and 1024px.
page.test.tsxcovers:Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)yarn test(1803) andyarn buildalso pass.🤖 Generated with Claude Code