Resolved some of suggestions from copilot

This commit is contained in:
Moira Daniella A Sebastian
2026-03-10 15:17:42 +01:00
parent 1cdfb56531
commit 153351ce81
4 changed files with 59 additions and 10 deletions

View File

@@ -14,10 +14,15 @@ type KanbanKeyMap struct {
MoveColumnRight key.Binding
MoveIssueLeft key.Binding
MoveIssueRight key.Binding
SubmitValidation key.Binding
}
var defaultKanbanKeyMap = KanbanKeyMap{
CommonKeyMap: components.DefaultCommonKeyMap(),
SubmitValidation: key.NewBinding(
key.WithKeys("S"),
key.WithHelp("S", "submit validation"),
),
SwitchToDashboard: key.NewBinding(
key.WithKeys("v"),
key.WithHelp("v", "dashboard 1"),
@@ -44,6 +49,13 @@ func (d *Model) handleKeyMsg(msg tea.KeyMsg) tea.Cmd {
var cmd tea.Cmd
switch {
case key.Matches(msg, d.keyMap.SubmitValidation):
if d.submitChan != nil {
select {
case d.submitChan <- struct{}{}:
default:
}
}
case key.Matches(msg, d.keyMap.Help):
d.helpBar.ToggleHelp()
case key.Matches(msg, d.keyMap.Quit):