feat(staged): remove automatic code review feature - #931
Merged
Conversation
Staged no longer starts code reviews on its own. This removes both triggers — the background review after each commit session completes and the review kicked off when adding a project or repo from a PR — along with everything that existed only to support them: - backend: trigger/cancel/adopt plumbing (trigger_auto_review, maybe_trigger_auto_review_for_new_repo, find_fresh_auto_review, set_review_auto), the pending_auto_review_branch_id session config, the isAutoReview session-status flag, and the queue special-casing that let auto reviews bypass the branch session queue - store: the reviews.is_auto flag and the auto-review-only session_provider column mapping; migration 0026 deletes background-created auto reviews (adopted ones were already flipped to is_auto = 0) and drops the column - frontend: the "Auto start code reviews" setting, auto-review adoption/cancellation in BranchCard, the DiffModal annotation polling, and the isAuto/isAutoReview filters across timeline, queueing, and session-status handling Reviews started manually via the Review button are unchanged. Verified: cargo check/clippy/fmt and cargo test (741 passed); svelte-check + tsc clean; vitest (682 passed); prettier clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
`run_post_completion_hooks` returned the `branch_id` of a newly detected commit solely so the caller could feed it to the auto-review trigger. With auto review gone, the production call site discards the value and only tests read it, leaving a return nothing traces back to a caller. Collapse it to `()` and have the mid-rebase tests assert on the store row they actually care about — the rebase session's pending commit still being `sha IS NULL` — via a new `assert_pending_unclaimed` helper, which `rebase_stopped_on_a_conflict_leaves_the_rows_alone` was already asserting inline. Verified: cargo fmt/clippy clean (only pre-existing warnings in test_utils and store/tests.rs); cargo test 741 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Auto reviews were the only branch session that could run without blocking the branch queue. With them gone, `blocks_queue` is `true` at every `BranchSessionSchedule` construction site, so all four `if schedule.blocks_queue` guards are unconditionally taken and the field reads as if a non-blocking session kind still existed. Drop the field and inline the guards. `has_queued_user_branch_session` loses its `user` qualifier for the same reason — the distinction it drew was user-started sessions versus background auto reviews — and collapses to an `is_some()` check on the resolved schedule. Also move the test-only `build_full_prompt` wrapper into `mod tests`, so its status is obvious from where it lives rather than from a `#[cfg(test)]` attribute on a production-shaped signature, and give its doc comment the verb it was missing. Verified: cargo fmt/clippy clean (only pre-existing warnings in test_utils and store/tests.rs); cargo test 741 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staged no longer starts code reviews on its own. This removes both triggers — the background review after each commit session completes, and the review kicked off when adding a project or repo from a PR — along with everything that existed only to support them.
Reviews started manually via the Review button are unchanged.
Changes
Backend — drops the trigger/cancel/adopt plumbing (
trigger_auto_review,maybe_trigger_auto_review_for_new_repo,find_fresh_auto_review,set_review_auto), thepending_auto_review_branch_idsession config, theisAutoReviewsession-status flag, and the queue special-casing that let auto reviews bypass the branch session queue.Store — removes the
reviews.is_autoflag and the auto-review-onlysession_providercolumn mapping. Migration0026deletes background-created auto reviews (adopted ones were already flipped tois_auto = 0) and drops the column.Frontend — removes the "Auto start code reviews" setting, auto-review adoption/cancellation in
BranchCard, theDiffModalannotation polling, and theisAuto/isAutoReviewfilters across timeline, queueing, and session-status handling.Two follow-up refactors clean up what the removal left behind:
blocks_queueonBranchSessionSchedule(auto reviews were the only non-blocking session kind, so every guard was unconditionally taken) and thebranch_idreturn fromrun_post_completion_hooks(only the auto-review trigger consumed it).Verification
cargo check/clippy/fmtclean;cargo test741 passed;svelte-check+tscclean;vitest682 passed;prettierclean.