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
1
Create Workspace
Click New Workspace in the Top Bar with a descriptive name (e.g.,
refactor-auth-module)2
Work in Workspace
Verdent now operates in the isolated workspace
3
Execute Refactoring
In the input box, describe the refactoring changes you want
4
Review Changes
Click Task Changes in the middle panel to review all modifications
5
Rebase or Discard
Click Workspace Actions → Rebase to main branch if satisfied, or Delete Workspace in the Workspace Bar to discard
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
1
Open Task Changes
Click Task Changes in the middle panel to review changes
2
Review Each File
Navigate through changed files
3
Verify Tests
Run tests to verify refactoring correctness
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
1
Switch to Plan Mode
Press
Shift+Tab or Ctrl+. to switch to Plan Mode2
Describe Refactoring
In the input box, describe the refactoring:
3
Review Plan
Verdent creates detailed plan with affected files and steps
4
Iterate
Ask questions, refine approach until satisfied
5
Execute
Switch to Agent Mode to implement in the workspace
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