fix(tui): show "Compacting" status during compaction instead of Idle#191
Merged
Conversation
#190 made AgentStatus backend-only and declared compact_banner the sole signal for compacting, but the unified status line never consumed it. Manual /compact runs as a control command in the idle phase, so status stays WaitingForInput and the decision tree fell through to Idle with a frozen spinner — covering auto-compaction and resume-rehydrate too. Extract the status-label decision into a pure pick_label() and add a Compacting tier (after Thinking, before Streaming). Feed it compact_banner.is_some(), and add the same flag to is_agent_active so the spinner animates for the whole compaction rather than freezing after the 750ms activity grace. Presentation-layer only: no AgentStatus mutation, no protocol change, so it does not reintroduce the #189/#190 turn-lifecycle desync risk.
rustfmt expands single-line `ActivityInputs { field: x, ..base() }` to
multi-line; apply the canonical formatting.
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.
Summary
/compact, auto-compaction, resume-rehydrate) showed● Idlewith a frozen spinner instead of an active indicator.AgentStatusmutation, no protocol change.Root cause
#190 made
AgentStatusbackend-only and removed view-state's status mutation. Manual/compactis handled as a control command in the idle phase, so status staysWaitingForInput; the status decision tree had no branch forcompact_banner, falling through toIdle. The 750ms activity grace also let the spinner freeze mid-compaction.Changes
views/unified_status_label.rs(new): extracted the status-tier decision into a purepick_label(ActivityInputs); added a Compacting tier (after Thinking, before Streaming). 9 inline unit tests cover every tier + priority ordering + spinner animation.views/unified_status.rs:status_icon_and_labelnow delegates topick_labelwithcompacting: conv.compact_banner.is_some();is_agent_activegains|| conv.compact_banner.is_some()so the spinner animates for the whole compaction.views/mod.rs: register the new module.Test plan
bazel test //crates/loopal-tui:loopal-tui-unit-test(new tier/priority/animation tests)bazel test //crates/loopal-tui:loopal-tui_test(existing banner-render suite, no regression)bazel build //crates/loopal-tui:loopal-tui --config=clippy(zero warnings)