fix(chat): keep regenerate button visible in High Contrast mode (#27644)

Every action button on a response message gates its visibility on
'isLastMessage || ($settings?.highContrastMode ?? false)' so that buttons
stay visible (not hover-only) when High Contrast mode is on. The two
Regenerate buttons — the one inside RegenerateMenu and the fallback in the
{:else} branch — were missed and still gated on isLastMessage alone, so on
any non-last message the Regenerate icon was invisible until mouse-over even
with High Contrast enabled (#27638).

Add the same highContrastMode clause to both buttons, matching the other
action buttons in this file.
This commit is contained in:
Solaris-star
2026-08-10 23:27:42 -06:00
committed by GitHub
parent be9af1653e
commit 2387ce63cb
@@ -1388,7 +1388,7 @@
<button
type="button"
aria-label={$i18n.t('Regenerate')}
class="{isLastMessage
class="{isLastMessage || ($settings?.highContrastMode ?? false)
? 'visible'
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
>
@@ -1415,7 +1415,7 @@
<button
type="button"
aria-label={$i18n.t('Regenerate')}
class="{isLastMessage
class="{isLastMessage || ($settings?.highContrastMode ?? false)
? 'visible'
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button"
on:click={() => {