fix: terminal button should link to session detail page, not raw xterm URL
The terminal button was fetching from the terminal-web plugin and opening a raw xterm.js URL (localhost:7801). Changed to a simple link to the session detail page which has an embedded terminal. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
05473376ad
commit
8ce33b29da
|
|
@ -105,22 +105,13 @@ export function SessionCard({ session, onSend, onKill, onMerge, onRestore }: Ses
|
|||
</button>
|
||||
)}
|
||||
{!isTerminal && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const port = process.env.NEXT_PUBLIC_TERMINAL_PORT ?? "3001";
|
||||
fetch(`http://localhost:${port}/terminal?session=${encodeURIComponent(session.id)}`)
|
||||
.then((res) => res.json() as Promise<{ url: string }>)
|
||||
.then((data) => window.open(data.url, `terminal-${session.id}`))
|
||||
.catch(() => {
|
||||
// Fall back to session detail page
|
||||
window.location.href = `/sessions/${encodeURIComponent(session.id)}`;
|
||||
});
|
||||
}}
|
||||
className="shrink-0 rounded-md border border-[var(--color-border-default)] px-2.5 py-0.5 text-[11px] text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-accent-blue)] hover:text-[var(--color-accent-blue)]"
|
||||
<a
|
||||
href={`/sessions/${encodeURIComponent(session.id)}`}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="shrink-0 rounded-md border border-[var(--color-border-default)] px-2.5 py-0.5 text-[11px] text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-accent-blue)] hover:text-[var(--color-accent-blue)] hover:no-underline"
|
||||
>
|
||||
terminal
|
||||
</button>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue