gemini-cli - 💡(How to fix) Fix Missing 'Esc to close' hint in the auth dialog

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

What happened?

The AuthDialog (where users select their authentication method, like "Sign in with Google" or "Use Gemini API Key") is missing a hint that the user can press Esc to cancel/close the dialog. This is inconsistent with other dialogs like ApiAuthDialog and BannedAccountDialog which do show the escape hint.

What did you expect to happen?

The dialog should display a hint like (Use Enter to select, Esc to cancel) when it's possible to dismiss the dialog.

Client information

<details> <summary>Client Information</summary>

OS: Linux Version: latest (main branch)

</details>

Login information

N/A (this is about the login selection dialog itself)

Anything else we need to know?

  • The functionality to handle Esc is already implemented in packages/cli/src/ui/auth/AuthDialog.tsx via the useKeypress hook.
  • The hint is present in packages/cli/src/ui/auth/ApiAuthDialog.tsx as (Press Enter to submit, Esc to cancel, Ctrl+C to clear stored key).
  • In AuthDialog.tsx, it currently only shows (Use Enter to select).

extent analysis

TL;DR

Add an escape hint to the AuthDialog component, similar to other dialogs, to inform users they can press Esc to cancel or close the dialog.

Guidance

  • Review the AuthDialog.tsx file and compare it with ApiAuthDialog.tsx to identify the difference in hint implementation.
  • Update the AuthDialog component to include the escape hint, e.g., (Use Enter to select, Esc to cancel), to maintain consistency with other dialogs.
  • Verify that the useKeypress hook is correctly handling the Esc key press event in AuthDialog.tsx.
  • Test the updated AuthDialog component to ensure the escape hint is displayed and functions as expected.

Example

// AuthDialog.tsx
import { useKeypress } from './useKeypress';

const AuthDialog = () => {
  // ...
  return (
    <div>
      {/* ... */}
      <p>(Use Enter to select, Esc to cancel)</p>
      {/* ... */}
    </div>
  );
};

Notes

The fix assumes that the useKeypress hook is correctly implemented and handles the Esc key press event. If the issue persists, further investigation into the hook's implementation may be necessary.

Recommendation

Apply workaround: Update the AuthDialog component to include the escape hint, as this is a straightforward fix that maintains consistency with other dialogs and does not require any version upgrades.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING