fix: advertise the escalation shortcut only while the control is live

Codex on the e2e head, one P2: the tooltip appended the chord hint even
while the button was disabled, advertising a shortcut that does nothing
during an approval pause. The flagged control (InterruptNowButton) was
since replaced by the shared EscalateNowButton, which inherited the
pattern; the successor now omits the chord whenever the control is
disabled, matching the rule the during-run hovercard already follows.
This commit is contained in:
Danny Avila 2026-07-30 22:20:20 -04:00
parent 0e0aa51656
commit 814cbff086

View file

@ -136,7 +136,9 @@ export function EscalateNowButton({
}
/>
<Ariakit.Tooltip className="z-50 rounded-lg bg-surface-tertiary px-2 py-1 text-xs text-text-primary shadow-lg">
{chord ? `${label} · ${chord}` : label}
{/* A disabled control's shortcut does nothing right now, so the
* chord is only advertised while the escalation is live. */}
{chord && !disabled ? `${label} · ${chord}` : label}
</Ariakit.Tooltip>
</Ariakit.TooltipProvider>
</>