Revert "adding assignee to tui"

This reverts commit c72b15f721.
This commit is contained in:
Robin Olsen
2026-03-11 20:37:05 +01:00
parent a5b04997a7
commit 9a0cb74e39
8 changed files with 19 additions and 116 deletions

View File

@@ -49,11 +49,6 @@ type issueTypeUpdatedMsg struct {
Err error
}
type issueAssigneeUpdatedMsg struct {
IssueID string
Err error
}
type selectIssueMsg struct {
IssueID string
}
@@ -121,14 +116,6 @@ func updateIssueTypeCmd(app *app.App, issueID string, issueType models.IssueType
}
}
func updateIssueAssigneeCmd(app *app.App, issueID, assignee string) tea.Cmd {
return func() tea.Msg {
updates := map[string]interface{}{"assignee": assignee}
err := app.Issues.UpdateIssue(context.Background(), issueID, updates, "tui")
return issueAssigneeUpdatedMsg{IssueID: issueID, Err: err}
}
}
func createIssueCmd(app *app.App, title string) tea.Cmd {
return func() tea.Msg {
issue := &models.Issue{
@@ -222,17 +209,6 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.logAction("tui updated issue type")
return m, m.refreshIssueListsAndSelectIssue(msg.IssueID)
case issueAssigneeUpdatedMsg:
m.editingAssignee = false
m.assigneeIssueID = ""
m.assigneeInput.Blur()
if msg.Err != nil {
m.logAction("tui failed to update issue assignee")
return m, nil
}
m.logAction("tui updated issue assignee")
return m, m.refreshIssueListsAndSelectIssue(msg.IssueID)
case selectIssueMsg:
m.issueList.SelectIssueID(msg.IssueID)
m.closedIssueList.SelectIssueID(msg.IssueID)
@@ -504,27 +480,6 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, cmd
}
if m.editingAssignee {
if msg.String() == "enter" {
assignee := m.assigneeInput.Value()
issueID := m.assigneeIssueID
m.editingAssignee = false
m.assigneeIssueID = ""
m.assigneeInput.Blur()
return m, updateIssueAssigneeCmd(m.app, issueID, assignee)
}
if msg.String() == "esc" {
m.logAction("tui canceled assignee edit")
m.editingAssignee = false
m.assigneeIssueID = ""
m.assigneeInput.Blur()
return m, nil
}
var cmd tea.Cmd
m.assigneeInput, cmd = m.assigneeInput.Update(msg)
return m, cmd
}
if m.editingDescription {
if msg.String() == "ctrl+s" {
m.logAction("tui submitted issue description edit")