Skip to content

Allow runtime updates to autoCommit setting via TUI#333

Merged
subsy merged 2 commits intomainfrom
claude/clever-tesla-AlXia
Feb 23, 2026
Merged

Allow runtime updates to autoCommit setting via TUI#333
subsy merged 2 commits intomainfrom
claude/clever-tesla-AlXia

Conversation

@subsy
Copy link
Copy Markdown
Owner

@subsy subsy commented Feb 23, 2026

Summary

This change enables the autoCommit setting to be updated at runtime through the TUI settings view without requiring an application restart.

Key Changes

  • Added setAutoCommit() method to ExecutionEngine class to allow runtime updates to the autoCommit configuration
  • Modified handleSaveSettings() in the run command to propagate autoCommit changes from the settings view to the engine instance

Implementation Details

The setAutoCommit() method provides a simple interface to update the engine's internal config state. When settings are saved through the TUI, the handler now checks if the autoCommit value has changed and syncs it to the running engine instance, allowing users to toggle auto-commit behavior without restarting the application.

https://claude.ai/code/session_012YFAFfSsnbpganDrHnxR2N

Summary by CodeRabbit

Release Notes

  • New Features

    • Configuration changes are now propagated immediately to running engines without requiring a restart.
    • Auto-commit behaviour can be toggled dynamically at runtime.
  • Tests

    • Comprehensive test coverage added for dynamic settings propagation and auto-commit toggle functionality, including edge cases.

The autoCommit config option was ignored at runtime because settings
changes from the TUI were saved to disk and updated in React state,
but never propagated to the ExecutionEngine instance. Add
setAutoCommit() to the engine and call it from handleSaveSettings.

https://claude.ai/code/session_012YFAFfSsnbpganDrHnxR2N
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ralph-tui Ignored Ignored Preview Feb 23, 2026 3:52pm

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.97%. Comparing base (9988dc6) to head (bdd3891).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/engine/index.ts 25.00% 3 Missing ⚠️
src/commands/run.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
+ Coverage   45.95%   45.97%   +0.01%     
==========================================
  Files         100      100              
  Lines       32252    32263      +11     
==========================================
+ Hits        14823    14833      +10     
- Misses      17429    17430       +1     
Files with missing lines Coverage Δ
src/commands/run.tsx 12.28% <88.88%> (+0.24%) ⬆️
src/engine/index.ts 58.23% <25.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Add setAutoCommit tests to engine test suite (toggle, preserve, default)
- Extract propagateSettingsToEngine as testable helper in run.tsx
- Add tests for propagateSettingsToEngine (true/false/undefined/null engine)
- Engine coverage: 75.58% funcs, 69.40% lines

https://claude.ai/code/session_012YFAFfSsnbpganDrHnxR2N
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9988dc6 and bdd3891.

📒 Files selected for processing (4)
  • src/commands/run.tsx
  • src/engine/index.ts
  • tests/commands/run.test.ts
  • tests/engine/execution-engine.test.ts

Walkthrough

A new setAutoCommit method was added to ExecutionEngine to enable runtime toggling of auto-commit behaviour. A helper function propagateSettingsToEngine was introduced to apply configuration changes to running engines when settings are saved, ensuring the engine immediately reflects user updates without restart.

Changes

Cohort / File(s) Summary
Engine auto-commit capability
src/engine/index.ts, tests/engine/execution-engine.test.ts
Added setAutoCommit(value: boolean) method to ExecutionEngine class with comprehensive tests validating runtime mutability of the autoCommit setting and default behaviour.
Settings propagation
src/commands/run.tsx, tests/commands/run.test.ts
Introduced propagateSettingsToEngine helper function that applies runtime-updateable settings from configuration to engine instances. Integrated into handleSaveSettings to immediately apply changes to running engines. Tests cover true/false/undefined autoCommit values and graceful handling of null/undefined engine instances.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #198 — Directly related; both PRs address the same runtime autoCommit surface by adding configuration support and the setAutoCommit method to the engine.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: enabling runtime updates to the autoCommit setting via the TUI interface, which aligns perfectly with the PR's objectives and implementation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/clever-tesla-AlXia

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@subsy subsy merged commit f7cd7fd into main Feb 23, 2026
7 checks passed
@subsy subsy deleted the claude/clever-tesla-AlXia branch February 23, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants