[fix] Release response lock reliably when browser/tab is closed

  • Use pagehide (with sendBeacon / fetch keepalive) instead of deprecated unload
  • Register current pageId in surveySession before render, so close request match
  • Keep lock for page restored from back-forward cache (new direct function keep)
  • Release lock when response is saved (saveall / savesubmit)
  • close direct request never delete lock of another browser
  • Fix multi access check when reloaded srid is a string
  • Fix surveySession delay : global max time and disabled delay

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Summary by CodeRabbit

  • Bug Fixes
    • Response locks now follow the active page during multi-access sessions and are released when navigating away. Returning to a suspended page attempts to reclaim its lock; if it is unavailable, the survey redirects.
    • Session cleanup now uses the configured global session limit. Nonpositive per-survey delays are treated as disabled.
    • Session locks are released only by the owning browser session or matching page, helping prevent one page from clearing another page’s lock.
Edited by CodeRabbit

Merge request reports

Loading
Loading