feat(ui): add "Esc to close" hint to SettingsDialog (#11289)

Co-authored-by: Miguel Solorio <miguelsolorio@google.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
JAYADITYA
2025-10-17 04:52:14 +05:30
committed by GitHub
parent 991bd37362
commit a440333990
3 changed files with 16 additions and 14 deletions
@@ -211,7 +211,9 @@ describe('SettingsDialog', () => {
const output = lastFrame();
expect(output).toContain('Settings');
expect(output).toContain('Apply To');
expect(output).toContain('Use Enter to select, Tab to change focus');
expect(output).toContain(
'Use Enter to select, Tab to change focus, Esc to close',
);
});
it('should accept availableTerminalHeight prop without errors', () => {
@@ -231,7 +233,7 @@ describe('SettingsDialog', () => {
const output = lastFrame();
// Should still render properly with the height prop
expect(output).toContain('Settings');
expect(output).toContain('Use Enter to select');
expect(output).toContain('Use Enter to select, Esc to close');
});
it('should show settings list with default values', () => {
@@ -1086,7 +1088,7 @@ describe('SettingsDialog', () => {
expect(lastFrame()).toContain('Apply To'); // Scope section
expect(lastFrame()).toContain('User Settings'); // Scope options (no numbers when settings focused)
expect(lastFrame()).toContain(
'(Use Enter to select, Tab to change focus)',
'(Use Enter to select, Tab to change focus, Esc to close)',
); // Help text
// This test validates the complete UI structure is available for user workflow