feat(documents): open a PDF or image original in a new browser tab

The document sheet gains an Open in new tab action for the types the
browser renders itself (PDF, JPEG, PNG, WebP, GIF), so a long report
gets the browser's own zoom and search instead of the small preview. It
opens the object URL the sheet already fetched through the app transport:
a plain navigation to the serve route carries no record-session
assertion and would be refused inside a shared record. Every other type
keeps the download only, and the serve route's matrix now pins SVG and
HTML to attachment as well.
This commit is contained in:
Marc-André Bombeck committed 2026-10-11 12:37:57 +02:00
1 parent fca1260b20
commit 12a8ab7c63
10 files changed
+95 -2

No files matched your search

@@ -240,6 +240,10 @@ describe("serving-posture header matrix (Class A inline vs Class B attachment)",
["image/heic", "photo.heic"],
["application/xml", "export.xml"],
["application/json", "export.json"],
// Upload refuses markup outright; a row that somehow carries one must
// still never render in-origin, where its script would run.
["image/svg+xml", "drawing.svg"],
["text/html", "page.html"],
])(
"Class B %s → attachment + octet-stream, never inline",
async (mime, name) => {