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
+51
View File
@@ -0,0 +1,51 @@
package ticket
import "time"
// Status represents the workflow state of a ticket.
type Status string
const (
StatusTodo Status = "todo"
StatusInProgress Status = "in_progress"
StatusDone Status = "done"
)
// AllStatuses is the ordered list shown in the status picker.
var AllStatuses = []Status{StatusTodo, StatusInProgress, StatusDone}
// Label returns a short display label for the status.
func (s Status) Label() string {
switch s {
case StatusTodo:
return "OPEN"
case StatusInProgress:
return "WIP"
case StatusDone:
return "DONE"
default:
return string(s)
}
}
// Index returns the position in AllStatuses, or 0 if unknown.
func (s Status) Index() int {
for i, st := range AllStatuses {
if st == s {
return i
}
}
return 0
}
// Ticket is the domain model for a work item.
// Title (headline) and Description are Markdown.
type Ticket struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status Status `json:"status"`
ProjectID string `json:"projectId"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}