Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

BelKed
Copy link
Contributor

@BelKed BelKed commented Mar 2, 2025

On Chromium-based browsers, the pop-up doesn't automatically close when the extension reloads, allowing users to click the save button multiple times and cause errors


Important

Close settings popup for non-Firefox browsers in reloadExtension() in main.ts.

  • Behavior:
    • In main.ts, reloadExtension() now closes the settings popup for non-Firefox browsers using window.close().
    • Specifically targets Chromium-based browsers by checking detectBrowser() !== 'firefox'.
  • Misc:
    • No changes to existing functionality for Firefox users.

This description was created by Ellipsis for dbc7296. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to dbc7296 in 1 minute and 17 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. src/settings/main.ts:11
  • Draft comment:
    Note: browser.runtime.reload() is called without await; ensure that subsequent window.close() executes as intended since reload may not be immediate.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
2. src/settings/main.ts:13
  • Draft comment:
    Suggestion: Verify that detectBrowser() reliably returns 'firefox' or another expected string to avoid unintended closures on unsupported browsers.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. src/settings/main.ts:8
  • Draft comment:
    Ensure that detectBrowser() returns a normalized (e.g., lowercase) value so the strict comparison with 'firefox' is reliable.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
    Without seeing the implementation of detectBrowser(), I cannot verify if case normalization is actually needed. The function could already return normalized values. The comment is speculative - it assumes there might be a case sensitivity issue without evidence. This violates the rule about not making speculative comments.
    The function could return inconsistent casing, making this a valid concern. Browser strings are notorious for inconsistency.
    While browser string inconsistency is a real concern, we need actual evidence of a problem. The function could be well-designed to handle this already.
    Delete the comment as it's speculative without evidence of an actual issue. We'd need to see detectBrowser()'s implementation to know if this is really needed.
4. src/settings/main.ts:14
  • Draft comment:
    Consider potential timing issues: calling browser.runtime.reload() and then immediately window.close() might be sensitive to race conditions. A short delay before closing the window might ensure the reload is properly initiated on Chromium-based browsers.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None

Workflow ID: wflow_XQzDMwYqFHBxfhzP


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ErikBjare ErikBjare merged commit 2076c82 into ActivityWatch:master Mar 2, 2025
5 checks passed
@BelKed BelKed deleted the settings-popup branch March 12, 2025 14:21
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.