Skip to content

Conversation

@fzahner
Copy link

@fzahner fzahner commented Jan 6, 2026

  • Automatically blocking all tabs in the block list when turning on the blocker or after the end of a pause
  • Automatically unblocking all blocked tabs when turning the blocker off or when taking a pause
  • Statically importing CSS into HTML files (to fulfill Firefox CSP)
  • Bringing NPM packages up to date (ran npm audit fix --force)

Adresses the following Issues:

@raicem

Previously, when having the Popup open while a timer expired, the UI did
not update accordingly, but wrapped back to displaying a 1 hour timer on
the cancel button

This commit fixes this bug

revert pausebutton for dev purposes
Copilot AI review requested due to automatic review settings January 6, 2026 17:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements automatic tab blocking/unblocking functionality when the Impulse Blocker extension is toggled on/off or paused. It also addresses Firefox CSP requirements by statically importing CSS files and updates several NPM dependencies.

Key Changes:

  • Adds refreshBlockedTabs() to automatically reload tabs with blocked domains when the blocker starts
  • Adds enableBlockedTabs() to automatically restore blocked tabs to their original URLs when the blocker is paused or stopped
  • Fixes countdown timer in PauseSection to properly trigger state refresh when pause expires
  • Migrates CSS imports from JavaScript to static HTML link tags for Firefox CSP compliance

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/ImpulseBlocker.js Core functionality: adds tab refresh/enable methods and integrates them with start/stop/pause workflows
src/popup/components/Pause/PauseSection.js Fixes countdown timer to clear interval and trigger onChange when pause expires
src/popup/index.js Removes dynamic CSS import from JavaScript
src/options/index.js Removes dynamic CSS import from JavaScript
extension/popup.html Adds static CSS link tag for popup styles
extension/options.html Adds static CSS link tag for options styles
package.json Updates Jest, babel-jest, css-loader, file-loader, web-ext, webpack, and webpack-cli versions
web-ext-config.mjs Converts from CommonJS to ES module syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"babel-jest": "^26.6.3",
"babel-jest": "^30.2.0",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^1.0.1",
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The webpack has been upgraded from v4 to v5, but the clean-webpack-plugin is still at v1.0.1 which is not compatible with webpack 5. This will cause build errors. The plugin should be updated to v3.0.0 or later, or you should use webpack 5's built-in asset cleaning feature by setting 'output.clean: true' in webpack.config.js.

Suggested change
"clean-webpack-plugin": "^1.0.1",
"clean-webpack-plugin": "^3.0.0",

Copilot uses AI. Check for mistakes.
"file-loader": "^6.2.0",
"jest": "^30.2.0",
"react-test-renderer": "^16.14.0",
"style-loader": "^0.23.1",
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The style-loader is still at v0.23.1, which is incompatible with webpack 5. This package should be updated to v3.0.0 or later for webpack 5 compatibility. However, if the intention is to extract CSS into separate files (as suggested by the HTML changes), this should be replaced with mini-css-extract-plugin instead.

Suggested change
"style-loader": "^0.23.1",
"style-loader": "^3.0.0",

Copilot uses AI. Check for mistakes.
fzahner and others added 2 commits January 9, 2026 15:00
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