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: cli flag for modules in config file + concurrency code fix #58

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Jan 17, 2025

Important

Adds CLI flag support for module arguments, fixes concurrency issues, and updates dependencies in lib.rs and manager.rs.

  • Behavior:
    • Adds CLI flag support for module arguments in UserConfig in lib.rs.
    • Refactors ManagerState in manager.rs to handle module arguments.
    • Implements handle_first_run() and listen_for_lockfile() in lib.rs to manage first run notifications and lockfile listening.
  • Concurrency:
    • Introduces AppHandleWrapper and TrayIdWrapper in lib.rs to manage concurrency with OnceLock and Condvar.
  • Dependencies:
    • Updates Cargo.toml with new versions for tauri, notify, directories, serde, log, and others.
    • Adds shell-words dependency in Cargo.toml for argument parsing.
  • Misc:
    • Removes unnecessary sleep in handle_first_run() in lib.rs.
    • Refactors start_module_thread() in manager.rs to use custom arguments if provided.

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

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 e2d2ef8 in 1 minute and 20 seconds

More details
  • Looked at 1064 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. src-tauri/src/manager.rs:309
  • Draft comment:
    Using unwrap here can cause a panic if the child process fails to start. Consider handling this error more gracefully.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. src-tauri/src/manager.rs:310
  • Draft comment:
    Using unwrap here can cause a panic if the child process fails to start. Consider handling this error more gracefully.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_uSvT54icQQMWru1Q


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

@0xbrayo 0xbrayo mentioned this pull request Jan 17, 2025
2 tasks
@0xbrayo 0xbrayo merged commit c45e43c into ActivityWatch:master Jan 17, 2025
5 checks passed
@0xbrayo 0xbrayo mentioned this pull request Jan 18, 2025
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