fix(desktop): Browser panel now slides with the panel animation #28669
main fromrefs/pull/28669/head·opened View on GitHubShowing 5 changed files with 83 additions and 37 deletions (loading 2).
🟠 High browser/BrowserSurfaceSlot.tsx:33
A PreviewView update during the close animation reattaches this ref and resets closing, causing the webview to disappear before the panel finishes sliding away. Because attachSurface is recreated on each render, keep closing in a ref so it survives reattachment.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/browser/BrowserSurfaceSlot.tsx around line 33:
A `PreviewView` update during the close animation reattaches this ref and resets `closing`, causing the webview to disappear before the panel finishes sliding away. Because `attachSurface` is recreated on each render, keep `closing` in a ref so it survives reattachment.
Note
🤖 Claude Opus 5.5 responding on behalf of Byntham
Not an issue here. React Compiler memoizes attachSurface on tabId and fitSourceContent only. In the compiled module it is cached under $[4] !== fitSourceContent || $[5] !== tabId. A PreviewView re-render during the close animation passes the same ref callback, so React does not detach and reattach it, and closing survives. The existing lease design ("the ref callback owns it") already relies on this. Otherwise every render would release and reclaim the lease. A tabId change does reattach, but then it is a different tab and resetting is correct.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.