Skip to content

bug: /compact command has 6 UX issues with visual feedbackΒ #395

@tunahorse

Description

@tunahorse

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

Research Document

Full UX mapping and technical analysis saved to:
memory-bank/research/2026-02-22_compact-command-ux-mapping.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompact-uxIssues related to /compact command user experienceuiUser interface improvementsuxUser experience improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions