From 3e7ab044a6f25d399575aae196ff99ae7e4468d9 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Fri, 20 Mar 2026 10:47:55 +0100 Subject: [PATCH] sent submission at init to make submission lablel appear --- pkg/tui/views/dashboard/model.go | 6 +++++- pkg/tui/views/kanban/model.go | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pkg/tui/views/dashboard/model.go b/pkg/tui/views/dashboard/model.go index bc75e80..a21f5e0 100644 --- a/pkg/tui/views/dashboard/model.go +++ b/pkg/tui/views/dashboard/model.go @@ -5,7 +5,7 @@ import ( "charm.land/bubbles/v2/textarea" "charm.land/bubbles/v2/textinput" - "charm.land/bubbletea/v2" + tea "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" @@ -193,6 +193,10 @@ func (m *Model) startEditAssignee(selected ListIssue) { } func (m *Model) Init() tea.Cmd { + if m.submitChan != nil { + m.submitChan <- struct{}{} + m.logAction("tui submitted validation") + } return components.ListenForValidation(m.feedbackChan) } diff --git a/pkg/tui/views/kanban/model.go b/pkg/tui/views/kanban/model.go index 57e371e..8c2568e 100644 --- a/pkg/tui/views/kanban/model.go +++ b/pkg/tui/views/kanban/model.go @@ -5,7 +5,7 @@ import ( "charm.land/bubbles/v2/textarea" "charm.land/bubbles/v2/textinput" - "charm.land/bubbletea/v2" + tea "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" @@ -169,7 +169,20 @@ func (m *Model) startEditAssignee(selected ListIssue) { m.assigneeInput.CursorEnd() } +func (m *Model) logAction(action string) { + if m.app != nil { + m.app.LogAction(models.EncodeActionEvent(models.ActionEvent{ + Source: "tui", + Action: action, + })) + } +} + func (m *Model) Init() tea.Cmd { + if m.submitChan != nil { + m.submitChan <- struct{}{} + m.logAction("tui submitted validation") + } return components.ListenForValidation(m.feedbackChan) }