#733

feat: filter sessions in the inbox sidebar

Openmvanhornwants to merge intofrom

Summary

Small addition to the inbox sidebar: a client-side filter input that appears when there are 10+ active sessions. Type to narrow the list by session title, repo owner/name, or branch. Empty query is a no-op.

No schema, no API, no data-model change.

Why this matters

@nicoalbanese's #518 flags this directly:

If every external invocation creates a visible top-level session, the sidebar will quickly become noisy and hard to manage.

#518 proposes a larger organizational rethink. This PR is orthogonal: it keeps the existing sidebar usable while that redesign lands.

Changes

  • apps/web/components/inbox-sidebar-search.tsx (new): InboxSidebarSearch input + matchesSessionQuery predicate. Colocated per the separate-file-per-concern rule in AGENTS.md.
  • apps/web/components/inbox-sidebar.tsx: adds a searchQuery state, memoizes a filtered list, renders the input above the scroll container when activeSessions.length >= 10, shows a "No sessions match your filter" empty state.
  • apps/web/components/inbox-sidebar-search.test.ts (new): unit tests for matchesSessionQuery covering empty query, whitespace, case-insensitive matching on title/repo/branch, and sessions with missing fields.

UX notes

  • Only renders on the Active tab. Archive tab is unchanged.
  • Clear (×) control resets the query. Esc while focused also clears and blurs.
  • Filters on title, repoOwner, repoName, and branch. Case-insensitive, trimmed.
  • Grouping, collapse state, pagination, and archived-fetching behavior are untouched.

Verification

  • bun run ci passes: ultracite check, turbo typecheck across all packages, bun run test:isolated, and bun run --cwd apps/web db:check (migrations in sync).
  • 8 unit tests for matchesSessionQuery, 0 failures.

Simulated Demo

I don't have the OAuth/GitHub App stack set up locally, so I can't produce a live recording with 10+ real sessions. Here's a Remotion-rendered simulated demo showing the filter behavior. Labeled honestly as simulated:

A durable mirror of the same GIF lives at https://raw.githubusercontent.com/mvanhorn/open-agents/evidence/sidebar-search-demo.gif in case the catbox link expires.

Out of scope

No session-organization model changes. No grouping/pinning/archiving affordances. No new server route. This does not preempt the v1 direction in #518.

Relates to #518.


This contribution was developed with AI assistance (Claude Code).

Activity

2
vercel[bot]7mo ago

@mvanhorn is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.