fix(agent): support Chromium 137 side panel APIs - #2245
fix(agent): support Chromium 137 side panel APIs#2245Felarof (felarof99) wants to merge 1 commit into
Conversation
|
Greptile (@greptileai) review |
|
Claude (@claude) review |
|
Claude finished Felarof (@felarof99)'s task in 2m 32s —— View job Review: Chromium 137 side panel API fallbackTasks
SummaryThe compatibility boundary is cleanly contained to
Logic is sound and matches the PR's stated design (graceful degradation to standard Chrome APIs, best-effort state preservation when Chromium can't close programmatically). Minor findings
Nothing else stood out — fallback behavior, state caching, and the Note: I wasn't able to execute |
✅ Tests passed: 294/294Ran 1 of 15 suites (14 not affected by this change).
|
Greptile SummaryThe PR feature-detects BrowserOS-specific side-panel APIs so the extension can run against Chromium 137, falling back to the standard open operation and independently registering available lifecycle listeners.
Confidence Score: 4/5The stale window-open cache should be fixed before merging because it can prevent users from reopening a manually dismissed side panel on Chromium’s reduced API surface. The compatibility branch suppresses sidePanel.open based on state that cannot be invalidated after a manual dismissal when onClosed is unavailable, leaving the toolbar action unable to restore the panel. Files Needing Attention: packages/browseros-agent/apps/app/lib/browseros/toggleSidePanel.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Click[Toolbar click] --> Scope{Window-scoped?}
Scope -- No --> TabAPI{browserosToggle available?}
TabAPI -- Yes --> NativeToggle[browserosToggle]
TabAPI -- No --> StandardOpen[sidePanel.open by tab]
Scope -- Yes --> Cached{Window ID cached open?}
Cached -- No --> WindowOpen[sidePanel.open by window and cache ID]
Cached -- Yes --> CloseAPI{sidePanel.close available?}
CloseAPI -- Yes --> WindowClose[Close panel and clear ID]
CloseAPI -- No --> Preserve[Return opened true]
ManualClose[User manually dismisses panel] --> MissingEvent{onClosed available?}
MissingEvent -- No --> Stale[Cached ID remains stale]
Stale --> Cached
Prompt To Fix All With AI### Issue 1
packages/browseros-agent/apps/app/lib/browseros/toggleSidePanel.ts:166-169
**Stale window-open state blocks reopening**
When a window-scoped panel is manually dismissed on Chromium without `sidePanel.close` and `sidePanel.onClosed`, its cached window ID cannot be cleared. The next toolbar click takes this branch and returns `{ opened: true }` without calling `sidePanel.open`, leaving the panel closed for that window.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(agent): support Chromium 137 side pa..." | Re-trigger Greptile |
| if (openWindowSidePanelIds.has(target.windowId)) { | ||
| if (typeof chrome.sidePanel.close !== 'function') { | ||
| return { opened: true } | ||
| } |
There was a problem hiding this comment.
Stale window-open state blocks reopening
When a window-scoped panel is manually dismissed on Chromium without sidePanel.close and sidePanel.onClosed, its cached window ID cannot be cleared. The next toolbar click takes this branch and returns { opened: true } without calling sidePanel.open, leaving the panel closed for that window.
Knowledge Base Used: Extension App (packages/browseros-agent/apps/app)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/browseros-agent/apps/app/lib/browseros/toggleSidePanel.ts
Line: 166-169
Comment:
**Stale window-open state blocks reopening**
When a window-scoped panel is manually dismissed on Chromium without `sidePanel.close` and `sidePanel.onClosed`, its cached window ID cannot be cleared. The next toolbar click takes this branch and returns `{ opened: true }` without calling `sidePanel.open`, leaving the panel closed for that window.
**Knowledge Base Used:** [Extension App (packages/browseros-agent/apps/app)](https://app.greptile.com/browseros-org-2/-/custom-context/knowledge-base/browseros-ai/browseros/-/docs/extension-app.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
chrome.sidePanel.openfor tab open/toggle behaviorsidePanel.closeDesign
The compatibility boundary remains in
toggleSidePanel.ts. Newer BrowserOS builds retain the richerbrowserosIsOpen,browserosToggle,close,onOpened, andonClosedpaths. Chromium 137 uses only its standard supported API surface.Test plan
app.html#/homemounts with no JavaScript exceptions/Users/felarof01/Workspaces/build/CHROME/nightwork/shots/ext-on-137.pngRoot Fallow remains baseline-red on 320 pre-existing repository findings; none references the changed files.