Skip to content

Agent cards as workspaces: click-to-filter running tabs, per-card +, status badges #90

Description

@astetic-dev

Problem

The tab bar is the bottleneck for heavy multi-agent use. Two real-world patterns
both overflow it:

  1. Parallel work on one process — several agents on the same folder (one
    fixes, one tests, one reviews). Tabs get near-identical names.
  2. Many processes at once — one or two sessions each for many agents. With
    10+ tabs the bar becomes unreadable and scrolls horizontally.

The sidebar cards are the natural place to organize this: a card should act as
a workspace over its running sessions, not just a launch button.

Behaviour (decided)

  • Card with no running sessions — a click is a start-up: it opens the
    launch form for that agent (current behaviour).
  • Card with running sessions — a small appears on the card element:
    • the opens the new-agent/launch form (prefilled with the card's
      defaults) to start another session for this card;
    • a plain click on the card toggles a filter: the tab bar shows only this
      card's sessions;
    • clicking the card again clears the filter.
  • While a filter is active it must be clearly visible in the UI (e.g. the
    card highlighted + a filter indicator at the tab bar).
  • Ad-hoc sessions (started via browse-folder): no separate entry in the
    left menu.
    They are simply visible whenever the filter is inactive, and
    hidden by any card filter.
  • Status badge per card: running-session count + aggregated state — steady
    when working, flash in the card colour when a session awaits input — so a
    background agent's "ready" is never missed while you're filtered onto another
    workspace. This makes the sidebar double as a status dashboard.
  • Ctrl+Tab cycles within the active filter (all tabs when no filter).

Technical notes

  • Sessions currently do not record which card they were launched from
    (spawnTerminal gets path/title/accent/mode/agent/model only). Add a
    projectId to the session object and to PersistedSession, so grouping
    survives restarts. Ad-hoc sessions have projectId = "".
  • Filtering is a render concern in renderTabs; the ready/flash detection is
    unchanged — the card badge mirrors the same state.
  • Relation to the backlog: this supersedes the ideas behind Sidebar: filter input for the project list #42 (filter
    input) and Sidebar: optional collapsible project groups #43 (collapsible groups) — the cards themselves become the
    filter. Decide on closing those when this lands.

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