↓ Skip to main content
  1. Posts/

Jelly

Table of Contents

Jujutsu in the VS Code sidebar: see what changed, drag to squash, push.

Jelly icon
VS Code 1.95+ Version 0.1.0 • needs jj 0.47+ • not published yet

Jelly is a VS Code extension packaged as a .vsix. It isn't on the Marketplace yet.

Jelly is a VS Code extension for Jujutsu (jj), built around one way of working: the squash workflow. You make changes in a fresh working-copy commit, then squash them into the commit where they belong. Jelly puts everything that workflow needs into one sidebar: what changed in the working copy and in its parent, a graph of the commits around you, and drag and drop to move changes between them.

Highlights at a Glance
#

Working Copy and Parent, Side by Side

The sidebar shows the changes in the working copy (@), in its parent (@-), and in any commit you select. Click a file for VS Code’s native diff, with the working-copy side editable.

A Graph for Narrow Sidebars

A curved SVG ancestry graph marks the working copy, mutable, immutable and conflicted commits at a glance, and stays readable in a narrow sidebar.

Drag to Squash

Drag a commit onto another to squash it in, or hold Alt/Option to rebase instead. Drag a single file from the working copy onto any mutable commit to squash just that file.

Commit and Describe Inline

An inline composer commits (⌘⏎, creating a new working copy) or only describes (⇧⌘⏎). Squash offers a safe choice of which description to keep.

Multiple Remotes

Fetch from one remote or all of them. Push moves or creates a bookmark at @- and pushes it in one click, tracking it on every remote.

Fast and Safe

Jelly reads jj’s state through JSON templates, never by parsing human-readable output. Writes go through one queue, reads run in parallel at a fixed operation, and the views refresh when jj’s operation log changes, without polling.

Why Jelly?
#

VS Code’s source control views are built for Git: a staging area, branches, a commit button. Jujutsu has none of those. The working copy is a commit, every change has a stable ID, and history is meant to be rewritten. Squashing small fixes into the commit they belong to is the everyday move.

Jelly is opinionated about that: it shows exactly the commits the squash workflow touches, @ and @-, and makes squashing a drag. We like squash.


How It Works
#

1. The Sidebar
#

The upper pane lists the changes in the working copy and its parent (and, for a merge, each parent), plus the commit selected in the graph. The lower pane is the graph. The split between them is resizable and remembered.

2. Moving Around
#

Double-click any commit in the graph to start a new, empty working copy on top of it (jj new <commit>). Filter the graph with any revset, or leave it to your revsets.log setting.

3. Squashing
#

Drag commit A onto commit B for jj squash --from A --into B. Drag a file instead of a commit to squash only that file. Undo and redo are jj’s own operation log, one command each.

4. Pushing
#

Choose a remote (or all of them) for fetch; Jelly remembers your choice. Push moves the bookmark at @-, or creates one if there is none, and pushes it.


Settings
#

  • jelly.jjPath: where to find jj, if it isn’t on your PATH.
  • Default revset for the graph, and how many commits it loads at first.
  • Explorer badges: file status badges in the Explorer tree. Off by default, so they don’t double up with the Git extension’s badges in a colocated repo.

Technology Stack
#

  • Language: TypeScript, built with esbuild, tested with Vitest
  • UI: a VS Code webview with Preact for the sidebar, native VS Code diff editors for files
  • Backend: the jj CLI (0.47+), through JSON templates and a serialized operation queue
  • Target: VS Code 1.95+