Files
StreamLens/test_textual.py
noisedestroyers 36a576dc2c Enhanced Textual TUI with proper API usage and documentation
- Fixed DataTable row selection and event handling
- Added explicit column keys to prevent auto-generated keys
- Implemented row-to-flow mapping for reliable selection tracking
- Converted left metrics panel to horizontal top bar
- Fixed all missing FlowStats/EnhancedAnalysisData attributes
- Created comprehensive Textual API documentation in Documentation/textual/
- Added validation checklist to prevent future API mismatches
- Preserved cursor position during data refreshes
- Fixed RowKey type handling and event names

The TUI now properly handles flow selection, displays metrics in a compact top bar,
and correctly correlates selected rows with the details pane.
2025-07-27 18:37:55 -04:00

26 lines
608 B
Python

#!/usr/bin/env python3
"""
Test script for Textual TUI interface
"""
import sys
import os
# Add the analyzer package to the path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from analyzer.analysis.core import EthernetAnalyzer
from analyzer.tui.textual.app_v2 import StreamLensAppV2
def main():
"""Test the Textual interface with mock data"""
# Create analyzer with some sample data
analyzer = EthernetAnalyzer(enable_realtime=False)
# Create and run the Textual app V2
app = StreamLensAppV2(analyzer)
app.run()
if __name__ == "__main__":
main()