Skip to content

feat(desktop): Search Hermes Desktop Sessions by Session ID - #37883

Closed
0xharryriddle wants to merge 1 commit into
NousResearch:mainfrom
0xharryriddle:feat/desktop-session-id-search
Closed

feat(desktop): Search Hermes Desktop Sessions by Session ID#37883
0xharryriddle wants to merge 1 commit into
NousResearch:mainfrom
0xharryriddle:feat/desktop-session-id-search

Conversation

@0xharryriddle

Copy link
Copy Markdown
Contributor

Search Hermes Desktop Sessions by Session ID

What does this PR do?

Adds session ID search to Hermes Desktop — exact, prefix, and substring matching — via a centralized sessionMatchesSearch helper used consistently across sidebar, settings, and command center surfaces. Backend changes in hermes_state.py add FTS5 ID lookup and lineage root projection, while hermes_cli/web_server.py merges and dedupes results.

This solves the problem of users having a session ID from logs or support notes but no way to find the matching session in the desktop app.

Related Issue

Fixes #37882

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • apps/desktop/src/lib/session-search.ts: New shared sessionMatchesSearch helper with exact/prefix/substring ID matching
  • apps/desktop/src/components/sidebar/SessionList.tsx: Updated to use new helper (sidebar surface)
  • apps/desktop/src/components/settings/SessionsPanel.tsx: Updated to use new helper (settings surface)
  • apps/desktop/src/components/cmd-center/SessionSearch.tsx: Updated to use new helper (command center surface)
  • hermes_state.py: Added FTS5 ID lookup and lineage root ID query support
  • hermes_cli/web_server.py: Merge FTS5 + ID results, deduplicate by lineage root
  • tests/: Frontend Vitest tests + Python state tests + Python endpoint tests

How to Test

  1. Open Hermes Desktop and copy a session ID from ~/.hermes/logs/agent.log or a gateway export
  2. Paste the full ID into the sidebar search bar — verify the session appears
  3. Try a prefix of the ID (first 6-8 characters) — verify it still matches
  4. Try a substring from the middle of the ID — verify it matches
  5. Repeat steps 2-4 in Settings → Sessions panel and Command Center (Cmd+K)
  6. Verify title, preview, and cwd search still work as before

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Infographics

01-problem-solution

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 3, 2026
@teknium1

teknium1 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #39062 (rebase). Your feature commit was cherry-picked onto current main with your authorship preserved in git log, plus a follow-up commit that makes the session-ID lookup SQL-bounded instead of an O(n) Python scan. Thanks for the contribution! #39062

@teknium1 teknium1 closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Search Hermes Desktop Sessions by Session ID

3 participants