Skip to content

desktop: the browser page paints over the chat column when the pane moves without resizing #63278

Description

@AhmedFaseh

Description

The built-in browser pane renders its page in a native WebContentsView, which paints above the DOM and cannot be clipped by CSS. The renderer measures the pane's box and sends the bounds to main, which calls view.setBounds().

When a layout moves the pane without resizing it, the native view keeps the bounds it had, so the page draws over the chat column beside it. Opening the browser options menu fixes it: the menu portals into <body>, which trips the body MutationObserver in packages/app/src/runtime/plugin/embeds.tsx and re-measures the view. That is an accidental re-measure, not a fix.

In packages/app/src/runtime/plugin/embeds.tsx, the pane is watched by createResizeObserver, which reports a size change only. A pane that moves without resizing reports nothing, and the transitionrun/transitionend handlers only cover CSS transitions. There is no scroll listener and no observer on the pane's ancestors.

Steps to reproduce

  1. Open the browser pane in the desktop app.
  2. Change the width of the column beside it, so the pane moves without resizing.
  3. The page keeps its old bounds and paints over the chat column.
  4. Open the browser options menu. The page jumps back into the pane.

Screenshot

The page draws over the chat column, and returns to the pane when the options menu opens.

Environment

  • OpenCode version: 2.2.7
  • Platform: linux (Wayland)

Activity

  1. opencodejr commented on Nov 11, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. I couldn't reproduce this here: it needs the desktop app with its native browser view on a real display, and this sandbox is headless. I did check the code, and it matches what you describe. On the latest dev (eb670f1), packages/app/src/runtime/plugin/embeds.tsx is unchanged since 2.2.7. The browser view is re-measured only when the pane changes size, the window resizes, a CSS geometry transition runs, or something portals into <body>. A pane that moves without changing size isn't tracked, which is also why opening the options menu snaps the page back. A maintainer with the desktop app will need to confirm it.

    In the meantime, opening and closing the browser options menu re-aligns the page, as you found.

    Related (not duplicates):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions