Skip to content

feat: add custom footer configuration via /footer#19001

Merged
jacob314 merged 32 commits intomainfrom
statusline
Mar 5, 2026
Merged

feat: add custom footer configuration via /footer#19001
jacob314 merged 32 commits intomainfrom
statusline

Conversation

@jackwotherspoon
Copy link
Collaborator

@jackwotherspoon jackwotherspoon commented Feb 13, 2026

Summary

Implements the /footer slash command (with alias /statusline) to provide a unified, interactive way for users to configure and reorder items in the CLI footer (statusline).

footer.v2.mp4

Details

This PR introduces a more flexible and customizable footer system.

Key changes:

  • New Setting: Added ui.footer.items (array of strings) to the settings schema. This stores the list of enabled footer items in the order they should be rendered.
  • Interactive Configuration: Created FooterConfigDialog, an interactive Ink component triggered by /footer. It supports:
    • Toggling items on/off (Enter/Space).
    • Real-time reordering using / keys.
    • A preview of the footer within the dialog.
  • Left-to-right Rendering: Updated Footer.tsx to a linear, item-based layout that respects the user's custom selection and order.
  • Legacy Migration: Implemented deriveItemsFromLegacySettings to initialize the /footer dialog state based on existing boolean settings (like ui.footer.hideCWD), providing a seamless transition for users who want to start customizing.
  • Improved Indicators: Refactored several footer indicators into reusable components and added new ones like session-id, code-changes, and token-count.

Related Issues

Fixes #8191
Fixes #16754

How to Validate

  1. Launch the CLI: Run npm run start.
  2. Open Configuration: Type /footer.
  3. Navigate & Toggle: Use / to move the cursor and Enter to toggle items.
  4. Reorder: Select an item and use / to move it. (Note: search must be empty to reorder).
  5. Preview: Verify that the "Preview" section at the bottom of the dialog updates in real-time.
  6. Apply: Exit with Esc and confirm the CLI footer matches your configuration.
  7. Reset: Re-open /footer, select "Reset to default footer", and verify it reverts to legacy default footer.

Pre-Merge Checklist

  • Updated relevant documentation and README
  • Noted breaking changes (None - opt-in and backward compatible)
  • Validated on MacOS (npm run)

@jackwotherspoon jackwotherspoon requested a review from a team as a code owner February 13, 2026 16:20
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jackwotherspoon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience by introducing a highly customizable and interactive footer (statusline) in the CLI. Users can now easily tailor the information displayed in the footer to their preferences, including the order and visibility of various metrics and statuses. This change moves away from rigid boolean settings to a more dynamic, item-based configuration, while maintaining full backward compatibility for existing users who prefer the traditional layout.

Highlights

  • Interactive Footer Configuration: Introduced a new /footer slash command (also accessible via /statusline) that opens an interactive Ink component (FooterConfigDialog) allowing users to configure, reorder, and toggle footer items.
  • Customizable Footer Items Setting: Added a new ui.footer.items setting, which is an array of strings, to store the user's selected and ordered footer items. This provides a flexible way to customize the CLI's status line.
  • Dual-Path Footer Rendering: Updated Footer.tsx to support two rendering modes: a legacy 3-section layout (default for existing users) and a new item-based layout that respects the ui.footer.items setting, ensuring backward compatibility.
  • Legacy Settings Migration: Implemented logic to derive initial footer item selections from existing boolean settings (e.g., hideCWD, hideModelInfo) for a seamless transition when users first interact with the new configuration.
  • New Footer Indicators: Refactored existing footer indicators into reusable components and added new ones such as session-id, code-changes (lines added/removed), and token-count.
