BlogThe rise of the Product Engineer
Engineering26 November 2026

Tessera is made of plugins

The to-dos, the tags, the dates, the table, the cards and the journal of Tessera are plugins, and the plugins that you write use the same interface as they do. This post describes what that means for the app: why it is reactive, why it is modular, and what you can extend.

The features that people use in Tessera, to-dos, tags, dates and repeats, links between outlines, the table and card views, the journal and the images on a card among them, are each a plugin with a manifest and a name such as tessera.tasks or tessera.journal, and each receives the same object that every other plugin receives, called ctx, through which it does everything it is able to do. A built-in feature cannot import the engine of the app, so when one of them needs something that ctx does not offer, I extend ctx for every plugin and not only for that feature. The rule costs me a little time each time it applies, and it is the reason that a plugin written by someone else can do what a built-in feature does: there is one interface, used from the inside and from the outside, and nothing the app does for itself is out of reach of a plugin that has been given the permission.

Modular

A plugin states what it is and what it is allowed to do in a manifest: an id written like a web address in reverse order, a version, the platforms it runs on, the file where its code starts, and a list of permissions such as reading the library, changing rows, showing things in the app, or fetching from one named website. The person approves the list when installing the plugin, can clear any permission afterwards, and the app asks again when a later version asks for more. The code runs in an isolated environment, a compartment of the JavaScript engine, where the page, the file system and the network do not exist except through ctx, and a call that needs a permission that was not given fails with an error named PermissionDenied and appears in the diagnostics of the plugin.

Settings, Plugins: the installed plugins Pomodoro and Sync alert, each with its version, its description, its hook order and a checkbox for each permission it was given
Settings, Plugins. Each plugin lists the permissions it asks for, and each permission can be cleared separately. The hook order says where the hooks of the plugin run among the others: the features of the app first, then the plugins in the order they were turned on.

The data of a plugin is kept apart in the same way. A plugin that needs to remember something about a row, an outline or the library defines a facet, which has a name written as the id of the plugin and a short name, a description of the values it accepts, and a rule for what happens when two devices change it at once: the last write wins, the elements of two sets are combined, two texts are merged, or the amounts that each device added are summed. The status of a to-do, the tags of a row and a due date are facets of the features that ship with the app, and any plugin can read them. What can be computed is never stored: the lists of tags, the counts, the numbering, the links that point back to a row, and the Today and Upcoming lists are derived after every change. When a plugin is uninstalled, its facets stay in the library and keep travelling between devices, and they are usable again if the plugin comes back.

Reactive

In Tessera a change is first described and then applied, and the description is the same whoever makes the change: the person typing, another device, undo, an import or a plugin. It goes through a fixed sequence of steps: the app asks whether the action is available, builds the list of modifications, asks the hooks of the plugins whether each modification and the whole change may go through, applies the change, repairs what became inconsistent, tells the plugins that it has been applied, and tells them again once it has been saved. A plugin takes part in the steps that interest it and in no others, and what it sees is a copy that it cannot modify.

Between changes, a plugin watches a value instead of asking for it again. It gives ctx.observe the name of the value and a function, and the function is called when the value changes and not otherwise: the Pomodoro plugin that ships with the app keeps the timer of a to-do as a value on the row, and the countdown, the card on the screen and the tomato that is added at the end all follow that value. The screen is built in the same manner. The core sends each app a single ordered stream with one batch for each change, so that the sidebar, the page and the settings pane show the same state after every batch, and each part is drawn from the values that concern it alone: when a to-do is checked, the progress of the outline is the only part of the settings pane that is drawn again.

Extensible

A hook does not decide anything itself; it returns an object that states its answer, and the app reads the object and decides: allow the change, refuse it with a code and a message that the person reads, replace it with another change, or defer, which tells the app to wait for a promise while the screen keeps working. This is the whole of a plugin that refuses to delete any row tagged #keep:

ctx.hooks.shouldDelete({ on: 'row', onTimeout: 'veto' }, delta => {
  if (delta.kind !== 'deleted') return allow();
  const tags = ctx.facets.core.tags.tags.of({ facets: delta.value.facets ?? {} }) ?? [];
  return tags.some(tag => tag.toLowerCase() === 'keep')
    ? veto('protected', 'Tagged #keep: it cannot be deleted')
    : allow();
});

The hook has 4 milliseconds to answer, and if it exceeds that time three times within a minute the app turns it off and says so. When a hook fails or is late the change is allowed unless the plugin chose onTimeout: 'veto', as this one does, because a plugin that protects data should refuse when it cannot answer. Slow work belongs in defer, in a job that runs in the background, or in the hook that runs after the change has been saved. A hook that runs after a change can also ask for further changes: they are run as separate changes, they join the undo step of the change that caused them, so that one undo reverses both, and the chain stops at a depth of eight.

Plugins reach the screen and the data by the same routes. A plugin can add commands to the menus of a row or of an outline, items to the / menu of a note, panels, status items, outline icons and entries of the sidebar, and it can propose a whole new kind of outline next to Rows, Table, Cards and Journal: the Kanban example draws the headings of an outline as the columns of a board and its rows as the cards. The nine blocks of the / menu are given by a plugin that ships with the app, in the way that a plugin from anyone else would give a tenth. The data that these plugins write is held in facets, so that it is synchronised with the rest of the library and converges when two devices change it at once.

The plugins that ship with the app, Pomodoro, Sync alert, Vault and Multiple keys, and a set of small examples are published in a public repository under the MIT license, together with the SDK, its TypeScript types and the scripts that build a plugin into a file that can be installed from Settings. The guide on this site starts with a plugin that shows a message and ends with one that keeps a note locked until several people agree to open it.

← All posts