Skip to content

Conversation

@olsh
Copy link
Owner

@olsh olsh commented Sep 5, 2025

Resolves #281

olsh added 4 commits September 5, 2025 22:29
…t callback functions to async/await syntax for improved readability and performance. Update storage access methods to utilize browser.storage API. Enhance user experience by ensuring all asynchronous operations are properly awaited, including loading options and user categories. Update internationalization calls to use browser.i18n for consistency across the extension.
- Added ESLint as a dependency and created configuration files (.eslintrc.json and .eslintignore).
- Introduced linting scripts in package.json for code quality checks.
- Updated JavaScript files to adhere to ESLint rules, including consistent use of double quotes and improved error handling.
- Removed unused function computeSavedGroup from options.js.
- Ensured proper export of functions in core.js and feedly.api.js.
- Refactored message handling in background.js for better readability and consistency.
…es. Update package dependencies and version in manifest. Refactor background and core scripts for improved initialization and async handling. Modify options and popup scripts to use modern event listeners and improve audio playback handling.
@olsh olsh marked this pull request as draft September 6, 2025 11:23
@olsh olsh changed the title Initial migration to manifest V3 Migration to manifest V3 Sep 6, 2025
@olsh
Copy link
Owner Author

olsh commented Sep 6, 2025

This PR was created just to track progress. Once we stabilize the 3.x version of the extension, this branch will become the master branch. The current master branch will be renamed to manifest-v2, since we still need to support v2 until Firefox fully supports v3 manifests.

…307)

- Made message listener async to properly catch Promise errors
- Changed from Promise chains to await pattern for better error handling
- Added block scoping for const declarations in switch cases
- Remove AGENTS.md from repository tracking
- Add Claude Code files (CLAUDE.md, .claude/, AGENTS.md) to .gitignore

The try/catch block can now properly handle errors from async functions
like getFeeds, getSavedFeeds, markAsRead, toggleSavedFeed, openFeedlyTab,
and getAccessToken.

Fixes #306
Resolves repeated login prompts in Chrome by fixing token refresh race conditions and improving authentication state management.

Key fixes:
- Update runtime variables immediately in refreshAccessToken() to prevent race conditions
- Retry original API request after successful token refresh in apiRequestWrapper()
- Improve error handling and return proper error objects
- Remove redundant status calls since refreshAccessToken() handles status updates

Fixes #308: Extension keeps asking for login
Fixes Chrome restart authentication issues
Maintains proper authentication state across service worker restarts
- Convert Promise chains to async/await in feedly.api.js, popup.js, and core.js
- Update getAccessToken() to immediately set runtime variables preventing race conditions
- Update refreshAccessToken() to use async/await with proper error handling
- Convert parseFeeds() from Promise.then() to async/await pattern
- Convert popup login, renderFeeds, renderSavedFeeds, and markAsRead to async/await
- Remove unnecessary setTimeout delays now that race conditions are fixed:
  - Remove 500ms delay after login (popup.js)
  - Remove 1000ms delay for options loading (options.js)
- Maintain Mac-specific UI rendering timeout in executeAsync()
- Improve error handling with try/catch blocks
- Ensure consistent async patterns throughout codebase
After marking feeds as read, update browser storage with the modified cached feeds to ensure they don't reappear when the popup is reopened.
@olsh olsh merged commit e3eafce into master Sep 20, 2025
11 checks passed
@olsh olsh deleted the manifest-v3 branch September 20, 2025 19:09
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.

Chrome / Chrome Web Store claims Extension will no longer be supported

2 participants