Skip to content

Move the two GSC dashboard cards onto the state boundary - #24

Merged
ThinkingSpade merged 1 commit into
mainfrom
feat/phase2-lane2-dashboard-cards
Jul 30, 2026
Merged

Move the two GSC dashboard cards onto the state boundary#24
ThinkingSpade merged 1 commit into
mainfrom
feat/phase2-lane2-dashboard-cards

Conversation

@ThinkingSpade

Copy link
Copy Markdown
Owner

Lane 2 of the state-boundary migration. Both cards read the same free Search
Console report, and both got their states subtly wrong in the same way Lane 1 did.

Project Keywords could report an absence it had not established

The zero case printed "No search queries yet in this period" whenever
summary.ranking === 0 — a count taken from one capped pull.

The card knew about the cap (it branched on truncated for its copy), but the
branch was a hand-rolled boolean sitting beside the sentence rather than evidence
feeding the decision. It now passes sampling into resolveQueryState, so a
truncated zero can only render "nothing in the rows we read" — never a
property-wide absence.

The bespoke "Counted across the N queries…" paragraph goes with it: the
boundary's CappedPullNotice says the same thing, and two copies of one caveat
is exactly the drift the shared layer exists to remove.

The two inner lists keep their own copy, deliberately — they're subsets that
can be empty while the summary above has rows, so the card-level sentence would
be the wrong claim for them.

Search Performance had no empty state, and shouldn't have one

Zero clicks on a connected property is a valid report, not an absence. So
rowCount is the presence of the report object, never the size of its numbers
— four zeroes are the honest answer.

Both

Each card keeps its DashboardCard frame in every state, so the dashboard grid
no longer changes shape between loading, error and ready.

Project Keywords still renders nothing when disconnected: the Search
Performance card directly above owns that state, and two connect prompts stacked
on one dashboard read as two separate problems.

Verification

Browser-checked on the not-connected path — Search Performance renders its
connect prompt, Project Keywords renders nothing, no error boundary. A fresh dev
server plus a fresh tab shows zero console errors (the first check showed
stale HMR errors from editing while the server was live; that trap has already
produced one false diagnosis in this project).

pnpm ci:check clean, 2,122 tests passing.

Not verified: the ready and truncated-empty paths need a connected GSC property,
which this machine doesn't have — the same gap noted for Lane 1.

🤖 Generated with Claude Code

Lane 2 of the migration. Both cards read the same free Search Console
report, and both got their states subtly wrong in the same way Lane 1 did.

**Project Keywords could report an absence it had not established.** The
zero case printed "No search queries yet in this period" whenever
`summary.ranking === 0` — a count taken from ONE capped pull. The card knew
about the cap (it branched on `truncated` for its copy) but the branch was
a hand-rolled boolean beside the sentence rather than evidence feeding the
decision. It now passes `sampling` to `resolveQueryState`, so a truncated
zero can only render "nothing in the rows we read", never a property-wide
absence.

The bespoke "Counted across the N queries..." paragraph is gone with it:
the boundary's CappedPullNotice says the same thing, and two copies of one
caveat is the drift the shared layer exists to remove. The two inner lists
keep their own copy, deliberately — they are subsets that can be empty
while the summary above has rows, so the card-level sentence would be
wrong for them.

**Search Performance had no empty state and should not have one.** Zero
clicks on a connected property is a valid report, not an absence, so
`rowCount` is the presence of the report object rather than the size of its
numbers. Its four zeroes are the honest answer.

Both cards keep their `DashboardCard` frame in every state, so the
dashboard grid no longer changes shape between loading, error and ready.
Project Keywords still renders nothing at all when disconnected — the
Search Performance card directly above owns that state, and two connect
prompts stacked on one dashboard read as two separate problems.

Verified in the browser on the not-connected path: Search Performance
renders its connect prompt, Project Keywords renders nothing, no error
boundary, and a fresh dev server plus a fresh tab shows zero console
errors. The ready and truncated-empty paths still need a connected GSC
property, which this machine does not have.

ci:check clean, 2,122 tests passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
flyrocketseo c741ffb Jul 30 2026, 10:44 PM

@ThinkingSpade
ThinkingSpade merged commit da41a2f into main Jul 30, 2026
3 checks passed
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.

1 participant