VS Code Extension
VSCode Extension
The jjj VSCode extension provides IDE integration for managing problems, solutions, critiques, milestones, and code reviews directly within Visual Studio Code.
Note
The VSCode extension is in early development (v0.0.1). Basic views and infrastructure are implemented. Advanced features are planned for future releases.
Overview
The extension integrates jjj’s project management capabilities into your editor:
Currently Implemented:
- Sidebar views for Problems, Solutions, Critiques, Milestones, and Reviews
- Command palette integration for jjj commands
- Welcome view for initializing repositories
- Refresh functionality for all views
- Basic command structure
Planned Features:
- Interactive board webview
- Drag-and-drop solution management
- Planning and roadmap visualizations
- Dashboard with project overview
- Inline critique display with comments
- Status bar integration
Installation
Prerequisites
- Visual Studio Code 1.70.0 or later
- jjj CLI installed and accessible in your PATH
- A jjj-initialized repository
Development Installation
Currently, the extension is not published to the VSCode Marketplace. To use it:
Method 1: Build from Source
# Clone the repositorygit clone https://github.com/doug/jjj.gitcd jjj/vscode
# Install dependenciesnpm install
# Compile the extensionnpm run compile
# Package the extensionnpm run package# This creates jjj-vscode-extension-0.0.1.vsixMethod 2: Install Pre-built VSIX
If a .vsix file is available:
- In VSCode, open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run
Extensions: Install from VSIX... - Select the
jjj-vscode-extension-0.0.1.vsixfile
Method 3: Run in Development Mode
cd jjj/vscodecode .# Press F5 to launch Extension Development HostGetting Started
Initialize a Repository
- Open a Jujutsu repository in VSCode
- Open the jjj sidebar:
- Click the beaker icon in the Activity Bar (left side)
- Initialize jjj:
- Click “Initialize Repository” in the Welcome view
- Or run
JJJ: Initialize Repositoryfrom Command Palette
First Steps
Once initialized, the sidebar shows:
- Milestones - Release targets and sprints
- Problems - Things that need solving
- Solutions - Conjectures proposed to solve problems
- Critiques - Error elimination on solutions
- Reviews - Code review requests
Features
Sidebar Views
The jjj sidebar provides tree views for all project work items.
Milestones View
Shows all milestones in your project with target dates and status.
Actions:
- Click to open milestone details
- Right-click for context menu
- Refresh button to sync with latest data
- Create new milestone (
+button)
Problems View
Displays problems grouped by status or priority.
Actions:
- Expand to see linked solutions
- Click to open problem details
- Create new problem (
+button) - Refresh to update
Solutions View
Lists solutions with grouping options (by status, problem, or assignee).
Actions:
- Click solution to view details
- Toggle grouping with group-by button
- Refresh solutions
- Create new solution (
+button)
Grouping Options:
- By status (proposed, review, accepted, refuted)
- By problem
- By assignee
Critiques View
Shows critiques organized by severity or status.
Actions:
- View critique details
- Link critiques to solutions
- Create new critique (
+button) - Refresh view
Reviews View
Displays pending code reviews.
Actions:
- View review details
- See review status
- Refresh reviews
The Unified Tree View (Core Vision)
The defining feature of the jjj extension is the Unified Tree. This view maps the Popperian model directly onto your code structure.
Hierarchical Problem Decomposition
Problems are displayed as a DAG (Directed Acyclic Graph). Developing a complex feature involves breaking it down:
- Parent Problem: “Scale API for 1M users”
- Child Problem A: “Implement Redis caching”
- Child Problem B: “Optimize SQL indices”
Solution Attachment
Each problem in the tree can be expanded to show its Solutions.
- Solutions are linked to your current Jujutsu Change IDs.
- Clicking a solution performs a
jjj resume, automatically switching your workspace context to the relevant code.
Critique Integration
Critiques appear as children of the solutions they target.
- Severity Indicators: Red for “Critical” (blocking) and Yellow for “Medium”.
- Inline Preview: Hovering over a critique shows the rationale without needing to open a new file.
Command Palette
Access jjj commands via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
Available Commands:
JJJ: Initialize Repository- Set up jjj in current repoJJJ: Open Problem- View problem detailsJJJ: Open Solution- View solution detailsJJJ: Open Critique- View critique detailsJJJ: Open Milestone- View milestone detailsJJJ: Open Review- View review detailsJJJ: Create Problem- Create a new problemJJJ: Create Solution- Create a new solutionJJJ: Create Milestone- Create a new milestoneJJJ: Create Critique- Raise a new critiqueJJJ: Open Dashboard- Open dashboard view (planned)JJJ: Open Board- Open board view (planned)JJJ: Open Planning View- Open planning view (planned)JJJ: Refresh All Views- Refresh all sidebar viewsJJJ: Refresh Problems- Refresh problems viewJJJ: Refresh Solutions- Refresh solutions viewJJJ: Refresh Milestones- Refresh milestones viewJJJ: Refresh Critiques- Refresh critiques viewJJJ: Refresh Reviews- Refresh reviews view
Webview Panels (Planned)
The following webview panels are planned for future releases:
Board
Interactive board showing solutions organized by status with drag-and-drop support.
Planning View
Hierarchical view of milestones, problems, and solutions with progress tracking.
Dashboard
Overview panel showing project status, pending critiques, and solution summaries.
Configuration
Configure the extension in VSCode Settings (Cmd+, / Ctrl+,):
jjj.path
Type: string
Default: "jjj"
Path to the jjj executable. Set this if jjj is not in your system PATH.
{ "jjj.path": "/usr/local/bin/jjj"}Example: If you installed jjj in a custom location:
{ "jjj.path": "/Users/yourname/.cargo/bin/jjj"}Development Status
Implemented (v0.0.1)
- Extension scaffolding and activation
- Sidebar container with activity bar icon
- Welcome view for uninitialized repositories
- Tree view providers for:
- Milestones
- Problems
- Solutions
- Critiques
- Reviews
- Command palette integration
- Refresh commands for all views
- Create commands for all work item types
- JJJ CLI wrapper (
jjj.ts) - Custom document provider for jjj files
- Basic testing infrastructure
Planned (Future Releases)
-
v0.2.0 - Webview Panels
- Interactive board
- Planning view with hierarchy
- Dashboard panel
-
v0.3.0 - Code Review Integration
- Inline critique display
- Gutter decorations
- Diff view integration
- LGTM/critique actions
-
v0.4.0 - Advanced Features
- Status bar integration
- Context menus with actions
- Keyboard shortcuts
- CodeLens for problem/solution IDs
- Hover tooltips
- Quick picks for operations
-
v1.0.0 - Production Release
- Full feature set complete
- Published to VSCode Marketplace
- Performance optimizations
- Comprehensive documentation
Troubleshooting
Extension Not Activating
Symptom: jjj sidebar doesn’t appear
Solutions:
- Ensure VSCode 1.70.0 or later is installed
- Check that the extension is enabled in Extensions view
- Reload window:
Developer: Reload Window
”jjj command not found”
Symptom: Extension shows errors when trying to execute commands
Solutions:
-
Verify jjj is installed:
Terminal window jjj --version -
If jjj is not in PATH, set
jjj.pathin settings:{"jjj.path": "/full/path/to/jjj"} -
Find jjj location:
Terminal window which jjj # On macOS/Linuxwhere jjj # On Windows
Views Not Showing Data
Symptom: Sidebar views are empty
Solutions:
-
Ensure repository is initialized:
- Run
JJJ: Initialize Repositoryfrom Command Palette - Or run
jjj initin terminal
- Run
-
Check that you’re in a Jujutsu repository:
Terminal window jj status -
Try refreshing views:
- Run
JJJ: Refresh All Views - Or click refresh button in each view
- Run
”Repository not initialized”
Symptom: Welcome view persists after running init
Solutions:
-
Reload window after initialization:
- Command Palette →
Developer: Reload Window
- Command Palette →
-
Verify initialization worked:
Terminal window jjj status --json -
Re-open the workspace folder
Development & Contributing
The VSCode extension is part of the jjj project and welcomes contributions!
Project Structure
vscode/├── package.json # Extension manifest├── src/│ ├── extension.ts # Main entry point│ ├── jjj.ts # CLI wrapper│ ├── views/ # Tree view providers│ │ ├── problemProvider.ts│ │ ├── solutionProvider.ts│ │ ├── critiqueProvider.ts│ │ ├── milestoneProvider.ts│ │ ├── boardPanel.ts│ │ ├── dashboardPanel.ts│ │ └── planningPanel.ts│ ├── editors/ # Custom editors│ │ └── jjjDocumentProvider.ts│ └── test/ # Test suites└── media/ # Icons and stylesDevelopment Setup
-
Clone the repository:
Terminal window git clone https://github.com/doug/jjj.gitcd jjj/vscode -
Install dependencies:
Terminal window npm install -
Open in VSCode:
Terminal window code . -
Run extension:
- Press
F5to launch Extension Development Host - Test your changes in the new window
- Press
-
Run tests:
Terminal window npm test
Making Changes
- Modify code in
src/ - Compile:
npm run compile - Test in Extension Development Host (F5)
- Run tests:
npm test - Submit a pull request
Testing
The extension includes:
- Unit tests for providers
- Integration tests with mock jjj CLI
- Test fixtures with mock data
Run tests:
npm test # All testsnpm run test:unit # Unit tests onlynpm run test:integration # Integration testsResources
- Main Documentation: jjj Docs
- CLI Reference: CLI Commands
- GitHub Repository: github.com/doug/jjj
- Report Issues: GitHub Issues
- Discussions: GitHub Discussions
Feedback
We’d love your feedback on the extension!
- 🐛 Report bugs: GitHub Issues
- 💡 Request features: GitHub Discussions
- ⭐ Star the project: GitHub
- 📖 Read the docs: Documentation