Write a pane
You build memo, a plugin whose pane shows a node its Python process writes, place the pane right of a desk's chart, and see it in Taji's window. You need a checkout built from source, whose make setup lays Taji's Python in .python, and the page, the window and the kernel built in this order (the kernel embeds ui/dist):
pnpm --filter @taji/ui build
pnpm --filter @taji/window build
cargo build -p taji-open
A pane is a React component that a plugin's <dir>/ui/plugin.tsx default-exports through definePlugin from @taji/plugin. Taji's window draws it in a frame, a page of its own. What the package exports, the frame's rules and the theme's tokens are the window reference.
1. Declare the pane
Make a directory named for the plugin's id and write its manifest:
id = "memo"
name = "Memo"
version = "0.1.0"
taji = ">=0.7, <0.8"
[process]
run = ["memo.py"]
python = {}
[[kernel.verbs]]
route = "memo/write"
name = "memo_write"
description = "Write the memo the Memo pane shows."
schema = { type = "object", properties = { text = { type = "string" } }, required = ["text"] }
scopes = ["local", "agent", "page"]
[[kernel.nodes]]
path = "memo"
description = "the memo the Memo pane shows"
[[ui.panes]]
kind = "memo.view"
label = "Memo"
reads = ["/read/memo"]
[process]runsmemo.pyon Taji's Python (Build your first plugin).[[kernel.verbs]]declaresmemo/write, which sets the memo.[[kernel.nodes]]declaresmemo, which anyone reads atGET /read/memo.[[ui.panes]]declares the pane: itskind,<plugin id>.<word>, its title, andreads, the routes it reads. Every key: the manifest reference.
2. Write the program
import taji
p = taji.plugin()
@p.verb("memo/write")
def write(args, bindings):
p.set("memo", {"text": args["text"]})
return {"wrote": args["text"]}
p.run()
@p.verb("memo/write")handles the verb the manifest declares.p.set("memo", …)sets the node the pane reads, and the return value is the verb's answer.
3. Write the pane
Put it in the plugin's directory as plugin.tsx in a ui/ of its own:
import { definePlugin, useNode } from "@taji/plugin";
function Memo() {
const memo = useNode<{ text: string }>("memo");
return <p style={{ padding: 12 }}>{memo.data?.text ?? "No memo yet"}</p>;
}
export default definePlugin({ id: "memo", panes: [{ kind: "memo.view", label: "Memo", Icon: () => <i />, Body: Memo }] });
useNode("memo")readsGET /read/memo, and reads it again each time the node changes. Until the first answer,dataisundefined.definePluginnames the plugin and its panes. Itsidand its panes say what[ui]oftaji-plugin.tomlsays, or the window refuses the frame.
4. Pack the pane
Copy the plugin into a plugins directory and pack its window half:
W=$(mktemp -d)
mkdir -p "$W/plugins" && cp -R docs/plugins/examples/pane/memo "$W/plugins/"
bun run ui/pack.ts "$W/plugins/memo"
index.js appears beside plugin.tsx: ui/pack.ts bundles the pane with React and @taji/plugin into the one file the kernel serves the frame from. --watch repacks on each change, so reopening the pane loads the new bundle. A pane that imports @taji/plugin/window or @taji/plugin/host does not pack.
5. Write the memo and place the pane
Define boot, get and v as in Build your first plugin, run boot, then write the memo:
v memo/write '{"text":"hello from the wire"}'
{
"wrote": "hello from the wire"
}
Place the pane right of the desk's chart:
DESK=$(get "" | jq -r .active)
CHART=$(get read/desk/$DESK/layout | jq .chart_pane_id)
v desk/$DESK/layout/add_pane "{\"anchor_pane_id\": $CHART, \"position\": \"right\", \"kind\": \"memo.view\"}"
You see the new pane's id in pane_ids:
{
"node": "desk/01a23da4-24cb-755e-9414-21efcd6c19d6/layout",
"pane_ids": [
8
]
}
positionisleft,right(the default),aboveorbelow, each halving the anchor's stack, ortab, joining it.- The kernel takes
memo.viewbecause an enabled plugin declares it.
6. Open the window
TAJI_WIRE=$PORT target/debug/taji ui
A first run opens on the welcome: press Continue. The desk shows the Memo pane right of the chart:
Captured 2026-12-03 on a keyless headless kernel, in Taji's window.
- Write the memo again with
v memo/write, and the pane redraws with the new text. engine/crates/taji/scripts/frame_gate.shholds installed panes' frames to the floor in Taji's window.
Stop the kernel, which closes the window:
v ui/quit '{}'
wait
rm -rf "$W"
Draw a chart with no backend
A pane that draws rows Taji already serves needs no process. plugin new --pane writes a window-only plugin, and plugin check draws its pane from fixtures/ with no kernel. Run these from your checkout, since check's pane step says SKIP anywhere else:
target/debug/taji plugin new toy --pane
target/debug/taji plugin check toy --bless
target/debug/taji plugin check toy
You see PASS manifest and PASS pane (blessed map), then PASS manifest and PASS pane, each run exiting 0. toy/golden/pane.map.png is the pane as check drew it in a 960 by 600 window: open it before you commit it, since --bless accepts whatever the pane drew. toy holds taji-plugin.toml, plugin.tsx under ui/, fixtures/screener.jsonl, AGENTS.md, README.md and .gitignore, and no [process]: taji plugin dev refuses it, and a kernel refuses it under TAJI_PLUGINS, where a plugin runs as a process. The manifest grants the screener product and declares one pane that reads it:
id = "toy"
name = "toy"
version = "0.1.0"
taji = ">=0.7, <0.8"
[grants]
reads = ["screener"]
[[ui.panes]]
kind = "toy.map"
label = "Map"
reads = ["/get/screener"]
The pane reads the screener, turns its rows into columns and hands Chart a function that draws them as a treemap:
// `toy.map`: the screener's most active equities as a treemap, sized by volume and coloured by the day's change.
import { useMemo } from "react";
import { definePlugin, useRows } from "@taji/plugin";
import { Chart, treemap, type Units } from "@taji/plugin/chart";
import { columnsOf } from "@taji/plugin/layer";
type Row = { symbol: string; volume: number; change_pct: number };
const UNITS: Units<Row> = { volume: "shares", change_pct: { unit: "percent", signed: true } };
function Map() {
const { data, error } = useRows("screener", "class=equity&list=share_volume_leaders");
const rows = useMemo(() => columnsOf(data?.rows ?? [], ["volume", "change_pct"], [], ["symbol"]), [data]);
if (error) return <p data-eid="toy.map.error">{error.message}</p>;
return (
<Chart
label="Most active equities"
rows={rows}
shapes={(size, tokens) => treemap(rows, { size: "volume", colour: "change_pct", labels: ["symbol", "change_pct"] }, size, tokens)}
tip={["symbol", "volume", "change_pct"]}
units={UNITS}
/>
);
}
export default definePlugin({
id: "toy",
panes: [{ kind: "toy.map", label: "Map", Icon: () => <i />, Body: Map }],
});
fixtures/screener.jsonl is what check serves in place of the screener: line 1 is {"item": "<class>:<symbol>"}, then a batch {"knowable_utc", "rows"} a line, the rows as GET /get/<product> answers them. That route's columns are paths./get/<product>.get.x-taji.columns in schema/wire.json; a Decimal cell is a string of digits and a List cell a JSON array. check draws the newest batch.
What Chart draws and gives you, how shapes, treemap, units and columnsOf work: Draw with Chart.
What check says
FAIL pane: <what> — <fix> names its fix. Each is one of these:
- The pack failed:
packing ui/plugin.tsx failed: <line>. Run thebun run ui/pack.tsit prints and read the error. A pane that imports@taji/plugin/windowor@taji/plugin/hostdoes not pack. <word>: the host refused its frame:definePlugin'sid,panesoritemsdisagree with[ui]oftaji-plugin.toml.fixtures/<product>.jsonl: …: a product in[grants] readshas no fixture, or it is not in the form above.<kind>'s frame did not greet its host in 12 s: the pane threw before it said hello, or the window compiles in a pane of this kind (Compiled-in panes) and drew it in the page, so no frame mounted. The saved picture may still look right.<word>'s Chart states "rects": 0: no row has a size above 0. Fix the fixture orshapes.<word> has no golden/pane.<word>.png, or it differs: look attarget/check/pane/<word>.png, and if the picture is meant, runcheck --blessand commitgolden/.
PASS pane holds the pane's frame, its rects and its picture, not a run on a kernel.
Compiled-in panes
The window's own panes (chart, ladder, book and watchlist, and those of the options, reference, screener and calendar plugins) are compiled into its build instead: ui/plugins.vite.ts imports every plugins/*/ui/plugin.tsx with no taji-plugin.toml beside ui/ (and each repo path TAJI_UI_PLUGINS names, colon-separated); a plugin with a manifest, in plugins/ or not, draws in a frame. Such a pane draws in the page itself, with no frame and no floor, and may import @taji/plugin/window and @taji/kit.
A compiled-in plugin adds a kind through its manifest: [[ui.panes]] rows of kind (<plugin id>.<word>) and label, and a Pane of that kind in its plugin.tsx. Its row then carries no ui and no frame is served; an icon, reads or [[ui.items]] fails the boot, since the rest is compiled into the window. The kernel takes the kind while the plugin is enabled. A bare word is still the kernel's own (PaneKindRecord in engine/crates/taji-pane-layout/src/persist.rs). A Page with pane set opens that kind from the left bar (the window reference); ui/mock/app/page.tsx is the example, and engine/crates/taji/scripts/plugin_gate.sh builds ui/walk/hello.tsx, a page that is a view, with TAJI_UI_PLUGINS.
On a phone
A paired phone draws the one pane in front, as wide as the screen. An installed frame is told nothing more: size its targets under @media (pointer: coarse) at 44px and 8px apart, and its inputs at 16px or more, or Safari zooms in. A compiled-in pane reads the phone with useCompact (packages/kit/shell/compact.ts) and puts a menu of many acts, a form or a confirm in the kit's PhoneSheet (packages/kit/ui/Sheet.tsx); the UI rules hold the touch rules.
If it fails
- The plugin's row in
GET /read/pluginssaysits [ui] is declared and ui/index.js is missing. The pane is not packed: run thebun run ui/pack.tsit names, then boot again. add_paneanswers409declined,memo.view is not a pane kind of an enabled plugin. No enabled plugin declares the kind: read the plugin's row inGET /read/pluginsfor itsreason.add_paneanswers404unknown_pane. The anchor is not a pane of that desk: read itschart_pane_idagain.add_paneanswers409no_room. A half of the anchor's stack would fall under its panes' least size in the canvas's 24 lines: anchor on a larger pane, or usetab.
Next
- The window reference: every export, the slots, the frame's floor and the theme's tokens.
- The manifest reference:
[ui]and its rows. - Pack and install a plugin from a signed registry.