fix: mobile terminal back and X buttons navigate to /sessions

Terminal sessions are opened in a new tab via window.open with
noopener,noreferrer. In a new tab, window.history has no previous
entry, so navigate(-1) silently does nothing. Both the back arrow
and the X button in the mobile terminal overlay called navigate(-1),
which made them appear broken.

Change both buttons to navigate('/sessions') so they always exit
to a sensible page regardless of how the terminal was opened.

Quality gates: tsc --noEmit (pass), build (pass)
This commit is contained in:
Developer
2026-06-04 18:24:48 +00:00
parent 5dc7d44111
commit 703cf1f88b
+2 -2
View File
@@ -318,7 +318,7 @@ export const TerminalPage: React.FC = () => {
<div className="mobile-terminal-toolbar-left">
<button
className="mobile-terminal-toolbtn"
onClick={() => navigate(-1)}
onClick={() => navigate("/sessions")}
type="button"
aria-label="Back"
>
@@ -353,7 +353,7 @@ export const TerminalPage: React.FC = () => {
</button>
<button
className="mobile-terminal-toolbtn"
onClick={() => navigate(-1)}
onClick={() => navigate("/sessions")}
type="button"
aria-label="Exit terminal"
>