feat(ui): status-bar active-agent count + PR #231 review fixes + shortcut docs - #232
Merged
Merged
Conversation
added 3 commits
May 29, 2026 21:31
From the review of PR #231: - #1 (run.rs): the cap notice's new_messages.push is a legitimate part of run_agent_loop's returned message list, but the comment overclaimed that headless/subagent collectors and resumed models read it — they drive display from the LoopEvent stream and discard the return value. Comment corrected to describe it as a return-value contract nicety, not the display mechanism. - #2 (provider/mod.rs): headless run_print dropped SystemNotice into its catch-all, so a --print run hitting the turn cap reported a clean success with no truncation signal. It now prints the notice to stderr. - #3 (text_output.rs): documented the deliberate divergence between the live <system>/warning-color notice and persisted <sys>/system-color session history, cross-referencing render_session. - #4 + altitude (text_output.rs): extracted write_prefixed_lines() shared by write_user_lines and write_system_lines, removing the copy-paste and making blank/empty-line handling identical by construction.
Adds an `agents:N` segment to the bottom status line, shown only when N>0 (like the compaction/mode badges) so the bar stays quiet during normal single-agent work. N is BackgroundStore::running_count() — the number of in-flight background `task` subagents — read at each render and threaded into StatusLine::render via the bg_store already in scope at every call site. (Scoped to agents only: dirge has no background-shell registry — bash runs synchronously within a tool call — so there is no persistent 'shells' count to display.)
Update the /help keybinding list (cmd_misc.rs), the session help (cmd_session.rs), and docs/tui.md to reflect the current subagent chat-window shortcuts: Ctrl+K kills the focused subagent, Ctrl+X closes the active chat window, Ctrl+N/Ctrl+P switch between subagent chat windows, and Ctrl+O expands a collapsed tool result.
allen-munsch
pushed a commit
to allen-munsch/dirge
that referenced
this pull request
Jun 3, 2026
…nts-and-review-fixes feat(ui): status-bar active-agent count + PR dirge-code#231 review fixes + shortcut docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundles three related UI changes (per request, shipping together).
1. Status bar: active background-agent count
New
agents:Nsegment on the bottom status line, shown only when N>0 (like the mode/compaction badges). N =BackgroundStore::running_count()(in-flight backgroundtasksubagents), read each render via thebg_storealready in scope at all 44StatusLine::rendercall sites.Scoped to agents only (confirmed with you): dirge has no background-shell registry —
bashruns synchronously within a tool call — so there's no persistent 'shells' count to show.2. Code-review findings from PR #231
new_messagespush (it's a return-value contract nicety; display is driven by theSystemNoticeevent, which production callers' return values don't feed).run_printnow printsSystemNoticeto stderr, so a--printrun that hits the turn cap no longer reports a silent clean success.<system>/warning-color notice and persisted<sys>/system-color session history.write_prefixed_lines()shared bywrite_user_lines/write_system_lines, removing the copy-paste and unifying blank/empty handling.3. Keyboard-shortcut doc corrections
Updated
/help(cmd_misc.rs), session help (cmd_session.rs), anddocs/tui.mdto list the current subagent chat-window shortcuts (Ctrl+K kill subagent, Ctrl+X close window, Ctrl+N/P switch windows, Ctrl+O expand tool result).Tests
status::tests—agents:Nbadge shown when active, hidden at zero.-D warnings(2143 passed).