feat: review agent changes by file or hunk#229
Conversation
- Added git-review.ts to handle git review operations including starting, finishing, and deciding on reviews. - Created git-review.test.mjs for comprehensive testing of the git review functionalities. - Introduced path-security.ts and path-security.test.mjs to ensure safe directory resolution and prevent symlink escapes. - Enhanced rpc-manager.ts to manage prompt events with run IDs, preventing concurrent prompt submissions. - Updated git-types.ts to define types related to git reviews. - Adjusted package-lock.json to include necessary dependencies for testing.
|
Thanks for the thoughtful implementation and the attention to concurrency and safety. I don’t think this is ready to merge in its current form. The feature is valuable, but it introduces a substantial Git review and patch-management subsystem into Pi Web. That feels heavier than the product’s current role as a web UI for Pi sessions, and it creates a large surface area around index state, conflicts, external edits, and rollback semantics. For example, rejecting a change currently restores the working tree but can leave agent-staged changes in the Git index. I’d prefer a smaller first step, such as showing a read-only diff for changes made during a prompt. We can revisit accept/reject workflows once the desired Git semantics and long-term ownership are clearer. |
Summary
Validation
node_modules/.bin/tsc --noEmitnpm run lintnode --test lib/*.test.mjs components/*.test.mjs— 117 tests passedgit diff --check origin/main...HEADNotes
next buildwas intentionally not run, following the repository development guidance.