ux: clarify OpenCode terminal restart action

This commit is contained in:
Harsh 2026-03-06 13:24:54 +05:30
parent 77b54953da
commit 54bdc9f2ea
1 changed files with 5 additions and 3 deletions

View File

@ -564,7 +564,9 @@ export function DirectTerminal({
{isOpenCodeSession ? (
<button
onClick={handleReload}
disabled={reloading}
disabled={reloading || status !== "connected"}
title="Restart OpenCode session (/exit then resume mapped session)"
aria-label="Restart OpenCode session"
className="ml-auto flex items-center gap-1 rounded px-2 py-0.5 text-[11px] text-[var(--color-text-tertiary)] transition-colors hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)] disabled:cursor-not-allowed disabled:opacity-70"
>
{reloading ? (
@ -578,7 +580,7 @@ export function DirectTerminal({
>
<path d="M12 3a9 9 0 109 9" />
</svg>
reloading
restarting
</>
) : (
<>
@ -592,7 +594,7 @@ export function DirectTerminal({
<path d="M21 12a9 9 0 11-2.64-6.36" />
<path d="M21 3v6h-6" />
</svg>
reload
restart
</>
)}
</button>