Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src-tauri/src/config/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ impl Default for AppConfig {
pr_cooldown_seconds: 1800,
source_kind: SourceKind::default(),
engine_kind: EngineKind::default(),
auto_review: true,
// Boot defaults to manual review: scheduler polls/emits but does NOT
// auto-dispatch codex at startup (avoids clashing with other review
// processes). Flip-back guarded by `default_auto_review_is_off`.
auto_review: false,
webhook_enabled: false,
webhook_port: 8787,
webhook_secret: String::new(),
Expand Down Expand Up @@ -245,7 +248,7 @@ mod tests {
pr_cooldown_seconds: 1800,
source_kind: SourceKind::default(),
engine_kind: EngineKind::default(),
auto_review: true,
auto_review: false,
webhook_enabled: false,
webhook_port: 8787,
webhook_secret: "shh".to_string(),
Expand Down Expand Up @@ -310,6 +313,17 @@ mod tests {
assert_eq!(AppConfig::default().repo_root, "");
}

/// Default-manual-review lock (Medium). A fresh/reset config must NOT
/// auto-dispatch codex review at boot: `auto_review` defaults off, so the
/// scheduler only polls/emits PRs and codex is left to the explicit triggers
/// (`start_review` / `start_codex`). Locking the default here makes that intent
/// machine-checked — a silent flip back to `true` would reintroduce the
/// boot-time review-process clash this guards against, and fails CI first.
#[test]
fn default_auto_review_is_off() {
assert!(!AppConfig::default().auto_review);
}

#[test]
fn validate_accepts_existing_repo_root_and_skill() {
let config = AppConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/config/OnboardingWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const draft = reactive<AppConfig>({
prCooldownSeconds: 0,
sourceKind: "github",
engineKind: "codex",
autoReview: true,
autoReview: false,
webhookEnabled: false,
webhookPort: 8787,
webhookSecret: "",
Expand Down
2 changes: 1 addition & 1 deletion src/config/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const draft = reactive<AppConfig>({
prCooldownSeconds: 0,
sourceKind: "github",
engineKind: "codex",
autoReview: true,
autoReview: false,
webhookEnabled: false,
webhookPort: 8787,
webhookSecret: "",
Expand Down
2 changes: 1 addition & 1 deletion src/config/fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function validDraft(): AppConfig {
prCooldownSeconds: 1800,
sourceKind: "github",
engineKind: "codex",
autoReview: true,
autoReview: false,
webhookEnabled: false,
webhookPort: 8787,
webhookSecret: "",
Expand Down
2 changes: 1 addition & 1 deletion src/config/useConfigStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const cfg = (over: Partial<AppConfig> = {}): AppConfig => ({
prCooldownSeconds: 1800,
sourceKind: "github",
engineKind: "codex",
autoReview: true,
autoReview: false,
webhookEnabled: false,
webhookPort: 8787,
webhookSecret: "",
Expand Down
Loading