Mirror from GitHub
  • TypeScript 71.4%
  • Swift 11.7%
  • JavaScript 9.9%
  • CSS 3.8%
  • Python 1.2%
  • Other 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sam Painter 4d8b6eff3f fix(sdk): repair modelRuntime rename crash + honor defaultThinkingLevel
pi 0.81.1 renamed the model service modelRegistry -> modelRuntime on both
AgentSessionServices and AgentSession, and swapped .find(provider,id) for
.getModel(provider,id); getAvailable() is now readonly. This crashed slot
startup (Cannot read properties of undefined reading 'find'). Update all
call sites + test doubles.

Also fix thinking level always resolving to "medium": pi ignores
settings.json defaultThinkingLevel whenever a model is supplied (the
dashboard always does). The RPC path re-applied the resolved default but
the now-default SDK path never did. Extract resolveDefaultThinkingLevel
into thinking-level.ts and apply it in the SDK runtime factory, persisting
the effective level back onto the slot.

Includes prior WIP on this branch: surface fully-failed turns (all retries
exhausted, empty content + errorMessage) as a visible system message
instead of silently dropping them (summarizeProviderError), and add the
Fable model + skill slash-command insert form.
2026-07-22 21:50:23 +00:00
android chore: remove token auth — single-user, Tailscale-protected 2026-06-09 13:20:50 -07:00
apple/PiDash fix: improve live activity contrast 2026-06-14 19:31:46 -07:00
backend fix(sdk): repair modelRuntime rename crash + honor defaultThinkingLevel 2026-07-22 21:50:23 +00:00
desktop perf: eliminate sustained GPU/CPU load in Electron app 2026-06-18 19:43:48 +00:00
docs docs: additive-backlog handoff (slices 12-17) + STATUS refresh (slice 11 done) 2026-07-13 18:47:14 +00:00
frontend fix(sdk): repair modelRuntime rename crash + honor defaultThinkingLevel 2026-07-22 21:50:23 +00:00
plugins feat: conductor-detach API endpoint 2026-06-18 19:52:42 +00:00
scripts test(sdk): live 2-slot cross-talk isolation probe (flip bar item 5) 2026-07-13 17:04:08 +00:00
shared feat(pi-dashboard): add system-message-renderer slot + details propagation 2026-06-05 18:10:57 +00:00
.gitignore Merge remote-tracking branch 'origin/master' 2026-06-08 23:36:58 -07:00
.pi-lsp.json feat: add LSP config for Swift sourcekit-lsp support 2026-04-19 01:11:25 -07:00
CHANGELOG.md chore(master): release 1.0.0 2026-05-29 18:34:52 +00:00
com.sam.pi-dashboard.plist feat(resilience): V8 launch flags, per-slot error boundaries + dispose, hardened crash backstop 2026-07-11 02:04:34 +00:00
CONTEXT.md feat(ios): cost bar, thinking level sync, git branch pill, chat sheets 2026-05-07 21:18:10 -07:00
ctl.sh feat: add launchd service for persistent background operation 2026-04-17 20:48:24 -07:00
deploy.sh feat: deploy.sh — wireless build+install+restart script 2026-06-09 11:01:49 -07:00
design.md feat: HTML/JS viewer document panel with manuscript theme 2026-07-10 22:26:32 +00:00
Dockerfile.test feat(sdk): PiSdkSession core event translation + shared contract/golden tests (flag off) 2026-07-11 00:37:26 +00:00
LICENSE feat: initial release 2026-04-14 23:44:10 +00:00
package-lock.json build: add @earendil-works/pi-coding-agent (pinned 0.80.3) as dependency 2026-07-10 23:24:31 +00:00
package.json build: add @earendil-works/pi-coding-agent (pinned 0.80.3) as dependency 2026-07-10 23:24:31 +00:00
pi-dash-connect.sh fix(ssh): use autossh and tighter keepalives for the dashboard tunnel 2026-05-28 21:32:42 +00:00
pi-dashboard.service feat(resilience): V8 launch flags, per-slot error boundaries + dispose, hardened crash backstop 2026-07-11 02:04:34 +00:00
plan.md feat: HTML/JS viewer document panel with manuscript theme 2026-07-10 22:26:32 +00:00
PLUGIN_RUNTIME_SPEC.md feat: extend plugin runtime and add 4 tool-renderer plugins 2026-05-01 17:29:54 +00:00
README.md docs: update README to reflect current state 2026-04-20 23:43:06 -07:00
restart.sh feat(resilience): V8 launch flags, per-slot error boundaries + dispose, hardened crash backstop 2026-07-11 02:04:34 +00:00
run.sh feat(resilience): V8 launch flags, per-slot error boundaries + dispose, hardened crash backstop 2026-07-11 02:04:34 +00:00
start.sh feat(resilience): V8 launch flags, per-slot error boundaries + dispose, hardened crash backstop 2026-07-11 02:04:34 +00:00
vitest.backend.config.js feat: convert backend to TypeScript 2026-04-21 22:54:30 -07:00

Pi Dashboard

