or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/textual@6.1.x
tile.json

tessl/pypi-textual

tessl install tessl/pypi-textual@6.1.0

Modern 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%

task.mdevals/scenario-3/

Task Manager with Custom Key Bindings

Build a terminal-based task manager application that demonstrates custom keyboard shortcuts and input handling.

Requirements

Create a task list application with the following features:

Task List Display

Display a list of tasks, where each task has:

  • A description (text)
  • A status (pending or completed)

Keyboard Shortcuts

Implement the following keyboard shortcuts:

  1. Add Task: Press a or n to add a new task. When triggered, show an input field where the user can type the task description. Press Enter to save, Escape to cancel.

  2. Toggle Complete: Press space to toggle the completion status of the currently selected/focused task.

  3. Delete Task: Press d or Delete to remove the currently selected/focused task.

  4. Navigation: Support both j/k (vim-style) and arrow keys (up/down) for navigating between tasks in the list.

  5. Quit: Press q or Ctrl+C to exit the application.

Visual Feedback

  • Display a footer showing available keyboard shortcuts with their descriptions
  • Group related shortcuts together in the footer (e.g., navigation shortcuts, task actions)
  • Completed tasks should be visually distinct from pending tasks (e.g., strikethrough text or different color)

Starting State

The application should start with 3 sample tasks:

  • "Buy groceries" (pending)
  • "Write documentation" (completed)
  • "Review pull request" (pending)

Test Cases

Your implementation should pass the following test cases:

  • When the app starts, it displays 3 tasks with the correct initial statuses @test
  • Pressing a activates the input field for adding a new task @test
  • Pressing space toggles the selected task's completion status @test
  • Pressing j moves selection down and k moves selection up @test

Implementation

@generates

API

from textual.app import App

class TaskManagerApp(App):
    """A task manager application with custom key bindings."""
    pass

Dependencies { .dependencies }

Textual { .dependency }

Modern Text User Interface framework for building terminal applications.

@satisfied-by