Skip to content

feat(audit): per-audit detail page at /dashboard/audit/[id] - #262

Merged
gkhngyk merged 1 commit into
mainfrom
feat/audit-detail-route
Jun 16, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feat/audit-detail-route

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Splits the Site Audit page into a hub and a per-audit detail route, so each audit is a persistent, bookmarkable/shareable artifact instead of inline state.

  • /dashboard/audit (hub) — URL input + Run Audit + Recent Audits list. Running an audit POSTs and navigates to the new audit's detail page.
  • /dashboard/audit/[id] (detail) — loads the audit by id, polls while it's running (staged loading), then renders the full report. Has a back link and a delete action. The audit id (already a uuid) is the route param.
  • Recent audits now link to their detail pages (real <Link>, browser back/forward works).
  • The report UI is extracted into a shared AuditReport component (web/src/components/audit/audit-report.tsx).

Why

  • Shareable/bookmarkable per-audit URLs (org members can open the same report; GET /api/audits/:id already enforces ownership, so it's safe to expose the id).
  • Cleaner separation of "run + history" vs "one report".
  • Native navigation instead of in-page state toggling.

Notes

  • Web-only — no API or schema changes (GET /api/audits/:id already existed).
  • The URL prefill is read once from the brand store at init (no setState-in-effect); history loads via a cancellable effect.

Split the Site Audit page into a hub (run bar + recent audits) and a
per-audit detail route. Each audit is now a bookmarkable/shareable URL;
running an audit navigates to its detail page, which polls until complete.
Recent audits link to their detail pages. The report UI is extracted into a
shared AuditReport component. Web-only; no API/schema changes.
@gkhngyk
gkhngyk merged commit 2e6a93e into main Jun 16, 2026
3 checks passed
@gkhngyk
gkhngyk deleted the feat/audit-detail-route branch June 16, 2026 14:27
@Srija-65 Srija-65 mentioned this pull request Jun 17, 2026
6 of 12 tasks
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