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

Maintain last tab used datetime even when open tabs is less than minTabs. #483

Open
rhhub opened this issue Aug 14, 2024 · 0 comments
Open

Comments

@rhhub
Copy link

rhhub commented Aug 14, 2024

Is your feature request related to a problem? Please describe.
I'm frustrated when my tabs are closed from left to right due to the current tab-closing logic. For instance, I have 5 tabs and a low minutesInactive setting. The last-used information isn't stored until I exceed the minTabs setting because the inactivity clock resets every 5 seconds. Once I have more than the minTabs, all tabs are placed on the same timer. When the timer runs out, they are closed from left to right, regardless of actual usage.

Describe the solution you'd like
Tab last access datetime should be stored and only changed when the tab is accessed (not updated every 5 seconds when open tabs is less than minTabs). The check for closing the tab could then be:

  1. Find tabs where (now - lastAccessed) > minutesInactive.
  2. Sort these tabs by lastAccessed.
  3. Close tabs until the number of open tabs is less then minTabs.

This approach would also allow for the implementation of a scanning frequency setting to enhance performance.

Describe alternatives you've considered
I considered increasing the minutesInactive setting, but this leads to tabs being closed less frequently, which isn't ideal.

Notes
From a short glance this logic might resolve issues that others have.
#412
#414.

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

No branches or pull requests

2 participants