t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Desktop (macOS): an html_render page's fullscreen now takes the whole screen in a new Space instead of filling the T3 window

Open baohappy02 opened this issue 3 weeks ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. In the desktop app on macOS, have an agent html_render a page with <button onclick="document.documentElement.requestFullscreen()">full</button>.
  2. Click the button.

Expected behavior

As before #25835: the page fills the T3 window (the window has disableHtmlFullscreenWindowResize: true).

Actual behavior

The window goes into macOS native fullscreen in a new Space. Leaving it animates back; it feels like a glitch.

Impact

Major degradation or frequent failure

Version or commit

0.1.9-nightly.20261110.4452 (since #25835, c5b869f29e)

Environment

macOS, T3 Code desktop (Nightly)

Logs or stack traces

Cause: #25835 added a `fullscreenchange` listener in `apps/desktop/src/preload.ts` that sends `element !== null && element.tagName !== "WEBVIEW"` to `syncHtmlFullscreen`, which calls `window.setFullScreen(true)`. An html_render page lives in an `<iframe allow="fullscreen">` (BrowserDocumentFrame), so its fullscreen now counts as a chat video's.

Fix options, either works:
- keep iframe fullscreen inside the window as `<webview>` guests are: also skip `element.tagName === "IFRAME"` in the preload check;
- or a page message (like `t3/notifications/open-image`) that opens the page in the expand dialog.

Screenshots, recordings, or supporting files

No response

Workaround

The page skips requestFullscreen when the user agent has Electron/ and shows a larger inline view instead.

baohappy02 avatar Nov 10 '26 05:11 baohappy02

I have this issue - there a typo 2000px vs 20000px (and 20000px was allowed). Thread is completely broken.

This was with Opus 5.5 xhigh.

An inline html_render page grew to about 16,500px tall in the thread on desktop, so the thread scrolls almost forever.

Tracing the agent's session:

  1. The agent loaded html_preview and html_render.
  2. Its reasoning noted the rule to preview before rendering, then skipped the preview because the returned PNG "costs context". It decided to "render the page at a fixed 2000px height instead".
  3. It called html_render with {"path": ".../rulings.html", "title": "Open eligibility rulings", "height": 2000}.

html_preview later reported "contentHeight":16505 for that page.

The tool text says two different things. The description says:

Frame fits height to 20000px. On mobile, content past the given height scrolls.

The height parameter says:

Frame height in CSS pixels, 80 to 2000. Use the contentHeight from html_preview.

So the agent believed height: 2000 set the frame size. On desktop the frame appears to fit the content up to 20000px instead, ignoring height.

studioetc avatar Nov 16 '26 22:11 studioetc