Conversation
Summary of ChangesHello @keithguerin, 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 implements a design refinement for the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request refines the SectionHeader component's design by moving the title below the separator line and adding support for a subtitle. The changes are well-implemented, and the suggestions to improve API consistency and robustness by making the caller responsible for spacing and ensuring subtitle truncation align with established UI consistency and layout predictability rules. These changes will make the SectionHeader component more predictable and maintainable.
| <Text color="white" bold wrap="truncate-end"> | ||
| {title} | ||
| </Text> | ||
| {subtitle && <Text color={theme.text.secondary}> {subtitle}</Text>} |
There was a problem hiding this comment.
There are a couple of improvements that could be made to the subtitle handling for better consistency and robustness:
-
Spacing Consistency: The component currently adds a leading space to the
subtitle. However, consumers of this component (likeShortcutsHelp.tsx) are already providing a leading space for thetitleprop. To make the component's API more consistent,SectionHeadershould not add any spaces itself. The caller should be responsible for providing any necessary spacing for bothtitleandsubtitle. -
Truncation: The
subtitledoes not have truncation enabled. If the combinedtitleandsubtitleare too long, thetitlewill truncate but thesubtitlewill wrap to a new line, which can break the single-line layout. Thesubtitleshould also be truncated to maintain the intended design.
Applying these changes will make the component more predictable and easier to use. Remember to update the call site in ShortcutsHelp.tsx to add the space to the subtitle prop.
| {subtitle && <Text color={theme.text.secondary}> {subtitle}</Text>} | |
| {subtitle && <Text color={theme.text.secondary} wrap="truncate-end">{subtitle}</Text>} |
References
- Maintaining consistency with existing UI behavior and component APIs across the repository to ensure predictability and ease of use.
- Ensuring consistent layout by preventing dynamic wrapping or variable heights, even for single-line elements, to maintain a predictable design.
| return ( | ||
| <Box flexDirection="column" width="100%"> | ||
| <SectionHeader title="Shortcuts (for more, see /help)" /> | ||
| <SectionHeader title=" Shortcuts" subtitle="See /help for more" /> |
There was a problem hiding this comment.
To complement the suggested change in SectionHeader.tsx, please add a leading space to the subtitle prop. This makes the caller responsible for all content spacing, leading to a more consistent and predictable component API.
| <SectionHeader title=" Shortcuts" subtitle="See /help for more" /> | |
| <SectionHeader title=" Shortcuts" subtitle=" See /help for more" /> |
References
- Maintaining consistency with existing UI behavior and component APIs across the repository to ensure predictability and ease of use.
|
Size Change: +213 B (0%) Total Size: 25.7 MB ℹ️ View Unchanged
|
| /> | ||
| <Box flexDirection="row"> | ||
| <Text color="white" bold wrap="truncate-end"> | ||
| {title} |
There was a problem hiding this comment.
use the them instead of "white"
|
The following feedback is from /review-frontend audited by Jacob:
|
jacob314
left a comment
There was a problem hiding this comment.
Approved after this quick to fix comments are addressed.
255e2b0 to
a0317cb
Compare

Summary
Refine the
SectionHeadercomponent design as requested for the Shortcuts help panel. Moves the title below the top horizontal line and updates the styling to bold white for the title and secondary gray for the subtitle.Details
SectionHeaderfromflexDirection: rowtocolumnto stack the title below the line.subtitleprop inSectionHeader.boldandwhitecolor.ShortcutsHelpto use the new title/subtitle structure: " Shortcuts" (bold white) and "See /help for more" (secondary gray).SectionHeaderandShortcutsHelp.Related Issues
Fixes #18717
Related to #18532
How to Validate
npm run start?to open the shortcuts help.npm test -w @google/gemini-cli -- src/ui/components/shared/SectionHeader.test.tsx src/ui/components/ShortcutsHelp.test.tsxPre-Merge Checklist