testing-mastracode-tui

Tests mastracode terminal UI features interactively in Konsole covering threads, tasks, and model configuration.

27.6k|2.7k|Updated Aug 6, 2024
One-click install
npx skills add https://github.com/mastra-ai/mastra --skill testing-mastracode-tui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-mastracode-tui
Source: https://github.com/mastra-ai/mastra/tree/main/.claude/skills/testing-mastracode-tui
Command: npx skills add https://github.com/mastra-ai/mastra --skill testing-mastracode-tui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interactive testing of a terminal-based AI coding assistant's UI is error-prone and hard to reproduce, especially when verifying thread lifecycle, task state isolation, and rendering bugs across different terminal widths.

Core Features & Use Cases

  • Build and Launch Guidance: Step-by-step instructions for building mastracode with pnpm/turbo, including workarounds for DTS errors and corepack issues.
  • Custom Provider Configuration: Configure OpenRouter as a custom model provider via settings.json when direct Anthropic/OpenAI keys are unavailable.
  • Thread State Isolation Testing: Verify that /new, /threads, and /clone commands correctly reset, restore, and isolate task state between threads.
  • Programmatic Rendering Tests: Use tsx scripts to render TUI components directly, strip ANSI codes, and assert consistent visible widths to catch border and padding bugs.
  • Use Case: A developer fixing a user-message border alignment bug writes a tsx script that renders UserMessageComponent at widths 40-120 and asserts all lines have identical visible width, producing concrete pass/fail evidence.

Quick Start

Build mastracode with pnpm build:mastracode, configure an OpenRouter custom provider in settings.json, then launch the TUI with pnpm cli and test thread commands like /new and /threads.

Frequently Asked Questions about testing-mastracode-tui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a terminal UI interactively?

Build the project with pnpm build:mastracode, then launch the TUI with pnpm cli from the mastracode directory. Use slash commands like /new, /threads, and /models to exercise thread lifecycle and model switching features.

How to test TUI rendering bugs without visual inspection?

Write a tsx script that imports the component directly, renders it at specific widths, and strips ANSI codes to measure visible character widths. Assert all lines have identical width and test at multiple terminal widths like 40, 80, and 120.

How do I configure OpenRouter as a custom model provider?

Edit ~/.local/share/mastracode/settings.json to add a customProviders entry with the OpenRouter URL, API key, and model list, plus a customModelPacks entry. Then activate the pack via the /models command in the TUI.

Why does the mastracode build fail with DTS errors?

Pre-existing DTS errors in @mastra/core or @mastra/memory can block the build. Use pnpm turbo build --filter ./mastracode --continue to let downstream packages build despite upstream failures.

Why is the model not calling tools in the TUI?

Less capable models may not invoke mastracode's tool system automatically. Explicitly instruct the model to use specific tools by name, such as asking it to use the task_write tool to create a task list.