Skip to content

fix(popup): fallback settings link open in prod (skeeditor-c4o9)#101

Draft
selfagency wants to merge 3 commits into
mainfrom
bugfix/skeeditor-c4o9-popup-settings-link-prod
Draft

fix(popup): fallback settings link open in prod (skeeditor-c4o9)#101
selfagency wants to merge 3 commits into
mainfrom
bugfix/skeeditor-c4o9-popup-settings-link-prod

Conversation

@selfagency

Copy link
Copy Markdown
Owner

Summary

Fixes a production regression where clicking Settings in the popup could fail to open the options page.

What changed

  • Added a resilient popup handler in src/popup/auth-popup.ts:
    • try browser.runtime.openOptionsPage() first
    • fallback to browser.tabs.create({ url: browser.runtime.getURL('options/index.html') }) when openOptionsPage rejects
  • Added regression coverage in test/unit/popup/auth-popup.test.ts:
    • verifies fallback tab-open behavior when openOptionsPage throws
  • Updated bean tracking in .beans/skeeditor-c4o9--fix-popup-settings-link-not-opening-in-production.md

Root cause

Popup settings navigation depended solely on runtime.openOptionsPage(). In packaged production contexts this API can reject, leaving no fallback path.

Test plan

  • Unit tests:
    • test/unit/popup/auth-popup.test.ts → pass (26/26)
  • Build verification:
    • Chrome production build task succeeded (build:chrome)

Bean

  • skeeditor-c4o9

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
442 1 441 0
View the full list of 1 ❄️ flaky test(s)
test/unit/utils/lint-staged-config.test.ts > lint-staged config > lints staged JS and TS files directly with oxlint instead of routing through task precommit

Flake rate in main: 100.00% (Passed 0 times, Failed 4 times)

Stack Traces | 0.00825s run time
AssertionError: expected './node_modules/.bin/oxlint --no-error…' to be './node_modules/.bin/oxlint' // Object.is equality

Expected: "./node_modules/.bin/oxlint"
Received: "./node_modules/.bin/oxlint --no-error-on-unmatched-pattern"

 ❯ .../unit/utils/lint-staged-config.test.ts:13:35

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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