Skip to content

Inactivity Timer Resets After Browser RestartΒ #489

Open
@Ed-Ti

Description

Description the bug:
The inactivity timer for open tabs resets every time the browser is restarted or when the computer is shut down and turned back on. This leads to incorrect behavior, as the actual inactivity time of the tabs is not being tracked properly.

Steps to reproduce:

  1. Set the inactivity timer for a long period (e.g., 4300 minutes).
  2. Close the browser or shut down the computer.
  3. Reopen the browser and observe that the timer has restarted from the original time.

Expected behavior:
The timer should account for the actual time that has passed since the tab was last used, even if the browser was closed or the computer was off. It should not reset upon reopening the browser, but rather continue based on the real time of inactivity. Additionally, the timer should be able to handle long intervals of inactivity, such as several days or even weeks, depending on user preferences. For example, if a user sets the inactivity timer to 10 days, the plugin should accurately track such extended periods without resetting.

Proposed solution:
Instead of using a real-time timer, the plugin can store a timestamp of the last activity for each tab. This timestamp would record the date and time when the tab was last used. Upon browser restart, the plugin would compare the saved timestamps with the current date and time. This check could happen periodically, for example, once an hour or at another configurable interval. If the difference between the saved timestamp and the current time exceeds the user's set inactivity period, the tab would be closed.

Handling user activity: If the user is actively interacting with a tab (e.g., reading, watching a video), the timestamp should update based on user inputs (scrolling, typing, etc.). However, if the user remains on a tab without interacting with it for a long time, the last activity timestamp would remain unchanged, and the tab could eventually be closed based on the inactivity interval. This approach would ensure that tabs are not prematurely closed while the user is still engaged with them, but also properly tracks inactivity when no interaction occurs.

Environment:
Browser: Yandex Browser 24.7.2.1098 (64-bit) (based on Blink and Chromium)
Tab Wrangler version: 7.6.0
Operating System: Windows 10 Pro

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions