Skip to content

feat: separate CLI sessions in sidebar#2506

Merged
2 commits merged into
nesquena:masterfrom
Michaelyklam:feat/issue-2351-cli-sessions
May 27, 2026
Merged

feat: separate CLI sessions in sidebar#2506
2 commits merged into
nesquena:masterfrom
Michaelyklam:feat/issue-2351-cli-sessions

Conversation

@Michaelyklam
Copy link
Copy Markdown
Contributor

Thinking Path

  • Issue list all sessions like by command hermes sessions list #2351 asked for WebUI access to CLI sessions without crowding the existing conversation list.
  • The repo already has a safe read-only CLI/session projection path behind the existing agent-session sync setting.
  • A narrow first slice should separate the browsing surface, not add write actions like rename/delete/import management yet.
  • The sidebar can therefore keep WebUI chats as the default list and expose CLI rows behind a separate source switch when CLI session sync is available.

What Changed

  • Added a persisted WebUI/CLI source switch above the chat sidebar session list when agent sessions are enabled or CLI rows are present.
  • Kept the default view focused on WebUI conversations; CLI/imported agent sessions render under a separate CLI sessions tab with counts.
  • Reset project/batch-selection state when switching sources so list actions do not cross between WebUI and CLI rows.
  • Added compact styling, an empty-state note for CLI sessions, source-string regression tests, and a release-note entry.

Why It Matters

  • Users with many command-line sessions can inspect them without mixing them into the normal WebUI conversation list.
  • The first slice stays read-only and reuses existing CLI session loading/import mechanics instead of adding destructive update/delete behavior.

Verification

UI Media

Before — CLI rows mixed into the same sidebar list:

Before: CLI sessions mixed into WebUI sessions

After — separate WebUI/CLI source tabs:

After: separate WebUI and CLI session tabs

Risks / Follow-ups

  • This does not add CLI session rename/delete/update actions. Those should remain a separate follow-up after the read-only browsing surface is stable.
  • The switch appears only when the existing agent-session sync path is enabled or CLI rows are already present.

Refs #2351

Model Used

AI-assisted change with repository inspection, targeted editing, shell-based test verification, and screenshot capture.

@Michaelyklam Michaelyklam force-pushed the feat/issue-2351-cli-sessions branch from 8bc973d to 784a0e6 Compare May 18, 2026 03:41
@nesquena nesquena added hold ux User experience / visual polish labels May 18, 2026
@nesquena
Copy link
Copy Markdown
Owner

@Michaelyklam Can you update the screen shots so I can see the before and after?

@Michaelyklam Michaelyklam force-pushed the feat/issue-2351-cli-sessions branch from 784a0e6 to 3b4f62d Compare May 18, 2026 04:46
@Michaelyklam
Copy link
Copy Markdown
Contributor Author

Michaelyklam commented May 18, 2026

Rebased this on current master and kept the CLI session source switch changelog entry under [Unreleased].

Verification on the rebased head:

  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue2351_cli_session_source_filter.py -q — 3 passed
  • node --check static/sessions.js
  • git diff --check origin/master...HEAD
  • git merge-tree --write-tree origin/master HEAD
  • GitHub Actions test (3.11), test (3.12), and test (3.13) — passed

@Michaelyklam Michaelyklam force-pushed the feat/issue-2351-cli-sessions branch from 3b4f62d to 86251f6 Compare May 18, 2026 20:03
@Michaelyklam
Copy link
Copy Markdown
Contributor Author

Rebased this branch on current master and resolved the changelog release-batch conflict, keeping the #2506 note under [Unreleased].

Verification on the rebased head:

  • pytest tests/test_issue2351_cli_session_source_filter.py -q — 3 passed
  • node --check static/sessions.js
  • git diff --check
  • merge simulation against origin/master
  • GitHub Actions test matrix passed for 3.11, 3.12, and 3.13

The PR is mergeable again on the latest head.

@Michaelyklam Michaelyklam force-pushed the feat/issue-2351-cli-sessions branch from 86251f6 to a48e47d Compare May 19, 2026 00:30
@Michaelyklam
Copy link
Copy Markdown
Contributor Author

Rebased this on current master and resolved the CHANGELOG.md release-batch conflict, keeping the CLI sessions entry under [Unreleased].

Verification on the rebased head:

  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue2351_cli_session_source_filter.py -q — 3 passed
  • node --check static/sessions.js
  • git diff --check
  • git merge-tree --write-tree origin/master HEAD
  • GitHub Actions are green for test (3.11), test (3.12), and test (3.13)

@Michaelyklam
Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current master after the changelog release batch and kept the #2351 release note under [Unreleased].

Verification on the rebased head 209b8928:

  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue2351_cli_session_source_filter.py -q → 3 passed
  • git diff --check / git diff --check origin/master...HEAD → passed
  • git merge-tree --write-tree origin/master HEAD → passed
  • GitHub Actions: 3.11 / 3.12 / 3.13 all passed

The PR is mergeable again.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Holding for UX reconsideration.

After reviewing the rebased + tested implementation with the maintainer:

What works

  • The functional separation is exactly right — external-agent / CLI session imports really do crowd the sidebar (test env has 200 such sessions visible by default).
  • Tab UX itself is clean: pill design matches existing chip language, active state is clear, count badges are accurate.
  • Default-off + setting-gated behavior preserves current UX for users without imports.
  • Rebases clean; focused tests pass.

Hold reason
Sidebar is becoming chip-stacked. The current vertical sequence is:

[ WebUI sessions (N) ] [ CLI sessions (M) ]      <-- this PR
[ All ] [ Unassigned ] [ Project A ] [ Project B ] ...
PINNED
  ...
TODAY
  ...

Three rows of click-targets above the conversation list is more discoverable surface than the user really needs, and it leaves room for misclick / wrong-filter confusion. The source filter (WebUI vs CLI) and the project filter are conceptually different axes that both deserve representation, but stacking both as horizontal chip rows isn't the right shape.

What we'd like to explore instead (open to discussion, not prescribing the answer):

  • A single source-aware selector at the top — e.g. a small dropdown / segmented control where "WebUI" is the default and "CLI sessions" is a peer choice that swaps the entire sidebar context (project chips + list)
  • Or fold the source filter into the existing project-chip row as a left-aligned pair, with project chips flowing after
  • Or move the CLI-sessions affordance into a collapsible section header within the list rather than a top-level tab

We want to keep the functional improvement — just not the additional always-visible chip row.

hold applied. Happy to iterate on the layout direction if you want to propose one of the above (or something else). If you'd rather we take a pass on the redesign ourselves, say the word.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Merged in Release DM / v0.51.141 (stage-batch23 — 4-PR second hold-bucket pass with PRs #2506 #2792 #2888 #2958).

Thanks @Michaelyklam! 🚢

franksong2702 pushed a commit to franksong2702/hermes-webui-fork that referenced this pull request May 27, 2026
# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold ux User experience / visual polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants