github →

New request

#3418: UX: unified sidebar session filter (origin multi-select) instead of WebUI/CLI tabs

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue

Summary

Replace the fragmented sidebar session filtering UX (WebUI/CLI tabs + misplaced Settings toggles + misleading search placeholder) with a single filter popover next to the session list: search stays separate; a funnel control opens origin multi-select plus two visibility policies.

Colocation principle: options that control the chat sidebar must live on the sidebar, not in Settings → Preferences. Today two sidebar-related toggles sit far from the UI they affect — that is incorrect and should be fixed as part of this work, not left as duplicate surfaces.

This is a feature request — a reference implementation exists in a downstream fork and can be offered as an upstream PR if the approach is accepted.

Problem

Today, filtering external/agent sessions is split across several surfaces that do not compose well:

  1. Settings → “Show non-WebUI sessions” (show_cli_sessions) — server-side gate for merging CLI/gateway/state.db rows, but exposed in Preferences far from the session list.
  2. Settings → “Show previous messaging sessions” — same problem: controls sidebar projection, lives in Settings.
  3. Sidebar WebUI / CLI tabs (when external sessions are enabled) — mutually exclusive, not multi-select.
  4. Search field placeholder historically suggested filtering, but search is content/title matching only.
  5. Profile switch can make messaging origins appear/disappear even when gateway platforms are unchanged, because /api/gateway/status platforms were derived only from profile-scoped sessions/sessions.json identity map — not from gateway runtime/config.

Users expect:

  • Origin checkboxes list all globally available sources (WebUI, CLI, Cron, Telegram, …) regardless of whether the active profile currently has rows for that origin.
  • Counts beside an origin are profile-scoped (e.g. Telegram (2) on one profile, (0) on another) — that is fine.
  • Checking/unchecking an origin filters the sidebar client-side only; toggling one origin must not disable unrelated origin rows or wipe their counts via a separate “master switch” or server refetch.

Proposed UX

Toolbar

  • Search: placeholder “Search conversations…” (text search only).
  • Funnel icon opens a popover (flat on sidebar background — no extra chrome).

Popover — Origin (multi-select, primary control)

  • WebUI — always on, checkbox disabled.
  • CLI, Cron, and dynamic messaging origins (Telegram, Discord, Slack, …) from gateway/config — independently toggleable.
  • Optional (N) count from current profile session list; counts stay stable when toggling unrelated origins.
  • Labels: reuse existing sidebar source naming + gateway platforms[].labelno new per-origin i18n keys.

No separate “Include agent / external sessions” checkbox in the popover. Origins are the filter. Server show_cli_sessions may still exist internally, but the UI entry point is origin selection; external data load is enabled when the filter module is active (not toggled off per-origin in a way that hides other origins’ counts).

Popover — visibility (moved out of Settings)

  • Show previous messaging sessions — reuse existing i18n key settings_label_previous_messaging_sessions (label only; control lives in popover).
  • Include archived — reuse kanban_include_archived (or equivalent existing copy).
<img width="597" height="414" alt="Image" src="https://github.com/user-attachments/assets/e8a533d0-2c81-4afe-9a07-fc3e3130052b" />

Settings → Preferences

  • Remove the two sidebar-related checkboxes (show_cli_sessions, show_previous_messaging_sessions) from Preferences entirely — they must not exist in two places.
  • Other Preferences fields unchanged. Server settings keys can remain for persistence/API; only the Settings UI duplicates go away.

Project chips

  • Stay outside the popover (unchanged).

Legacy

  • Hide WebUI/CLI tabs when the new filter module is active; keep code paths for fallback/upstream merge safety.

Backend / API expectations

For origin checkboxes to be profile-independent:

  • /api/gateway/status platforms should union:
    • connected platforms from gateway runtime (gateway_state.json, state == connected),
    • enabled platforms from config.yaml (root + active profile),
    • plus existing identity-map platforms as fallback.

Origins must not disappear when switching Hermes profile only because that profile’s sessions/sessions.json lacks Telegram rows.

Acceptance criteria

  • Single popover replaces WebUI/CLI tabs for origin filtering.
  • Settings → Preferences no longer shows “Show non-WebUI sessions” or “Show previous messaging sessions”; both controls live only in the sidebar filter popover.
  • Origin list stable across profile switches (Telegram visible if gateway/config says it is enabled/connected).
  • Origin toggles filter sidebar client-side; toggling CLI does not hide Telegram/Cron counts unless those rows are filtered out of view.
  • No new per-origin i18n keys — reuse existing strings + sidebar/gateway labels.
  • Preferences autosave / manual save must not clobber sidebar filter settings when saving unrelated fields.

Reference implementation (fork)

Isolated files suitable for upstream review:

  • static/session-filters.js
  • static/session-filters.css
  • Small hooks in static/sessions.js, static/index.html
  • Removal of duplicate fields from Settings in static/index.html, static/panels.js
  • /api/gateway/status platform union in api/routes.py

Happy to open a PR if this direction is approved.

Assessmentadvisory
feature●●● hard80% confidence

Redesigning sidebar filtering requires moving controls from Settings, adding multi-select popover state, and updating session APIs.

Likely files
  • static/js/sidebar.js
  • static/js/settingsPanel.js
  • static/css/styles.css
  • static/index.html
  • api/sessions.py
  • tests/test_sidebar.py
Create the request

This opens a fresh agent run and a draft PR for issue #3418.

Cancel