Skip to content

feat(tui): add session navigation mode#27788

Closed
samiralibabic wants to merge 2 commits into
anomalyco:devfrom
samiralibabic:session-navigation-mode
Closed

feat(tui): add session navigation mode#27788
samiralibabic wants to merge 2 commits into
anomalyco:devfrom
samiralibabic:session-navigation-mode

Conversation

@samiralibabic
Copy link
Copy Markdown

@samiralibabic samiralibabic commented May 15, 2026

Issue for this PR

Closes #27787

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a TUI session navigation mode for keyboard-first navigation through long session output.

When the session is idle, Escape enters navigation mode. In navigation mode, the prompt is blurred, a compact NAV indicator is shown, and Vim-style keys navigate output: j/k, Ctrl+D/Ctrl+U, Ctrl+F/Ctrl+B, gg/G, and n/N/p. The n/N/p bindings jump to the next/previous visible user message and do nothing when there is no matching target.

The prompt editor is unchanged. Bare letters still type normally while the prompt is focused. Navigation-mode bindings are scoped to NAV mode only.

This works by adding separate session.navigation.* keybinds and commands rather than remapping existing prompt or session bindings globally.

How did you verify your code works?

  • bun test test/config/tui.test.ts
  • bun typecheck
  • git diff --check dev...HEAD
  • pre-push hook: bun turbo typecheck
  • local TUI smoke test for Escape/NAV, j/k, Ctrl+D/Ctrl+U, Ctrl+F/Ctrl+B, gg/G, and n/N/p

Screenshots / recordings

No recording attached yet. This is a TUI interaction change; a short recording showing Escape -> NAV -> j/k -> i would help review.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@samiralibabic
Copy link
Copy Markdown
Author

Closing this core PR in favor of the TUI plugin path suggested in the issue discussion:

https://github.com/samiralibabic/opencode-session-navigation

The plugin is published on npm:

https://www.npmjs.com/package/opencode-session-navigation

Install:

opencode plugin opencode-session-navigation

This keeps the feature outside core while still making the behavior available for real-world testing.

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.

[FEATURE]: Add TUI session navigation mode

1 participant