Skip to content

fix(extension): remove redundant setOptions call before opening side panel#148

Merged
lcomplete merged 1 commit into
mainfrom
dev
Apr 26, 2026
Merged

fix(extension): remove redundant setOptions call before opening side panel#148
lcomplete merged 1 commit into
mainfrom
dev

Conversation

@lcomplete
Copy link
Copy Markdown
Owner

Summary

  • Removes the sidePanelApi.setOptions() call that was made before opening the side panel in openSidePanelForContextMenuClick
  • The setOptions call (configuring tabId, path, and enabled) was redundant since sidePanelApi.open() handles opening directly

Test plan

  • Verify side panel opens correctly via context menu click
  • Confirm no regressions in side panel behavior

🤖 Generated with Claude Code

…panel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 26, 2026

🤖 Augment PR Summary

Summary: Removes the pre-open chrome.sidePanel.setOptions() configuration in openSidePanelForContextMenuClick, relying on chrome.sidePanel.open()/manifest defaults instead.
Why: Simplifies the context-menu side panel open flow by dropping an apparently redundant options call.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

});
}

void sidePanelApi.open({ windowId: tab.windowId }).catch((error: unknown) => {
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setOptions({ tabId, path, enabled }) was the only place in this file that explicitly configured/enabled the side panel; after removing it, can you confirm the extension’s manifest/WXT build always provides the correct side_panel.default_path and that the panel is enabled by default for the target tab?
Otherwise sidePanelApi.open() may fail or open an unexpected/blank panel on Chrome versions that require setOptions to establish an active panel for the tab/window first.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@lcomplete lcomplete merged commit 6f8dd7b into main Apr 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant