Skip to content

feat: add terminal review comments#1

Merged
osolmaz merged 9 commits into
mainfrom
feat/initial-implementation
Jul 10, 2026
Merged

feat: add terminal review comments#1
osolmaz merged 9 commits into
mainfrom
feat/initial-implementation

Conversation

@osolmaz

@osolmaz osolmaz commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Files and piped text now have a focused terminal review surface instead of requiring a browser or source edits.
Users can drag across line ranges, write and revisit inline comments, and emit only the quoted ranges by default.
The same review can also produce the full quoted document or a versioned JSON sidecar.

What Changed

The new Rust CLI keeps terminal interaction separate from source and output data.
It renders through /dev/tty, so stdout remains safe for normal Unix pipelines.

  • Added a Ratatui/Crossterm interface with semantic mouse hit targets, drag selection, keyboard selection, scrolling, and responsive layouts.
  • Added an inline multiline editor with Enter-to-save, Ctrl-O newline, Ctrl-A/Ctrl-E movement, paste support, comment editing, and deletion.
  • Added comments, full, and json output formats plus atomically saved JSON sidecars guarded by the exact source SHA-256.
  • Added an RAII terminal guard that restores raw mode, alternate screen, mouse capture, and bracketed paste after normal exits and panics.
  • Added an MIT license, user and architecture documentation, contributor guidance, and a Schemator-reviewed version 1 data model.
  • Added Slophammer 0.4.0 policy, local/CI quality gates, an MSRV job, and tmux end-to-end coverage.

Testing

The complete local CI contract passes.
The tmux test drives the compiled binary through a pseudoterminal with real SGR mouse press, drag, and release events, then verifies default Markdown, full Markdown, JSON, and sidecar reload behavior.

  • scripts/ci-local.sh
  • cargo +1.88.0 check --workspace
  • 49 unit tests and 3 architecture tests passed.
  • LLVM line coverage passed at 97.21% for in-process production modules; /dev/tty adapters are exercised by the tmux process test.
  • 114 scoped mutants ran: 110 caught and 4 unviable, with no survivors.
  • cargo audit found no vulnerable dependencies.
  • Slophammer DRY, boundary, unsafe, and complete checks passed with no findings.
  • Schemator converged in one iteration with no model changes or warnings.

Risks

The first release deliberately targets Unix terminals and UTF-8 input.
Terminal emulators can differ in modified-Enter and mouse reporting, so Ctrl-O is the portable multiline shortcut and Crossterm button tracking is retained across drag events.

  • Native terminal text selection is unavailable while mouse capture is active; --no-mouse provides a keyboard-only mode.
  • Sidecars intentionally fail closed when the source hash changes, preventing comments from silently attaching to the wrong lines.

@osolmaz osolmaz marked this pull request as ready for review July 10, 2026 10:34
@osolmaz

osolmaz commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Implementation is complete and ready to merge.

  • Built the Rust/Ratatui TUI with mouse line-range selection, inline multiline comments, comment navigation/editing/deletion, keyboard selection, Ctrl-A/Ctrl-E editing, paste, scrolling, and /dev/tty isolation.
  • Added default quoted-range Markdown output, full-document Markdown, versioned JSON output, and atomic SHA-256-bound sidecars.
  • Hardened terminal restoration and destination handling for aliases, hard links, symlinks, permissions, case-insensitive names, Unicode normalization, and preflight filesystem errors.
  • Added README, output-format and architecture docs, contributor guidance, MIT license, Schemator model review, Slophammer policy, local CI, and GitHub Actions.
  • End-to-end tmux coverage injects real SGR mouse press/drag/release events and verifies default, full, JSON, and sidecar reload flows.

Verification:

  • 49 unit tests and 3 architecture tests pass.
  • LLVM line coverage: 97.21% for in-process production modules.
  • Mutation testing: 114 mutants, 110 caught, 4 unviable, 0 survivors.
  • cargo audit: no vulnerable dependencies.
  • Slophammer DRY, boundaries, unsafe, and complete checks: no findings.
  • SimpleDoc: clean.
  • Rust 1.88 compatibility: pass.
  • GitHub Actions rust 1.88 and verify: pass.
  • Repeated Codex reviews found no P0/P1 blockers; all surfaced P2 findings were addressed.

@osolmaz osolmaz merged commit 8b75538 into main Jul 10, 2026
2 checks passed
@osolmaz osolmaz deleted the feat/initial-implementation branch July 10, 2026 10:38
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.

1 participant