fix(sessions): hide parentless named subagent sessions #178

Merged
dries merged 1 commit from fix/hide-parentless-named-subagents into main 2026-06-29 23:14:13 +02:00
Owner

Summary

  • (@explore subagent) and other named subagent sessions were leaking to the top-level session list when their parent_id was empty (parent not in the query window).
  • The Go-side filter only dropped subagents that were both done AND had a non-empty parent_id, plus a title check hardcoded to the literal (auto-approve subagent).
  • Broaden the parentless title check to any ... subagent) title, gated on empty parent_id so real nested subagents still surface under their parent.

Testing

  • New regression test TestGetSessions_ExcludesParentlessNamedSubagent.
  • go test ./internal/db/ passes (incl. existing nesting + auto-approve tests).
## Summary - `(@explore subagent)` and other named subagent sessions were leaking to the top-level session list when their `parent_id` was empty (parent not in the query window). - The Go-side filter only dropped subagents that were both `done` AND had a non-empty `parent_id`, plus a title check hardcoded to the literal `(auto-approve subagent)`. - Broaden the parentless title check to any `... subagent)` title, gated on empty `parent_id` so real nested subagents still surface under their parent. ## Testing - New regression test `TestGetSessions_ExcludesParentlessNamedSubagent`. - `go test ./internal/db/` passes (incl. existing nesting + auto-approve tests).
fix(sessions): hide parentless named subagent sessions
All checks were successful
CI / Frontend (pull_request) Successful in 4m7s
CI / Backend (pull_request) Successful in 4m21s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 3m54s
CI / Build (pull_request) Successful in 4m18s
CI / Playwright E2E (pull_request) Successful in 6m49s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Ratchet (pull_request) Successful in 5m34s
375c9fe64e

Coverage ratchet: pass

Suite Baseline This PR Δ
go 69.40% 69.40% +0.00
frontend 57.39% 57.39% +0.00

Tolerance: -0.1%. Baseline stored on gh-pages.

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 69.40% | 69.40% | +0.00 | ✅ | | frontend | 57.39% | 57.39% | +0.00 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries merged commit 4c0fed07b3 into main 2026-06-29 23:14:13 +02:00
Sign in to join this conversation.
No description provided.