Fix: Implement audit design and error state remediation - #1263
Conversation
- Removes errant prompt-perfector skill folder and catalog entry. - Mocks next/navigation in privacy-ui unit tests to fix unmounted router. - Increases reconciliation preflight timeout for heavily populated local environments.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (47)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dda4a42baa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| query, | ||
| documentId: source.document_id, | ||
| chunkId: source.id, | ||
| fileName: source.file_name, | ||
| title: source.title, |
There was a problem hiding this comment.
Stop persisting raw clinical queries in IndexedDB
When the interaction POST rejects while offline, these fields—including the raw clinical query—are passed to enqueueOfflineAction, which stores the request body in persistent IndexedDB without expiry or logout cleanup. This bypasses the server-side queryTextForStorage redaction and reverses the explicit deferral in docs/pwa.md:330; on a shared device, potential PHI can remain after the session ends. Do not queue telemetry containing raw queries, or redact it and add an approved lifecycle before persistence.
Useful? React with 👍 / 👎.
| const response = await fetch(action.endpoint, { | ||
| method: action.method, | ||
| headers: { "Content-Type": "application/json", ...getAuthHeaders() }, | ||
| body: action.body, |
There was a problem hiding this comment.
Bind queued actions to the authenticated owner
When user A queues a preference or favourite mutation offline and signs out before reconnecting, the stored action has no owner binding and this loop sends it with whichever authorization header is current when user B authenticates. Because the account APIs assign writes to the bearer owner, A's preferences/favourites can be applied to B, and A's interaction telemetry can be attributed to B. Store an immutable owner fingerprint and drain or discard only entries belonging to the current user.
Useful? React with 👍 / 👎.
| fetch("/api/account/preferences", { | ||
| method: "PUT", | ||
| headers: { "Content-Type": "application/json", ...authorizationHeader }, | ||
| body: JSON.stringify(next), | ||
| }) | ||
| .then((response) => { | ||
| if (response.status === 401) markSessionExpired(); | ||
| }) | ||
| .catch(() => undefined); | ||
| body, | ||
| }).catch(() => { |
There was a problem hiding this comment.
Handle resolved 401 responses from preference writes
When the access token expires while saving a preference, fetch resolves with a 401 rather than rejecting, so this .catch never runs. The previous response handler called markSessionExpired; after its removal, the UI remains apparently authenticated and silently treats a locally changed preference as synced even though the server rejected it. Inspect the response status and expire the session on 401, while handling retriable non-OK statuses explicitly.
Useful? React with 👍 / 👎.
| setError("You are offline. Changes will sync when reconnected."); | ||
| return true; |
There was a problem hiding this comment.
Confirm queue persistence before reporting a saved change
When the network request throws but IndexedDB is unavailable, blocked, over quota, or its transaction fails, enqueueOfflineAction is fire-and-forget and swallows the failure, yet these lines still promise later synchronization and return success. The optimistic favourite then disappears on reload with no indication that it was lost. Await a queue operation that reports failure and roll back or return false unless persistence actually succeeds.
Useful? React with 👍 / 👎.
|
Closing without merge after the 2026-07-27 open-PR review + Bugbot sweep. Why: Same unsafe dirty-checkpoint lineage as closed #1255/#1253, ~526 behind Do not sync this tip onto main. Rebuild any remaining empty/error-state work on current |
Implements recommendations from the master empty and error state design report. Resolves regressions in tests and fixes failing type contracts.