fix(macos): FDA toast copy + inline action row (#41892)

* fix(macos): FDA toast copy claims only observed file prompts, not agent interruptions

* fix(macos): keep FDA toast actions inline on roomy cards and ring the dismiss link on focus
This commit is contained in:
Jinjing
2026-11-13 21:34:27 -08:00
committed by GitHub
parent 2105344a21
commit b5bfbf58c8
2 changed files with 13 additions and 14 deletions
@@ -35,12 +35,10 @@ export function FullDiskAccessNudgeToast({
const t = useTranslate()
const title =
promptCount > 1
? t(
'auto.hooks.useMacosTccPromptNotice.titleMany',
'macOS interrupted your agents {{count}}×',
{ count: promptCount }
)
: t('auto.hooks.useMacosTccPromptNotice.titleOne', 'macOS just interrupted an agent')
? t('auto.hooks.useMacosTccPromptNotice.titleMany', 'macOS showed {{count}} file prompts', {
count: promptCount
})
: t('auto.hooks.useMacosTccPromptNotice.titleOne', 'macOS just showed a file prompt')
return (
<div className="@container relative w-[26rem] max-w-full rounded-lg border border-border bg-popover px-3.5 py-3.5 text-popover-foreground shadow-floating">
@@ -61,15 +59,16 @@ export function FullDiskAccessNudgeToast({
<p className="text-[12.5px] leading-snug text-muted-foreground">
{t(
'auto.hooks.useMacosTccPromptNotice.subtitle',
'Full Disk Access stops these file prompts.'
'Full Disk Access stops these prompts.'
)}
</p>
</div>
</div>
{/* Why: on a roomy card, indent by illustration width + gap so the actions start
under the title. Below ~22rem of card width (20rem content box) that indent would
push the button past the border, so the row drops it and stacks full width. */}
<div className="mt-3 flex flex-col items-start gap-y-1.5 @[20rem]:ml-[90px] @[20rem]:flex-row @[20rem]:flex-wrap @[20rem]:items-center @[20rem]:gap-x-2">
under the title; below a 20rem content box that indent would overflow, so stack.
Each property is set only by a container variant: dev-loaded utility sheets
(react-grab) re-declare base utilities later and would win a base-vs-variant tie. */}
<div className="mt-3 flex flex-wrap gap-x-2 gap-y-1.5 @[20rem]:ml-[90px] @[20rem]:items-center @max-[20rem]:flex-col @max-[20rem]:items-start">
{/* Why: Button is nowrap/shrink-0 by default; let the label wrap rather than overflow. */}
<Button
variant="default"
@@ -81,7 +80,7 @@ export function FullDiskAccessNudgeToast({
</Button>
<button
type="button"
className="text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground"
className="rounded-sm text-xs text-muted-foreground underline underline-offset-2 outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50"
onClick={onDontShowAgain}
>
{t('auto.hooks.useMacosTccPromptNotice.dismiss', "Don't show again")}
+3 -3
View File
@@ -2682,9 +2682,9 @@
"unreadableSkillSource": "A skill folder did not respond, so this status may be incomplete."
},
"useMacosTccPromptNotice": {
"titleOne": "macOS just interrupted an agent",
"titleMany": "macOS interrupted your agents {{count}}×",
"subtitle": "Full Disk Access stops these file prompts.",
"titleOne": "macOS just showed a file prompt",
"titleMany": "macOS showed {{count}} file prompts",
"subtitle": "Full Disk Access stops these prompts.",
"enable": "Turn on Full Disk Access",
"close": "Close",
"dismiss": "Don't show again"