Fix Case Vault document preview loading
From the PR description
Summary
- stream
/single-documents/:documentId/displaybytes through the Mike backend instead of redirecting browser fetches to Case Vault presigned URLs - preserve inline content type/disposition headers for PDF, DOC, and DOCX display
- carry forward the Account > Models loading-state fix that landed after PR #5 had already merged
Why
Production PDF preview can show Failed to load document because the frontend fetch follows a cross-origin Case Vault presigned URL. Proxying display bytes through the backend keeps the viewer on the app API origin and keeps Mike auth/ACL as the access-control boundary.
Evidence
- PR #5 is merged, so the post-merge settings fix needed a new PR
- production API logs also show separate demo budget exhaustion / processing states for recent chat attempts, but the document preview path itself was still redirect-based
Validation
- git diff --check
- npm run build --prefix backend
- cd frontend && npx tsc --noEmit
- npm run build --prefix frontend
Our analysis
Proxy Case document display through the Mike backend — read the full analysis →
Think the analysis missed something the PR description covers?
Commits in this PR (2)
| SHA | Subject | Author | Date | |
|---|---|---|---|---|
96ee1a64 | Avoid false missing key state during profile load | kveton | 2026-05-04 | ↗ GitHub |
8b7e3e0a | Proxy Case document display bytes | kveton | 2026-05-04 | ↗ GitHub |
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-6.md from
inside the repo you want the changes in.