feat(cli): update approval mode labels and shortcuts per latest UX spec (#18698)

This commit is contained in:
Jerop Kipruto
2026-02-10 07:45:14 -05:00
committed by GitHub
parent 2ae5e1ae20
commit e6b43cb846
2 changed files with 14 additions and 14 deletions

View File

@@ -15,8 +15,8 @@ describe('ApprovalModeIndicator', () => {
<ApprovalModeIndicator approvalMode={ApprovalMode.AUTO_EDIT} />,
);
const output = lastFrame();
expect(output).toContain('auto-edit');
expect(output).toContain('shift + tab to enter default mode');
expect(output).toContain('auto-accept edits');
expect(output).toContain('shift+tab to manual');
});
it('renders correctly for AUTO_EDIT mode with plan enabled', () => {
@@ -27,8 +27,8 @@ describe('ApprovalModeIndicator', () => {
/>,
);
const output = lastFrame();
expect(output).toContain('auto-edit');
expect(output).toContain('shift + tab to enter default mode');
expect(output).toContain('auto-accept edits');
expect(output).toContain('shift+tab to manual');
});
it('renders correctly for PLAN mode', () => {
@@ -37,7 +37,7 @@ describe('ApprovalModeIndicator', () => {
);
const output = lastFrame();
expect(output).toContain('plan');
expect(output).toContain('shift + tab to enter auto-edit mode');
expect(output).toContain('shift+tab to accept edits');
});
it('renders correctly for YOLO mode', () => {
@@ -46,7 +46,7 @@ describe('ApprovalModeIndicator', () => {
);
const output = lastFrame();
expect(output).toContain('YOLO');
expect(output).toContain('shift + tab to enter auto-edit mode');
expect(output).toContain('ctrl+y');
});
it('renders correctly for DEFAULT mode', () => {
@@ -54,7 +54,7 @@ describe('ApprovalModeIndicator', () => {
<ApprovalModeIndicator approvalMode={ApprovalMode.DEFAULT} />,
);
const output = lastFrame();
expect(output).toContain('shift + tab to enter auto-edit mode');
expect(output).toContain('shift+tab to accept edits');
});
it('renders correctly for DEFAULT mode with plan enabled', () => {
@@ -65,6 +65,6 @@ describe('ApprovalModeIndicator', () => {
/>,
);
const output = lastFrame();
expect(output).toContain('shift + tab to enter plan mode');
expect(output).toContain('shift+tab to plan');
});
});

View File

@@ -25,26 +25,26 @@ export const ApprovalModeIndicator: React.FC<ApprovalModeIndicatorProps> = ({
switch (approvalMode) {
case ApprovalMode.AUTO_EDIT:
textColor = theme.status.warning;
textContent = 'auto-edit';
subText = 'shift + tab to enter default mode';
textContent = 'auto-accept edits';
subText = 'shift+tab to manual';
break;
case ApprovalMode.PLAN:
textColor = theme.status.success;
textContent = 'plan';
subText = 'shift + tab to enter auto-edit mode';
subText = 'shift+tab to accept edits';
break;
case ApprovalMode.YOLO:
textColor = theme.status.error;
textContent = 'YOLO';
subText = 'shift + tab to enter auto-edit mode';
subText = 'ctrl+y';
break;
case ApprovalMode.DEFAULT:
default:
textColor = theme.text.accent;
textContent = '';
subText = isPlanEnabled
? 'shift + tab to enter plan mode'
: 'shift + tab to enter auto-edit mode';
? 'shift+tab to plan'
: 'shift+tab to accept edits';
break;
}