VS Code Extension
VS Code Extension
The jjj VS Code extension provides IDE integration for managing problems, solutions, critiques, and milestones directly within Visual Studio Code. It surfaces the full jjj workflow in a unified sidebar tree, with context menu actions, inline critique display, and GitHub sync commands.
Overview
The extension integrates jjj’s Popperian project management model into your editor:
- Unified Project Tree — milestones, problems, solutions, and critiques in a single hierarchical view
- Assignee visibility — problems, solutions, and milestones show
· @namein the sidebar - Context menu actions — create, transition, assign, and move items without leaving the tree
- Inline critiques — PR review comments appear as critique threads anchored to file locations
- Drag-and-drop milestone management — drag problems between milestones directly in the tree
- GitHub sync — import issues, sync PR reviews, and push metadata from the command palette
- Filter mode — toggle between “Open only” and “All” views with a single button or keyboard shortcut
Installation
Prerequisites
- Visual Studio Code 1.85.0 or later
- jjj CLI installed and accessible in your PATH
- A jjj-initialized repository (
jjj init)
Build from Source
cd jjj/vscodenpm installnpm run package# Creates jjj-vscode-0.1.0.vsixInstall Pre-built VSIX
- In VS Code, open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run
Extensions: Install from VSIX... - Select the
.vsixfile
Run in Development Mode
cd jjj/vscodecode .# Press F5 to launch Extension Development HostGetting Started
- Open a Jujutsu repository in VS Code
- Click the JJJ icon in the Activity Bar (left side)
- Initialize jjj if not already done:
- Run
JJJ: Initialize Repositoryfrom the Command Palette - Or run
jjj initin the terminal
- Run
The sidebar will show your project tree once initialized.
Features
Unified Project Tree
The sidebar contains a single Project tree view. The hierarchy is:
Milestone (solved/total) · @lead Problem [status] priority · @assignee Solution [status] · @assignee Critique [severity]Backlog Problem ...Milestones are shown with a (solved/total) progress indicator. The Backlog node collects problems not assigned to any milestone.
Filter mode (default: Open only): In “Open” mode, solved/withdrawn/approved items are hidden. Problems with active children auto-expand. Toggle with the filter button in the view toolbar or Cmd+Shift+O / Ctrl+Shift+O.
Tab navigation: While the tree is focused, Tab / Shift+Tab cycles through open actionable items.
Drag-and-Drop Milestone Management
Drag problems from one milestone to another (or to Backlog) directly in the tree. The extension calls jjj milestone add-problem and jjj milestone remove-problem automatically.
Context Menu Actions
Right-click any item in the tree for relevant actions:
| Item | Available actions |
|---|---|
| Milestone | New Problem, New Problem in Milestone |
| Problem | New Solution, Solve, Dissolve, Reopen, Assign to Me, Move to Milestone |
| Solution (proposed) | Submit for Review, New Critique, Resume, Withdraw, Assign to Me, Switch to Change |
| Solution (submitted) | LGTM (Sign Off), Approve, New Critique, Resume, Withdraw, Assign to Me, Switch to Change |
| Critique (open/valid) | Address, Dismiss, Validate |
Status Bar
The extension adds two items to the VS Code status bar:
- Left bar (active solution): shows the current solution’s title and an open-critique badge (e.g.
$(beaker) Fix auth flow $(warning)2). Clicking opens the solution’s entity document. - Right bar (next action summary): shows project-wide counts —
$(issues) 3 $(beaker) 2 $(warning) 1for open problems, solutions in review, and open critiques. Hidden when all counts are zero. Clicking runs JJJ: Next Open Item.
Inline Critique Display
Critiques with file and line location (imported from PR review threads via jjj github import) appear as comment threads anchored to the relevant line in the editor. Thread actions (Address, Dismiss, Validate) are available inline without switching to the tree.
Use JJJ: Add Critique Here from the editor right-click menu to raise a critique pinned to the current cursor position.
Critique threads are re-anchored immediately on every file save — if the surrounding code has moved, the thread relocates to the best matching position without waiting for a full cache refresh. Threads that can no longer be confidently anchored are marked ⚠️ Outdated. A full cache refresh (adds/removes threads) still runs 500ms after each save.
Command Palette
Access all jjj commands via Cmd+Shift+P / Ctrl+Shift+P:
Problems
JJJ: New Problem— create a new problemJJJ: Solve Problem— mark a problem solvedJJJ: Dissolve Problem— mark a problem dissolvedJJJ: Reopen Problem— reopen a solved or dissolved problem
Solutions
JJJ: New Solution— create a solution for a problemJJJ: Submit Solution— submit a proposed solution for reviewJJJ: Approve Solution— approve a submitted solutionJJJ: Withdraw Solution— withdraw a proposed or submitted solutionJJJ: LGTM (Sign Off)— sign off on a submitted solutionJJJ: Resume Solution— resume working on a solution
Critiques
JJJ: New Critique— raise a critique on a solutionJJJ: Add Critique Here— raise a critique anchored to the current editor lineJJJ: Address Critique— mark a critique as addressedJJJ: Dismiss Critique— dismiss a critiqueJJJ: Validate Critique— confirm a critique as a real flaw
Milestones
JJJ: New Milestone— create a milestone
Navigation
JJJ: Switch to Change— runjj editto the change ID of the selected solutionJJJ: Next Open Item— focus next open item in tree (Tab)JJJ: Previous Open Item— focus previous open item in tree (Shift+Tab)JJJ: Toggle Filter— toggle open/all filter (Cmd+Shift+O)
GitHub
JJJ: Sync GitHub— pull PR reviews and issue stateJJJ: Import GitHub Issue— import a GitHub issue as a problemJJJ: GitHub Sync Status— show sync status in a preview pane
View
JJJ: Refresh All— reload all data from the jjj store
Configuration
Configure the extension in VS Code 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": "/Users/yourname/.cargo/bin/jjj"}jjj.filterMode
Type: "open" | "all"
Default: "open"
Controls the default tree filter. "open" hides completed/solved/approved items; "all" shows everything.
{ "jjj.filterMode": "all"}Troubleshooting
Extension Not Activating
Symptom: jjj sidebar doesn’t appear
Solutions:
- Ensure VS Code 1.85.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 # macOS/Linuxwhere jjj # Windows
Views Not Showing Data
Symptom: Sidebar tree is empty
Solutions:
-
Ensure the repository is initialized:
- Run
JJJ: Initialize Repositoryfrom Command Palette - Or run
jjj initin terminal
- Run
-
Check that you are in a Jujutsu repository:
Terminal window jj status -
Refresh the view:
- Click the refresh button in the tree toolbar
- Or run
JJJ: Refresh Allfrom Command Palette
”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
Development & Contributing
Project Structure
vscode/├── package.json # Extension manifest and registered commands├── src/│ ├── extension.ts # Main entry point│ ├── cli.ts # jjj CLI wrapper│ ├── commands.ts # All command handlers│ ├── cache.ts # In-memory data cache│ └── views/│ └── projectTreeProvider.ts # Unified tree with drag-and-drop└── media/ # IconsDevelopment Setup
-
Install dependencies:
Terminal window cd jjj/vscodenpm install -
Open in VS Code:
Terminal window code . -
Run extension:
- Press
F5to launch Extension Development Host
- Press
-
Run tests:
Terminal window npm test -
Package:
Terminal window npm run package
Resources
- Main Documentation: jjj Docs
- CLI Reference: CLI Commands
- GitHub Repository: github.com/doug/jjj
- Report Issues: GitHub Issues