From 3ae859a90f70079fbd21d80765ff06ab5c339608 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 15 Mar 2026 21:51:24 +0000
Subject: [PATCH 1/2] Initial plan
From 1a8bca5f823e06a6402aa32b2c1cfad34eee10b5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 15 Mar 2026 22:00:34 +0000
Subject: [PATCH 2/2] Fix PDF preview embed for Electron 41
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
---
.../view/preview/preview-streaming.test.tsx | 40 +++++++++++++++++++
.../app/view/preview/preview-streaming.tsx | 6 ++-
2 files changed, 44 insertions(+), 2 deletions(-)
create mode 100644 frontend/app/view/preview/preview-streaming.test.tsx
diff --git a/frontend/app/view/preview/preview-streaming.test.tsx b/frontend/app/view/preview/preview-streaming.test.tsx
new file mode 100644
index 0000000000..8faeed4364
--- /dev/null
+++ b/frontend/app/view/preview/preview-streaming.test.tsx
@@ -0,0 +1,40 @@
+// Copyright 2026, Command Line Inc.
+// SPDX-License-Identifier: Apache-2.0
+
+import { Provider, atom } from "jotai";
+import { renderToStaticMarkup } from "react-dom/server";
+import { describe, expect, it, vi } from "vitest";
+import { StreamingPreview } from "./preview-streaming";
+
+vi.mock("@/util/endpoints", () => ({
+ getWebServerEndpoint: () => "http://wave.test",
+}));
+
+vi.mock("@/util/waveutil", () => ({
+ formatRemoteUri: (path: string, conn: string) => `wsh://${conn}${path}`,
+}));
+
+describe("StreamingPreview", () => {
+ it("renders PDFs with an object/embed viewer instead of an iframe", () => {
+ const model = {
+ refreshCallback: null,
+ refreshVersion: atom(0),
+ connection: atom("local"),
+ statFile: atom({
+ path: "/docs/guide.pdf",
+ mimetype: "application/pdf",
+ }),
+ };
+
+ const markup = renderToStaticMarkup(
+
+
+
+ );
+
+ expect(markup).toContain("