Where p3's web UI is heading

An idea sketch, not a spec. Starting from Max's views and Christian's rollups in p2, and where we want to take them in p3.

You've seen Max's views: panes next to the chat that the agent and you share, including a custom page the agent writes (the glyph editor). And Christian's rollups: sidebar sections computed from your sessions, some of them written as small scripts. The idea for p3 is to make everything on the page work like that. The whole UI becomes views that plugins (and the agent) provide, arranged by layouts, with a thin, unbreakable frame around them.

workbenchThe frameThe page's base code. Draws pane frames and a small fixed bar. Can't be replaced, so it can always rescue you.
appA layout of viewsA plugin that arranges views for one purpose: coding, triage, family. You switch between apps.
viewA placeAnything you can open, keep beside other things and link to: the chat, a diff, an issue, a sidebar.
slotA spot inside a viewWhere other plugins add their part without replacing the view: a card in the chat, a chip in the composer.

1. One page, four layers

This is the default p3 screen. Turn on the outlines to see who draws what.

◆ Coding ▾▤ Views↺ Reset layout⛨ Safe modefixed barworkbench: fixed bar
Recent
p3 web ideas
kit cleanup
Triage
Flaky test in CI#11981
Crash on resume#11990
Folder: ~/pi
Durable signals
view: Sidebarslot: row badge (triage plugin)
Chat⋯workbench: pane frame
Make the CI tests faster and push it.
▸ edit ci/run-tests.sh
Approval needed bash
git push origin faster-ci
AllowDenyslot: chat entry (approvals plugin)
view: Transcript
Message… ⎘ screenshot.pngslot: composer part
ChangesGlyph editor✕
ci/run-tests.sh
- npm test
+ npm test -- --shard=$SHARD
echo done
view: Changes

The coding app put the sidebar on the left, the chat in the middle and other views on the right. Every piece of content is a plugin's view; the frames around them and the top bar are the workbench's.

2. Views come from two places

Plugin views

Installed plugins provide views like the chat, diffs, files, terminals and the sidebar. They run inside the app, use p3's real components and data, and can also render in the terminal.

Agent sketches

The agent writes a page on the fly, like Max's glyph editor. It runs sandboxed: it can't act as you, so it can't, say, approve its own requests. It still gets p3's look and components.

Sketchagent writes it in a session
→
Librarysaved, reusable in any session
→
Pluginsame code, plus its own server logic

A sketch you like doesn't get rewritten: it's saved to a library the agent can see, and if it needs more (rules, storage), a plugin wraps the very same page.

3. Apps: one instance, many agentic apps

An app is a layout of views for one purpose, and each app works on its own slice of your sessions. You pick the app; clicking a thing inside it opens that thing's view right there. The same instance can hold a coding app per project, the triage agent, a talking robot for a kid who can't read yet, a family planner, a music tracker you make songs in together, a space shared with friends, and an app for looking after your machines.

Each app is a plugin: its layout, its views and its own data on the server. The sessions underneath are ordinary sessions; an app only decides which ones it shows and how. Clicking a session in any app opens it inside that app.

3a. What an app is made of

Its layout and its views

Where things go and what draws them. Coding has sidebars and the chat in the middle; the robot has no sidebar at all; the family app has its own sidebar. And the same session is a robot face with voice there, a plain chat in the family app, and the full chat with diffs in coding.

Its slice of the instance

Which sessions it shows (maybe just one long-running session in a fixed folder, with that folder's skills and AGENTS.md), and which machines and accounts it reaches: calendars, mail, the family files.

Its own views

Whatever the purpose needs beside the chat: a calendar, a game canvas, a tracker, the list of your machines.

Sharing a whole app with friends, not just one session, fits the same idea (you share its slice). How exactly is still open.

4. One sidebar up close: the coding app's

Each app brings its own sidebar, or none. This is the coding app's built-in one: Christian's rollups, generalized. It shows sections, and anyone can contribute one. They all produce the same thing: a list or groups of sessions.

Built in

Recent, by folder, by project, archive.

From a plugin

Triage contributes "Triage", grouped by repository, straight from its own data.

From a script

You or the agent write a small rule ("sessions that mention GitHub"), as rollup scripts do today.

Open question: whether one session may appear in several sections at once (p2 allows it; it can be confusing). That only concerns this built-in sidebar: anyone can build a different sidebar view and switch it into their app's layout. Clicking a session always opens the same place: the link names the session, not the section.

5. Rooms: working on a view together

Every open view gets a room: who else is looking, a live channel, and a shared clock. That's what makes collaboration feel live, not just "saved on drop".

sketchglyph editor · 3 people here
Max dragging Christian

While you drag, others see the handle move live; when you let go, it's saved for good.

Games like Pong work the classic way: one player's tab runs the game and the others predict and smooth, so a quarter-second of lag over the internet is fine.

Each view gets its own connection, so a fast game never waits behind the chat's traffic.

6. You can always get out

A broken view

Only its pane shows the error, with Close and Reload. The frame belongs to the workbench, so close always works.

A broken layout

Falls back to the default layout.

Safe mode

One button in the fixed bar: only the chat, the composer and the plugin manager, until you turn off what broke.

7. Phone and terminal

☰ p3 web ideas ⋯
ChatChangesGlyphs
Make the CI tests faster.
▸ edit ci/run-tests.sh
Approval needed
git push
AllowDeny
▤ Views↺ Reset⛨ Safe

Phone: one view at a time, picked from tabs; the sidebar is a drawer. Same views, same layout ideas.

Terminal: the same views, drawn as text. A view without a text version shows its name and a link to open it in the browser.

1 Chat 2 Changes 3 Glyphs ┌─ Chat ──────────────────────────────────┐ │ you Make the CI tests faster. │ │ pi ▸ edit ci/run-tests.sh │ │ Approval needed: git push [a]llow [d]eny │ └─────────────────────────────────────────┘ Glyphs: no text version · open in browser

The short version

A thin frame that can't break; apps (layouts) you switch between, each a different view on your sessions; everything on screen is a view from a plugin or the agent; plugins add to views through slots instead of replacing them; and rooms make shared views live. Next step: a spike rewriting p2's UI this way to see what holds up, then the clean version in p3.