Skip to content

feat(user-status): add system activity and system lock check on online/away status update #1222

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

Merged
merged 5 commits into from
May 30, 2025

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Apr 17, 2025

☑️ Resolves

  1. When a user locks the system - it is immediately - Away (only Windows and macOS are supported)
  2. Otherwise, if the user is idle in the system for 2 minutes - Away
  3. Otherwise, if the user is inactive in the app (in case of IdleDetector being unavailable) - Away
  4. Otherwise Online

Has refactorings => review simpler by commits.

The last commit is for testing.

Notes:

  • IdleDetector has a delay for locked/unlocked (~7-15 seconds on my test on Windows)
    • Alternative: PowerMonitor on Electron side
  • Heartbeat is now sent immediately in both, switch to away and to online changes

🖼️ Screenshots

No visual changes

@ShGKme ShGKme added enhancement New feature or request 2. developing labels Apr 17, 2025
@ShGKme ShGKme added this to the 🪴 Next Release milestone Apr 17, 2025
@ShGKme ShGKme self-assigned this Apr 17, 2025
@ShGKme ShGKme modified the milestones: v1.1.7, 🪴 Next Release Apr 18, 2025
@ShGKme ShGKme force-pushed the feat/idle-detection branch from 7861e48 to 751e6c2 Compare April 28, 2025 10:00
@ShGKme ShGKme modified the milestones: v1.1.8, 🪴 Next Release May 5, 2025
@ShGKme ShGKme force-pushed the feat/idle-detection branch from 751e6c2 to d3fc6bc Compare May 29, 2025 10:03
@ShGKme ShGKme force-pushed the feat/idle-detection branch 3 times, most recently from 97a5cb9 to a3f8c15 Compare May 29, 2025 10:54
@ShGKme ShGKme marked this pull request as ready for review May 29, 2025 10:55
@ShGKme ShGKme requested a review from Antreesy May 29, 2025 10:55
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Tested

ShGKme added 5 commits May 30, 2025 14:28
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
- Add notes
- Simplify
- Wait for heartbeat request before waiting for the next heartbeat
- Also restart on going to away

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the feat/idle-detection branch from c200d08 to c7dd43f Compare May 30, 2025 12:29
@ShGKme
Copy link
Contributor Author

ShGKme commented May 30, 2025

  • Squashed
  • Removed debug commit
  • Rebased onto main with no conflicts

@ShGKme ShGKme enabled auto-merge May 30, 2025 12:29
@ShGKme ShGKme merged commit 043d4b2 into main May 30, 2025
11 checks passed
@ShGKme ShGKme deleted the feat/idle-detection branch May 30, 2025 12:30
@ShGKme ShGKme mentioned this pull request May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System-level user activity/Idle status
2 participants