Add offline-first task-master TUI with tickets, board lists, and undo.

Charm-based CLI with JSON persistence, status/list filters, external editor editing, command-history undo/redo, and glamour markdown without AutoStyle OSC hangs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Skruecken
2026-10-19 10:21:48 +02:00
co-authored by Cursor
parent 4a3d0d777b
commit 24c1e146ec
37 changed files with 3259 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
package ticket_test
import (
"os"
"os/exec"
"testing"
"task/internal/ticket"
)
func TestResolveEditorPrefersEnv(t *testing.T) {
t.Setenv("EDITOR", "custom-ed")
t.Setenv("VISUAL", "visual-ed")
if got := ticket.ResolveEditor(); got != "custom-ed" {
t.Fatalf("got %q, want custom-ed", got)
}
}
func TestResolveEditorFallsBackToNvim(t *testing.T) {
t.Setenv("EDITOR", "")
t.Setenv("VISUAL", "")
got := ticket.ResolveEditor()
if _, err := exec.LookPath("nvim"); err == nil {
if got != "nvim" {
t.Fatalf("got %q, want nvim when available", got)
}
return
}
// Without nvim, accept vim/vi.
if got != "vim" && got != "vi" {
t.Fatalf("got unexpected fallback %q", got)
}
_ = os.Environ()
}