From 53c37e6209e8c6cefa34ad22dc6696bf1752f0c5 Mon Sep 17 00:00:00 2001 From: Valdemar Lorenzen Date: Fri, 16 Oct 2026 16:40:45 +0200 Subject: [PATCH] docs: keep Rust tests under tests directory --- AGENTS.md | 6 ++++++ TODO.md | 33 --------------------------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6c81cd9..be1bf3f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,3 +3,9 @@ Vamp is a single-user, pre-alpha tool. Prefer clean cutovers to the simplest current design across code, configuration, interfaces, and persisted formats. Update callers and remove obsolete paths together; add backwards compatibility or migrations only when explicitly requested. Report incompatible persisted data clearly and preserve it unless the user explicitly requests a reset or deletion. + +# Tests + +Keep project tests and test-only fixtures/helpers under `tests/`. `src/` may retain test-module declarations and minimal test hooks; keep test bodies outside implementation files and preserve private access rather than widening production APIs. + +When adding or moving tests, follow [test organization](docs/development.md#test-organization) for module wiring and verification. diff --git a/TODO.md b/TODO.md index 53a7382..80f9ad1 100644 --- a/TODO.md +++ b/TODO.md @@ -1,36 +1,3 @@ -- [x] we should be able to execute commands in visual mode, since some commands may relevant to selections. -- [x] diff view: local review UX first, independently of GitHub integration, for reviewing local changes and delivering feedback to coding agents. - - add comments at the caret or on selected line ranges on either diff side; compose/edit with normal editor interaction, delete drafts, navigate comments, and open a review overview. - - use gutter markers and a focused floating comment editor over the whole diff text workspace, without adding source-side splits or inserting comment text into source rows. - - support a review summary and local verdict: Looks good / Changes requested. - - save and reopen reviews using local files that coding agents can read; no server or client/server protocol. - - anchor comments to immutable revision IDs, paths, sides, and source line ranges, never screen coordinates or mutable file indices. - - preserve original anchors and mark comments stale when the reviewed snapshot no longer matches; defer automatic reanchoring. -- [x] diff view: attach local review comments to arbitrary contiguous text ranges, not only containing lines. - - preserve exact start/end source positions in grapheme coordinates with an exclusive end, including partial-line and multiline selections on either diff side. - - characterwise Visual (`v`) anchors the exact selected text; Visual Line (`V`) anchors whole selected lines; no selection retains current-line behavior. - - retain gutter markers for discovery and highlight the exact anchored text when its comment is selected. - - preserve immutable snapshot identity and existing stale detection; never silently reanchor comments after source changes. - - persist precise ranges in version 2 JSON import/export. SQLite storage follows in the next item. - - future GitHub publishing may map precise local anchors to supported line ranges without reducing precision in the local review. -- [x] persist local reviews automatically in a local SQLite database using rusqlite; no server, hosted storage, or synchronization. - - keep one database under $XDG_DATA_HOME/vamp/reviews/, falling back to ~/.local/share/vamp/reviews/; allow a configurable review_directory. - - key reviews by repository identity and persistent review ID, preserving reviews and stale comments across revision changes. - - autosave committed comment edits and summaries when dismissing or switching review editors; save verdicts and deletions immediately, using transactions rather than per-keystroke writes. - - automatically reopen the repository's sole review; offer a selector when several exist. - - retain explicit JSON export/import for sharing with coding agents; export must not redirect subsequent autosaves away from the database. - - version the database schema; use review-version checks to reject conflicting edits from multiple editor instances. - - surface write failures and conflicts without discarding drafts or marking unsuccessful saves as persisted. - - persist the precise start/end grapheme anchors without reducing them to line ranges. -- [x] diff view: local coding-agent review loop through a read-only `vamp --review` CLI. - - list repository reviews and show committed feedback; return exact anchors and grapheme excerpts without repeating full source files. - - show unresolved comments by default; `--all` includes resolved comments. - - manually resolve/unresolve comments in Vamp, independently of staleness; persist status in SQLite and version 3 JSON. - - preserve filename arguments, configured storage, and incompatible data; no MCP, agent replies, or automatic dispatch. -- [x] add an option for three pane left/base/right view for conflict resolution. - - alternative pane layout as left/right with base underneath (`config.resolve_history_layout = "base_below"`) -- [x] pull out tests from implementation code, and place them in a dedicated test folder. - - private unit tests live in `tests/unit/`, alongside the existing `tests/*.rs` integration suites. - [ ] diff view: GitHub code review integration after the local review UX is usable. - publish local reviews explicitly: general PR comments, inline line/range comments, review summaries, approval, and requests for changes. - preserve explicit PR identity and reviewed commit IDs; validate anchors against GitHub's PR diff and recheck the PR head before submission.