Verdent’s workspace isolation makes refactoring safer by allowing you to experiment in isolated workspaces before rebasing changes.

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

BenefitDescription
Safe experimentationChanges isolated from master branch
Easy rollbackDelete workspace to discard changes
Clean diffsAll changes in one reviewable branch
No interferenceOther 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 symbols across your entire codebase:
Rename the function getUserData to fetchUserProfile across the entire codebase,
including all imports, references, and documentation
What Verdent does:
  1. Finds all occurrences using search
  2. Updates function definition
  3. Updates all import statements
  4. Updates all call sites
  5. 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
Use Plan Mode first to define the target architecture and function signatures. Pass these signatures to each agent so they understand the final structure and can implement compatible interfaces across workspaces.

Plan Mode for Complex Refactors

1

Switch to Plan Mode

Press Shift+Tab or Ctrl+. to switch to Plan Mode
2

Describe Refactoring

In the input box, describe the refactoring:
Plan a refactoring of the authentication module to:
- Split monolithic auth service into smaller focused services
- Add proper TypeScript types
- Improve testability
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

The @UserList.tsx and @ProductList.tsx components share pagination logic.
Extract the common pagination logic into a usePagination hook in @hooks/

FAQs

In a workspace:
  1. Run tests to identify failures
  2. Fix issues or request Verdent to fix
  3. If too broken, delete workspace and start fresh
The master branch remains unaffected until you rebase.
  1. Complete refactoring in workspace
  2. Sync with base using Workspace Actions → Sync with main branch
  3. Resolve any conflicts in the workspace
  4. Then click Workspace Actions → Rebase to main branch
This keeps conflict resolution contained to the workspace.
Small pieces are safer:
  • Easier to review
  • Faster to rollback if needed
  • Tests can validate each step
All at once can work for:
  • Tightly coupled changes
  • Rename operations
  • When using isolated workspace

See Also