feat: make auto-approve rules toggleable #155

Merged
dries merged 1 commit from feat/toggleable-autoapprove-rules into main 2026-06-24 23:25:06 +02:00
Owner

Summary

  • Each reviewer prompt section (auto-approve rule) can now be enabled/disabled via a toggle in Settings.
  • enabled is stored in the section JSON; missing field (legacy rows) is treated as enabled, so existing rules keep working after upgrade.
  • Disabled rules are skipped when building the judge prompt, on both the interactive and headless auto-approve paths.

Testing

  • go test ./internal/server -run TestJudgePrompt (incl. new disabled-rule regression) — pass
  • go test ./internal/state — pass
  • pnpm exec tsc -b, pnpm lint, pnpm test (1276 tests) — pass standalone

Note: the pre-commit hook flaked on unrelated timeout-sensitive tests (auto-approve watcher 2s context deadline, a tmux test needing a live tmux server, 3 frontend tests timing out at 5s under load); all pass when run on their own.

## Summary - Each reviewer prompt section (auto-approve rule) can now be enabled/disabled via a toggle in Settings. - `enabled` is stored in the section JSON; missing field (legacy rows) is treated as enabled, so existing rules keep working after upgrade. - Disabled rules are skipped when building the judge prompt, on both the interactive and headless auto-approve paths. ## Testing - `go test ./internal/server -run TestJudgePrompt` (incl. new disabled-rule regression) — pass - `go test ./internal/state` — pass - `pnpm exec tsc -b`, `pnpm lint`, `pnpm test` (1276 tests) — pass standalone Note: the pre-commit hook flaked on unrelated timeout-sensitive tests (auto-approve watcher 2s context deadline, a tmux test needing a live tmux server, 3 frontend tests timing out at 5s under load); all pass when run on their own.
feat: make auto-approve rules toggleable
All checks were successful
CI / Frontend (pull_request) Successful in 4m8s
CI / Backend (pull_request) Successful in 5m27s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 53s
CI / Playwright E2E (pull_request) Successful in 7m1s
CI / Coverage Ratchet (pull_request) Successful in 5m52s
CI / Build (pull_request) Successful in 4m22s
CI / Semantic Tag (pull_request) Has been skipped
111103c08a
Each reviewer prompt section can now be enabled or disabled from the
settings page via a toggle. The enabled flag is stored in the section
JSON; legacy rows without the field are treated as enabled, so existing
rules keep working after upgrade. Disabled rules are skipped when
building the judge prompt (both interactive and headless paths).

Coverage ratchet: pass

Suite Baseline This PR Δ
go 68.90% 68.90% +0.00
frontend 54.21% 54.20% -0.01

Tolerance: -0.1%. Baseline stored on gh-pages.

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 68.90% | 68.90% | +0.00 | ✅ | | frontend | 54.21% | 54.20% | -0.01 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries merged commit 57063baed5 into main 2026-06-24 23:25:06 +02:00
Sign in to join this conversation.
No description provided.