Skip to content

Pi: review dashboard tabs, live refresh and speed, turn summary system stats, work dock kill - #20

Merged
Prometheus1400 merged 7 commits into
Prometheus1400:mainfrom
sfc-gh-kdickerson:kdickerson/pi-dashboard
Dec 1, 2026
Merged

Prometheus1400 merged 7 commits into
Prometheus1400:mainfrom
sfc-gh-kdickerson:kdickerson/pi-dashboard

Conversation

@sfc-gh-kdickerson

Copy link
Copy Markdown
Contributor

Pi extension updates since #19: the review dashboard gets a Markdown tab, live refresh, inline images and a stable port, and is much faster over a port forward. Also included: a CPU/RAM readout in the turn summary, killing processes from the work dock, a configurable default model for agents, Quiet Transcript notices for dashboard reviews and PR status, and removal of the transcript timestamp stamps.

Review dashboard (.pi/agent/extensions/review/)

  • Context, Code and Markdown are separate tabs with their own URLs (/?<dir>&md=, /?<dir>&view=code, /context?<dir>). The status line link opens review.page (default Markdown):
    { "review": { "page": "code" } }
  • Open pages follow the worktree. Unstaged diffs and Markdown re-check every 3 s and on tab focus; commits and PRs refresh after Pi answers a draft. The check sends the known snapshot id and gets a small unchanged reply when nothing moved. Updates wait while text is selected, a dialog is open or a draft is saving.
  • Markdown images render inline. Relative paths inside the worktree are read on the server (no symlinks, png/jpg/gif/webp/svg/avif, 4 MB each, 12 MB per document) and embedded as data URIs, since the browser can't attach the bearer token to <img src>. Remote or missing images show [image: alt].
  • The server takes a port derived from the working directory (30000–32767, then the next 7, then any free one), so one port forward survives restarts.
  • Faster, mainly over a tunnelled forward (measured through Rex from a Mac): connections are kept alive with no idle timeout, which was the cause of the hang Connection: close worked around. Assets are fingerprinted and cached as immutable, the session id is inlined into the page, responses are gzipped, the last snapshot per view is served at once and confirmed in the background, and diff highlighting yields to the event loop. The sidebar renders collapsed folders lazily, hovered documents are prefetched, and the current page stays up while the next one loads.
  • File and review panels have their own collapse buttons, so collapsing doesn't need a scroll back to the top.
  • Submitted reviews and questions render as a Quiet Transcript notice (▸ review · submitted · PR #42 · 3 comments) instead of raw JSON. Expanding it shows the note and each comment with the highlighted text. The model still receives the full prompt.

Turn summary system stats (turn-usage.ts, composer-layout/)

  • cpu 14% · ram 35% (43/124G) sits right-aligned on the turn summary row and is hidden while a turn runs. It falls to its own row when both don't fit. It reads /proc on Linux (RAM counts reclaimable cache as free) and Node's os counters elsewhere.
    { "turnUsage": { "systemStats": { "intervalSeconds": 5, "show": ["cpu", "ram", "load"] } } }
    "systemStats": false turns it off. composer-layout gains a trailing widget role for this.

Work dock and agents

  • x in the focused work dock roster kills the selected row. pi-processes rows stop gracefully, and terminate-timeout rows get SIGKILL. Unsupported rows and failures show a toast.
  • Agents read defaultModel from ~/.pi/agent/agents.json, used when neither the request nor the definition names a model.

Quiet Transcript and session PRs

  • New inlineKeep (default 3): inline-until-done keeps the latest N calls open during a run, not just the newest. codemode now uses inline-until-done; ask_user_question is persistent.
  • session-prs status messages render as a notice, ▸ pr · merged · owner/repo#42 · Title.

Removed

  • transcript-timestamps.ts, the /stamp command and transcript-stamp/layout.ts, with their tests and README sections.

Drops the transcript-timestamps extension, its /stamp command, and the
transcript-stamp layout. The native image decorator keeps its own
unload test.
…le port

- Context, Code, and Markdown are separate tabs; the status link opens
  review.page (default Markdown).
- Open pages follow the worktree: a conditional snapshot check runs every
  3 s, on tab focus, and after Pi answers a draft.
- Markdown images are embedded as data URIs from inside the worktree.
- Snapshot building yields to the event loop; responses are gzipped,
  assets are fingerprinted, and connections stay open for tunnelled use.
- The server picks a port derived from the working directory so a
  forward survives restarts.
- Submitted reviews and questions render as a Quiet Transcript notice.
Configured with turnUsage.systemStats; hidden while a turn runs.
ask_user_question stays persistent, codemode shows inline-until-done, and
the extensions catalog covers the new behavior.
@Prometheus1400
Prometheus1400 merged commit f7d38e6 into Prometheus1400:main Dec 1, 2026
@sfc-gh-kdickerson
sfc-gh-kdickerson deleted the kdickerson/pi-dashboard branch December 1, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants