Skip to content

shell: More robust session time outs#22929

Open
mvollmer wants to merge 2 commits intocockpit-project:mainfrom
mvollmer:shell-real-time-idle-timeouts
Open

shell: More robust session time outs#22929
mvollmer wants to merge 2 commits intocockpit-project:mainfrom
mvollmer:shell-real-time-idle-timeouts

Conversation

@mvollmer
Copy link
Member

@mvollmer mvollmer commented Feb 26, 2026

This makes them work even when JavaScript stops running.

Demo: https://youtu.be/gVb_cbIlfqo

Counting timer ticks works only when the ticks come on time. Usually
they do, but browsers might decide to not run our JavaScript for
whatever reason, especially if the tab is actually idle or minimized
or otherwise hidden.

By looking at the wall clock time, the session gets logged out
immediately once the timer ticks start coming again (and it has indeed
been idle long enough).

See https://issues.redhat.com/browse/COCKPIT-1418
@mvollmer
Copy link
Member Author

I will backport this to RHEL 8.10 once this is merged (and we agree that we should backport it).

@mvollmer mvollmer force-pushed the shell-real-time-idle-timeouts branch from feb30a6 to 4ca92b7 Compare February 26, 2026 17:32
and use it as a backup for the JavaScript session timeout
implementation. With it, the session really ends at about the expected
time, regardless of whether JavaScript is executed by the browser or
not.

We keep the JavaScript implementation so that session timeouts work
with older cockpit-ws versions and to keep the cockpit-ws side
simple. There anyway needs to be cooperation from JavaScript to
perform a proper logout.
@mvollmer mvollmer force-pushed the shell-real-time-idle-timeouts branch from 4ca92b7 to b6b7ef0 Compare February 26, 2026 17:45
@mvollmer mvollmer marked this pull request as ready for review March 2, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant