Repository navigation
fix(traffic): keep the export going without the untracked queries, and match the AI bots sheets to the report - #1244
Conversation
…d match the AI bots sheets to the report Follow-ups from gkhngyk's AI Traffic reviews: - ansvisor#1178: the export read the untracked Google queries without a .catch, so an API 5xx failed the whole file. It now leaves that sheet with its note and exports the rest, as the AI bot report already does. - ansvisor#1182: the AI bots sheet had one row per bot while the By bot type card has one row per type; it now has one per type, with its bots. The cited pages no search bot read in 30 days get their own sheet, as the report lists them (the most cited, then how many more), with a note while the bot data is under 30 days or not whole. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk Two of your export notes from the AI Traffic reviews: the export now survives an untracked-queries failure (#1178), and the AI bots sheet has one row per type like the By bot type card, plus a new "Cited pages no search bot read" sheet (#1182). The full uncrawled list needs ai_bot_report's limit 10 changed, which #1225 also redefines, so it waits for #1225. The "one untracked fetch per page" note is handled in #1216's review fixes. |
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks. The export now matches the report: the AI bots sheet reads like the By bot type card, and the cited pages no search bot read get a sheet of their own.
-
A failed read now says something untrue. When the untracked-queries read fails:
googleQueriesgets null;- the sheet then says "No query data from Google Search Console yet", even though the brand has Search Console connected.
The AI-bot sheets already do the same when
getTrafficBotsfails ("No AI-bot requests in this range"), and with this PR so does the new uncrawled sheet. Please keep a failed section apart from an empty one. For example, catch to afailedmarker and write a note like "Couldn't read this section; export again to include it". Then assert the note text in the route test, not just "Note".
Smaller:
- With
alertState: 'stale'the new sheet says "Listed once the AI bots have sent 30 days of whole data". The data is paused there, not short, so the report'salertStalewording fits better.
…it's empty When the untracked-queries read or the AI bot report failed, the export left it out so the rest still exported, but its sheets then said "No query data from Google Search Console yet" or "No AI-bot requests in this range", which wasn't true. The route now notes those sections as unread, and their sheets say "Couldn't read this section; export again to include it". The uncrawled-pages sheet also tells a paused alert (stale) from one still waiting for 30 days of data, as the report does. Review on ansvisor#1244. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk thanks, fixed in the latest commit:
Web format, lint, typecheck, 1795 tests and build pass. |
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks, both points are fixed. A failed read now says "Couldn't read this section; export again to include it" on its sheets, for the untracked queries and for all three AI bot sheets. A paused alert reads as paused, not as waiting. Tested with #1247 on main: web 1,893 and server 1,919 tests pass, and tsc, lint and Prettier are clean.
Summary
Two follow-ups from the AI Traffic reviews, both about the page's export.
#1178: keep the export going without the untracked queries.
getUntrackedGoogleQuerieswithout a.catch, so an API 5xx failed the whole file..catch(() => null), asgetTrafficBotsandgetTrafficSourceshave. The Untracked Google queries sheet then says why it's empty, and every other sheet still exports.#1182: match the AI bots sheets to the report.
Left out:
ai_bot_reportreturns only the top 10 (limit 10in 00185), and fix(traffic): hold the uncrawled-pages alert until bot data covers its 30 days #1225's 00190 redefines that function. Exporting every page means changing that limit, so it waits for fix(traffic): hold the uncrawled-pages alert until bot data covers its 30 days #1225./untracked-queriesfetch per page load" (feat(traffic): list the Google queries no prompt tracks, with Track and Track all #1178). That part is in the code perf(traffic): read the AI Traffic page's data side by side, behind one spinner #1216 rewrites, so it's done in perf(traffic): read the AI Traffic page's data side by side, behind one spinner #1216's review fixes (shared count reads).Related issue
Follow-ups from the reviews on #1178 and #1182.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Locally, a CSV of
section=botsreadTraining,"ClaudeBot, GPTBot",52,2,…from four test rows.section=uncrawledPagesgave the "30 days of whole data" note.Tests:
traffic-export.test.ts: the per-type sheet, the uncrawled list with "N more", and the notes.route.test.ts: the new sheet in the workbook and the zip; the export survives an untracked-queries failure.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)yarn test(1785 before merging main) andyarn buildalso pass.🤖 Generated with Claude Code