Skip to content

Conversation

@kiing-dom
Copy link
Owner

Previously, the popup relied on messaging the content script to retrieve the current problem’s status, which only worked if the active tab was a LeetCode problem page and the content script had already run.

After closing and reopening the browser, or if the content script hadn’t executed yet, the popup would fail to find the problem in storage, causing solved problems to appear as unsolved and recent problems to disappear from the popup.

This change updates the popup logic to always read problem data directly from browser.storage.local, which is persistent across browser restarts. Now, the popup first checks storage for the problem’s status and only falls back to messaging the content script if the problem isn’t found. As a result, the recent problems list and solved status are correctly displayed in the popup even after restarting the browser, ensuring consistency with the data shown in the options page.

Fixes #2 👍

kiing-dom and others added 4 commits May 30, 2025 04:50
Version 0.1.0 mvp now on the addons store
users can now access the options from the popup at any time and the recently solved problems list is also visible
fixed problem solved state not persisting on browser close
@kiing-dom kiing-dom merged commit 9c0019a into feat/mvp Jun 1, 2025
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.

2 participants