Skip to content

Conversation

@DNin01
Copy link
Member

@DNin01 DNin01 commented Sep 13, 2025

Resolves #5836
Same as #5838 by @iqnite but a different implementation, and additional features.

New features 2

Automatic pausing

Adds a new setting that, when enabled, allows the project to pause automatically when one of the following things happens:

  • Focus leaves the browser window
  • You switch browser tabs
  • You start typing a comment

...and automatically resume when focus returns.

However, it will not pause automatically if Cloud variables were updated in the last 15 seconds.

Show/hide pause button

Another new setting was added, Show pause button, which hides the pause button when turned off. When hidden, pause can still be toggled via keyboard shortcut.

This is useful alongside the auto-pause feature if you for some reason only want the auto-pause feature and don't need a button to manually pause the project.

Additional context

This feature was based on work that ended up becoming #8478, but here, the online feature detection has been stripped down from a complicated algorithm to a much simpler check for activity in the last 15 seconds, a process that ensures that projects with live user interaction aren't messed up by the auto-pausing.

Tests

Everything works as expected on both projects with and without Cloud variables.

@DNin01 DNin01 requested a review from Samq64 September 13, 2025 02:24
@DNin01 DNin01 added type: enhancement New feature for the project scope: addon Related to one or multiple addons labels Sep 13, 2025
@iqnite
Copy link
Contributor

iqnite commented Sep 13, 2025

Should there be a toggle for auto-resume as well?

@DNin01
Copy link
Member Author

DNin01 commented Sep 13, 2025

Should there be a toggle for auto-resume as well?

If you were distracted and switch back or if your computer was asleep, that would be ideal so that you have time to get back into action. Are there any other cases where you wouldn't want it to auto-resume?

I could also experiment with having it only auto-resume if you come back after less than a minute since the last auto-pause. I think that would be a good balance, however, it wouldn't really work if the pause button was hidden—one of the other additions in this PR. Perhaps there could be something like the big green flag button when a project loads but instead it's a resume button.

@iqnite
Copy link
Contributor

iqnite commented Sep 15, 2025

I could also experiment with having it only auto-resume if you come back after less than a minute since the last auto-pause.

I don't think that's what users expect. Instead, there could be an auto-resume toggle, and if it's enabled, a number input could appear, allowing to customize that time.

However, this amount of customization might still be a bit overkill.

Perhaps there could be something like the big green flag button when a project loads but instead it's a resume button.

This should definitely be a toggle. I pause projects to take a closer look at the stage, and a big button would obstruct the view.

@DNin01
Copy link
Member Author

DNin01 commented Sep 15, 2025

I could also experiment with having it only auto-resume if you come back after less than a minute since the last auto-pause.

I don't think that's what users expect. Instead, there could be an auto-resume toggle, and if it's enabled, a number input could appear, allowing to customize that time.

However, this amount of customization might still be a bit overkill.

Yeah, that could be confusing.

@Samq64
Copy link
Member

Samq64 commented Oct 2, 2025

How about auto-resuming after an interaction? That could also be confusing though, especially if the project doesn't register that input.

@DNin01
Copy link
Member Author

DNin01 commented Oct 5, 2025

I think auto-resuming is generally fine if it has only been a few moments since the project was paused and the device didn't go to sleep. Otherwise, I agree that resuming should be manual, unless the pause button is hidden, in which case, there wouldn't be an easy way to resume the project so maybe it should always auto-resume then. Complicated...?

How about auto-resuming after an interaction? That could also be confusing though, especially if the project doesn't register that input.

I like that on top of my previous idea. We could also display a play-button overlay that is like the green flag overlay that shows when a project first loads, but that appears when the project is paused and/or the pause button is hidden. That would make more sense when the pause button is hidden.

@DNin01 DNin01 added this to the v1.45.0 milestone Oct 5, 2025
@DNin01 DNin01 modified the milestones: v1.45.0, v1.46.0 Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: addon Related to one or multiple addons type: enhancement New feature for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-pause on focus leave

4 participants