Skip to content

Feature request: session row action extension hook (so consumers don't fork SessionSidebar for copy/archive/etc.) #400

Description

@dust617

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:

  1. A session-row-action extension event/bus that fires with the session id/path (the extension system already exists via pi.on(...)).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions