Skip to content

feat: Idle-aware smart test scheduling using chrome.idle API #30

Description

@ajithakdev

Summary

Enhance the scheduled test system to be "idle-aware" — never run bandwidth-intensive tests while the user is actively working, on a video call, or gaming.

Current state

Scheduled tests use chrome.alarms with fixed intervals (configurable in options). Tests fire regardless of user activity.

Proposed improvement

  • Use chrome.idle.queryState() before running scheduled tests
  • Only run full bandwidth tests when state is 'idle' (user hasn't interacted for 60+ seconds)
  • If user is 'active', defer the test and retry after 5 minutes
  • If user is 'locked', still run the test (screen locked = not actively using bandwidth)

Why

  • Prevents scheduled tests from disrupting active Zoom calls, gaming sessions, or large downloads
  • Makes background monitoring truly invisible and non-intrusive
  • Addresses the Dev/v2025.2.0 #1 complaint about continuous monitoring tools: "It slows down my browser"

Implementation

  • Add chrome.idle permission to manifest
  • Wrap runFullTest() call in alarm listener with idle check
  • Add configurable idle threshold in options (default: 60 seconds)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance optimization

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions