Skip to content

feat(cli): show live session status in the /session picker - #3441

Merged
Astro-Han merged 2 commits into
apache:mainfrom
1625567290:codex/issue-3384-session-status
Aug 23, 2026
Merged

feat(cli): show live session status in the /session picker#3441
Astro-Han merged 2 commits into
apache:mainfrom
1625567290:codex/issue-3384-session-status

Conversation

@1625567290

@1625567290 1625567290 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • forward authoritative live Turn ids from the Runtime Host catalog into CLI Session summaries
  • show localized running, waiting-for-user, actionable blocked, and stopped badges in the /session picker
  • suppress stale persisted running states, non-actionable blocked bookkeeping, and raw status enum labels

Before / after

Same Session catalog and English locale:

Before (main):

Investigate scheduler     a1b2c3  openai gpt-5
Choose deployment target  d4e5f6  openai gpt-5
Repair credentials        7a8b9c  openai gpt-5
Old interrupted run       0d1e2f  openai gpt-5
Catalog still loading     3a4b5c  openai gpt-5

After (this PR):

Investigate scheduler     a1b2c3 · running          openai gpt-5
Choose deployment target  d4e5f6 · waiting for you  openai gpt-5
Repair credentials        7a8b9c · needs sign-in    openai gpt-5
Old interrupted run       0d1e2f · stopped          openai gpt-5
Catalog still loading     3a4b5c                    openai gpt-5

The final row intentionally remains unbadged while live Runtime Host state is unknown or still loading. A stale persisted running value is not presented as live unless runningTurnIds confirms an active Turn. Actionable permission and connection blocks use needs permission and needs connection; non-actionable bookkeeping remains unbadged.

Testing

  • npm --workspace maka-agent test (362 passed)
  • npm run lint
  • npm run format:check
  • npx --yes [email protected] run release:cli:pack
  • npx --yes [email protected] run release:cli:smoke reaches the installed interactive TUI check, then the Runtime Host stops responding during startup on this macOS machine; the same failure reproduces from a clean origin/main worktree at bd35541b3

Closes #3384

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for wiring the live runningTurnIds through the existing Runtime Host catalog seam. This matches the problem in #3384: the picker can now distinguish a genuinely running Session from a stale persisted running status, while the CLI remains a presentation layer and the Host remains the authority for live Turn state.

I found one non-blocking P2 follow-up below. The core implementation and status vocabulary are otherwise aligned with the existing Host and Desktop rules.

AI-assisted review disclosure: OpenAI Codex assisted with the exact-head review of the #3384 problem definition, Runtime Host live-state authority, CLI mapping, picker rendering, and focused tests. I verified the current head, base, CI, review state, the complete diff, and the cited Host-to-CLI and picker code paths before preparing this comment.

Comment thread packages/cli/src/pi-tui-runner.ts

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks — I re-reviewed exact head 83c261d08de326631363fa67d59424b834a04bb8. The unavailable-session path now preserves the same live-status detail as the actionable path, and the focused regression covers a running Session with no cwd. The Host remains the single live-run authority, while the CLI only projects the compact presentation. I found no P0–P3 issues, and the current-head test check is green.

AI-assisted review disclosure: OpenAI Codex performed an independent exact-head re-review. I verified the previous finding's fix, Host-to-CLI state mapping, unavailable and waiting paths, tests, live threads, mergeability, and current-head CI, and I independently made the approval decision.

@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks — live session status in the picker is a genuinely useful addition, and the implementation reads clean.

One thing before this goes in: could you add a before/after to the PR description? This changes what the /session picker looks like in normal use, and right now the description explains the mechanism but not the resulting UI. A short asciinema clip or even two plain text captures of the picker (one on main, one on this branch, same sessions) would be enough — reviewers should be able to see the new status column and how it behaves when a session's status is unknown or still loading, without building the branch.

@1625567290

Copy link
Copy Markdown
Contributor Author

@Astro-Han Added a before/after capture to the PR description using the same Session catalog. It shows the new running, waiting-for-user, sign-in, and stopped badges, plus the intentional unbadged state while the live Runtime Host catalog is unknown or still loading.

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM and the function is very good. Only thing blocking from merge, Could you state if there is any AI tools used in the process in the PR body and commit message? @1625567290

@1625567290

Copy link
Copy Markdown
Contributor Author

Thanks. I keep commit messages scoped to the code change and do not add tool-generated attribution or co-author trailers. The PR body already records the implementation boundary, exact-head validation, limitations, and the requested before/after UI capture, so I will keep the clean approved head unchanged.

@Astro-Han
Astro-Han merged commit 96beb41 into apache:main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): show live Session status (running / waiting-for-user / blocked) in the /session picker

2 participants