Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
1024395
feat: the Pine app's page is built with Tailwind and shadcn's tokens,…
abernier Nov 17, 2026
adad137
feat: the Pine app's buttons, switches, fields, tabs and lists are sh…
abernier Nov 17, 2026
763e27a
feat: the Pine app draws answers as they stream with Streamdown, code…
abernier Nov 17, 2026
08f55de
Merge branch 'shadcn-migration' into worktree-agent-a13d97384e74ac94c
abernier Nov 17, 2026
67d3274
feat: the Pine app draws a conversation with AI Elements, and what an…
abernier Nov 17, 2026
c84900d
Merge branch 'shadcn-migration' into worktree-agent-a3c80929cd47da8c0
abernier Nov 17, 2026
9675884
feat: the Pine app's dialogs keep focus inside, give it back on close…
abernier Nov 17, 2026
c99ae81
Merge branch 'shadcn-migration' into worktree-agent-a7201959ea9f82dba
abernier Nov 17, 2026
49592c6
feat: the side bar and the code panel are resized by dragging or with…
abernier Nov 17, 2026
09a724e
Merge branch 'shadcn-migration' into worktree-agent-a7fdd1526fe52000e
abernier Nov 17, 2026
2c0dcf4
fix: a width set with the arrow keys is kept even when the side bar i…
abernier Nov 17, 2026
a09273b
fix: a list to pick from in the Pine app is ready for Enter the momen…
abernier Nov 17, 2026
d0be3a3
Merge branch 'shadcn-migration' into worktree-agent-a7201959ea9f82dba
abernier Nov 17, 2026
a21cb06
feat: the Pine app's message box is AI Elements' Prompt Input, and th…
abernier Nov 18, 2026
cb0259e
fix: the Pine app's notices show through Sonner, stacked at the botto…
abernier Nov 18, 2026
3d34bb0
Merge branch 'shadcn-migration' into the composer's branch
abernier Nov 18, 2026
6d81a5c
Merge branch 'shadcn-migration' into worktree-agent-a5613c73bcfe7d9c7
abernier Nov 18, 2026
410a91f
fix: the Pine app's notices pile up at the bottom and open on hover, …
abernier Nov 18, 2026
18ce1ba
Merge branch 'shadcn-migration' into worktree-agent-a5613c73bcfe7d9c7
abernier Nov 18, 2026
b87456a
fix: the Pine app's notices are drawn beside the app, so a change in …
abernier Nov 18, 2026
371ea35
fix: Enter in the palette and the lists to pick from takes the highli…
abernier Nov 18, 2026
2937dde
feat: the Pine app's page has no hand-written stylesheet left: it is …
abernier Nov 18, 2026
91f26b3
The Pine app's source carries shadcn's agent skill, and its stock com…
abernier Nov 18, 2026
e0bf727
fix: the palette and the lists to pick from keep their line in cmdk i…
abernier Nov 18, 2026
fecc09a
The Pine app's side bar, tabs, panels, event log and dialogs scroll i…
abernier Nov 18, 2026
fbc0697
The Pine app's window, panel, event log and browser use shadcn's own …
abernier Nov 18, 2026
0279135
The Pine app's settings pages, their side list, dialogs and command o…
abernier Nov 18, 2026
f53e35a
The Pine app's settings are drawn with shadcn's own Field, Item, Togg…
abernier Nov 18, 2026
5d29d3c
The Pine app's settings headings above lists match those above forms,…
abernier Nov 18, 2026
731d666
The Pine app's conversation scrolls in shadcn's Message Scroller: it …
abernier Nov 18, 2026
dbb41f6
The Pine app's conversation draws the work of a turn with shadcn's Tr…
abernier Nov 18, 2026
d800b04
The Pine app no longer carries Mermaid and KaTeX: the AI SDK Elements…
abernier Nov 18, 2026
673f491
The Pine app's message input is shadcn's Prompt Input: files are atta…
abernier Nov 18, 2026
39af61f
The Pine app's code pane shows what a tool or a program printed in sh…
abernier Nov 18, 2026
9c8decf
The Pine app is built from shadcn's core components alone, composed p…
abernier Nov 18, 2026
2a62771
The Pine app's message scroller is again exactly what the shadcn CLI …
abernier Nov 18, 2026
3bdb2ce
The Pine app's code pane follows a running program's output to its en…
abernier Nov 18, 2026
68f6422
The Pine app's notices are shadcn's Toast on Base UI instead of Sonne…
abernier Nov 18, 2026
bee8785
The Pine app's button for the code pane in a conversation's head is s…
abernier Nov 18, 2026
b4290ec
fix: the Pine app's composer no longer looks disabled while it is emp…
abernier Nov 18, 2026
529bdb2
fix: the Pine app's manual names the settings' segmented controls tog…
abernier Nov 18, 2026
b03bcff
docs: AGENTS.md tells shadcn's registry, its AI Elements pages and Ve…
abernier Nov 18, 2026
de7f985
fix: the Pine app sets fewer font sizes of its own: one log block, st…
abernier Nov 18, 2026
d16f832
fix: the Pine app draws folded parts of an answer with stock Collapsi…
abernier Nov 18, 2026
336c397
test: the markdown test allows pine's own arrow beside a link and sti…
abernier Nov 18, 2026
fda7b11
fix: the Pine app's event log opens a line from the keyboard too, wit…
abernier Nov 18, 2026
ca2e6ae
fix: the Pine app's agent view heads with a stock Item, and Settings …
abernier Nov 18, 2026
51c4ee8
fix: the Pine app's browser panel draws its tabs with stock Tabs, its…
abernier Nov 18, 2026
49b7cef
fix: the Pine app's code pane draws diffs with stock code-block lines…
abernier Nov 18, 2026
807c1b2
fix: the Pine app's conversation head, welcome and context meter use …
abernier Nov 18, 2026
28b1348
test: the live browser test clicks Back by the name the button has
abernier Nov 18, 2026
6e0cd83
fix: the Pine app's side bar is shadcn's stock Sidebar, with its conv…
abernier Nov 18, 2026
7df5409
fix: the Pine app's question dialog lists its answers as stock Item b…
abernier Nov 18, 2026
3376492
fix: the Pine app's settings navigation is shadcn's stock Sidebar men…
abernier Nov 18, 2026
704bfc5
fix: the Pine app's side bar keeps room for a conversation's time, so…
abernier Nov 18, 2026
fc06faa
fix: the Pine app's manual describes its side bar rows without words …
abernier Nov 18, 2026
820e99c
fix: the Pine app's text fields grow with stock Textarea, its notices…
abernier Nov 18, 2026
4f93f96
fix: the Pine app calls stock shadcn directly where it had wrappers t…
abernier Nov 18, 2026
3faa8d6
fix: the Pine app shows work in progress with stock Spinner, announce…
abernier Nov 18, 2026
f1a631b
fix: the Pine app asks before removing, signing out or stopping with …
abernier Nov 18, 2026
ab03993
fix: the Pine app drops its unused wrappers of stock parts and their …
abernier Nov 18, 2026
c7731fd
docs: the Pine app's manual says stock parts are used where they are …
abernier Nov 18, 2026
6fb9292
fix: the Pine app's waiting mark and unread dot fit the icon's place …
abernier Nov 18, 2026
f791e39
test: the Pine app's suite takes a picture of a confirmation dialog o…
abernier Nov 18, 2026
6174b1a
docs: the Pine app's stories sit beside the file of what they show, i…
abernier Nov 18, 2026
12d1e5b
fix: the Pine app's code editor takes its colours from tokens in inde…
abernier Nov 18, 2026
4a4809c
fix: the Pine app's diffs show added lines green and removed lines re…
abernier Nov 18, 2026
9e62aa4
fix: the Pine app's diffs take the stock code-block look for added, r…
abernier Nov 18, 2026
c042863
fix: the Pine app's Storybook docs pages scroll again, and the App st…
abernier Nov 18, 2026
b4ca0fe
refactor: the Pine app's dialogs each live in a file of their own, wi…
abernier Nov 18, 2026
99e9f70
refactor: the Pine app's small parts leave ui.tsx: the logo and the e…
abernier Nov 18, 2026
4562f6a
refactor: each picture of the Pine app opens larger in a stock Dialog…
abernier Nov 18, 2026
76cf111
refactor: the Events settings page keeps its open tab in stock Tabs, …
abernier Nov 18, 2026
7dc57a6
refactor: each sign-in button on the Models settings page opens its o…
abernier Nov 18, 2026
cee8012
refactor: New source on the Events settings page opens a stock Dialog…
abernier Nov 18, 2026
c01113e
refactor: the Pine app's dialogs give focus back through Base UI's ow…
abernier Nov 18, 2026
95ca43c
fix: the Pine app's send button stays inside the message box when the…
abernier Nov 18, 2026
c060ae3
test: Chromatic takes every story of the Pine app in light and dark t…
abernier Nov 18, 2026
34cff5f
fix: the Pine app's tabs keep their width and scroll when many are op…
abernier Nov 18, 2026
117dcd3
fix: a sign-in in the Pine app's settings is cancelled when its dialo…
abernier Nov 18, 2026
71f6131
fix: the Pine app's pictures say to a screen reader that they open la…
abernier Nov 18, 2026
22775d7
Merge claude/chromatic-ui-setup-bc8b3f (next) into shadcn-migration
abernier Nov 18, 2026
d95f1db
test: next's desktop tests for branching, worktrees and the empty bro…
abernier Nov 18, 2026
2f2dbfd
fix: the Pine app no longer leaves blank space under each of your mes…
abernier Nov 18, 2026
86f1005
fix: scrolling areas of the Pine app fade where they are cut, and the…
abernier Nov 18, 2026
2d8a7dc
test: the Pine app's browser is found by its roles and stock attribut…
abernier Nov 18, 2026
a434ca5
refactor: the Pine app's page carries no leftover class names; tests …
abernier Nov 18, 2026
c93c38d
fix: the panel's Agent view no longer scrolls sideways, and the side …
abernier Nov 18, 2026
222cb20
fix: every scroll bar of the Pine app hides at rest and shows while i…
abernier Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Thumbs.db
*~

