Feature Description
Read-only prompt navigation for long interactive sessions: jump to previous/next user prompts and (follow-up) pick a prompt from a list. This does not resend, rewind, fork, edit-and-resubmit, or otherwise mutate session state. Composer Up/Down history-recall stays unchanged. Cross-session jumping and scrollbar tick-marks are out of scope (marks would need an OpenTUI primitive that does not exist yet).
Problem
In a long TUI session the only way back to a prompt you wrote is manual scrolling and eyeballing user turns among assistant output, tool traces, and subagent noise. That gets expensive once the transcript is long.
Proposed behavior
-
Keyboard jump (PR 1)
- Prev / next user prompt relative to the current scroll position (not always the newest).
- Target prompt lands at/near the top of the viewport so its assistant reply stays visible below.
- Brief highlight/flash on the jump target.
- Hard stop at first/last prompt (no wrap), unless maintainers prefer wrap.
-
Picker (PR 2, after PR 1)
- List every user prompt as a one-line truncated preview + timestamp.
- Arrow keys + mouse click; selecting scrolls to that prompt.
- Candidate openers: dedicated shortcut and/or
/prompts (slash menu already hosts /schedule, /verify, etc.).
Data model
Derive an ordered index from existing session/transcript state (role === "user"). Derived, not duplicated - no second source of truth. Each entry: message id, grapheme-safe ~60-char preview (newlines collapsed), scroll anchor.
Implementation sketch (aligned with current tree)
- Chat scroll lives in
src/ui/app.tsx (scrollRef / ScrollBoxRenderable, sticky bottom).
- Transcript persistence already distinguishes user messages in
src/storage/transcript.ts.
- Picker UI can follow existing modal list patterns (
schedule-modal.tsx, mcp-modal.tsx, agents-modal.tsx).
- Unit-test pure helpers with Vitest (
bun test); keep the first PR keyboard-only and small.
Default keybinding candidates (open to bikeshed)
- Prev / next:
ctrl+shift+[ / ctrl+shift+]
- Picker (PR 2):
ctrl+shift+p and/or /prompts
I will verify these do not collide with current handleKey / textarea bindings before locking them in.
Out of scope (explicit)
- Resend / rewind / fork / edit-and-resubmit
- Cross-session jump
- Scrollbar track marks
- Changing composer history-recall
- Unrelated repo hygiene (known AGENTS.md ESLint / dev-mode type-import issues)
Prior art
Searched open and closed issues/PRs for prompt navigation, jump-to-prompt, scrollback, and related keyboard/scroll wording. No existing request for this feature; unrelated "prompt" hits only (e.g. prompt-cache metrics, sandbox trust prompt, headless --prompt).
Offer
I am happy to implement this in two small PRs:
- Keyboard-only jump + unit tests + flash
- Picker dialog built on (1)
Happy to adjust defaults (bindings, wrap vs stop, picker trigger, highlight style) to maintainer preference before or during review.
Feature Description
Read-only prompt navigation for long interactive sessions: jump to previous/next user prompts and (follow-up) pick a prompt from a list. This does not resend, rewind, fork, edit-and-resubmit, or otherwise mutate session state. Composer Up/Down history-recall stays unchanged. Cross-session jumping and scrollbar tick-marks are out of scope (marks would need an OpenTUI primitive that does not exist yet).
Problem
In a long TUI session the only way back to a prompt you wrote is manual scrolling and eyeballing user turns among assistant output, tool traces, and subagent noise. That gets expensive once the transcript is long.
Proposed behavior
Keyboard jump (PR 1)
Picker (PR 2, after PR 1)
/prompts(slash menu already hosts/schedule,/verify, etc.).Data model
Derive an ordered index from existing session/transcript state (
role === "user"). Derived, not duplicated - no second source of truth. Each entry: message id, grapheme-safe ~60-char preview (newlines collapsed), scroll anchor.Implementation sketch (aligned with current tree)
src/ui/app.tsx(scrollRef/ScrollBoxRenderable, sticky bottom).src/storage/transcript.ts.schedule-modal.tsx,mcp-modal.tsx,agents-modal.tsx).bun test); keep the first PR keyboard-only and small.Default keybinding candidates (open to bikeshed)
ctrl+shift+[/ctrl+shift+]ctrl+shift+pand/or/promptsI will verify these do not collide with current
handleKey/ textarea bindings before locking them in.Out of scope (explicit)
Prior art
Searched open and closed issues/PRs for prompt navigation, jump-to-prompt, scrollback, and related keyboard/scroll wording. No existing request for this feature; unrelated "prompt" hits only (e.g. prompt-cache metrics, sandbox trust prompt, headless
--prompt).Offer
I am happy to implement this in two small PRs:
Happy to adjust defaults (bindings, wrap vs stop, picker trigger, highlight style) to maintainer preference before or during review.