Async/Push UI updates are preventing idle

in my Vaadin 23 application, there is an option for the use to pop up a floater that periodically updates to show some backend status metrics.
When the user does not use the status floater, the usual closeIdleSessions=true and such works properly, expiring the session and logging the user out as expected.
When the user does use the status metrics floater, the session never terminates. It appears that when server push updates the UI (e.g. updating the displayed metrics), the client side sends back a confirmUpdate request, which then resets the session timer, keeping the session open and the user logged in.

I’m clearly missing something here - how can I push updates to the user in a way that doesn’t break idle logout?

You can use closeIdleSessions = true to get the intended behaviour, see this:

This is a source of constant confusion, so I would suggest to make the default true in the framework

No - as I mentioned above, we already use closeIdleSessions=true and it works unless we are also using push to update UI elements. It is as if heartbeats are (correctly) ignored but uidl confirmUpdate messages are not. Indeed, uidl requests appear to unconditionally update the timestamp in v23, so I’m not sure how this could work at all unless ui pushes went unconfirmed.

Oh, sorry, I had tunnel vision as this was already discussed in other threads where missing closeIdleSessions = true seemed to be the cause.

yeah, I’ve opened a support ticket: I’m not sure if what I’m seeing is a bug/regression or if there’s new functionality that needs to be taken into account (or we’re abusing things somehow). Hopefully I’ll get an answer and will respond here.

Right, good luck, I hope you find a solution soon!

Actually closeIdleSessions = true does not help here. It is because Grid refreshAll will include request back to the server (required for keeping states in sync), which will update lastRequestTimeStamp. This is something that should be perhaps added to Grid documentation.

Thanks Tatu - Indeed, when I dropped the use of Grid from this component, timeouts work as expected.