What You’ll Learn
- Use workspace isolation for safe refactoring
- Execute multi-file refactoring workflows
- Leverage parallel agents for large refactors
Using Workspace Isolation
Why Workspaces for Refactoring
| Benefit | Description |
|---|---|
| Safe experimentation | Changes isolated from master branch |
| Easy rollback | Delete workspace to discard changes |
| Clean diffs | All changes in one reviewable branch |
| No interference | Other work continues unaffected |
Refactoring Setup
Create Workspace
Click New Workspace in the Top Bar with a descriptive name (e.g.,
refactor-auth-module)Refactoring Workflows
- Rename
- Extract
- Restructure
Rename symbols across your entire codebase:What Verdent does:
- Finds all occurrences using search
- Updates function definition
- Updates all import statements
- Updates all call sites
- Updates comments and documentation
Comparing Changes
Review Workflow
Desktop-Specific Refactoring
Parallel Refactoring
For large codebases, split refactoring across workspaces: Coordination:- Assign independent modules to different workspaces
- Minimize overlap to reduce rebase conflicts
- Rebase in dependency order
Plan Mode for Complex Refactors
Common Refactoring Patterns
- Extract Common Logic
- Update Deprecated
- Improve Types
- Consolidate Duplicates
FAQs
What if refactoring breaks something?
What if refactoring breaks something?
In a workspace:
- Run tests to identify failures
- Fix issues or request Verdent to fix
- If too broken, delete workspace and start fresh
How do I handle conflicts when rebasing?
How do I handle conflicts when rebasing?
- Complete refactoring in workspace
- Sync with base using Workspace Actions → Sync with main branch
- Resolve any conflicts in the workspace
- Then click Workspace Actions → Rebase to main branch
Should I refactor in small pieces or all at once?
Should I refactor in small pieces or all at once?
Small pieces are safer:
- Easier to review
- Faster to rollback if needed
- Tests can validate each step
- Tightly coupled changes
- Rename operations
- When using isolated workspace