gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

ui.footer.hideContextPercentage: false does not show context usage in footer (v0.20.0)

Open AmanKRoy opened this issue 11 months ago • 2 comments

What happened?

The context window usage percentage is not visible in the CLI footer, even though ui.footer.hideContextPercentage is explicitly set to false in my settings.json.

Image

What did you expect to happen?

The footer should display the current context window usage percentage (e.g., "Context: 1%") alongside the model information (if enabled).

Client information

  • CLI Version: 0.20.0
  • Git Commit: d0ce3c4c5
  • Session ID: 4c662676-8027-488b-9e9a-301aa7fab4b3
  • Operating System: win32 v24.11.1
  • Sandbox Environment: no sandbox
  • Model Version: auto
  • Memory Usage: 428.3 MB

Login information

OAuth (Personal Google Account)

Anything else we need to know?

I have verified that no other configuration files or environment variables are overriding this setting.

My ~/.gemini/settings.json configuration: 1 { 2 "ui": { 3 "footer": { 4 "hideContextPercentage": false, 5 "hideModelInfo": false 6 }

Image

7 }
8 }

AmanKRoy avatar Dec 09 '25 23:12 AmanKRoy

@AmanKRoy it seems your footer is not displayed at all?

Do you have hideFooter set to true in /settings, seems that would be the case.

If you have the entire footer being hidden it will override the context percentage.

jackwotherspoon avatar Dec 10 '25 13:12 jackwotherspoon

Hi @AmanKRoy,

I investigated this issue and found that the code logic appears correct. However, I noticed that the documentation could be clearer about the relationship between these settings.

Could you confirm:

  1. Is hideModelInfo set to false in your settings?
  2. Is hideFooter set to false (or not set at all)?

The hideContextPercentage setting only takes effect when both hideModelInfo and hideFooter are false, as the context percentage is displayed inside the model info section.

I'd be happy to submit a documentation PR to clarify this dependency.

tomsen02 avatar Dec 10 '25 13:12 tomsen02

Hi! It looks like the root cause is in packages/cli/src/ui/components/Footer.tsx:

{!hideModelInfo && (
<Box alignItems="center" justifyContent="flex-end">

the <ContextUsageDisplay> component is currently nested inside the {!hideModelInfo} conditional block, causing it to disappear when the model info is disabled.

I will start working on decoupling this logic and have a PR up shortly.

anthonychen000 avatar Mar 01 '26 07:03 anthonychen000

/assign

anthonychen000 avatar Mar 01 '26 07:03 anthonychen000

👋 @anthonychen000, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our contributing guidelines.

gemini-cli[bot] avatar Mar 01 '26 07:03 gemini-cli[bot]