Skip to content

Commit 1c49097

Browse files
ThomasK33claude
andauthored
feat(dashboard): minimize maximized view on Enter as well as Esc (#153)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 6c6fa6a commit 1c49097

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/dashboard/app.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,11 @@ function App({ options }: { options: DashboardAppOptions }): React.ReactNode {
672672
return;
673673
}
674674
// While maximized this layer owns input: only pan / overview / restore
675-
// respond. Tab, H, 'a' and Enter are swallowed so it reads as a distinct
676-
// mode. `focus` is left untouched, so Esc (restore) returns to whatever was
677-
// focused underneath.
675+
// respond. Tab, H and 'a' are swallowed so it reads as a distinct mode.
676+
// `focus` is left untouched, so Esc/Enter (restore) returns to whatever was
677+
// focused underneath. Enter both maximizes and restores, so it toggles.
678678
if (maximized) {
679-
if (key.escape) {
679+
if (key.escape || key.return) {
680680
setMaximized(false);
681681
setPan({ row: 0, col: 0 });
682682
return;
@@ -834,7 +834,7 @@ function App({ options }: { options: DashboardAppOptions }): React.ReactNode {
834834
<Box>
835835
<Text dimColor>
836836
{maximized
837-
? 'maximized · ↑/↓ h/j/k/l pan · z overview · esc restore · q quit'
837+
? 'maximized · ↑/↓ h/j/k/l pan · z overview · esc/⏎ restore · q quit'
838838
: focus === 'home'
839839
? '↑/↓ j/k select Home · ⏎ open · a scope · esc cancel · q quit'
840840
: focus === 'list'

0 commit comments

Comments
 (0)