Skip to content

feat(action-center): land on the Action Center's Actions, its first tab - #1238

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/land-on-actions
Oct 20, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/land-on-actions

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

New Ansvisor: Action Center + Getting started, PR 6 of 7 (AC-ALT2 spec, §3: "First login lands on Action Center. Everything starts here").

⚠️ Merge after #1234 → #1235 → #1236 (Getting started). Otherwise new users land on an Actions page with nothing in it yet.

One home path, config/home.ts (DASHBOARD_HOME = /dashboard/action-center/actions):

  • /dashboard redirects there (was Visibility).
  • /dashboard/action-center redirects there (was KPIs). This includes the sidebar's Action Center item.
  • The end of onboarding (self-hosted) and the Stripe success route after payment land there (was Visibility).
  • A new brand from the brands page lands there.
  • The onboarding preview highlights Action Center (isDashboardHomeItem).

Tabs:

  • The Action Center's tabs read Actions · Signals · KPIs · History.
  • The list moved to lib/action-center/tabs.ts.

First tracking run's progress:

  • The Stripe success route still passes the first run's ?jobId=. Visibility used to read it from its own address to show the progress bar.
  • TrackingJobHandoff, mounted once in the dashboard layout, saves the id to the tracking-job store for the active brand and removes it from the address.
  • Visibility then restores the progress from the store, as it already does after a refresh. On Visibility itself the param is left to the page.

Unchanged:

  • Links that point at Visibility on purpose: signal details, topic pages, and "Analyze new prompts" on a brand's prompts page, which shows the run's progress.
  • The ready-made KPIs are still added on the first visit to the KPI tab.

Related issue

New Ansvisor (AC-ALT2). Depends on #1236 (and #1234, #1235) for what users land on.

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

  1. Open /dashboard. You land on Action Center › Actions.
  2. Click Action Center in the sidebar, or open /dashboard/action-center. You land on Actions; the tabs read Actions · Signals · KPIs · History.
  3. Run curl -I localhost:3000/api/stripe/success (no session). It answers 307 to /dashboard/action-center/actions. Locally it needs a STRIPE_SECRET_KEY; the CI placeholder works.
  4. Open /dashboard/action-center/actions?jobId=test. The param leaves the address and localStorage['aeo:tracking-job'] holds { jobId: 'test', brandId: <active brand> }. Remove it afterwards.
  5. On cloud, finish onboarding with a test card. You land on Actions; opening Visibility shows the first run's progress.

Tests (8):

  • home.test.ts: the home path, the preview item and the tab order.
  • tracking-job-handoff.test.tsx: saves and strips the id; waits for the brand; leaves Visibility alone; does nothing without an id.

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

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 (1783) and yarn build also pass.

🤖 Generated with Claude Code

New Ansvisor (AC-ALT2 spec, §3), PR 6 of 7: everything starts at the
Action Center. One home path (config/home.ts, DASHBOARD_HOME) for:

- /dashboard and /dashboard/action-center (was Visibility and KPIs);
- the end of onboarding and the Stripe success route after payment;
- a new brand from the brands page;
- the onboarding preview's highlighted sidebar item.

The Action Center's tabs read Actions · Signals · KPIs · History
(lib/action-center/tabs.ts).

The Stripe success route still passes the first tracking run's ?jobId=;
TrackingJobHandoff, in the dashboard layout, keeps it for Visibility's
progress bar (which used to read it from its own address) and takes it
out of the address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk New Ansvisor PR 6/7 — please merge it only after #1234 → #1235 → #1236, so new users land on Getting started rather than an empty Actions page. /dashboard, /dashboard/action-center, onboarding's end, the Stripe success route and a new brand now land on Action Center › Actions (one DASHBOARD_HOME), and the tabs read Actions · Signals · KPIs · History. The success route's ?jobId= is handed to the tracking-job store by a small layout component, so Visibility still shows the first run's progress.

@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.

Looks right: every tab route still exists, only the bare /dashboard/action-center and /dashboard now land on Actions, and the ?jobId= hand-off keeps the other params. I'll merge it after the Getting started PRs (#1234 → #1235 → #1236), since it makes that page the home page.

For a follow-up: after payment, a new brand or onboarding, people now land on Actions while the first run is still going, and nothing there shows it; the progress bar appears only on Visibility. A "First analysis running" note on Actions would cover it.

@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.

Approving now that the Getting started PRs are ready. This merges right after #1243, and #1248 goes on top of it.

@gkhngyk
gkhngyk merged commit 4da7826 into ansvisor:main Oct 20, 2026
6 checks passed
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 20, 2026
gkhngyk added a commit that referenced this pull request Oct 20, 2026
…alysis is running (#1248)

* feat(action-center): land on the Action Center's Actions, its first tab

New Ansvisor (AC-ALT2 spec, §3), PR 6 of 7: everything starts at the
Action Center. One home path (config/home.ts, DASHBOARD_HOME) for:

- /dashboard and /dashboard/action-center (was Visibility and KPIs);
- the end of onboarding and the Stripe success route after payment;
- a new brand from the brands page;
- the onboarding preview's highlighted sidebar item.

The Action Center's tabs read Actions · Signals · KPIs · History
(lib/action-center/tabs.ts).

The Stripe success route still passes the first tracking run's ?jobId=;
TrackingJobHandoff, in the dashboard layout, keeps it for Visibility's
progress bar (which used to read it from its own address) and takes it
out of the address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(action-center): say on the Action Center when a brand's first analysis is running

After the payment, a new brand or onboarding, people now land on the
Action Center's Actions (#1238) while the first tracking run is still
going, and only Visibility showed it. A note under the Action Center's
tabs now says the first analysis is running (or queued), with the
progress when this browser started it and a link to follow it on
Visibility.

It shows while the brand has no completed run and one is under way:
from the tracking_runs ledger, so any browser's run counts, or, while
the job still waits for the worker, from the job this browser saved.
It reads every 30 s and stops once the brand has a completed run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
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