Skip to content

feat(action-center): open a card on the right for each Getting started step - #1236

Merged
gkhngyk merged 12 commits into
ansvisor:mainfrom
cihan-gyk:feature/getting-started-card
Oct 20, 2026
Merged

gkhngyk merged 12 commits into
ansvisor:mainfrom
cihan-gyk:feature/getting-started-card

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

New Ansvisor: Action Center + Getting started, PR 4 of 7 (AC-ALT2 spec, §6). Stacked on #1235 → #1234; merge after them. This PR's own change is the last commit (29e14ba1).

A Getting started step now opens a card on the right instead of jumping straight to its page. The card shows:

  • Header: status and stage chips, plus "Optional · recommended" for Search Console and Analytics.
  • Title and summary.
  • Who and when: "Everyone in the workspace" and when the step is ready.
  • Why it's important: 1–3 reasons.
  • How to do this: a 16:9 place that says "Videos coming soon" (no videos in the first release, product decision), then 1–3 numbered steps.
  • Done when: the condition, with progress (e.g. 3 topics · 2/3).
  • Footer:
    • The main button opens the step's page in a new tab; a note says the step updates on return.
    • Optional steps get Skip, with a last-chance dialog ("Skip anyway" / "Connect now"). A skipped step can still be connected.
    • A done step reads "Done · checked automatically".
    • The last step leads back to the actions.

The card is not modal:

  • The list stays usable and makes room for it from 1300px (spec: "no row sits under the card").
  • Below 1300px it covers the list, as in the mockup.
  • Escape or X closes it.

Also:

  • Prompt Suggestions gets a "From your data" source filter: suggestions built from Search Console or Analytics data, via the new fromYourData() in lib/prompt-suggestion-source.ts.
  • The filter can be opened with ?source=data. The "Track high-value prompt suggestions" step links there.

Unchanged: standard (signal) actions keep today's drawer. Their redesign waits on the spec's open question (Alternative 1).

Related issue

New Ansvisor (AC-ALT2). Depends on #1234 and #1235.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

With 00196 applied (#1234), on a brand running Getting started:

  1. Open a card. Click "Add at least 3 topics". The card opens with why/how/"Videos coming soon"/done-when 2/3, and the list shifts left on a wide screen.
  2. Open the page. Click "Open topic suggestions". Topics opens in a new tab and the card says to finish there. Come back after adding topics; the step updates.
  3. Skip an optional step. On "Connect Google Analytics", click Skip. The last-chance dialog shows. Click "Skip anyway": the step turns Skipped (amber) with a note, and only Connect stays.
  4. Close. Escape or X closes the card.
  5. From your data. Open /dashboard/prompts/suggestions?source=data. The filter reads "From your data" and lists only Search Console / Analytics suggestions.

Checked in light and dark, at 1440 and 1024px. Tests:

  • step-card.test.tsx (8): open, done/waiting footers, skip only after the dialog, no Skip on required or skipped steps, the last step, Escape, no message lookups a step doesn't have.
  • page.test.tsx: a row opens its card; a waiting row says when it opens.
  • prompt-suggestion-source.test.ts: fromYourData.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

yarn test (1814) and yarn build also pass.

🤖 Generated with Claude Code

cihan-gyk and others added 3 commits October 20, 2026 03:48
… 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]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk New Ansvisor PR 4/7, stacked on #1235 → #1234 (merge after them). Each Getting started step opens a non-modal card on the right (why / how with a "Videos coming soon" slot / done when, Skip with a last-chance dialog for Search Console and Analytics); the list makes room from 1300px. It also adds a "From your data" filter to Prompt Suggestions (?source=data) for the high-value prompts step. Standard actions keep today's drawer until the spec's Alternative 1 question is settled.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The card works, and every step's link exists on main. One change, which follows from my #1234 note: hide Skip when !canManage (step-card.tsx).

Nits:

  • panel.nextStep in en.json is unused.
  • The steps table shows the stage twice, as a badge under the title and in its own column.
  • The card's window-level Escape handler also fires while the "Skip getting started" dialog is open, so one press closes both.

cihan-gyk and others added 8 commits October 20, 2026 10:26
…rted-data

# Conflicts:
#	supabase/schema.sql
…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]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Done in 41c6c818, with #1235's fix merged in (e985332c):

@github-actions github-actions Bot removed the needs-migration Adds or edits a migration — apply it to the hosted database label Oct 20, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, all fixed:

  • Skip shows only to admins and managers.
  • Escape leaves an open dialog alone.
  • The steps table shows the stage once.
  • panel.nextStep is gone.

@gkhngyk
gkhngyk merged commit 7a53744 into ansvisor:main Oct 20, 2026
5 checks passed
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 20, 2026
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
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.

2 participants