// Preserve task parameter before SPA strips it
(function() {
  
  // Check current URL for task parameter
  const currentUrl = window.location.href;
  const urlParams = new URLSearchParams(window.location.search);
  const taskId = urlParams.get('task');
  
  
  if (taskId) {
    // Store task parameter in sessionStorage
    sessionStorage.setItem('pendingTaskId', taskId);
  }
})();
