Skip to content

Conversation

@marcoAntonioNina
Copy link
Contributor

@marcoAntonioNina marcoAntonioNina commented Jan 21, 2026

Issue & Reproduction Steps

The session loss warning when you have multiple tabs does not correctly control the time of each one; the time should be global and synchronized for all of them.

Solution

  • Implement session synchronization and timeout management in bootstrap.js; enhance Session.vue to utilize session state updates and warnings. This includes adding BroadcastChannel support for session events, localStorage management for session state, and integrating session renewal logic in the Session component.

How to Test

  • Log in to the ProcessMaker platform.

  • Open multiple browser tabs, such as:
    Editing a screen
    Editing a script
    Editing a process modeler
    Viewing a request page

  • Work on one of the open screens while leaving the other tabs idle.

  • After 5–10 minutes, the session automatically expires some time take more than.

  • When you try to submit changes, an "Unauthorized" message appears, along with a "Stay Connected" prompt.

  • If you do not click "Stay Connected" or miss the prompt, you are automatically logged out.

  • As a result, any unsaved changes in screens, scripts, or process models are lost.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:deploy


Note

Unifies and synchronizes session timeout handling across tabs with a new shared module and UI updates.

  • Introduces common/sessionSync.js to manage the timeout worker, leader election (via BroadcastChannel/localStorage), and cross-tab events: warning, renewing, renewed, started, activity, logout, expired
  • Replaces legacy timeout/Echo wiring in bootstrap.js and next/config/session.js with initSessionSync, wiring in Echo, notifications, and modal getters; exposes sessionSync and timeout vars globally
  • Enhances components/Session.vue to show a processing spinner during renewal, broadcast renewal/logout/expired, update shared session state, and restart worker only when leader
  • Adds sessionIsRenewing state to navbar (classic and Next) and passes it to <session-modal> in Blade; ensures closing the modal clears renewing state

Written by Cursor Bugbot for commit df25a80. This will update automatically on new commits. Configure here.

….js; enhance Session.vue to utilize session state updates and warnings. This includes adding BroadcastChannel support for session events, localStorage management for session state, and integrating session renewal logic in the Session component.
…bootstrap.js; update Session.vue to handle session expiration and logout functionality with improved button interactions. Modify session.js to ensure proper handling of timeout warning seconds.
@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-4956f1abde.engk8s.processmaker.net

cursor[bot]

This comment was marked as outdated.

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-4956f1abde.engk8s.processmaker.net

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-4956f1abde.engk8s.processmaker.net

…ion event handling; improving performance and user experience during session management.
…rap.js and Session.vue; update broadcast logic to synchronize logout state across tabs, improving user experience during session termination.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-4956f1abde.engk8s.processmaker.net

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-4956f1abde.engk8s.processmaker.net

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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.

3 participants