tessl install tessl/pypi-textual@6.1.0Modern Text User Interface framework for building cross-platform terminal and web applications with Python
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.18x
Baseline
Agent success rate without this tile
79%
Build a simple task counter TUI application that tracks completed and pending tasks using reactive programming.
Create a terminal application that displays:
The application should update all displays automatically when task counts change. When a user presses the 'c' key, it should increment the completed count. When a user presses the 'p' key, it should increment the pending count. Pressing 'q' should quit the application.
The completion percentage should be calculated automatically based on the completed and pending counts, formatted as "X.X%" (one decimal place). If there are no tasks, display "0.0%".
Implement this using reactive attributes that automatically update dependent values and trigger UI refreshes when changed.
@generates
"""Task counter application using reactive programming."""
from textual.app import App
class TaskCounterApp(App):
"""A TUI app that tracks task counts with reactive updates."""
def compose(self):
"""Compose the UI widgets."""
passProvides the TUI framework with reactive programming support.
@satisfied-by