add metrics to tui

This commit is contained in:
Robin Olsen
2026-03-02 23:10:09 +01:00
parent 5942d0d8ab
commit 7c704a1572
3 changed files with 62 additions and 5 deletions

View File

@@ -46,11 +46,11 @@ type Model struct {
choosingPriority bool // true while choosing a priority
priorityIssueID string
choosingType bool // true while choosing a type
typeIssueID string
feedbackChan chan models.ValidationFeedback
quitChan chan bool
currentFeedback models.ValidationFeedback
showComplete bool
typeIssueID string
feedbackChan chan models.ValidationFeedback
quitChan chan bool
currentFeedback models.ValidationFeedback
showComplete bool
}
func NewDashboard(app *app.App, feedbackChan chan models.ValidationFeedback, quitChan chan bool) *Model {
@@ -98,6 +98,15 @@ func NewDashboard(app *app.App, feedbackChan chan models.ValidationFeedback, qui
return m
}
func (m *Model) logAction(action string) {
if m.app != nil {
m.app.LogAction(models.EncodeActionEvent(models.ActionEvent{
Source: "tui",
Action: action,
}))
}
}
func (m *Model) startEditTitle(selected ListIssue) {
m.editingTitle = true
m.editingIssueID = selected.ID