A web and iOS dashboard for the pi coding agent. Chat with pi, manage multiple sessions, browse files, and run terminals — from your browser or iPhone.

Pi Dashboard

Features

Chat

  • Multi-slot sessions — run multiple pi conversations, each with its own working directory, model, and history
  • Streaming responses — real-time token streaming with thinking blocks, tool calls, and inline images
  • Slash commands/clear, /compact, /import, and custom commands from pi extensions
  • Fork & resume — fork a conversation at any point, or resume past sessions
  • Context usage — live token/context tracking per session

Files & Editing

  • File browser — directory tree navigation with workspace picker
  • Document panel — syntax-highlighted code viewer, markdown preview, PDF/XLSX rendering
  • Inline comments — comment on line ranges, review and send feedback to the agent
  • Diff view — word-level diff highlighting with accept/reject

Terminal & Monitoring

  • Integrated terminal — full PTY terminal via xterm.js and node-pty
  • Background processes — live status cards for subagents and long-running tasks
  • System monitor — CPU, memory, disk, and process stats
  • Streaming logs — real-time pi internal log viewer

iOS App

  • Native SwiftUI — full chat interface with markdown rendering, thinking blocks, and tool call display
  • Session list — browse, search, and manage all chat slots
  • Push notifications — get notified when pi needs approval or finishes a task
  • Siri Shortcuts — "Ask Pi", "Send to Pi", "Check Pi Status", "Get Active Chats"
  • Session history — browse and resume past sessions
  • Project picker — switch working directories per session

Desktop App (Optional)

  • Electron wrapper — native window with system tray
  • SSH tunnel management — automatic tunnel setup for remote servers

Quick Start

git clone https://github.com/samfoy/pi-dashboard.git
cd pi-dashboard
npm run setup    # installs deps + builds frontend
npm start        # starts server with auto-restart

Open http://localhost:7777.

Requirements

  • Node.js 18+
  • pi installed and on PATH

Run as a Service (macOS)

./ctl.sh install   # installs launchd plist, starts on boot
./ctl.sh start     # start the service
./ctl.sh stop      # stop the service
./ctl.sh restart   # restart
./ctl.sh status    # check status
./ctl.sh logs      # tail stdout/stderr

Logs: ~/Library/Logs/pi-dashboard/stdout.log and stderr.log.

Environment Variables

Variable Default Description
PI_DASH_PORT 7777 Server port

Architecture

pi-dashboard/
├── backend/
│   ├── server.js          # Express + WebSocket server, chat routing, file/doc APIs
│   ├── pi-manager.js      # Spawns pi --mode rpc processes, one per chat slot
│   ├── pty-manager.js     # Terminal sessions via node-pty
│   ├── pi-env.js          # Pi environment detection (extensions, models, memory stats)
│   └── session-store.js   # Slot state persistence, session JSONL parsing
├── frontend/              # React + TypeScript + Tailwind + Vite
│   └── src/
│       ├── pages/         # ChatPage, ChatSidebar, TerminalPage, LogsPage, SettingsPage, SystemPage
│       ├── components/    # MarkdownPanel, DiffView, FileBrowser, InlineComments, WelcomeView
│       └── store/         # Redux slices (chat, dashboard, settings, notifications)
├── ios/PiDash/            # Native iOS app (SwiftUI)
│   └── PiDash/
│       ├── Views/         # Chat, SlotList, Settings, Common
│       ├── ViewModels/    # ChatViewModel, SlotListViewModel
│       ├── Intents/       # Siri Shortcuts (AskPi, SendToPi, CheckStatus, GetActiveChats)
│       └── Networking/    # API client
├── desktop/               # Optional Electron wrapper
├── run.sh                 # Auto-restart wrapper
├── start.sh               # Startup script (used by launchd)
├── restart.sh             # Graceful restart via SIGUSR2
├── ctl.sh                 # Service management (install/start/stop/restart/logs)
└── pi-dash-connect.sh     # SSH tunnel helper for remote access

The backend spawns pi as a child process using JSON-RPC mode (pi --mode rpc), one per chat slot. The React frontend and iOS app connect via WebSocket for real-time streaming. Slot metadata is persisted to ~/.pi/agent/pi-web-sessions.json; message history lives in pi's session files and is loaded on demand.

Idle pi processes are automatically reaped after 30 minutes and restart transparently on the next message.

Remote Access

If both machines are on the same Tailscale network, just hit the Tailscale IP directly:

http://<tailscale-ip>:7777

SSH Tunnel

PI_DASH_HOST=your-server PI_DASH_USER=you ./pi-dash-connect.sh

Or manually:

ssh -f -N -L 7777:localhost:7777 user@your-remote-host
open http://localhost:7777

iOS App

The iOS app lives in ios/PiDash/. Open PiDash.xcodeproj in Xcode and build for your device.

Configure the server URL in the app's settings. Supports both local network and Tailscale connections.

Features: full chat with markdown/code rendering, thinking block expansion, tool call details, session management, push notifications for approval requests, and Siri Shortcuts for hands-free interaction.

License

MIT