Skip to content

feat(desktop): improve session list sidebar - #65720

Closed
phathur wants to merge 1 commit into
NousResearch:mainfrom
phathur:feat/desktop-session-list-improvements
Closed

feat(desktop): improve session list sidebar#65720
phathur wants to merge 1 commit into
NousResearch:mainfrom
phathur:feat/desktop-session-list-improvements

Conversation

@phathur

@phathur phathur commented Jul 16, 2026

Copy link
Copy Markdown

What does this PR do?

The desktop app sidebar hid all sessions that didn't belong to an explicit project — sessions with an empty cwd, a home-directory cwd (~/), or a cwd under ~/.hermes/ were silently filtered out as "junk" and never appeared in the session list. Additionally, the project overview only showed the 3 most recent sessions per project, forcing users to click into each project to find older conversations.

This PR makes two improvements:

  1. Add a "No project" bucket for unowned sessions. Sessions that can't be auto-grouped into a project (empty cwd, home directory, ~/.hermes/ path, or no valid git repo) are now collected into a synthetic "No project" group in the sidebar, so users can find and access all their conversations.

  2. Increase preview session limit from 3 to 20. The project overview in the sidebar now shows up to 20 recent sessions per project (up from 3), so most users can see all their recent conversations without drilling into each project.

  3. Frontend fix for pathless groups. Updated overlayLivePreviews to use node.path ?? node.id as the key instead of skipping nodes with no path, so the new "No project" synthetic group (which has path: null) renders correctly in the live preview overlay.

Related Issue

No existing issue — this was discovered during personal use of the desktop app.

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)

Changes Made

  • tui_gateway/project_tree.py (+49 lines): New logic in the project tree builder that iterates over unowned sessions, checks each session's repo root / cwd against junk criteria (home dir, hermes home, empty cwd), and collects them into a __no_project__ synthetic project node with path: None. Scoped session IDs are extended so these sessions appear in the flat list too.
  • apps/desktop/src/store/projects.ts (+1/-1): Changed preview_limit parameter in the projects.tree gateway request from 3 to 20.
  • apps/desktop/src/app/chat/sidebar/projects/workspace-groups.ts (+2/-5): Replaced the early if (!node.path) continue with const key = node.path ?? node.id, so pathless synthetic groups (like "No project") are included in the overlay output instead of being skipped.

How to Test

  1. Start the desktop app with sessions that have empty cwd, home-directory cwd (~), or cwd under ~/.hermes/ — verify they now appear under a "No project" group in the sidebar (previously they were completely hidden).
  2. Open a project with more than 3 sessions — verify the overview now shows up to 20 recent sessions instead of only 3.
  3. Confirm that sessions with valid project/repo paths still group correctly under their respective projects (no regression).
  4. Run npx tsc --noEmit in apps/desktop/ — TypeScript compilation passes with no errors.
  5. Run python3 -m py_compile tui_gateway/project_tree.py — Python syntax check passes.

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: macOS 15.2 (Apple Silicon)

Documentation & Housekeeping

  • N/A — no config keys changed, no architecture changes, no tool behavior changes. The preview_limit change is a hardcoded constant, not a user-facing config key.

Screenshots / Logs

Not applicable — the changes are minimal: one additional synthetic group in the sidebar and more sessions listed per project in overview mode.

- Add "No project" bucket for unowned sessions (empty cwd, home directory, ~/.hermes path) that were previously hidden
- Increase project preview session limit from 3 to 20, so users can see more recent sessions without drilling into projects
- Fix frontend mapping logic to support pathless synthetic groups like No project

Closes issue where users couldn't see sessions without explicit project assignment, and only saw 3 most recent sessions per project in overview.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jul 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #54608, which already implements the broader No project bucket rendering path. This PR also changes the project preview limit, so it is not marked duplicate; maintainers should choose or consolidate the overlapping bucket work.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Feature improving session list sidebar (+52 -6). Clean UI improvement.


Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) 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.

3 participants