Skip to content

feat(review): add go-to-line prompt - #808

Draft
IAMLEIzZ wants to merge 1 commit into
modem-dev:mainfrom
IAMLEIzZ:feat/goto-line
Draft

feat(review): add go-to-line prompt#808
IAMLEIzZ wants to merge 1 commit into
modem-dev:mainfrom
IAMLEIzZ:feat/goto-line

Conversation

@IAMLEIzZ

Copy link
Copy Markdown
Contributor

Closes #805

Summary

Adds a go-to-line flow to the review UI: : opens a small line-number prompt in the status bar (the same inline-input pattern as the / file filter), and Enter jumps the current-line cursor to that line in the selected file so c can annotate it directly. A bare number uses the current file's numbering (the R side the note labels use); an l prefix such as :l42 targets the source file's numbering (the L side). Escape cancels, and a line that is not part of the diff reports a transient notice naming the side instead of jumping silently.

The jump resolves through the existing shared revealLine path that the session navigate command uses, so scrolling, selection, and note targeting all land consistently. Line-level navigation is also decoupled from the cursor_line display option: when the marker is off, the target cursor is synthesized on demand from the render plan (no full stop-list rebuild), so jumping and annotating stay precise instead of degrading to the hunk.

Notes

  • hunk.review.gotoLine is registered in the shared command catalog with : as the default chord, is remappable via [keybindings], and closes an open menu when triggered.
  • The bundled vim-navigation example moves its command line from : to ;, since built-in chords shadow extension chords by design.
  • Failure paths are explicit: lines outside the diff, hunk-only degraded targets, and an empty file selection each report a transient notice, and notices now outrank the filter=… summary so they stay visible while a file filter is active.

Testing

  • AppHost interaction coverage: prompt opening without key leakage, same-chunk :2 delivery, non-digit stripping, Escape cancel, new/old side targeting, closing an open menu, cursor_line = "off" jump and annotate precision, selected-file targeting, and the two-stage filter Escape.
  • One real-PTY end-to-end test: jump to line 62 across hunks and anchor a note at R62.
  • useTerminalReview contract tests updated for the synthesized-cursor reveal; vim example unit tests and PTY updated for the move to ;.
  • Full unit suite, typecheck, lint, and format checks pass locally.

Add a go-to-line flow: `:` opens a line-number prompt in the status bar,
and Enter jumps the current-line cursor to that line in the selected file
so `c` can annotate it directly. Bare numbers use the current file's
numbering (the note labels' `R` side); an `l` prefix targets the source
file's numbering (the `L` side). The jump resolves through the shared
revealLine path, and line-level navigation no longer depends on the
cursor_line display option: with the marker off, the target cursor is
synthesized on demand instead of falling back to the hunk.

The command closes an open menu when triggered, reports failures as
transient notices (which now outrank the filter summary), and the bundled
vim-navigation example's command line moves from `:` to `;` since
built-ins shadow extension chords by design.
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

@IAMLEIzZ is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

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.

feat(review): add go-to-line prompt

1 participant