+
Session expired
+
Session ${sessionId.replace(/[<>]/g, '')} is gone, and no replay is available.
+
The transcript may have aged out after the 24-hour retention window.
+
← Back to terminal
+
+ `;
+ }
+```
+
+- [ ] **Step 5: Wire `_initFromQueryString` into the boot path**
+
+Find where the existing session-picker is shown after `DOMContentLoaded`. Wrap it:
+
+```javascript
+ document.addEventListener('DOMContentLoaded', async () => {
+ // existing init code (sockets, themes, etc.)
+
+ const handled = await _initFromQueryString();
+ if (handled) return;
+
+ // existing flow (show session picker, etc.)
+ });
+```
+
+The exact insertion site depends on the existing boot structure — read lines 990-1050 of `static/index.html` to find the right place.
+
+- [ ] **Step 6: Add history hygiene on pane close**
+
+Locate the existing pane-close handler. Inside, after the pane is removed, add:
+
+```javascript
+ // If this pane was opened via ?session=