gemini-cli - ✅(Solved) Fix FooterConfigDialog "reset to default" is laggy [1 pull requests, 1 comments, 1 participants]

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…
GitHub stats
google-gemini/gemini-cli#26138Fetched 2026-04-29 06:35:31
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
commented ×1cross-referenced ×1labeled ×1

Root Cause

Caused by a stale closure.

Fix Action

Fixed

PR fix notes

PR #26139: fix(cli): fix bugs from stale closures in FooterConfigDialog

Description (problem / solution / changelog)

Summary

<!-- Concisely describe what this PR changes and why. Focus on impact and urgency. -->

The FooterConfigDialog has some stale closure issues with how it uses useSettingsStore

Details

<!-- Add any extra context and design decisions. Keep it brief but complete. -->

This PR just fixes the two bugs articulated in #26138

What happened?

Bug 1 — Reset to Default requires two clicks (stale closure)

  1. Uncheck a default setting (e.g. "workspace") and exit the dialog
  2. Reopen with /footer
  3. Click Reset to Default — notice it doesn't work
  4. Click it again — it works on the second try

Caused by a stale closure.


Bug 2 — Active/highlighted item reflects old index after reset

After resetting, the highlighted item still points to the previous first index rather than the new one.

Reproducible using the "workspace" example.

Related Issues

<!-- Use keywords to auto-close issues (Closes #123, Fixes #456). If this PR is only related to an issue or is a partial fix, simply reference the issue number without a keyword (Related to #123). -->

Fixes #26138

How to Validate

<!-- List exact steps for reviewers to validate the change. Include commands, expected results, and edge cases. -- Open /footer Reset to default Note that it worked if you are not on defaults Hit esc Uncheck workspace Hit esc Open /footer Hit reset to default Note that it worked Reproduce on main to observe the previous stale closure bug mandated the user hit reset to default twice. ## Pre-Merge Checklist <!-- Check all that apply before requesting review or merging. -->
  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Changed files

  • packages/cli/src/ui/components/FooterConfigDialog.test.tsx (modified, +73/-0)
  • packages/cli/src/ui/components/FooterConfigDialog.tsx (modified, +56/-18)
  • packages/cli/src/ui/hooks/useSelectionList.test.tsx (modified, +27/-0)
  • packages/cli/src/ui/hooks/useSelectionList.ts (modified, +24/-19)

Code Example

> /about
About Gemini CLI│                                                                                                                                                                       │
CLI Version                                               0.41.0-nightly.20260423.gaa05b4583Git Commit                                                fb4ae5ed4                                                                                                   │
Model                                                     gemini-3-flash-preview                                                                                      │
Sandbox                                                   no sandbox                                                                                                  │
OS                                                        linux                                                                                                       │
Auth Method                                               Signed in with Google (pyushsinha20@gmail.com)Tier                                                      Gemini Code Assist for individuals                                                                          │
RAW_BUFFERClick to expand / collapse

What happened?

Bug 1 — Reset to Default requires two clicks (stale closure)

  1. Uncheck a default setting (e.g. "workspace") and exit the dialog
  2. Reopen with /footer
  3. Click Reset to Default — notice it doesn't work
  4. Click it again — it works on the second try

Caused by a stale closure.


Bug 2 — Active/highlighted item reflects old index after reset

After resetting, the highlighted item still points to the previous first index rather than the new one.

Reproducible using the "workspace" example.

What did you expect to happen?

Should not require two clicks/enters If the UX goal is to fling the user back to the top of the list, it should do so properly and not fling it to the item that was the top of the list in the previous render cycle

Client information

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

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│ About Gemini CLI                                                                                                                                                      │
│                                                                                                                                                                       │
│ CLI Version                                               0.41.0-nightly.20260423.gaa05b4583                                                                          │
│ Git Commit                                                fb4ae5ed4                                                                                                   │
│ Model                                                     gemini-3-flash-preview                                                                                      │
│ Sandbox                                                   no sandbox                                                                                                  │
│ OS                                                        linux                                                                                                       │
│ Auth Method                                               Signed in with Google ([email protected])                                                              │
│ Tier                                                      Gemini Code Assist for individuals                                                                          │
</details>

Login information

oauth

Anything else we need to know?

another concern is that unchecked ordering does not persist. this would require the data model to better match what the UI needs. if migrated, this would also make the component much more simple.

extent analysis

TL;DR

The issue can be resolved by addressing the stale closure causing the "Reset to Default" button to require two clicks and updating the highlighted item index after reset.

Guidance

  • Investigate the closure that is causing the "Reset to Default" button to require two clicks and refactor the code to avoid stale closures.
  • Update the logic for resetting the highlighted item index to reflect the new first index after resetting the default settings.
  • Review the data model to ensure it aligns with the UI needs, particularly for unchecked ordering persistence.
  • Consider simplifying the component by migrating to a more suitable data model.

Example

No code snippet is provided as the issue lacks specific code details.

Notes

The issue seems to be related to the implementation of the "Reset to Default" feature and the data model. Without more information about the code, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround to address the stale closure and update the highlighted item index logic, as upgrading to a fixed version is not mentioned in the issue. This will allow for a temporary fix until a more permanent solution can be implemented.

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

gemini-cli - ✅(Solved) Fix FooterConfigDialog "reset to default" is laggy [1 pull requests, 1 comments, 1 participants]