Skip to content

fix(extension): open the panel with the defaults when a saved setting is not one it knows - #436

Merged
nucliweb merged 3 commits into
mainfrom
fix/extension-stored-setting
Nov 14, 2026
Merged

nucliweb merged 3 commits into
mainfrom
fix/extension-stored-setting

Conversation

@nucliweb

Copy link
Copy Markdown
Owner

Summary

Stacked on #435.

The panel looked for the radio of the saved theme and of the saved side of the list. With a value that has no radio, such as one synced from another version of the extension, the module threw and the panel stayed empty.

  • load() of extension/lib/settings.js checks each value it reads: the theme, the side, the state of the list and the filter of the audit against the values the panel has, and the rest by type.
  • A value that fails gives way to its default.

Test plan

  • Failing tests first: the unit test got the unknown values back, and the e2e test timed out waiting for the list of snippets.
  • npm run test:extension locally: 114 of 114.
  • npm run test:extension:e2e locally: 94 of 94. The new case opens the real panel.html in Chromium with theme: "sepia" and side: "top" in a simulated chrome.storage, and finds the list and the default options checked.
  • npm run lint locally.
  • Not checked with the extension loaded unpacked in DevTools.

Copy as Markdown treated every result with a rating as a metric, so an audit such as Script-Loading came out as a heading with "undefined" and none of its issues or items, and a result whose unit is a score threw before copying anything.

The export picks its format with detectRenderer, as the page picks its view. detectRenderer moves to its own module so that the export can import it. A result the page shows as JSON is exported as JSON instead of "No issues found".

The tests export the 114 result fixtures and fail on any "undefined" or "NaN".
… is not one it knows

The panel looked for the radio of the saved theme and of the saved side, and with a value that has no radio, such as one synced from another version of the extension, the module threw and the panel stayed empty.

The settings check each value they read: the theme, the side, the state of the list and the filter of the audit against the values the panel has, and the rest by type. A value that fails gives way to its default.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webperf-snippets Ready Ready Preview Nov 14, 2026 9:31pm UTC

Base automatically changed from fix/visualizer-markdown-export to main November 14, 2026 20:49
@nucliweb
nucliweb merged commit 6d05d13 into main Nov 14, 2026
13 checks passed
@nucliweb
nucliweb deleted the fix/extension-stored-setting branch November 14, 2026 21:41

This branch was successfully deployed

1 active deployment
Preview — d189161f Deployed Nov 14, 2026 by vercel[bot]
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