Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix buggy autostart minimized. #95

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Feb 21, 2025

#56


Important

Fixes autostart minimized behavior by correcting window visibility logic in lib.rs and updating tauri.conf.json.

  • Behavior:
    • Fixes logic in run() in lib.rs to correctly show the main window when autostart is true and autostart_minimized is false.
    • Updates tauri.conf.json to set visible to false for the main window, ensuring it starts minimized by default.
  • Misc:
    • No changes to support additional sub-events or error logging.

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

@0xbrayo 0xbrayo force-pushed the window-minimized-fix branch from 50de04f to fbd06cb Compare February 21, 2025 16:16
Copy link

@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 50de04f in 1 minute and 3 seconds

More details
  • Looked at 32 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. src-tauri/src/lib.rs:482
  • Draft comment:
    Changed autostart_minimized check seems to invert the logic intentionally. Confirm that when autostart_minimized is false the window should show on non-first run.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
2. src-tauri/tauri.conf.json:12
  • Draft comment:
    Setting 'visible': false makes the window hidden on startup. Ensure this aligns with the intended autostart behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. src-tauri/src/lib.rs:482
  • Draft comment:
    Reversed autostart_minimized condition: Now the code calls window.show() when autostart is enabled and autostart_minimized is false. Confirm this matches the intended behavior (i.e. show the window when not minimized, and keep hidden otherwise). Also, the use of !*is_first_run() is key—ensure that first-run behavior is as expected.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 30% <= threshold 50%
    The comment is asking the PR author to confirm the intended behavior, which violates the rule against asking for confirmation of intention. However, it also provides a specific observation about the code change, which is useful. The part about ensuring first-run behavior is as expected is also asking for confirmation, which is not allowed. Overall, the comment is mostly about confirming intentions, which is not allowed.
4. src-tauri/tauri.conf.json:12
  • Draft comment:
    Setting "visible": false ensures the main window starts hidden by default. This supports the autostart minimized feature. Verify this aligns with overall UX expectations.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is informative and asks the PR author to verify alignment with UX expectations, which is against the rules. It doesn't provide a specific code suggestion or ask for a specific test to be written.
5. src-tauri/src/lib.rs:369
  • Draft comment:
    Typo detected: In the error message on line 369, 'Unable to disable autosart' should likely be corrected to 'Unable to disable autostart'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_cXO3uG8gE0QCNRb6


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

@0xbrayo 0xbrayo merged commit b749c14 into ActivityWatch:master Feb 21, 2025
6 checks 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.

1 participant