fix(audit): re-audit forces a fresh scan (noCache)#432
Conversation
…audit - top-audit-bar: 24-segment freshness decay gauge (green->amber->pink across the 7-day TTL); removes the redundant "last audit audited 12h ago" copy and the separate "expires in 14h" chip - failed state folds inline on the bar; AuditProgressStrip becomes a fixed scroll-echo gated to the bar's visibility (no stacked double-band, no run-start layout shift); ERROR_COPY shared between bar and strip - re-audit sends noCache:true -> a genuine fresh scan instead of a silent cache hit; the prior report survives a failed re-audit - button surfaces "clears cache - fresh scan" - updated + extended top-audit-bar tests; CHANGELOG entry under 0.0.11-beta.7 (#431) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update docs/dashboard.mdx and docs/cli/audit.mdx for the decay-gauge bar, inline scanning/failed states, fixed scroll-echo strip, and noCache re-audit. CHANGELOG Docs entry under 0.0.11-beta.7 (#431). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 17 minutes and 13 seconds. Learn how PR review limits work. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR removes the top-of-page re-audit bar from the audit dashboard, centralizes re-audit UI in the empty state, introduces a ChangesAudit Re-Audit Simplification
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sign main merged #431, which removed the top-of-page re-audit bar entirely, so this PR is reduced to just the cache-busting behaviour the bar redesign also carried: the explicit re-audit handler (startRerun) now sends noCache:true through triggerRun -> paramsToBody -> /api/audit/run, so re-audit re-scans every transcript from scratch instead of returning the identical cached result. The earlier decay-gauge bar redesign on this branch is dropped to match main's removal; the empty-state first run stays on the fast cached path. ScanParams/paramsToBody gain an optional noCache (paramsToBody exported + unit-tested in __tests__/audit/rerun-button.test.ts). Docs + CHANGELOG updated (#432). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # docs/cli/audit.mdx # docs/dashboard.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/dashboard.mdx`:
- Line 71: Update the copy in docs/dashboard.mdx to hyphenate the compound
adjective: change the phrase "no full page reload" to "no full-page reload" in
the paragraph that describes the re-audit behavior (the sentence mentioning "the
fresh result swaps in place on success (no full page reload; a failed re-audit
leaves the prior report intact)").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7898f46e-6774-41f2-8400-57ee72c471e8
📒 Files selected for processing (9)
CHANGELOG.md__tests__/audit/rerun-button.test.ts__tests__/audit/top-audit-bar.test.tsxapp/audit/_components/audit-dashboard.tsxapp/audit/_components/rerun-button.tsxapp/audit/_components/top-audit-bar.tsxapp/audit/audit-styles.cssdocs/cli/audit.mdxdocs/dashboard.mdx
💤 Files with no reviewable changes (3)
- app/audit/_components/top-audit-bar.tsx
- tests/audit/top-audit-bar.test.tsx
- app/audit/audit-styles.css
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/dashboard.mdx`:
- Line 71: Update the wording that currently says the re-audit "clears the
per-transcript cache" to reflect actual behavior: change the phrase around the
`/api/audit/run` POST with `noCache: true` to say it "bypasses the
per-transcript cache" (or "bypasses cached transcript reads/writes") and
"re-scans every transcript from scratch without deleting existing cache entries"
so it accurately references the `noCache` path and its semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
…bbit) noCache bypasses cached transcript reads/writes rather than deleting cache entries — align the docs wording to the actual semantics. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Makes
/auditre-audit force a genuinely fresh scan instead of silently returning the cached result — the requested "delete the cache, trigger a fresh audit" behavior.The explicit re-audit handler (
startRerun, behind the bottom[ re-audit now ]button) now sendsnoCache: truethroughtriggerRun→paramsToBody→ the/api/audit/runroute (which already honorednoCache). Re-audit bypasses the per-transcript cache (src/audit/cache.ts) and re-scans every transcript from scratch, rather than returning the identical cached result when nothing changed on disk.ScanParams/paramsToBodygain an optionalnoCache;paramsToBodyis exported and covered by a new__tests__/audit/rerun-button.test.ts.History note
This branch originally also redesigned the top-of-page re-audit bar (a "decay gauge"). While it was in review, #431 merged to
mainand removed that bar entirely (same "reads as broken" motivation). Per that decision, the bar redesign has been dropped from this PR — it's now scoped to just the cache-busting behavior, which is independent of the bar and applies to the surviving[ re-audit now ]button.Verification
bun run test:run— full suite green, incl. the newparamsToBodynoCache coverage.tsc --noEmitclean,eslint0 errors,bun run buildsucceeds.Docs
docs/dashboard.mdx+docs/cli/audit.mdxnote thenoCachefresh-scan semantics. Translated mirrors flow through the existing translation job.🤖 Generated with Claude Code
Summary by CodeRabbit
Improvements
Bug Fixes
Documentation