Commit 2f6ced0
fix(ui): redirect to session hub when no sessions exist (#122)
When the terminal page (`/terminal`) has no sessions — on initial load,
after the last session ends, or when polling detects all sessions are
gone — it previously showed a dead-end "No sessions" label with no way
forward.
Now it redirects to the session hub (`/`) using `location.replace()` so
users land on the proper empty state with a "+ New Session" button,
without polluting browser history.
**Changes:**
- Replace three `window.location.href` dead-end states in
`terminal.html` with `window.location.replace('/')`
- Add `test/e2e-empty-sessions.test.js` — Playwright E2E test covering
the redirect
Closes #121
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b0c6e47 commit 2f6ced0
2 files changed
Lines changed: 55 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2497 | 2497 | | |
2498 | 2498 | | |
2499 | 2499 | | |
2500 | | - | |
2501 | | - | |
2502 | | - | |
| 2500 | + | |
| 2501 | + | |
2503 | 2502 | | |
2504 | 2503 | | |
2505 | 2504 | | |
| |||
3139 | 3138 | | |
3140 | 3139 | | |
3141 | 3140 | | |
3142 | | - | |
3143 | | - | |
3144 | | - | |
3145 | | - | |
3146 | | - | |
| 3141 | + | |
| 3142 | + | |
3147 | 3143 | | |
3148 | 3144 | | |
3149 | 3145 | | |
| |||
4232 | 4228 | | |
4233 | 4229 | | |
4234 | 4230 | | |
4235 | | - | |
4236 | | - | |
4237 | | - | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
| 4231 | + | |
| 4232 | + | |
4241 | 4233 | | |
4242 | 4234 | | |
4243 | 4235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments