Files
unisono/specs/009-inactive-sessions-purging/quickstart.md
2025-10-16 12:59:43 +03:00

43 lines
2.4 KiB
Markdown

# Quickstart Guide for Inactive Sessions Purging, Form Data Persistence, and Centralized Snackbars
This guide provides instructions to quickly set up, configure, and verify the new features.
## 1. Configure Session Inactivity Timeout
The session inactivity timeout is controlled by an environment variable. To configure it:
1. Locate your backend service's environment configuration (e.g., `.env` file, Docker Compose environment variables).
2. Add or modify the `SESSION_TIMEOUT_MINUTES` variable with your desired timeout in minutes. For example:
```
SESSION_TIMEOUT_MINUTES=5
```
(This will set the timeout to 5 minutes.)
3. Restart your backend service for the changes to take effect.
## 2. Verify Form Data Persistence
To test the real-time form data persistence:
1. Navigate to a page containing a form (e.g., a user profile edit page, a new entry form).
2. Start typing values into the form fields but DO NOT submit the form.
3. Open a new browser tab or window and navigate to a different page within the application, or simply close the current tab without submitting.
4. Return to the original form page (or reopen the tab).
5. **Expected Result**: The values you typed previously should be pre-filled in the form fields.
6. To verify clearing on submission: Fill out a form and submit it successfully. Then, try to return to that form page. The fields should now be empty.
## 3. Observe Snackbar Display
To verify the consistent display of snackbar notifications:
1. Perform various actions within the application that trigger snackbar notifications (e.g., successful form submission, an error message, a confirmation).
2. **Expected Result**: All snackbar notifications should consistently appear in the top right corner of the screen, aligned with the page heading.
3. Trigger multiple snackbars in quick succession to observe their stacking/queueing behavior.
## 4. Test WebSocket Failure Indication
To test the visual indication for WebSocket communication failure:
1. Navigate to a page with a form that uses real-time persistence.
2. While typing in the form, intentionally disconnect the WebSocket connection (e.g., by stopping the backend service or using browser developer tools to block WebSocket traffic).
3. **Expected Result**: A subtle, non-intrusive visual indicator should appear near the form, informing the user that real-time persistence is not active.