2.1 KiB
2.1 KiB
Debugging Notes - Blank TUI Issue
Current Status
✅ What's Working
- API Connection: Successfully connecting to Jellyfin server
- Data Fetching: All API endpoints returning data correctly
- Users: 12 found
- Libraries: 3 found
- Playback stats: Query working, data converting from list-of-lists to dictionaries
- Stats Services: All three services (user, series, library) generating correct statistics
- Table Row Formatting: Data being formatted correctly for display
❌ What's Not Working
- TUI Display: Tables appear blank/empty in the terminal
- No error messages or exceptions occurring
- Layout renders (header, tabs, footer) but content area is blank
Data Dump Analysis
See jellycleanarr_data_dump.txt for complete data verification showing:
- User "HRiggs" with 346 plays
- Series "Landman - s02e05" with 13 plays
- All table rows properly formatted as lists of strings
Example working data:
['HRiggs', '346', '3h 9m', '153']
['TV', '204', '5d 1h 16m', '115']
Fixes Applied
-
API Client (
src/jellycleanarr/api/client.py)- Fixed
query_playback_stats()to convert API's list-of-lists format to list-of-dicts - Maps column names from
data["colums"]to result rows
- Fixed
-
StatsTable (
src/jellycleanarr/ui/widgets/stats_table.py)- Moved column initialization from
__init__toon_mount() - Added logging for debugging
- Moved column initialization from
-
CSS (
src/jellycleanarr/ui/styles/main.tcss)- Added explicit height for widget containers
Possible Remaining Issues
- Widget Composition: TabPane might not be passing through content properly
- CSS Cascading: Height/sizing might not be cascading correctly
- Async Timing: Data might load but tables refresh before columns are added
- Textual Version: Possible compatibility issue with current Textual version
Next Steps
- Try running with Textual devtools:
textual consolethen run app - Check Textual version:
pip show textual - Try simplifying the widget hierarchy (remove TabPane, just show widgets directly)
- Add more explicit sizing in CSS (px values instead of percentages)