Repository navigation
feat(action-center): point to what's ready now while the first tracking run goes on - #1814
Conversation
…th Details The panel under the Action Center tabs took several lines while a new brand's first tracking ran: a title, the count, a link and a paragraph. People saw it on every section and asked for something simpler and smaller. - It is one line now, at most 36px: "First tracking running · 18 of 40 checks · ~6 min left · Details". Details unfolds what was there before (what the run means, or that it waits for a slot, and the way to Brand Visibility) and folds it again. Still gone once the brand has a completed run. - The run's reading moves to a hook (hooks/use-first-run.ts): one read loop per brand however many parts of the page show the run, so the Getting started steps can read the same in the next change. Same sources and 12 s pace as before; the time left is kept per brand. - The count still says checks, not answers: a check can end without an answer (ansvisor#1774). - Help (action-center-overview) and the Action Center guide describe the line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… first run goes on A new brand's first tracking takes 30 to 65 minutes. Clicking a step or a page that needs its data meanwhile showed an empty page or a 0, which reads as a product that doesn't work; asking people to wait loses them. - Getting started: while the first run goes on, the steps that need none of its data and aren't done (set-up steps: KPIs, competitors, topics, prompts, Search Console, Analytics, the snippet; and the high-value prompts once Search Console's suggestions are in) come first, marked "Ready now". The explore steps, whose pages show the first answers, say "Arriving now" and open their card, which says "Your first answers are arriving (18 of 40) · ~6 min. This fills in when tracking finishes." instead of opening an empty page. The act steps wait for the suggestions after the run, as before. Back to the usual order once it's done (steps.ts: needsFirstAnswers, needsTrackingData, firstRunOrder). - The same message (FirstRunEmptyState, from useFirstRun) replaces Brand Visibility's empty state and "No results for the period" during the first run, and sits above the Tracked Prompts table. - When the first run finishes: "Your first results are ready" as a toast, on whatever page (FirstRunReady in the dashboard layout reads the run there while this browser holds its job; the Action Center, Brand Visibility and Prompts read it anyway). The Actions page reads its list and steps again then, and once more 90 s later for the first signal pass's actions. - Help: getting-started-steps and first-results-after-setup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…riving now" in Tracked Prompts
From the first look at the Ready now change:
- Brand Visibility said it twice during the first run: its own "First
tracking in progress" band, and the new arriving card under it. The
band stays alone: no empty state under it while the first run goes on
("Or test a single prompt" stays). Tracked Prompts keeps the card, as
it has no band.
- Getting started's explore steps said "First answers · ~3h"; a first
run usually takes 30 to 65 minutes, so ~1h.
- Tracked Prompts' rows said "Within 24h" under the card's "~6 min".
While the brand's first run goes on, a new prompt's row (and a
location column) says "Arriving now", with why on hover; without a
first run, "Within 24h" as before.
- Help: getting-started-steps, first-results-after-setup,
tracked-prompts and prompt-locations; the guides too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
…on, and not in a hidden tab The first run's read loop now runs on Brand Visibility, Prompts and the Action Center, which stay open for long. After five reads in a row with no run going, read every minute instead of every 12 seconds; a run showing up brings back the usual pace. A hidden tab reads nothing and reads at once when it is shown again.
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good with c946780 (one commit on this branch, in web/src/hooks/use-first-run.ts). useFirstRun read every 12 s for as long as a page was open, even with nothing going on: a brand never tracked, or a run that failed before its ledger row. It also kept reading in hidden tabs. This PR puts the hook on Brand Visibility, Prompts and Actions, so that adds up.
- After 5 reads in a row with no run, it reads every 60 s, and it goes back to 12 s when a run shows up.
- A hidden tab reads nothing, and it reads at once when the tab is shown again.
- A page closed while its tab was hidden doesn't start reading again.
use-first-run.test.tsx has 4 tests, 3 of which fail without the commit.
Checked, fine: the Ready now / Arriving now order, the step card, the done toast (only for a run the page saw going, never another brand's), the 90 s reload of Actions, and Insights and Prompts during the first run. No new links, and the step buttons keep their role and plan gates. The hook only reads, and the demo brand has completed runs, so none of this shows there. plan-row.test.ts passes.
Non-blocking: the AI Traffic step reads "fills in when tracking finishes", but that page fills from the snippet's visits, not from tracking.
Merge: merge #1811 first. There are keep-both conflicts with #1808 (prompts/page.test.tsx) and with the Chat PRs #1841–#1844 (layout.tsx and its test, plus the imports of insights/page.tsx and prompts/page.tsx in #1843/#1844). No migrations. 130 web test files and 1,294 tests pass, and tsc, eslint and prettier are clean.
gkhngyk
left a comment
There was a problem hiding this comment.
Merging in order with the other approved PRs. This head merges current main; its tree is what main will be after this squash, checked with the full server and web suites, tsc, lint, format and next build.
Summary
From onboarding testing: while the first tracking run goes on (30–65 minutes), clicking around showed empty pages and zeros, which reads as broken. The product owner chose not to block anything. Instead, the first run points to what can be done now and says plainly that the data is on its way. The product owner saw this in a local preview and approved it with three fixes, which are included.
Stacked on #1811 (the one-line first-run strip and the
use-first-runhook). The diff against main includes #1811 until it merges.Getting started (Action Center › Actions) during the first run
Data pages
When the first run finishes
Help and docs:
getting-started-steps,first-results-after-setup,tracked-prompts,prompt-locationsdocs/guides/action-center.mdx,docs/guides/prompts.mdxRelated issue
None. Product owner's onboarding feedback.
Type of change
feat— New featureHow to test
tracking_runsrow from the last 2 hours with nocompleted_at, andgetting_started.confirmed_atset.Checklist
yarn typecheckpass (build left to CI)Screenshots, light and dark: shared with the product owner in the local preview and approved.
🤖 Generated with Claude Code