TASK BACKLOG REFINEMENT fix for closing reason

This commit is contained in:
Ine Maria Nilssen Aanonsen
2026-03-12 11:46:58 +01:00
parent 9aa940fcca
commit 2ce04896ee
7 changed files with 229 additions and 28 deletions

View File

@@ -46,23 +46,27 @@ type Model struct {
deleteConfirmID string
deleteConfirmIndex int
choosingStatus bool // true while choosing a status
statusIssueID string
choosingPriority bool // true while choosing a priority
priorityIssueID string
choosingType bool // true while choosing a type
typeIssueID string
editingAssignee bool // true while editing assignee
assigneeInput textinput.Model
assigneeIssueID string
addingComment bool // true while adding a comment
commentInput textarea.Model
commentIssueID string
feedbackChan chan models.ValidationFeedback
quitChan chan bool
currentFeedback models.ValidationFeedback
showComplete bool
submitChan chan<- struct{}
choosingStatus bool
statusIssueID string
choosingPriority bool
priorityIssueID string
choosingType bool
typeIssueID string
editingAssignee bool
assigneeInput textinput.Model
assigneeIssueID string
addingComment bool
commentInput textarea.Model
commentIssueID string
choosingCloseReason bool
closeReasonIssueID string
closingOtherReason bool
closeReasonInput textarea.Model
feedbackChan chan models.ValidationFeedback
quitChan chan bool
currentFeedback models.ValidationFeedback
showComplete bool
submitChan chan<- struct{}
}
func NewDashboard(app *app.App, feedbackChan chan models.ValidationFeedback, quitChan chan bool, submitChan chan<- struct{}) *Model {
@@ -92,6 +96,12 @@ func NewDashboard(app *app.App, feedbackChan chan models.ValidationFeedback, qui
m.descriptionInput = inputs.Description
m.assigneeInput = inputs.Assignee
closeReasonTa := textarea.New()
closeReasonTa.Placeholder = "Enter closing reason..."
closeReasonTa.SetWidth(56)
closeReasonTa.SetHeight(4)
m.closeReasonInput = closeReasonTa
commentTa := textarea.New()
commentTa.Placeholder = "Write your comment..."
commentTa.SetWidth(56)
@@ -189,7 +199,9 @@ func (m *Model) Init() tea.Cmd {
// IsInModal returns true when a modal (edit, create, delete confirm, choose status/priority/type) is active.
func (m *Model) IsInModal() bool {
return m.editingTitle || m.creatingIssue || m.editingDescription ||
m.choosingStatus || m.choosingPriority || m.confirmingDelete || m.choosingType || m.editingAssignee
m.choosingStatus || m.choosingPriority || m.confirmingDelete ||
m.choosingType || m.editingAssignee ||
m.choosingCloseReason || m.closingOtherReason
}
func (m *Model) IsFocusedOnList() bool {