specs/009-open-file-at-comment/checklists/requirements.md
Ref: Size: 1.4 KiB
# Requirements Checklist: 009-open-file-at-comment ## Functional Requirements - [x] **FR-001**: System MUST bind the 'e' key in the TUI diff view to trigger the open-file-at-comment action. - [x] **FR-002**: System MUST determine the inline comment nearest to (at or above) the current scroll position in the rendered diff. - [x] **FR-003**: System MUST extract the `file` and `line` fields from the selected `InlineComment`. - [x] **FR-004**: System MUST resolve the editor command from `$VISUAL` (preferred) or `$EDITOR` (fallback). - [x] **FR-005**: System MUST suspend the TUI (restore terminal state), execute `<editor> +<line> <file>`, then restore the TUI after the editor exits. - [x] **FR-006**: System MUST display a status message when no editor is configured or the referenced file does not exist. - [x] **FR-007**: System MUST ignore 'e' keypresses when not in diff view mode or when no inline comments exist near the scroll position. ## User Stories - [x] **US-001 (P1)**: Open file at inline comment line in $EDITOR - [x] **US-002 (P2)**: Handle missing files and editor gracefully with status messages ## Success Criteria - [x] **SC-001**: Pressing 'e' opens correct file at correct line in under 1 second - [x] **SC-002**: TUI suspends/resumes cleanly around editor launch - [x] **SC-003**: All error cases handled without panics, with user-visible status messages - [x] **SC-004**: No regressions to existing keybindings or TUI behavior