Changelog
  • packages/cli/src/config/footerItems.test.ts
    • Added unit tests for the deriveItemsFromLegacySettings function, ensuring correct conversion of old footer settings to the new item-based format.
  • packages/cli/src/config/footerItems.ts
    • Added FooterItem interface and ALL_ITEMS array to define all available footer items with their IDs, labels, descriptions, and default enabled states.
    • Defined DEFAULT_ORDER for footer items.
    • Implemented deriveItemsFromLegacySettings function to convert legacy footer settings into an ordered list of item IDs.
  • packages/cli/src/config/settingsSchema.ts
    • Added a new items property to ui.footer in the settings schema, allowing an array of strings to define custom footer item order and selection.
  • packages/cli/src/services/BuiltinCommandLoader.ts
    • Imported footerCommand to make the new footer configuration command available.
    • Added footerCommand to the list of built-in commands loaded by the CLI.
  • packages/cli/src/ui/commands/footerCommand.tsx
    • Added the footerCommand definition, including its name, alternative names (statusline, status-line, status), description, and action to open the FooterConfigDialog.
  • packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx
    • Reordered Ink imports for consistency.
  • packages/cli/src/ui/components/Footer.test.tsx
    • Added new test suites for Footer Token Formatting to verify correct display of token counts (k, m, b suffixes).
    • Added new test suites for Footer Custom Items to ensure items are rendered in the specified order, with dividers, and handle empty item arrays or conditionally hidden items.
  • packages/cli/src/ui/components/Footer.tsx
    • Extracted CwdIndicator, BranchIndicator, SandboxIndicator, CorgiIndicator, and ErrorIndicator into separate, reusable React functional components.
    • Refactored the main Footer component to support two rendering paths: a legacy mode based on old boolean settings and a new item-based mode driven by the ui.footer.items setting.
    • Implemented logic to dynamically render selected footer items in the specified order, including new indicators for session ID, code changes, and token count.
  • packages/cli/src/ui/components/FooterConfigDialog.test.tsx
    • Added a new test file for the FooterConfigDialog component.
    • Included tests for rendering with default settings, toggling items, filtering with search, reordering items with arrow keys, closing on escape, and previewing changes.
  • packages/cli/src/ui/components/FooterConfigDialog.tsx
    • Added a new FooterConfigDialog component, an interactive Ink dialog for configuring footer items.
    • Implemented state management for ordered and selected footer items, initialized from user settings or legacy defaults.
    • Integrated fuzzy searching, item toggling, and reordering functionality.
    • Included a real-time preview of the footer based on current selections and order.
    • Added a 'Reset to default footer' option to revert to legacy-derived settings.
  • packages/cli/src/ui/components/MemoryUsageDisplay.tsx
    • Reordered Ink imports for consistency.
    • Removed the hardcoded separator (|) from the MemoryUsageDisplay component, allowing it to be managed by the new item-based footer rendering.
Activity
  • The pull request introduces a new /footer command and an interactive configuration dialog.
  • New tests were added for packages/cli/src/config/__tests__/footerItems.test.ts, packages/cli/src/ui/components/__tests__/Footer.test.tsx, and packages/cli/src/ui/components/__tests__/FooterConfigDialog.test.tsx.
  • The changes have been validated on MacOS.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality labels Feb 13, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fantastic new feature for customizing the CLI footer via the /footer command. The implementation is robust, providing an interactive dialog for configuration, a live preview, and ensuring backward compatibility with a legacy mode. The code is well-structured, with new components and comprehensive tests. I've identified a couple of areas for improvement to enhance UI consistency and fix a minor formatting bug, but overall this is an excellent contribution.

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

Size Change: +22.1 kB (+0.09%)

Total Size: 26 MB

Filename Size Change
./bundle/gemini.js 25.5 MB +22.1 kB (+0.09%)
ℹ️ View Unchanged
Filename Size
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

@ByteX420
Copy link

When expected to be previewed?

@Turbo-the-tech-dev
Copy link

