feat(session): navigate to comments by id - #845
Conversation
Co-authored-by: OpenAI Codex <codex@openai.com>
|
PR author is not in the allowed authors list. |
|
@Yuki9814 is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Requesting changes because the new comment-ID navigation path currently drops exact-line reveal semantics and its added integration test fails on Linux.
Validation: bun test test/session/cli.test.ts -t "navigate works" (1 failed).
This comment was generated by Pi using GPT-5.6 Sol
| filePath: comment?.filePath ?? input.filePath, | ||
| hunkIndex: | ||
| comment?.hunkIndex ?? | ||
| (input.hunkNumber !== undefined ? input.hunkNumber - 1 : undefined), |
There was a problem hiding this comment.
[P1] Preserve exact-line navigation for comment IDs
This forwards hunkIndex together with side/line, but useTerminalReview.navigateToLocation only calls revealLine when hunkIndex is absent. As a result, --comment selects only the hunk rather than revealing the annotated row, and the command result omits side/line. The new integration test confirms the regression: bun test test/session/cli.test.ts -t "navigate works" fails at test/session/cli.test.ts:655. Please omit hunkIndex for resolved comments (letting the line resolve its containing hunk), or make the terminal handler prioritize an exact line whenever side/line are present.
This comment was generated by Pi using GPT-5.6 Sol
Problem
hunk session comment list --jsonexposes stable comment IDs, but callers cannot use one of those IDs to focus that exact comment. They must reconstruct a file/line target or use relative next/previous navigation.Closes #490.
Approach
hunk session navigate --comment <id>and reject combinations with the existing navigation selectors;navigate_to_hunkpayload;This stays in the existing session CLI/daemon path. It does not add a new UI socket command or change how comments are stored.
Validation
Tested on macOS arm64:
bun ./scripts/run-test-suite.ts— 3021 passed, 24 platform/tool-gated skips, 0 failed;bun test src/app/cli.test.ts src/session/protocolSchemas.test.ts src/session/agent/cliClient.test.ts src/session/broker/brokerServer.helpers.test.ts src/session/client/capabilities.test.ts src/session/agent/commands.daemon.test.ts src/hunk-review/skillDocument.test.ts scripts/generate-docs.test.ts— 199 passed, 0 failed;oxfmt --check .;oxlint . --deny-warnings;tsc --noEmit;bun ./scripts/generate-docs.ts --check;bun ./scripts/generate-changelog.ts --check;depcruise src packages --config .dependency-cruiser.cjs --ignore-known.The Linux-only live-session CLI integration is included but platform-gated locally; CI can exercise it. There is no visual UI change.
Implemented with OpenAI Codex assistance. The final diff and verification results were reviewed before submission.