Improve error messages on failed onboarding (#17357)

This commit is contained in:
Gaurav
2026-01-26 06:31:19 -08:00
committed by GitHub
parent cb772a5b7f
commit 5fe328c56a
17 changed files with 458 additions and 56 deletions
@@ -48,17 +48,17 @@ export function ValidationDialog({
},
];
// Handle keypresses during 'waiting' state (ESC to cancel, Enter to confirm completion)
// Handle keypresses globally for cancellation, and specific logic for waiting state
useKeypress(
(key) => {
if (keyMatchers[Command.ESCAPE](key) || keyMatchers[Command.QUIT](key)) {
onChoice('cancel');
} else if (keyMatchers[Command.RETURN](key)) {
} else if (state === 'waiting' && keyMatchers[Command.RETURN](key)) {
// User confirmed verification is complete - transition to 'complete' state
setState('complete');
}
},
{ isActive: state === 'waiting' },
{ isActive: state !== 'complete' },
);
// When state becomes 'complete', show success message briefly then proceed