Skip to content

Commit 68d719f

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/app-tool-registration
2 parents cb46344 + c59c606 commit 68d719f

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/app.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,14 @@ export class App extends ProtocolWithEvents<
10791079
return await this.request(
10801080
{ method: "tools/call", params },
10811081
CallToolResultSchema,
1082-
options,
1082+
{
1083+
// Hosts may interpose long-running or user-interactive steps before the
1084+
// tool result arrives. Opting in here lets a host heartbeat keep the
1085+
// request alive past the default timeout; callers can still override.
1086+
onprogress: () => {},
1087+
resetTimeoutOnProgress: true,
1088+
...options,
1089+
},
10831090
);
10841091
}
10851092

tests/e2e/pdf-viewer-zoom.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ test.describe("PDF Viewer — fullscreen fit + pinch zoom", () => {
6363
await waitForPdfRender(page);
6464
const app = getAppFrame(page);
6565

66+
// Initial fit-to-width measures container.clientWidth immediately after
67+
// showViewer() flips display:flex; under CI load the reflow can lag, so
68+
// poll until the shrink-to-fit scale has actually applied.
69+
await expect
70+
.poll(() => readZoomPercent(page), { timeout: 5000 })
71+
.toBeLessThan(100);
6672
const inlineZoom = await readZoomPercent(page);
67-
expect(inlineZoom).toBeLessThan(100);
6873

6974
// Widen + give plenty of height, then enter fullscreen. Fullscreen uses
7075
// fit-to-PAGE (whole page visible), so the resulting zoom is whichever

0 commit comments

Comments
 (0)