Repository navigation
ship 2026-06-07: desktop browser-view placement during window resize - #69
Merged
Merged
Conversation
During a native window drag the desktop main process reprojected each browser view from a cached edge-inset descriptor (left/top pinned, right/ bottom insets pinned to the window edge). The secondary panel lays out proportionally, so that extrapolation was geometrically wrong: the view's right edge snapped to the live window while the (lagging) chrome painted the old layout, visibly stretching the webview out of its panel; stale renderer corrections then fought the projection, producing jitter. The renderer is now the single placement authority: it measures the panel rect and pushes it whenever the rect actually changes, at its own layout cadence (ResizeObserver tick, window resize, layout-sync event) — so the native view always lands where the chrome around it is painted. The main process no longer extrapolates on resize; it only re-clamps the last renderer rect to the live window so a shrinking window cannot leave the view spilling past its edge, and a grow-back restores the full rect. The resize-invariant layout descriptor (type, both projection helpers, and the renderer's descriptor dedupe + rAF deferral) is deleted; bounds equality is the dedupe key and measurements send synchronously. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Renderer-cadence bounds tracking still bleeds during an interactive window resize: the chrome repaints at ~6-10fps under a drag while the native view composites independently, so the view rubber-bands behind the chrome and overlaps the thread content. No bounds protocol can keep two independently composited surfaces glued mid-drag. Hide the views for the duration of the resize burst instead — the chrome's own panel background shows in their place, always exactly where the chrome painted it — and reveal them at the latest renderer rect (clamped to the live window) once the resize settles. `resized` ends a manual drag on mouse release; a 200ms settle timer covers programmatic resize streams, which never emit `resized`. Renderer visibility changes made mid-burst are recorded and take effect on the reveal. The per-tick clamp pass is gone; clamping now happens at apply time and on reveal. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Hiding the native view during a window resize burst left a bare panel. Now beginWindowResize captures each visible view first, pushes the bitmap to the renderer as a JPEG data URL over a new snapshot channel, and hides the view only once the capture resolves (capped at 80ms so a stalled capture cannot prolong the stale-view exposure). The renderer paints the bitmap absolutely inside the panel, so it stretches with the chrome and stays glued to the panel however far the chrome paint lags the drag. endWindowResize reveals the live view, then pushes a null snapshot to drop the stand-in — overlap on the swap, never a blank gap. Captures that resolve after their burst ended are discarded. onSnapshot is optional on BbDesktopBrowserApi purely for version skew: the SPA routinely attaches to older shells whose preload predates the channel, and falls back to the bare panel background during resizes. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Posted in error by an automated workflow. Apologies. |
|
This comment was posted to the wrong repository by an automated workflow. Its technical content has been removed from this location. Apologies for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this ships
Fixes the desktop shell's native browser views (secondary-panel webviews) misbehaving during interactive window resizes. Three stacked changes: the renderer becomes the single placement authority for view bounds, views hide entirely during resize bursts instead of rubber-banding behind the chrome, and a captured snapshot of each view stands in while it is hidden so the panel never goes blank.
Commits in this batch (3)
a2b6ac3d8b5a55resizedfor manual drags, 200ms settle timer for programmatic streams). Mid-burst visibility changes are recorded and applied on reveal.1881febbeginWindowResizecaptures each visible view and pushes the bitmap to the renderer as a JPEG data URL over a new snapshot channel (capped at 80ms); the renderer paints it inside the panel so it stretches with the chrome.endWindowResizereveals the live view then drops the stand-in — overlap on the swap, never a blank gap.onSnapshotis optional onBbDesktopBrowserApifor version skew with older shells.QA checklist
pnpm exec turbo run typecheckandpnpm exec turbo run testgreen.Notes
sawyer-nextcarries one more commit on top of this batch (external app sources) that ships separately.🤖 Generated with Claude Code