Phase 06: CLI Interface Gap Closure - 2 plans addressing 3 UAT-identified issues - Session persistence: Add missing set_conversation_history method - Session feedback: Add verbose messaging for session file operations - Resource display: Fix color coding with force_terminal=True - Ready for execution to close CLI interface gaps
4.8 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, gap_closure, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | gap_closure | must_haves | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 06-cli-interface | 06 | execute | 1 |
|
|
true | true |
|
Purpose: Address two UX issues - users can't see when/where session files are created, and resource monitoring lacks color coding in terminal Output: CLI with clear session feedback and working color-coded resource monitoring
<execution_context>
@/.opencode/get-shit-done/workflows/execute-plan.md
@/.opencode/get-shit-done/templates/summary.md
</execution_context>
Gap closure context from UAT
@.planning/phases/06-cli-interface/06-UAT.md
Previous session persistence and resource monitoring implementations
@.planning/phases/06-cli-interface/06-02-SUMMARY.md @.planning/phases/06-cli-interface/06-04-SUMMARY.md
Add verbose session feedback and fix resource display colors src/app/__main__.py Fix two issues in src/app/__main__.py:1. **Enhance session feedback** - Add user-friendly messaging for session operations:
- When creating new session: "Session created at ~/.mai/session.json"
- When loading existing session: "Session loaded from ~/.mai/session.json"
- When saving session: "Conversation saved to ~/.mai/session.json"
- Enhance /session command to display file path and session stats
- Add feedback for session file creation in ~/.mai directory
2. **Fix resource display color coding** - Modify ResourceDisplayManager:
- Change Console initialization to use Console(force_terminal=True) to force color output
- This overrides Rich's automatic terminal detection that disables colors in non-terminal environments
- Ensure rich imports and conditional logic properly handle this change
Gap reasons:
- "Session system works correctly, but users lack clear feedback about when/where session files are created"
- "Rich console detects is_terminal=False and disables color output automatically"
Make sure to preserve existing functionality while adding these improvements.
# Test session feedback displays file path
echo "Testing session feedback..." && python -c "
import sys
sys.path.insert(0, 'src')
from pathlib import Path
import json
Check if session feedback logic exists
with open('src/app/main.py', 'r') as f: content = f.read() if 'Session created at' in content and 'Session loaded from' in content: print('✓ Session feedback messages added') else: print('✗ Session feedback messages missing') exit(1)
# Check for force_terminal=True
if 'force_terminal=True' in content:
print('✓ Console force_terminal=True added')
else:
print('✗ Console force_terminal=True missing')
exit(1)
" CLI now provides clear feedback about session file operations and resource monitoring displays with proper color coding
Test both fixes by: 1. Start new CLI session - should see "Session created at ~/.mai/session.json" 2. Send a message - should see color-coded resource display (not just plain text) 3. Use /session command - should show file location information 4. Exit and restart - should see "Session loaded from ~/.mai/session.json"Expected: Clear feedback about session file operations and working color-coded resource monitoring
<success_criteria>
- Session creation displays file path feedback to user
- Session loading displays file path feedback to user
- /session command shows file information
- Resource monitoring uses color-coded status indicators
- Console initialization uses force_terminal=True for color support </success_criteria>