Skip to content

[Widget] Spinner / progress bar / status line for long-running commands #52

Description

@fissible

Source: external review report, 2026-08-24 (notable exclusion #1)

Gap

CLAUDE.md's vision lists "progress bars, spinners, status lines" under Feedback. Alert and toast shipped; spinners and progress didn't. For a library whose consumers are deploy/ops scripts, a long-running-command progress primitive is arguably the most-wanted missing piece.

What it needs

  • shellframe_spinner 'msg' -- cmd args… — runs the command, animates on /dev/tty, returns the command's exit code (preserves the $()/exit-code contract; stdout of the command passes through)
  • shellframe_progress <current> <total> ['label'] — inline bar, idempotent redraw on the same line; callable in a loop
  • shellframe_status 'text' — single-line status region for the v2 runtime (bottom row), updated without full redraw
  • Respect SHELLFRAME_TPUT_OK / non-tty (degrade to plain text lines)
  • Bash 3.2 clean; spinner animation via background subshell + trap, cleaned up on INT/TERM

Tests

  • ptyunit: spinner wraps sleep 0.3; exit 3 → exit code 3, spinner frames observed, line cleared
  • Unit: progress bar widths at 0/50/100%

Effort: M
Deps: none. Nice-to-have after #53 (theming) lands (colors).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions