Skip to content

fix(desktop): show unprojected sessions in project grouping - #54608

Open
EvenXieWF wants to merge 1 commit into
NousResearch:mainfrom
EvenXieWF:fix/desktop-no-project-sessions
Open

fix(desktop): show unprojected sessions in project grouping#54608
EvenXieWF wants to merge 1 commit into
NousResearch:mainfrom
EvenXieWF:fix/desktop-no-project-sessions

Conversation

@EvenXieWF

@EvenXieWF EvenXieWF commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a synthetic No project bucket to the Desktop project tree for sessions that cannot be assigned to an explicit project or git repo.
  • Keep cwd-less/root/junk-root sessions visible in the Projects grouped sidebar instead of only showing real/auto repo projects.
  • Teach the sidebar preview/rendering path to handle pathless project rows and prevent treating the synthetic bucket as a removable auto project.
  • Show each project row's real session count and add a visible "show more in project" affordance when the overview only displays a preview.

Why

After the Desktop project-grouped sidebar was introduced, historical sessions with cwd missing, cwd='/', home/Hermes state paths, or other non-project locations could disappear from the grouped Projects view. The sessions still existed in the database and flat recents, but the Projects overview could appear to contain only one real project, which looks like sessions were lost after an upgrade.

Even after adding the synthetic bucket, the overview intentionally previews only a few rows per project. Without a count/"show more" affordance, a bucket with many sessions can still look like it only contains the preview rows.

Tests

  • /Users/xiewenfen/.hermes/hermes-agent/venv/bin/python -m pytest tests/tui_gateway/test_project_tree.py tests/tui_gateway/test_projects_rpc.py -q — 32 passed
  • npm run test:ui -- src/app/chat/sidebar/projects/workspace-groups.test.ts — 37 passed
  • npm run typecheck
  • npm run build

@EvenXieWF
EvenXieWF force-pushed the fix/desktop-no-project-sessions branch from f4db463 to 5afe863 Compare June 29, 2026 04:07
@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Jun 29, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for covering the backend tree, preview rendering, dismissal guard, and project drill-in path. The underlying omission is still present on current main: tui_gateway/project_tree.py:566-568 skips cwd-less/junk sessions, and tests/tui_gateway/test_project_tree.py:309-314 verifies they are unscoped.

Problems

  • The new bucket still will not show a newly created cwd-less live session until a later tree refresh. apps/desktop/src/app/chat/sidebar/projects/workspace-groups.ts:363-366 returns null for a cwd-less row, and overlayLivePreviews() skips null membership at lines 571-574. The proposed preview-key change does not alter that path.

Suggested changes

  • Add a synthetic-bucket live-membership case and regression test so a cwd-less live row overlays immediately after the initial projects.tree snapshot.
  • Salvage against current tui_gateway/project_tree.py: fff1769bd changed Tier 2 to preserve legacy non-git workspaces, and ceb179163 added Windows identity handling in the same code path.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@teknium1 teknium1 added the area/sessions Session lifecycle, resume, persistence, history label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants