Repository navigation
feat(audit): list audited pages one row per URL with their history - #1133
Merged
Merged
Conversation
Site Audit's Recent Audits listed every run, so a page audited several
times appeared as several rows (F6), with dates in the browser's locale
("16.10.2026", "14 Eki") in an English UI (F9). This is SA-002 of the
Site Audit v2 spec.
- GET /api/audits/pages groups the brand's audits by page (host without
www. and path without a trailing slash; query and fragment ignored, final
URL after redirects), most recently audited first. Each page has its
latest completed score, the previous one, a status (Good from 70,
Improving when a point or more up, Needs work, Running, Failed), its
trend, open issues (failed + warning signals) and its runs. Audits are
read past the 1000-row page, and issues are counted for the rows sent.
- The hub's Pages table replaces Recent Audits: Page, Score with a small
trend line, Issues, Status and Last audit. The row opens the latest
report; the arrow lists earlier audits with their reports and delete.
Own-domain pages show their path, other sites host and path.
- Dates use fixed English formats (formatMonthDay, formatDateTime) on the
chart axis, the table and the history.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
@gkhngyk This is SA-002 from the Site Audit v2 spec: the hub lists audited pages one row per URL (status, trend, issues, history), and its dates no longer follow the browser's locale. It's independent of #1132 (SA-001); the two touch |
9 of 12 tasks
gkhngyk
approved these changes
Oct 17, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Rebuilt on main: the history, audits-pages route, Pages table and format tests, typecheck, lint and format pass, and CI is green.
/pages reads every audit of the brand past the 1000-row page and counts issues only for the page of rows sent, in chunks of 20 audits that stay under the row cap. Production has 105 audits in all, so the read is small today.
Merged
8 of 12 tasks
This was referenced Oct 17, 2026
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
Site Audit lists audited pages one row per URL, with each page's history underneath, and its dates no longer follow the browser's locale. This is SA-002 of the Site Audit v2 spec.
Two problems this fixes:
/ai-search/citation-monitoringtwice on the same day).Server:
GET /api/audits/pages?brandId=…&limit&offsetwww.and the path without a trailing slash, from the final URL after redirects./pricing,www…/pricing/and/pricing?utm_source=…are one page.readAllRpcRows), and a row repeated at a slice boundary counts once.total(the number of pages) for paging, and the brand'sprimaryHost.GET /api/auditslist and the MCP site-audit tools.Web: the hub's Pages table (
audit/_pages-table.tsx)formatMonthDayandformatDateTimeinlib/format.ts, used on the Score over time axis, the table and the history.getAuditsand its types; the hub was their only user.Out of scope (later Site Audit tasks)
Known limits
runningby a crashed job keeps its page at Running until that run is deleted. The old list showed it the same way.Related issue
None. Site Audit v2 spec, task SA-002.
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
https://www.example.com/pricing/,…/pricing?utm_source=x). Also audit one page on another site, and one URL that fails.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): no errors; the 7 warnings are in files this PR does not touchyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
server:npm run format,npm run lintandnpm test(1450) pass.history.test.js:pageKeyspellings, root, case and hosts;pageStatusrules;buildAuditPages: grouping, redirects, running and failed runs, the trend, and repeats at a read boundary.routes/audits-pages.test.js:web:yarn test(1256) andyarn buildpass._pages-table.test.tsx: rows, row click vs arrow, history, the "older audits not shown" note, failed/running pages, Load more,pageLabel.format.test.ts: English dates under a simulated Turkish browser locale./pricingplus a failed run, a competitor page, a never-completed page and others.🤖 Generated with Claude Code