WIP: feat(auth): automatic logoff after user inactivity (UI API 1.12.0) #211
Draft
james.maes
wants to merge 1 commits from
feat/session-user-activity into main
pull from: feat/session-user-activity
merge into: QRun-IO:main
QRun-IO:main
QRun-IO:feature/table-default-sort
QRun-IO:fix/audit-dialog-layout-and-requests
QRun-IO:feature/account-menu-host-links
QRun-IO:fix/presence-outage-quiet
QRun-IO:fix/explore-views-way-back
QRun-IO:fix/process-link-and-preference-redirect
QRun-IO:fix/ask-indicator-anchor
QRun-IO:feat/about-build-info
QRun-IO:fix/error-banner-names-cause
QRun-IO:fix/signin-always-asks-credentials
QRun-IO:kof22/next-workflow-assets-on-pr206
QRun-IO:feat/standalone-qbits-ui
QRun-IO:feature/authentik-access-ui
QRun-IO:feat/qqq-tools
QRun-IO:ci/historical-finding-baseline-20261101
QRun-IO:dependabot/npm_and_yarn/npm-minor-and-patch-89ab5b524d
QRun-IO:dependabot/npm_and_yarn/dompurify-3.4.17
QRun-IO:dependabot/npm_and_yarn/storybook-10.6.2
QRun-IO:dependabot/npm_and_yarn/zod-4.6.6
QRun-IO:feature/collaboration-rc37
QRun-IO:dependabot/github_actions/github-actions-85a4666970
QRun-IO:fix/windows-export-1309
QRun-IO:release/collab-rc37
QRun-IO:feature/collaboration-production-20261021
QRun-IO:feature/assistant-panel-chrome
QRun-IO:dependabot/npm_and_yarn/playwright/test-1.64.0
QRun-IO:dependabot/npm_and_yarn/jest-axe-11.0.0
QRun-IO:dependabot/npm_and_yarn/testing-library/jest-dom-7.0.1
QRun-IO:dependabot/npm_and_yarn/lucide-react-1.54.0
QRun-IO:dependabot/maven/maven-minor-and-patch-9cd342f381
QRun-IO:feature/process-one-time-secrets
QRun-IO:pr-assets/user-preferences
QRun-IO:pr-assets/date-filters
QRun-IO:pr-assets/search-ux
QRun-IO:pr-assets/record-picker
QRun-IO:pr-assets/resizable-nav
QRun-IO:pr-assets/sql-workbench-theme
QRun-IO:pr-assets/record-developer-view
QRun-IO:feature/next-rc13-prep
QRun-IO:feature/home-app
QRun-IO:pr-assets/widget-width-readability
QRun-IO:feature/responsive-readable-layout
QRun-IO:pr-assets/single-scroll-container
QRun-IO:feature/image-preview-lightbox
QRun-IO:feature/sql-workbench
QRun-IO:pr-assets/responsive-readable-layout
QRun-IO:feature/GH-712-next-rc12
QRun-IO:fix/45-record-actions-menu
QRun-IO:feature/GH-660-header-off-bulk-load
QRun-IO:feature/GH-723-record-view-process-order
QRun-IO:feature/widget-date-defaults
QRun-IO:feature/GH-1001-dashboard-readiness
QRun-IO:feature/GH-985-browser-security-integration
QRun-IO:feature/GH-1003-chart-label-readiness
QRun-IO:feature/GH-1017-standalone-csp-metadata
QRun-IO:feature/GH-1009-standalone-branding
QRun-IO:feature/GH-1015-circle-stage-diagnostic
QRun-IO:feature/GH-734-standalone-security-acceptance
QRun-IO:feature/GH-696-security-review-status
QRun-IO:feature/GH-985-agent-handoff-20261002
QRun-IO:feature/GH-1006-next-query-cleanup
QRun-IO:feature/next-date-default-rc12
QRun-IO:feature/GH-995-cell-focus-investigation
QRun-IO:feature/GH-994-copy-menu-focus
QRun-IO:feature/GH-952-session-capture
QRun-IO:feature/GH-716-menu-viewport
QRun-IO:feature/GH-904-document-capture
QRun-IO:feature/GH-712-next-rc11
QRun-IO:feature/GH-904-transport-capture
QRun-IO:feature/GH-970-browser-input-races
QRun-IO:feature/GH-990-esb-touch-coverage
QRun-IO:feature/GH-712-next-rc10
QRun-IO:feature/QQQ-989-pr15-reconciliation
QRun-IO:feature/browser-stability
QRun-IO:feature/GH-985-next-tracking
QRun-IO:feature/GH-10-esb-acceptance
QRun-IO:feature/rc9-publication-notes
QRun-IO:feature/next-1.0
QRun-IO:feature/next-issue-tracking
QRun-IO:fix/GH-12-flaky-qry-051
QRun-IO:feature/GH-9-esb-process-dev-overview-management
QRun-IO:feature/GH-8-esb-table-dev-section
QRun-IO:fix/ci-unattended-install
QRun-IO:feature/GH-649-next-acceptance
QRun-IO:feature/qqq-641-local-quickstart
QRun-IO:feature/4.0-joined-list-permissions
QRun-IO:circleci-project-setup
No Reviewers
Labels
Clear labels
architecture
bug
dependencies
documentation
duplicate
enhancement
full-acceptance
github_actions
good first issue
help wanted
invalid
java
javascript
question
secuurity
ux
wontfix
Architecture review: coupling, cohesion, UI API
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Run the full real-backend acceptance matrix on this PR
Pull requests that update GitHub Actions code
Good for newcomers
Extra attention is needed
This doesn't seem right
Pull requests that update java code
Pull requests that update javascript code
Further information is requested
Admin UX / information architecture
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: QRun-IO/qqq-frontend-next#211
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Automatic logoff: a session must end after a set time without a user action. This app polls (jobs, alerts, presence), so its requests are not its user. QQQ core gets a user inactivity timeout in QRun-IO/qqq PR 1361 (UI API 1.12.0); this is the Next UI's side of it.
What
Nothing changes, and no header is sent, unless the server publishes
values.userInactivityTimeoutSecondsinGET /metaData/authentication.src/lib/auth/user-activity.ts: the time of the last key, pointer (down or move), wheel or touch; page load counts as one. Shared between the tabs of one browser throughlocalStorage(they share the session), written at most once a second.src/lib/api/client.ts: every request statesX-QQQ-User-Activity-Age(whole seconds since the last user action). The threefetchcall sites that bypass the client (assistant stream, realtime stream, presence beacon) state it too.src/components/layout/InactivityLogoff.tsx, mounted inproviders.tsx: warns 60 seconds before ("Are you still there? You will be signed out in N seconds because of inactivity." with "Stay signed in"), and signs out through the normallogout()when the time runs out (backend logout, then the identity provider's end-session). Any user action dismisses the warning. For an active user on a page that sent nothing for four minutes it resumes the session once, so the activity reaches the server and the session is renewed.QAuthenticationMetaData.values.userInactivityTimeoutSecondstyped. The bundled UI API document is not re-vendored:ui-api:checkaccepts a newer server.The server enforces the same timeout by itself at the next request (401). A hidden tab's timers are throttled by the browser; the server and the tab's next tick still end the session.
Verified
pnpm typecheck: clean.pnpm lint: 0 errors (6 warnings, none in these files), license headers pass.pnpm test: 366 files, 3834 passed, 1 skipped; the new tests areuser-activity.test.ts,InactivityLogoff.test.tsx, one each inclient.test.tsand the login page test.d9f2baa0(typecheck, lint, test,build:export, Maven): success (run 7367).Release
After QRun-IO/qqq PR 1361 is released (the header is only sent to a server that publishes the timeout, so the order is not critical): tag the next RC (
v1.0.0-RC.40), then hosts pin it.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.