Skip to content

feat(terminal): navigate command output with keyboard shortcuts - #358

Merged
wzz6423 merged 2 commits into
mainfrom
feat/command-output-navigation
Dec 5, 2026
Merged

wzz6423 merged 2 commits into
mainfrom
feat/command-output-navigation

Conversation

@wzz6423

@wzz6423 wzz6423 commented Dec 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add Previous Command Output and Next Command Output to the Terminal menu, with Command-Shift-Up and Command-Shift-Down. Navigation follows retained shell command identities across reflow, starts at the current viewport, and supports both backends, read-only panes, and Quick Terminal without running commands.

Preserve native editor, Copy Mode, and find-field selection when navigation is unavailable, including the first shortcut after terminal focus returns. Reset sequential navigation after manual scrolling, search, other output jumps, input, and resize. Document the behavior and both shortcuts in all 17 supported languages.

@coderabbitai summary

GitHub Project

  • Project: zshell Development
  • Start date: 2026-12-05
  • Target date: 2026-12-05

PR Type

  • Type: feat

Validation

  • Status: passed

  • Command: python3 -B mac/tests/test_terminal_command_navigation.py

  • Result: All 15 identity, viewport, reflow, expiry, and reset checks passed in an independent parent-agent run.

  • Status: passed

  • Command: python3 -B mac/tests/test_secure_keyboard_entry.py

  • Result: All 25 lifecycle, failure, ownership, and Carbon checks passed against the combined branch.

  • Status: passed

  • Command: cd web && bun run typecheck && bun run build

  • Result: Website typecheck and production build passed. Generated terminal documentation includes both command navigation and Secure Keyboard Entry in all 17 languages. All 17 shortcut reference pages include both navigation chords, with labels matching the app catalog.

  • Status: passed

  • Command: python3 -B mac/tests/test_app_localization.py; git diff origin/main --check

  • Result: Both localization checks passed. Existing catalog entries are unchanged; both new navigation strings include all 17 supported languages.

  • Status: passed

  • Command: xcodebuild -project mac/zshell.xcodeproj -scheme zshell -configuration Debug -destination 'platform=macOS,arch=arm64' -derivedDataPath mac/build/debug ENABLE_USER_SCRIPT_SANDBOXING=NO build; codesign --verify --deep --strict --verbose=2 'mac/build/debug/Build/Products/Debug/zshell Debug.app'

  • Result: The combined Debug build succeeded and the app passed strict signature verification.

  • Status: passed

  • Command: python3 -B mac/tests/test_terminal_command_block_surfaces.py --derived-data mac/build/debug --suite command-navigation --gui

  • Result: Alacritty and Ghostty each passed 179 real AppKit checks. Coverage includes sequential navigation, read-only panes, Quick Terminal, focus restoration, native text selection, and Block Zshell Commands. Both blocked-chord captures use the same AppKit event path and preserve identical foreground TUI bytes with exactly one native key dispatch per chord. The fixture isolates unrelated keyboard input while retaining native event routing.

  • Status: passed

  • Command: python3 -B mac/tests/test_secure_keyboard_entry.py --built-app 'mac/build/debug/Build/Products/Debug/zshell Debug.app'

  • Result: All 25 lifecycle checks passed. Ghostty and Alacritty each passed 50 real AppKit/Carbon checks against the combined Debug build, including workspace focus, Copy Mode, editor focus, Quick Terminal, all 17 menu languages, failure retries, and protection release through the real application delegate at termination.

  • Status: not run

  • Reason: CI is not awaited, as requested by the maintainer. Local build and behavior results will be recorded above before merge.

Risk and Rollback

  • Risk: Navigation depends on retained shell-integration output. Full-screen applications, expired output, cleared scrollback, and Block Zshell Commands keep navigation unavailable. The root menu yields unavailable arrow chords to native responders.
  • Rollback: Revert this pull request.

Related Issue

None

AI Attribution

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Document both navigation shortcuts in every supported language.

Co-authored-by: Codex <noreply@openai.com>
@wzz6423
wzz6423 marked this pull request as ready for review December 5, 2026 06:26
@wzz6423
wzz6423 merged commit 485f418 into main Dec 5, 2026
28 checks passed
@wzz6423
wzz6423 deleted the feat/command-output-navigation branch December 5, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant