-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Summary
The /compact command has 6 distinct UX issues related to visual feedback, all stemming from an architectural mismatch between the ResourceBar and context panel. The most critical issue (P0) is that users receive zero feedback when compaction runs while the context panel is open.
Root Cause
ResourceBar and context panel are mutually exclusive via CSS display: none, but "Compacting..." status renders exclusively in the ResourceBar. The context panel has no compaction awareness at all.
Issues (Ranked by Severity)
P0: No feedback when context panel is open
Problem: "Compacting..." renders only in ResourceBar, which is display: none when ctrl+e panel is visible
Impact: Users see absolutely nothing happen when they run /compact with panel open
P1: No immediate visual response
Problem: Nothing happens until controller internally fires callback(True) β delay between typing /compact and seeing anything
Impact: Users wonder if the command was received
P2: No error feedback on exception
Problem: finally clears status but no toast is shown if force_compact() throws
Impact: Silent failures leave users confused
P3: No chat container record
Problem: Compaction leaves zero trace in the conversation (unlike /update which writes progress to chat)
Impact: No audit trail of what was compacted
P4: No viewport state feedback
Problem: Agent requests get #viewport.streaming CSS class; /compact has nothing β UI looks idle
Impact: No visual differentiation between idle and compacting states
P5: Ephemeral toast notifications
Problem: Results auto-dismiss and are never logged
Impact: Users can't review what happened
Technical Context
- File:
src/tunacode/ui/resource_bar.pyβ ResourceBar renders compaction status - File:
src/tunacode/ui/context_panel.pyβ Context panel needs compaction awareness - The CSS mutual exclusion is the architectural blocker
Acceptance Criteria
- Context panel shows compaction status when panel is open
- Immediate visual feedback (within 100ms) when /compact is triggered
- Error toasts displayed on compaction failures with details
- Chat container records compaction events with token counts
- Viewport CSS class reflects compaction state
- Non-ephemeral log of compaction results accessible to users
- Fix passes UX testing with context panel both open and closed
Related Issues
- bug: manual /compact ignores user intent due to boundary hard-stopΒ #382 β Manual /compact should honor explicit user intent (no boundary hard-stop)
- [Feature]: Rolling summary compaction not integrated into request loopΒ #271 β [Feature]: Rolling summary compaction not integrated into request loop
Research Document
Full UX mapping and technical analysis saved to:
memory-bank/research/2026-02-22_compact-command-ux-mapping.md