✅ WRITING-PLANS ACTIVATED – /footer PR Leveraged
(Turbo Fleet Command – Feb 21, 2026 – PR #19001 Integrated)

Project Spec (from link):
#19001
Title: feat: add custom footer configuration via /footer (aliases: /statusline, /status)
Status: Open (Feb 13–14 2026) – awaiting review
Author: jackwotherspoon
Fixes: #8191 (Gemini CLI Statusline) + #16754 (Footer: Display Model Usage %)

What it adds (exact, no hallucination):

  • New setting ui.footer.items (array of strings = order + toggle)
  • Interactive /footer dialog: fuzzy-search items, toggle on/off, reorder with arrows, live preview
  • New reusable indicators: session-id, code-changes, token-count, plus cwd/branch/etc.
  • Backward-compatible migration from old booleans (hideCWD → new system)
  • Clean refactor of Footer.tsx + full tests

Goal for our fleet:
Make nec-fleet-gemini and the Central Documentation Hub the first extensions to fully showcase this powerful new core feature the day it merges.
Turn the footer into a live “Sovereign Electrician Dashboard”: show NEC 2026 edition, ELECTRICIAN-INDEX health, active takeoff count, SRS streak, DEATHSTAR status, token usage, etc.


MULTI-PHASE EXECUTION PLAN (Before Any Code Touch)

Phase 0: PR Tracking & Lock (Current – 5 min)

  • Monitor PR until merge (I’ll auto-check daily)
  • Fork the PR branch locally for testing once merged
  • Commander approves this plan

Success Metric: Reply LOCKED

Phase 1: nec-fleet-gemini Extension Hook (Est. 40 min)

  • Add new MCP tool: nec_footer_status() → returns JSON for custom footer item
  • Extend gemini-extension.json with footerItems suggestion array
  • Add slash command /nec:footer (via new commands/nec/footer.toml) that guides user to enable our items
  • Update GEMINI.md persona to recommend /footer in every response
  • Output: Ready-to-merge extension update v1.1

Phase 2: Central Docs Hub Integration (Est. 50 min)

  • New Starlight page: /docs/cli-customization/footer.md
    • Live demo of /footer dialog
    • Migration guide + recommended fleet config
    • Embed nec-fleet-gemini items (mock until merge)
    • Interactive “Try it” button using your FileSearch + study-ai
  • Update sidebar + homepage hero with footer screenshot
  • Auto-sync workflow so every NEC update reflects in footer health
  • Output: 3 new polished Markdown pages

Phase 3: Fleet-Wide Polish & Testing (Est. 35 min)

  • Use devops + git-expert to add .github/workflows/monitor-footer-pr.yml (alert on merge)
  • Test full flow in Gemini CLI (preview features enabled)
  • Update all repo READMEs + profile with one-liner: gemini /footer → enable NEC-Fleet items
  • Add to todo-ext daily reminder
  • Output: Passing end-to-end tests + release notes

Phase 4: Release & Announcement (Est. 20 min)

  • Tag nec-fleet-gemini v1.1 “Footer-Ready”
  • Publish Central Hub update with banner using the logo I already generated
  • Post in your GitHub + X: “Sovereign Electricians just got a live NEC dashboard in their terminal footer”
  • Output: Live links + announcement draft

Total Estimated Time: ~2.5 hours (once PR merges – we can start Phase 1 prep now)
Risks & Mitigations:

  • PR still open → build everything behind a if (footerItemsSupported) flag
  • No extension API yet for custom items → provide exact JSON users can paste today + future-proof hook
  • UI consistency → match Ink dialog style exactly using canva + speedgrapher

Success Criteria:

  • Footer shows “🔌 NEC 2026 • INDEX: 12,847 sections • TAKEOFFS: 3 • SRS: 47-day streak”
  • One-command enable for every fleet user
  • Docs hub becomes the canonical guide for this new core feature

Fleet Command ready.

Reply:
LOCKED → I immediately drop:

  1. Updated gemini-extension.json + new footer.toml
  2. Mock nec_footer_status tool code
  3. Full footer page for the Central Hub
  4. One-liner test commands

AMEND → tweak anything (e.g. desired footer items, priority order)
SKIP TO HUB → go straight to docs hub build (Phase 2 only)

The PR is pure gold for our sovereign workflow. Let’s make nec-fleet-gemini the flagship example. ⚡🔌

Your move, Commander.

@keithguerin
Copy link
Contributor

I've updated the footer labels to use lower sentence case and renamed the workspace label to 'workspace (/directory)' to help with command discovery, per Core/UX chat on 2/18.

Follow-up issue for the full command renaming: #20737

@jacob314 jacob314 enabled auto-merge March 5, 2026 02:08
Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic! Following up with some fast follow layout and color fixes but overall super solid.lgtm

@jacob314 jacob314 added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 9dc6898 Mar 5, 2026
26 of 27 checks passed
@jacob314 jacob314 deleted the statusline branch March 5, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer: Display Model Usage % Gemini CLI Statusline

5 participants