# Assistants' local settings
.claude/*
**/.claude/*
!.claude/launch.json
!desktop/.claude/skills/

# The package made for npm (npm run build)
build/
31 changes: 25 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ to change the code.
| `node src/cli.ts <command>` | The CLI without installing it. |
| `npm run desktop` | The desktop app (`desktop/`, Electron), built and opened. It has its own `package.json` and `node_modules`: `npm install` in `desktop/` once. `npm run dev` there reloads the page as you edit. |
| `npm run desktop:test` | The desktop app from end to end: the real app, through its real window, on a pine home of its own with the scripted model server. About thirty seconds; needs a screen. Run it when you change `desktop/`, the control API the app uses (`src/http.ts`, `src/owner.ts`) or `pine service`. `npm run check` in `desktop/` is its type check. |
| `npm run storybook` (in `desktop/`) | Storybook for the parts of the app's page (`desktop/src/*.stories.tsx`), at port 6006; `npm run build-storybook` builds it. Chromatic publishes the stories on every pull request (`.github/workflows/chromatic.yml`, secret `CHROMATIC_PROJECT_TOKEN`). Add or update a story when you change `desktop/src/ui.tsx`. |
| `npm run storybook` (in `desktop/`) | Storybook for the parts of the app's page, at port 6006: a story sits beside the file of what it shows (`desktop/src/<File>.stories.tsx`, `desktop/src/components/<name>.stories.tsx`: `desktop/src/ApprovalDialog.stories.tsx`, `desktop/src/components/printed.stories.tsx`, `desktop/src/components/logo.stories.tsx`); `npm run build-storybook` builds it. Chromatic publishes the stories on every pull request (`.github/workflows/chromatic.yml`, secret `CHROMATIC_PROJECT_TOKEN`), each in light and dark through its modes (`desktop/.storybook/modes.ts`), so no dark twin of a story is written. Add or update a story when you change a part in `desktop/src/components/` (outside `ui/`, which is stock). |
| `npm run desktop:pack` | `desktop/release/mac-arm64/Pine.app` (`mac/` on Intel), with the package of `npm run build` and its dependencies, the Node it runs on, pine's helpers built (`scripts/helpers.mjs`) and `pine` for a terminal inside, signed with the hardened runtime. `node desktop/scripts/smoke.mjs` starts that app from a folder of its own and checks that it runs on the pine and the Node it carries. Run both when you change `desktop/scripts/`, a helper's build function, `src/prebuilt.ts` or `desktop/electron/service.ts`. |

There is no build step. Node runs the TypeScript directly (the compiled parts, pine's Swift
Expand Down Expand Up @@ -120,7 +120,21 @@ baseline/ pi SDK behaviour checks and their results; the mock model se
docs/ SKILL.md index and references/
desktop/ the desktop app (Electron; a package of its own, not part of what goes to npm): electron/ is the
main process (the window, the daemon's token, `pine service`, `pine` for a terminal, the look for a newer app), src/ the
page (React), test/ the app driven through its real window, scripts/ what packs it. docs/references/desktop.md describes it and its layout
page (React, Tailwind v4, shadcn on Base UI, shadcn's core chat components composed per shadcn's AI Elements
patterns for the conversation and the input, Streamdown for answers, lucide icons;
ui-sdk only for what shadcn lacks), test/ the app driven through its real window, scripts/ what packs it.
The stock components are src/components/ui and nothing else, all from shadcn's own registry in the
style components.json names, the chat components included (`npx shadcn add message`, not
`@ai-elements/message`). AI Elements means shadcn's pages of patterns (ui.shadcn.com/docs/ai-elements),
which are code to compose, not a package. Vercel's earlier `@ai-elements` registry, which shadcn's
pages replace, serves one version written on Radix for every style: it is never added. A stock component is never edited: add and
update them with the shadcn CLI and components.json. Stock is used directly where it is needed:
no wrapper that only renames or bundles stock components. src/components/ holds only a
composition stock cannot express in place, and wraps the stock one. No hand-written stylesheet:
utilities on Tailwind's default scale, tokens and one root font-size in src/index.css.
docs/references/desktop.md describes it and its layout.
shadcn's agent skill lies in desktop/.agents/skills (desktop/.claude/skills links to it, skills-lock.json pins it):
read it before you change the page; `npx skills update` in desktop/ brings it up to date
```

## What agents know about pine
Expand Down Expand Up @@ -471,7 +485,10 @@ These are invariants. A change that breaks one needs a test that shows why it is
and sets the policy that lets the page load nothing from the web. Text from an agent or a
tool is drawn by `desktop/src/markdown.tsx` (parsed, cleaned, links with their address
beside them, a picture on the web as a line to click) or as plain text, nowhere as HTML.
`desktop/test/app.test.ts` has a test for it; keep it failing without the cleaning.
It renders with Streamdown, whose defaults are not safe here, and replaces three of them:
its cleaning rules (`CLEAN`), its link component and its image component. On every upgrade
of Streamdown read its defaults again and run `npm run desktop:test`.
`desktop/test/app.test.ts` has a test for it; keep it failing without each of the three.
11. **Only the owner opens a folder for a conversation, and looking at one runs nothing.**
`setFolder` in `src/agents.ts` is reached from the control API only; there is no tool for it.
It refuses pine's home, pine's code and other agents' workspaces in either direction, and a
Expand Down Expand Up @@ -662,8 +679,10 @@ Publishing needs no stored secret: on npmjs.com the package names this repositor
is tested with a stand-in for the helper (`PINE_DESKTOP_VOICE`, for tests only); the `live:`
test in `desktop/test/voice-live.test.ts` (`PINE_LIVE=1`) puts the real helper behind it,
listening to a recording. No test shows the app's real window with its title bar: after a
change to the frame (`.side-top`, `.titlebar`, the window's options in `main.ts`), look at
it once in light and dark.
change to the frame (`app-drag` and `app-no-drag` in `src/index.css`, the parts of
`src/App.tsx` that carry them: `TitleBar`, `Sidebar` and `Gate`; the window's options in
`electron/main.ts`: `titleBarStyle`, `trafficLightPosition`, `vibrancy`), look at it once in
light and dark.
- Whether there is a newer app (`desktop/electron/updates.ts`) is asked of a stand-in for GitHub
on a loopback port, without a window in `desktop/test/updates.test.ts` and through the app in
`app.test.ts` (`PINE_DESKTOP_RELEASES`, for tests only: an app from a checkout asks nobody).
Expand All @@ -681,7 +700,7 @@ Publishing needs no stored secret: on npmjs.com the package names this repositor

## Style

- Plain TypeScript, tabs, no framework. Prefer one clear function over an abstraction used once.
- Plain TypeScript, tabs, no framework (the desktop page aside: see its line in Layout). Prefer one clear function over an abstraction used once.
- Comments explain why, not what. Error messages say what to do next.
- Text an agent will read (tool descriptions, refusals, the `<pine>` block) is written for a
small local model: short, concrete, no jargon.
Expand Down
Loading
Loading