Refactor the codebase and add --dry-run feature#8
Merged
Conversation
…space Calculation Add pure Data types (PaneHandle, BackendOp) and Calculation functions (plan_workspace, plan_file) to engine.rs. This is the duplication phase: the old apply/apply_workspace/MockBackend stay untouched. 18 plan-level tests added covering the full decision logic.
- Add Clone to Workspace, Tab, Pane - resolve_workspace_paths takes &Workspace and returns owned Workspace - resolve_paths takes &SpreadFile and returns owned SpreadFile - No .take() calls remain - Update main.rs call site to pass &spread_file
…se_focus_strategy - Add FocusStrategy enum and pure choose_focus_strategy Calculation - Add socket_path field to CliBackend, thread from main.rs - focus_pane_via_socket takes explicit socket_path parameter - No std::env::var in backend/cli.rs anymore - Unit tests for strategy selection and explicit path threading
…ation Add two tests that assert engine::plan_file(&file) produces exact Vec<BackendOp> for the integration test fixtures, demonstrating the Actions/Calculations split at the integration seam. Existing subprocess tests pass unchanged.
- Add #[arg(long)] dry_run: bool to Command::Apply - Add pure render_op function for human-readable BackendOp display - Wire main.rs: when dry_run is true, print plan lines and exit - Update existing cli.rs test to include dry_run: false
…itecture - Replace MockBackend/apply_workspace/focus_pane mentions with BackendOp/PaneHandle/plan_workspace/execute_plan/RecordingBackend - Update data flow diagram to flat Vec<BackendOp> story - Rewrite focus section: per-call --focus/--no-focus, no focus_pane call - Add choose_focus_strategy to pure functions list - Update testing strategy: plan tests + RecordingBackend + plan-pinning
yuk1ty
force-pushed
the
refactor/actions-calculations-data
branch
from
July 16, 2026 14:03
0029027 to
f9dbbce
Compare
yuk1ty
marked this pull request as ready for review
July 16, 2026 14:05
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.
Refactor the codebase and add dry-run feature.