Skip to content

fix: exclude open_in_tab from options_ui for Safari#2311

Open
rxliuli wants to merge 2 commits intowxt-dev:mainfrom
rxliuli:fix/safari-open-in-tab
Open

fix: exclude open_in_tab from options_ui for Safari#2311
rxliuli wants to merge 2 commits intowxt-dev:mainfrom
rxliuli:fix/safari-open-in-tab

Conversation

@rxliuli
Copy link
Copy Markdown
Contributor

@rxliuli rxliuli commented Apr 27, 2026

Summary

  • Safari does not support the open_in_tab key in options_ui. Including it causes safari-web-extension-converter to emit a warning: "The following keys in your manifest.json are not supported by your current version of Safari: open_in_tab"
  • Conditionally set open_in_tab to undefined when building for Safari, following the same pattern used for browser_style (Firefox-only) and chrome_style (non-Firefox only)
  • Added a test case for Safari options_ui generation

Test plan

  • Existing manifest tests pass (91 tests)
  • New test verifies open_in_tab is excluded for Safari
  • Verified with wxt build -b safari that the output manifest no longer contains open_in_tab

Safari does not support the `open_in_tab` key in `options_ui`.
Including it causes `safari-web-extension-converter` to emit a warning:
"The following keys in your manifest.json are not supported by your
current version of Safari: open_in_tab"

This follows the same pattern used for `browser_style` (Firefox-only)
and `chrome_style` (non-Firefox only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rxliuli rxliuli requested a review from aklinker1 as a code owner April 27, 2026 12:37
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for creative-fairy-df92c4 failed.

Name Link
🔨 Latest commit cb2664d
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/69ef6c7b6ff1840007e20ba2

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Apr 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.81%. Comparing base (e75e534) to head (e2a960c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2311      +/-   ##
==========================================
+ Coverage   79.73%   79.81%   +0.08%     
==========================================
  Files         131      131              
  Lines        3804     3805       +1     
  Branches      861      862       +1     
==========================================
+ Hits         3033     3037       +4     
+ Misses        686      684       -2     
+ Partials       85       84       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2026

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2311

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2311

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2311

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2311

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2311

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2311

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2311

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2311

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2311

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2311

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2311

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2311

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2311

wxt

npm i https://pkg.pr.new/wxt@2311

commit: e2a960c

@aklinker1
Copy link
Copy Markdown
Member

Looks like you have some type errors: https://github.com/wxt-dev/wxt/actions/runs/24995402536/job/73196741505?pr=2311

- Use conditional spread instead of undefined assignment for open_in_tab
  to satisfy the boolean type constraint
- Remove stale @ts-expect-error for browser_style (now typed upstream)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rxliuli
Copy link
Copy Markdown
Contributor Author

rxliuli commented Apr 27, 2026

Looks like you have some type errors: https://github.com/wxt-dev/wxt/actions/runs/24995402536/job/73196741505?pr=2311

ref cb2664d

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

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants