Towards universal version control with Patchwork
Sometimes, when I'm bombarded by one too many digital billboards or waiting for an endless loading spinner, I find myself doubting: do computers really have much to offer in the creative process? Maybe I would have been better off with paper and pen...
But then I remember: computers can simulate many possible worlds! This is a power not to be underestimated. With a tap of cmd-z, I can roll back time. With a click and a drag, I can copy an entire artboard, try out a few wild deviations, and effortlessly discard the ones that didn't work out. Instant time travel and branching worlds, not bound by physics, can offer a serious boost when navigating an uncertain design space.
And yet, it often feels like we're leaving something on the table with the software interfaces we use to to access this power. Git provides developers with powerful tools for branching history, but is inaccessible to most computer users, and doesn't mesh well with modern realtime collaboration. Google Docs' beloved "suggestion mode" helps writers easily make tentative edits, but doesn't let users push further into more powerful functionality like branching and merging whole documents. Perhaps most frustratingly of all, each app has its own approach to history and branching—for anything beyond basic undo, we're forced to learn new metaphors within the bounds of each application. This problem space—version control—is mostly what I've been exploring this year.
Patchwork: universal version control
Since finishing my PhD at MIT last fall, I've been working full-time at the independent research lab Ink & Switch. In January I started up a new project there called Patchwork, together with a great group of collaborators: Paul Sonnentag, Max Schöning, Adam Wiggins, Peter van Hardenberg, and Orion Henry. Our vision is universal version control: a set of conceptual primitives that can support simple and powerful versioning for all kinds of apps, across all kinds of collaboration patterns.
The work is still ongoing, but we've been sharing short blog posts on our progress as we go; here are some quick highlights:
Versioned writing
Though our end goal is versioning for many media types,we decided to start out by narrowing in on versioned writing. There were pragmatic reasons: we were already writing in our own homegrown collaborative automerge-based writing tool at Ink & Switch, and we had prior art to build on in the Upwelling project. But beyond that, verisoned writing is also just a conceptually rich area: I think writing together with others is the best way to align on complex ideas in a group, and version control can help with everything from writing internal specs and grant proposals all the way to writing academic papers.
In short, so far: we've tried out a bunch of ideas for visualizing diffs in writing at small and large scale; we experimented with grouping sets of edits into reviewable units; we built some lightweight branching interactions extending Upwelling; and we explored different ways of making history legible and discussable, including chat messages in the version history.
As a little peek, here's a snippet of our UI for grouping and commenting on edits:
We've maintained a serious context of authentic use throughout by using Patchwork to write all those blog posts linked above. (In fact: I'm writing this newsletter in Patchwork right now, using branches to great effect!) You can see some of what we learned in the various posts, and we'll likely share some more findings soon—but to briefly summarize: we've found that adding even basic branching and versioning concepts to a writing tool can be incredibly useful for navigating the collaborative process of drafting and editing.
We've also dipped our toes into a couple extensions beyond basic versioned writing, which are early but promising:
AI + version control
The first extension is using version control as a basis for collaboration with AI tools. Just like human collaborators, AI tools need a way to stage tentative changes for others to review. In fact, if you squint, I think you can view most interfaces for working together with AI on a shared artifact—everything from Copilot autocomplete to Photoshop's Generative Fill—as a kind of version control interface, for managing speculative worlds of edits and deciding what to do about them.
In Patchwork, so far we've prototyped a simple way for an AI bot to propose a branch on your writing and leave suggestions which you can review and accept/reject, just like a human-created branch. We think this works quite nicely in some cases—for example, I made a bot which edits using our lab style guide and explains its underlying reasoning in terms of the style guide:
But this workflow is too heavy in many other cases, so there's a lot of room to explore other interaction modes. The fact that AI can be always-on and faster than a human collaborator means that there are versioning interfaces (like Copilot's "ghost text") which go outside the bounds of what we'd design for human collaboration.
In passing, I'll also note that AI has been super useful in mundane ways within the Patchwork versioning UI itself—we have AI automatically populate branch names and edit descriptions by default, which has been more useful than I expected. There seems to be a nice pattern here of letting the AI do the boring meta-work so you can focus on the task at hand.
Version control across tools
A second extension in our work is expanding beyond just verisoned prose towards universal version control that spans media various types. So far we've tried some small experiments extending our branching, diffing, and commenting primitives to whiteboard canvases, spreadsheets, and Kanban boards. Initial results have been promising—commenting on a branch diff on a whiteboard feels nifty, and we've found plausibly useful ways to use versioning in all of those contexts.
The end goal here is to figure out what can be shared as common user-facing concepts (e.g., perhaps things like branches and edit groups) and what needs to be datatype- or view- specific (e.g., diff views specialized to the particular kind of information)—and then how to design both a good UX and developer APIs around all of that.
This idea of universal version control fits the shape of our goals at Ink & Switch: we're not shipping a commercial application as a startup, but rather exploring platform primitives for computing that might have a general impact on a longer time scale. You know, ideas like: a powerful version control system embedded in a cross-application collaborative data layer.
Version control + malleable software
In general, my research focuses on malleable software: customizable computing environments that individuals and teams can tune to serve their unique needs. And so a couple people have asked me: "wait, this version control stuff is cool, but what does it have to do with malleable software?" I promise, there is an important connection to version control—more than one, in fact!
The first (and more direct) connection is that collaborative malleable software requires tools for managing divergence. Imagine you're using a collaborative writing tool and you decide to customize it for yourself: by adding a big word count displayed in flashing red colors to help you keep track as you write. Leaving aside for now the details of how you'd go about implementing that, once you're done there's a question: how do you go on using your customization without imposing it on all of your collaborators? And then how will your customization stay in effect as the underlying tool evolves in other ways?
There are various solutions you could imagine to this: perhaps plugin/extension models, or a "fork and continually rebase" metaphor in git terminology, but the essential problem is a version control one: when our software fragments into customized variants, we need tools for managing that variation, and those tools need to be something end-users are comfortable wielding. If you imagine code as just another kind of data in a system, a powerful end-user-accessible versioning system like Patchwork seems potentially useful.
There's also a second, more subtle connection between version control and malleable software: universal version control tools create motivating challenges for GUI composition.
A big challenge in malleable software is figuring out ways that UI components can compose nicely and feel like a single unified app experience, even if the components were developed in a decoupled way without knowledge of one another. This was one thing I learned from working on Embark: coordinating hover, selection and focus state across components through a shared data substrate is an unreasonably powerful technique for creating a sense of unity in an interface.
Universal version control tooling turns out to be have some really good examples of this challenge! You want your work environment to have universal UI for versioning, so that users can learn one set of powerful tools and use it across all kinds of documents. And all the various domain-specific tools in the system—the text editor, the whiteboard, the spreadsheet—need to interface nicely with this universal frame: letting the user scrub through time, displaying diff highlighting over a document, scrolling to show the right thing when a comment is focused. These kinds of composition require a rich API that goes beyond simple shallow iframe-style embeds.
We haven't solved this part of the puzzle yet, but we lots of initial ideas we're exploring, spurred by embedding various editors into the Patchwork versioning interface. So that's the second connection: using universal version control as a generative example of UI composition problems for our broader malleable software agenda.
Lots more to explore here, and we'll hopefully have more updates soon. If you have feedback or questions, I'd love to hear your thoughts! In particular, I'd be interested in hearing from you if:
- you're interested in trying out a collaborative writing editor with powerful history and branching, e.g. for blogging or writing academic papers
- you have a collaborative app that you'd like to extend with better versioning, including history and branching
Other stuff
- I'm co-organizing the LIVE workshop this year. If you're working on something related to live programming environments, consider submitting your work! Due date is July 7. I wrote more on Twitter about what we're hoping to do with LIVE this year and why it's a great venue.
A few talks I enjoyed watching recently:
- Orion Reed about spatial canvases as a malleable substrate for integrating software tools
- Simon Peyton Jones and Tim Sweeney on their Verse language — their ideas on "choice" are particularly interesting...
- Alan Kay on a whole lot of topics, as usual
That's all for now. Until next time, be well!