Summary
The session sidebar (SessionSidebar.tsx) has no extension hook for per-row actions. Downstream consumers that want to add row actions (copy session ID/path, archive/unarchive, star, etc.) are forced to fork and modify the component internals — which breaks on every upstream change and makes upgrades fragile.
Problem
Because there is no row-action API, downstream projects duplicate the whole SessionSidebar rendering logic just to add a right-click menu or a couple of buttons per session row. This creates:
- Large, upgrade-fragile downstream patches (a downstream fork currently patches ~200 lines of
SessionSidebar.tsx).
- No way to contribute features without diverging from upstream.
- Duplicated session-tree / context-menu logic in every consumer.
Suggested API
A stable, minimal surface would be:
- A
session-row-action extension event/bus that fires with the session id/path (the extension system already exists via pi.on(...)).
- Or a per-row action render slot that consumers opt into via a prop.
Value
- Removes the need to fork
SessionSidebar.tsx for row actions (largest downstream patch today).
- Makes feature contributions (archive, copy, star, pin) portable extensions instead of forks.
- Eases every future upstream upgrade for downstream consumers.
Environment
- pi-web 0.8.7
- Reported from a downstream Electron wrapper that currently patches
SessionSidebar.tsx to add copy + archive row actions.
Summary
The session sidebar (
SessionSidebar.tsx) has no extension hook for per-row actions. Downstream consumers that want to add row actions (copy session ID/path, archive/unarchive, star, etc.) are forced to fork and modify the component internals — which breaks on every upstream change and makes upgrades fragile.Problem
Because there is no row-action API, downstream projects duplicate the whole
SessionSidebarrendering logic just to add a right-click menu or a couple of buttons per session row. This creates:SessionSidebar.tsx).Suggested API
A stable, minimal surface would be:
session-row-actionextension event/bus that fires with the session id/path (the extension system already exists viapi.on(...)).Value
SessionSidebar.tsxfor row actions (largest downstream patch today).Environment
SessionSidebar.tsxto add copy + archive row actions.