Skip to content

fix(tui): include child transcripts in resume picker - #35780

Closed
mzkarami wants to merge 1 commit into
NousResearch:mainfrom
mzkarami:auto/nightly-tui-resume-child-sessions-20260530
Closed

fix(tui): include child transcripts in resume picker#35780
mzkarami wants to merge 1 commit into
NousResearch:mainfrom
mzkarami:auto/nightly-tui-resume-child-sessions-20260530

Conversation

@mzkarami

@mzkarami mzkarami commented May 31, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the TUI historical session picker and auto-resume path include message-bearing child sessions, while continuing to filter empty shell/internal tool-only rows.

This addresses the case where real transcripts are stored as child sessions but the TUI resume picker surfaces parent/compression shell rows instead, making valid sessions hard to resume from the TUI.

Related Issue

Refs #35542

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

  • tui_gateway/server.py
    • Passes include_children=True when listing historical sessions for session.list.
    • Passes include_children=True when resolving session.most_recent.
    • Keeps the existing source deny-list for internal tool rows.
  • tests/test_tui_gateway_server.py
    • Adds regression coverage showing session.list includes message-bearing child sessions.
    • Adds regression coverage showing session.most_recent prefers the newest resumable child transcript over empty shell rows.
  • tests/gateway/test_session_list_allowed_sources.py
    • Keeps allowed-source fixture rows message-bearing so they are not filtered as empty sessions.

How to Test

  1. Run whitespace/conflict-marker validation:
    • git diff --check
  2. Run the focused TUI gateway regression suite:
    • python -m pytest tests/test_tui_gateway_server.py -q
  3. Run the allowed-source regression tests:
    • python -m pytest tests/gateway/test_session_list_allowed_sources.py -q
  4. Run the CI-equivalent shard containing the changed gateway test:
    • HERMES_TEST_WORKERS=8 python scripts/run_tests_parallel.py --slice 5/6

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: Linux

Documentation & Housekeeping

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

For New Skills

N/A — this PR does not add a skill.

Screenshots / Logs

Focused tests:

python -m pytest tests/gateway/test_session_list_allowed_sources.py tests/test_tui_gateway_server.py -q
192 passed, 1 warning

CI-equivalent shard:

HERMES_TEST_WORKERS=8 python scripts/run_tests_parallel.py --slice 5/6
5105 tests passed, 0 failed

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels May 31, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #35544, which addresses the same bug (#35542) with the same approach: passing include_children=True to list_sessions_rich() in session.list and session.most_recent handlers.

@mzkarami

mzkarami commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

duplicate

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

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants