pi-message-sidebar
Persistent responsive message history sidebar for Pi
Package details
Install pi-message-sidebar from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-message-sidebar- Package
pi-message-sidebar- Version
2.0.1- Published
- Sep 11, 2026
- Downloads
- 878/mo · 673/wk
- Author
- ffrappo
- License
- MIT
- Types
- extension
- Size
- 132 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-message-sidebar
Persistent message history sidebar for Pi.
Features
- The obsidian rail: a 42-column truecolor ladder with a deep well as canvas, a raised panel step for the goal card, accent-tinted selection, and two ghost tiers for chrome; 256-color and light-terminal variants included
- The Fornace flag crowns the rail: the seven brand hues from the production logo, painted solid edge to edge, with a sheen band while the rail is live
- Goal card as the hero: breathing status dot, budget share, bold objective across up to three lines, and a
bdg-labeled meter in eighths-of-a-cell resolution that eases toward the live ratio - Ghost chrome: section labels sit flush left in a near-invisible tier with right-aligned metadata and an air row above; no rules, no dashes
- Structured two-row message slots without ordinals: time, then the summary across 32-cell lines; selection is a two-row yellow bar on a soft accent tint
- Motion language that idles for free: pulsing pending dots, landing sweeps, decaying arrival glows, left-to-right reveals, eased meters with a riding shimmer, and a victory flash when a goal completes
- AI message summaries (
fornace-flashthrough the Fornace gateway,PI_SIDEBAR_SUMMARY_MODELto override): one plain sentence per prompt, cached per session on disk, with a deterministic preview until the model answers; an unconfigured gateway shows a setup hint - Age-faded summaries like pi-recap: newest bright, recent normal, older muted, previews dimmer still
- Git-style change badges (M/A/U/D/R) on the FILES rows, from a throttled
git statusprovider - Message detail view with size in chars and wrapped lines, scrollable when the text overflows
- Ellipsis rows counting hidden messages whenever the history outgrows the viewport
- Contiguous chronological viewport that bottom-anchors the stream and follows new messages until you browse away
- Mandatory rows reserved before optional rows are handed out; too short a terminal shows a resize notice rather than clipped sections
- cmux session context that preserves the complete surface ref by truncating the workspace title first
Installation
Development symlink
git clone git@github.com:Fornace/pi-message-sidebar.git ~/repos/pi-message-sidebar
ln -s ~/repos/pi-message-sidebar ~/.pi/agent/extensions/message-sidebar
Pi package
pi install npm:pi-message-sidebar
# or from git
pi install git:github.com/Fornace/pi-message-sidebar
Usage
The sidebar appears automatically in interactive mode when the terminal is at least 123 columns wide. It collapses below that breakpoint so Pi keeps a usable main pane. Fullscreen mode uses a persistent HStack right rail. Regular mode uses a compact compositor over the terminal's current screenful; because the terminal owns regular-mode scrollback, the sidebar is not permanently sticky while browsing old scrollback. An on-demand overlay is intentionally not implemented: overlay components are disposed on close, which conflicts with the persistent ID-stable sidebar state, so the compact compositor is kept instead.
The message body is one contiguous chronological viewport. New messages remain selected while follow-tail is active. Navigating away preserves the selected message, expansion state, and visible range by message ID when history entries are inserted or refreshed.
- Press
Ctrl+Shift+Hto focus or unfocus the sidebar. - Press
↑or↓to navigate. - Press
PageUp,PageDown,Home, orEndfor larger jumps. - Press
Enterto open the selected message's full text; scroll with↑/↓when the hint offers it. - Press
cto copy the selected prompt while the rail is focused, or the session path when it is not. - Press
Escapeto close an open message, and again to return focus to Pi.
Architecture
index.tsis the auto-discovered extension entrypoint.src/layout.tsreserves a persistent horizontal region in fullscreen mode and composes the current screenful in regular mode.src/sidebar-component.tsowns section budgets, the render cache, and focus handling.src/messages.tsrenders the message grid and detail view, and owns ID-stable navigation and follow-tail behavior.src/goal-card.tsrenders the goal card;src/sections.tsrenders ghost headers plus the session, files, and runtime sections into fixed row budgets.src/slots.tsrenders message slots;src/flag.tspaints the Fornace crown;src/palette.tsandsrc/anim.tsown the color ladder and the motion timing.src/summaries.tsgenerates and caches one-line AI summaries off the render path.src/files.tscollects the session's edited files from write tool calls.src/git-status.tsmaps the worktree status onto the shared M/A/U/D/R letter convention.src/palette.tsresolves theme tokens, universal content grays, and the background ladder per render.src/anim.tsowns the pulse and settle timing; the tick runs only while something moves.src/status-dock.tssupplies context-usage and status validation helpers.src/goal.tsreconstructs the active pi-codex-goal from session entries.src/cmux.tsresolves the cmux workspace title and surface ref once per session.src/style.tsprovides ANSI-safe row filling and width helpers.src/constants.tsowns responsive layout thresholds.
Every source file stays below 400 lines.
License
MIT