Skip to content

fix(cli): Improve header spacing#18531

Open
NTaylorMullen wants to merge 1 commit intomainfrom
ntm/fix-build-and-spacing
Open

fix(cli): Improve header spacing#18531
NTaylorMullen wants to merge 1 commit intomainfrom
ntm/fix-build-and-spacing

Conversation

@NTaylorMullen
Copy link
Collaborator

@NTaylorMullen NTaylorMullen commented Feb 7, 2026

Summary

This PR improves the UI aesthetics by reducing unnecessary vertical whitespace between the header and the prompt box.

Details

  • UI Improvements:
    • Changed marginY={1} to marginTop={1} in UserIdentity.tsx to reduce the gap between the user header and the input area.
  • Test Refactoring:
    • Updated ModelDialog.test.tsx to use the standard renderWithProviders utility and correctly wrap state-changing operations in act(), resolving several React warnings and aligning with project conventions.

Related Issues

None.

How to Validate

  1. Run npm run build from the root. It should succeed.
  2. Run npm test -w @google/gemini-cli -- src/ui/components/ModelDialog.test.tsx. All tests should pass without act() warnings.
  3. Start the CLI with npm run start and observe the reduced spacing below the user identity header.

Pre-Merge Checklist

  • 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

@NTaylorMullen NTaylorMullen requested review from a team as code owners February 7, 2026 20:07
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @NTaylorMullen, 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 CLI package's robustness and user experience. It tackles critical build-time issues by correctly typing WebSocket error handlers and ensuring all necessary type definitions are present. Concurrently, it refines the UI by optimizing spacing for a cleaner look. Furthermore, the PR modernizes the testing suite for the 'ModelDialog' component, adopting best practices for React component testing to prevent common pitfalls with asynchronous state updates.

Highlights

  • Build Stability: Resolved CLI build failures by addressing missing '@types/ws' and implicit 'any' TypeScript errors, ensuring the project compiles successfully.
  • UI Refinement: Improved user interface aesthetics by reducing excessive vertical spacing in the user identity component, leading to a cleaner visual layout.
  • Testing Modernization: Updated 'ModelDialog.test.tsx' to align with modern React testing practices, utilizing 'renderWithProviders' and 'act()' for more reliable and warning-free tests.
  • Dependency Metadata Cleanup: Streamlined 'package-lock.json' by removing unnecessary '"peer": true' declarations from various dependency entries, which can sometimes cause dependency resolution issues.
Changelog
  • package-lock.json
    • Removed '"peer": true' property from numerous dependency entries, streamlining the lock file.
  • packages/cli/src/ui/components/ModelDialog.test.tsx
    • Replaced 'ink-testing-library/render' with a custom 'renderWithProviders' utility for consistent test setup.
    • Integrated 'act()' wrappers and 'waitFor' assertions to correctly handle asynchronous state updates in React tests, eliminating 'act()' warnings.
    • Removed 'ConfigContext' and 'KeypressProvider' direct usage in tests, relying on 'renderWithProviders' for context provisioning.
    • Added 'getIdeMode' to the mock configuration for the 'ModelDialog' component.
  • packages/cli/src/ui/components/UserIdentity.tsx
    • Adjusted the 'Box' component's styling from 'marginY={1}' to 'marginTop={1}' to reduce vertical spacing above the user identity.
  • packages/cli/src/utils/activityLogger.ts
    • Added an explicit 'any' type annotation to the 'err' parameter in the WebSocket 'on('error')' handler to resolve a 'noImplicitAny' TypeScript error.
Activity
  • Tests were updated and added as part of this change.
  • The changes have been validated on MacOS using 'npm run'.
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.

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 successfully addresses a build failure by adding the missing @types/ws dependency and resolving an implicit any error. It also includes a nice UI improvement by adjusting spacing and a valuable test refactoring in ModelDialog.test.tsx to use renderWithProviders and act, which aligns with modern React testing practices. My review includes one suggestion to further improve type safety in the WebSocket error handler by using the specific Error type instead of any.

- Install missing @types/ws to fix compiler errors
- Add explicit 'any' type to WebSocket error handler in activityLogger.ts
- Refactor ModelDialog.test.tsx to use renderWithProviders and proper act/waitFor wrappers
- Reduce vertical spacing in UserIdentity by changing marginY to marginTop
- Sync package-lock.json with dependency updates
@NTaylorMullen NTaylorMullen force-pushed the ntm/fix-build-and-spacing branch from bde01cb to f6ef3d8 Compare February 7, 2026 20:09
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 7, 2026
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Size Change: 0 B

Total Size: 23.8 MB

ℹ️ View Unchanged
Filename Size
./bundle/gemini.js 23.8 MB
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@NTaylorMullen NTaylorMullen changed the title fix(cli): resolve build failure and improve UI spacing fix(cli): Improve header spacing Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant