Skip to content

fix(tui): load root sessions safely in dialogs#31132

Open
CasualDeveloper wants to merge 1 commit into
anomalyco:devfrom
CasualDeveloper:fix/16270-tui-root-session-dialog-loading
Open

fix(tui): load root sessions safely in dialogs#31132
CasualDeveloper wants to merge 1 commit into
anomalyco:devfrom
CasualDeveloper:fix/16270-tui-root-session-dialog-loading

Conversation

@CasualDeveloper
Copy link
Copy Markdown
Contributor

@CasualDeveloper CasualDeveloper commented Jun 6, 2026

Issue for this PR

Closes #16270
Closes #31125
Partially addresses #13877
Supersedes #23276, #24383, #26432

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Problem: Session dialogs built options from mixed or not-yet-loaded session data, which let child sessions crowd out roots and could freeze an empty browse order during startup.

Solution:

  • Request root sessions from dialog-local browse and search resources.
  • Freeze browse order only after the root browse load resolves.
  • Share query/order helpers across both TUI session dialog implementations.

How did you verify your code works?

  • bun test test/cli/tui/dialog-session-list.test.ts
  • bun typecheck
  • git diff --check
  • Pre-push hook: bun turbo typecheck

Screenshots / recordings

N/A. This changes session query/loading behavior, not the rendered layout.

Notes

  • AI Assistance: OpenCode + openai/gpt-5.5
  • Review: Human operator reviewed

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found a related PR:

PR #26432: fix(tui): request root sessions in session dialog

The current PR (#31132) represents an improved/updated fix that builds upon the earlier approach in #26432.

Problem: Session dialogs built options from mixed or not-yet-loaded session data, which let child sessions crowd out roots and could freeze or stall an empty browse order during startup.\n\nSolution: Query root sessions from dialog-local resources, use synced root sessions while the browse request is pending, keep the selector mounted while loading, and share query/order helpers across both dialog implementations.\n\nNotes: Refs anomalyco#16270 and anomalyco#31125.
@CasualDeveloper CasualDeveloper force-pushed the fix/16270-tui-root-session-dialog-loading branch from 72d361b to bdcc5ba Compare June 6, 2026 21:50
@CasualDeveloper CasualDeveloper marked this pull request as ready for review June 6, 2026 21:51
@antomicblitz
Copy link
Copy Markdown

Yes please 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI sessions dialog can stay empty if opened before session list loads /sessions TUI only shows recent sessions, ignores historical ones

2 participants