Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions openless-all/app/src/components/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,12 @@ function DesktopOnboarding({
]);
setAccessibility(a);
setMicrophone(m);
const aOk = !requiresAccessibility || a === 'granted' || a === 'notApplicable';
// Gate on the real permission status — macOS returns granted/denied, other
// platforms return notApplicable. This must NOT depend on the hotkey
// capability flag: it is null while it loads, so trusting it let mic-only
// onboarding finish before we knew macOS needs Accessibility, dropping users
// into the app with a dead hotkey. Mirrors the gate in App.tsx.
const aOk = a === 'granted' || a === 'notApplicable';
const mOk = m === 'granted' || m === 'notApplicable';
if (aOk && mOk) {
onComplete();
Expand Down Expand Up @@ -362,7 +367,7 @@ function DesktopOnboarding({
>
<BrandHeader title={t('onboarding.welcome')} desc={t('onboarding.intro')} />

{requiresAccessibility && (
{(requiresAccessibility || accessibility === 'denied') && (
<PermissionStep
index={1}
title={capability?.requiresAccessibilityPermission ? t('onboarding.accessibilityTitle') : t('onboarding.hotkeyTitle')}
Expand All @@ -380,13 +385,13 @@ function DesktopOnboarding({
: t('onboarding.actionGrant')
}
onAction={onGrantAccessibility}
disabled={busy || !capability?.requiresAccessibilityPermission || accessibility === 'granted' || accessibility === 'notApplicable'}
disabled={busy || accessibility === 'granted' || accessibility === 'notApplicable'}
hint={capability?.requiresAccessibilityPermission ? t('onboarding.accessibilityHint') : undefined}
/>
)}

<PermissionStep
index={requiresAccessibility ? 2 : 1}
index={(requiresAccessibility || accessibility === 'denied') ? 2 : 1}
title={t('onboarding.micTitle')}
desc={t('onboarding.micDesc')}
status={microphone}
Expand Down
Loading