Skip to content

Conversation

@redanthrax
Copy link
Contributor

  • set debug logging to enabled when in developer mode
  • read config from background worker (with merged config) and fall back to local storage

Copy link
Contributor

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 improves debug logging behavior and configuration loading to better support developer mode and URL allow lists. The key changes include auto-enabling debug logging when developer mode is active and ensuring the content script receives properly merged configuration (including enterprise policies) from the background worker.

  • Auto-enables debug logging when developer console logging (developer mode) is enabled
  • Updates content script to retrieve merged configuration from background worker with fallback to local storage
  • Removes duplicate debug logging UI checkbox, consolidating control under developer mode

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/modules/config-manager.js Adds logic to auto-enable debug logging when developer console logging is enabled during config merge
scripts/content.js Changes config retrieval to use background worker message passing for merged enterprise config, with local storage fallback
options/options.js Removes enableDebugLogging UI element references and auto-sets enableDebugLogging based on developer mode checkbox
options/options.html Removes separate debug logging checkbox and updates developer mode label to indicate it enables debug logging

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

Comment on lines +1160 to +1163
// Developer mode (debug logging auto-enabled when this is true)
enableDeveloperConsoleLogging:
this.elements.enableDeveloperConsoleLogging?.checked || false,
// Auto-enable debug logging when developer mode is enabled
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment on line 1163 is redundant with the comment on line 1160, and the code duplicates the same condition. Consider consolidating the comments or making the relationship more explicit. For example, combine into a single comment block above line 1160: // Developer mode - also auto-enables debug logging

Suggested change
// Developer mode (debug logging auto-enabled when this is true)
enableDeveloperConsoleLogging:
this.elements.enableDeveloperConsoleLogging?.checked || false,
// Auto-enable debug logging when developer mode is enabled
// Developer mode - also auto-enables debug logging
enableDeveloperConsoleLogging:
this.elements.enableDeveloperConsoleLogging?.checked || false,

Copilot uses AI. Check for mistakes.
@redanthrax
Copy link
Contributor Author

I said that in my commit, clanker.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: John Duprey <jwd@johnwduprey.com>
@JohnDuprey JohnDuprey merged commit 3da1e16 into CyberDrain:dev Nov 20, 2025
1 check passed
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