faameunier / tk-chrome

Tabby (aka project tabkiller) is a Chrome extension that aims at automatically deleting all your useless tabs.
https://www.tabby.us/
0 stars 0 forks source link

[Policy] The effective number of opened tab is settings + 1 #82

Closed faameunier closed 3 years ago

faameunier commented 4 years ago

The safety hack in the policy will not remove a tab if we have an excess of protected tabs. The active tab is always protected by the scorer.

When we have 6 tabs open, and the active tab is unpinned (95% of the time), the safety hack will block and no tabs will be closed.

Fix : change the safety hack condition to minus 1 ? Could be integrated with #70

MerlinLaffitte commented 4 years ago

Do you think we can add it before tomorrow night in the quick release?

faameunier commented 4 years ago

Still not sure what's the best way to do it... i want to be sure it can't lead to the current active tab deletion in the future


From: Merlec notifications@github.com Sent: Tuesday, June 2, 2020 11:39:35 PM To: faameunier/tk-chrome tk-chrome@noreply.github.com Cc: Francois MEUNIER faa.meunier@gmail.com; Assign assign@noreply.github.com Subject: Re: [faameunier/tk-chrome] [Policy] The effective number of opened tab is settings + 1 (#82)

Do you think we can add it before tomorrow night in the quick release?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/faameunier/tk-chrome/issues/82#issuecomment-637820984, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHEBCGXADAVR5DT3YIHSV6DRUVWRPANCNFSM4NQQTLDQ.

faameunier commented 4 years ago

not a problem in practice

faameunier commented 4 years ago

@MerlinLaffitte Reopening this one in link with #102

We should find a better fix as this behaviour creates a reverse problem when you create a new tab. Also, can we properly define a test case and expected behavior?

This is my understanding so far:

  1. Having 6 tabs open all unpinned, one active in excess
  2. the policy reads 5 open 1 protected
  3. Wait for a 5 / 10 minutes
  4. Create a new tab
  5. User side: 7 tabs, 2 in excess
  6. Focus automatically switches to the new tab
  7. The policy reads 6 open, 1 protected (active = new tab, we are expecting 5 open 2 protected)
  8. The policy closes a tab immediately in favor of the new tab (wrong behavior)

This in practice a bit harder to reproduce due to the scorer implementation. I think we can make a workaround by extending the soft protection envelope delay of the scorer

faameunier commented 3 years ago

it is not a bug, it's a feature