10 · Beyond prose

So far on the Patchwork project, we’ve created a prototype of version control for writers. Key features are lightweight branches, diff visualization, and a chat-like interface to document history. We’ve used this prototype for our own writing (including the posts in this lab notebook) and found it useful for coauthoring and creative iteration.

But our end goal isn’t just versioned writing! We’re pursuing the vision of universal version control: flexible versioning and collaboration tools that can work with any kind of data in your computer. As we wrap the first phase of our project, we wanted to find out: how well do these concepts generalize to other domains besides writing?

To start exploring this question, we prototyped a version-controlled diagram editor based on tldraw. This demo shows collaborative floorplan editing with branching, timeline, and visual diffs:

Overall, we found that it took minimal effort to port our existing version control prototype to support a more visual tool.

Branches apply to drawing just as in writing: they are useful for creative explorations, and for grouping units of work to share. The document timeline is mostly the same as its prose equivalent, although the grouping and description of changes needed some domain-specific logic.

Diff visualization varies a lot more by document type. Since this was a brief spike, we used the simplest thing we could think of: a green glow for added shapes, and a translucent/ghost effect for deleted shapes. Even this simple approach worked well for an at-a-glance look at where changes have happened in a document, especially when paired with side-by-side comparison views.

Comments also require deeper integration to the app. Here we needed to hook into tldraw’s selection and rendering logic in order to connect the comments to the object via a curved line. We’re enthusiastic about the idea of sharing a comments layer across all kinds of data, but we think more UI work is needed to make the experience feel natural in all contexts.

Comments are attached to objects on the canvas, but still appear in a linear list that a reviewer can quickly read top-to-bottom.

What did we learn from this attempt at generalization?

To push this idea even further, we tried a quick integration with a spreadsheet, made with Handsontable.

A startup’s cap table spreadsheet under version control. Here, the user has selected an item in the history which highlights the diff created by that batch of edits.

Results for porting Patchwork to a spreadsheet were similar to the diagram case:

For each case where we’ve applied branching to a new domain (writing, diagrams, and spreadsheets), we’ve quickly found useful ideas for applying them. This suggests branching is a powerful general primitive for all kinds of creative work.

Going forward, we’re planning to refine the APIs used to integrate an application with the Patchwork infrastructure. And we’ll keep using these versioning tools in our own work to uncover which pieces are most useful in practice.

When we started on this journey, our vision was universal vision control, perhaps even built into the OS. These small experiments give us some confidence we’re on a good path towards that goal.

This is the last entry for now, but you can go back to read the lab notebook from the beginning.

Sign up to the Ink & Switch Dispatch

Occasional stories from Ink & Switch about our work, publications, talks, and the people at the lab. Browse the archive.