Repository navigation
feat(action-center): show the first tracking run as one thin line, with Details - #1811
Merged
Merged
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]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
6 tasks done
gkhngyk
approved these changes
Oct 30, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, approve. The line is smaller and does the same job. Moving the reads into useFirstRun keeps the old behaviour and adds one read loop per brand.
Checked, fine
- Progress states, same as main. Queued (saved job
waiting/delayed, no ledger row yet) reads "First tracking queued". Running (ledger row, or saved jobactive) reads "First tracking running", with checks and time left only when this browser saved the job. Done (any completed run) shows nothing and stops reading. A failed job without a ledger row hides the line. A run row with no stamp counts as running for up to 2 hours (getTrackingWindow's ceiling). A failed read keeps the last state until the next one. All of this matches main'sFirstRunNote. - The shared hook.
useSyncExternalStorewith oneWatchper brand: the first subscriber starts the loop, and the last unsubscribe stops the timer and drops the entry. A read still in flight returns on!watch.live, so a brand switch or a StrictMode remount never writes into a dead watch.run.brandId === brandIdkeeps another brand's run off this one. The new "reads once for every line" test covers the shared loop. - Polling cost. Unchanged per page: one
getTrackingWindow(3 smalltracking_runsreads) plus, when this browser saved the job, onegetJobStatusevery 12 s. With the shared loop, more readers no longer mean more reads. - Demo brand / read-only. Reads only, no writes, so the read-only gate doesn't apply. The demo brand has completed
tracking_runsrows, so the line never shows there. - Details toggle. It's a real
<button type="button">witharia-expandedandaria-controls. The chevron isaria-hidden. The default focus outline stays. The link moves into the unfolded part. - Build. The changes are client-only. The hook imports the same modules the component did (
'use server'actions,tracking-job-store,tracking-eta).plan-row.test.tspasses.
Non-blocking
- Narrow screens. The line is
h-9+truncate, so on a phone "· 18 of 40 checks · ~6 min left" is cut, and Details doesn't repeat it. Letting it wrap belowsm(min-h-9, notruncate) or repeating the count in Details would fix that. - Live region.
role="status"wraps the whole line, so screen readers hear the count every 12 s, and they hear the Details text when it unfolds. Puttingrole="status"on the text<p>only would quiet the Details part. The count updates come from main. - Reads with nothing going on. Main does this too: a brand with no completed run and nothing running (never tracked, or a run that failed before the ledger row) keeps reading every 12 s while the page is open, even in a hidden tab. Now that the hook is meant to be shared (#1814 uses it on more pages), it's worth pausing while
document.hiddenand backing off after a few empty reads. - Copy.
queuedBodystill says "Another analysis is running right now". "Another tracking run…" would match the rename. The help article says the line shows the checks and time left, but they only show in the browser that started the run (as the PR description says). "when available" would cover it. - The test finds the line through
.h-9. Adata-testidor role query would survive a style change.
Merge
- Based on current main and merges clean. No migrations.
- #1814 is stacked on this PR (its branch contains 8e5e6d6), so no conflict. Merge this one first.
- Clean with #1810 and #1799. They touch no shared files.
Tests
src/components/action-centerandsrc/lib/guards/plan-row.test.ts: 19 files, 156 tests pass.tscis clean. eslint and prettier are clean on the changed files.
gkhngyk
approved these changes
Oct 30, 2026
gkhngyk
left a comment
Contributor
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
From onboarding testing: the first-run panel at the top of the Action Center took several lines while the first tracking run was going. The product owner asked for something simpler and smaller, and approved this design in a local preview.
What changes
first-run-note.tsxis one 36px line under the Action Center tabs (Actions, Signals, KPIs, History, Needs review): ⟳ First tracking running · 18 of 40 checks · ~6 min left · Details ▾hooks/use-first-run.ts: reading the first run (thetracking_runsledger, or the job this browser saved, with its progress and pace for the time left) moves out of the component. Other parts of the page can now share it; the follow-up PR uses it.en.json: "First analysis" → "First tracking", "~N min left", anddetails.help/action-center/action-center-overview.mdanddocs/guides/action-center.mdx.Brand Visibility's own progress band (with Stop) is unchanged.
Related 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.yarn vitest run src/components/action-center/first-run-note.test.tsx(13 tests).Screenshots, light and dark, Details closed and open: shared with the product owner in the local preview and approved.
Checklist
yarn typecheckran out of memory locally (8 GB machine), and a typecheck of the changed files and their imports passed. CI runs the full typecheck and build.🤖 Generated with Claude Code