Skip to content

Conversation

@AnshKumarTripathi
Copy link
Contributor

🎉 Summary

Hey! I've implemented a comprehensive TUI (Text User Interface) for Spewer as requested in Issue #14. I tried to take things further by creating a beautiful, modern interface inspired by Gemini CLI, complete with a startup screen and multiple viewing modes.

✨ What's Been Done

Core TUI Implementation

  • Beautiful ASCII Art Startup Screen - Inspired by Gemini CLI, with tips and usage examples
  • Four View Modes: Table (htop-style), Tree (ncdu-style), Dashboard (btop-style), and Ranger (3-pane inspector)
  • Three Color Schemes: Default (cyan/pink), Claude (amber/purple), and Gemini (Google colors)
  • Complete Emoji Removal - All emojis replaced with text indicators ([OK], [!!], [!], [-], [>], [LIVE])

Technical Details

  • Full TUI module (spewer/tui/) with startup, display, renderer, models, and data collector
  • Real-time execution monitoring with live updates
  • Keyboard controls for interactive navigation
  • Comprehensive test suite and documentation
  • 5 example scripts demonstrating different use cases
  • Pre-commit hooks passed, all files properly formatted

Status Indicators (No Emojis)

  • Success: [OK] | Error: [!!] | Warning: [!]
  • Default: [-] | Running: [>] | Live: [LIVE]

📝 What I've Tried

I've done my best to make the TUI functional and beautiful, but there are some things that are beyond my current scope and would benefit from the maintainer's expertise:

🔮 Future Improvements (Need Maintainer Input)

  1. Dynamic Codebase Integration

    • Making the TUI work seamlessly with ANY Python codebase without configuration
    • Auto-detecting which modules to trace based on project structure
    • Better filtering of library vs. user code
  2. Advanced Features

    • Interactive filtering during runtime
    • Search functionality within the TUI
    • Export trace data to different formats
    • Configuration file support (SPEWER.md)
  3. Performance Optimization

    • Reducing overhead for large codebases
    • Better handling of high-frequency function calls
    • Memory optimization for long-running traces

These enhancements would make the TUI even more powerful, but they require deeper knowledge of the project architecture and design decisions that I feel the maintainer is better positioned to make.

✅ Testing Done

  • All imports successful
  • No linter errors
  • Pre-commit hooks passed
  • All 4 view modes working
  • All 3 color schemes functional
  • Examples run without errors
  • Fully backward compatible

📚 Files Changed

Modified Core (7 files): .gitignore, README.md, pyproject.toml, spewer/init.py, spewer/config.py, spewer/spewer.py, spewer/trace.py

New TUI Module (6 files): Complete spewer/tui/ implementation

Examples & Tests (7 files): 5 new examples + test suite + documentation

Total: 20 files (7 modified + 13 new)

🎯 Resolves

Closes #14

🙏 Notes

I've put a lot of effort into making this TUI beautiful and functional. While I believe it's a solid foundation, I recognize there's room for growth, especially in making it more dynamic and universally applicable. I'm open to feedback and would love to see this evolve with the maintainer's vision!

Thank you for reviewing my contribution! 🚀


Screenshots/Demo: Run python examples/startup_demo.py to see it in action!
Screenshot 2025-10-28 133959
Screenshot 2025-10-28 134011

feat: Implement beautiful TUI with startup screen (Issue Agent-Hellboy#14)
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.55%. Comparing base (4b82db4) to head (8d72326).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage   96.55%   96.55%           
=======================================
  Files           4        4           
  Lines         203      203           
=======================================
  Hits          196      196           
  Misses          7        7           
Flag Coverage Δ
unittests 96.55% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AnshKumarTripathi
Copy link
Contributor Author

@Agent-Hellboy I've built the foundation – now I'm trusting you to take this to heights I can only imagine.
I believe in you. Make this legendary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implelement TUI using rich

2 participants