Show similar earlier incidents and let notes be marked as the fix
The incident view gets a "Seen before" section from the server's new /similar endpoint; an older server without it just shows nothing. C adds a note as the resolution note, alongside c for a plain note. Needs the server release that adds /similar. Claude-Session: https://claude.ai/code/session_01MMados3BD1oSjevHxbmVqU
This commit is contained in:
@@ -145,6 +145,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
case incidentDetailFetchedMsg:
|
||||
m.selectedIncident = msg.incident
|
||||
m.timeline = msg.timeline
|
||||
m.similar = msg.similar
|
||||
m.detailLoading = false
|
||||
if m.noteCursor >= len(noteEvents(m.timeline)) {
|
||||
m.noteCursor = -1
|
||||
@@ -938,8 +939,9 @@ func (m Model) handleIncidentDetailKey(msg tea.KeyMsg) (Model, tea.Cmd) {
|
||||
m.mode = modeDashboard
|
||||
return m, archiveIncidentCmd(m.client, inc.ID, m.activeTeamID, m.incidentFilter)
|
||||
|
||||
case "c":
|
||||
case "c", "C":
|
||||
m.mode = modeNote
|
||||
m.notePinned = msg.String() == "C"
|
||||
m.noteInput.Reset()
|
||||
m.noteInput.Focus()
|
||||
m.detailViewport.Height = m.detailViewportHeight()
|
||||
@@ -1032,7 +1034,7 @@ func (m Model) handleNoteKey(msg tea.KeyMsg) (Model, tea.Cmd) {
|
||||
m.mode = modeIncidentDetail
|
||||
m.noteInput.Blur()
|
||||
m.detailViewport.Height = m.detailViewportHeight()
|
||||
return m, addNoteCmd(m.client, m.selectedIncident.ID, content)
|
||||
return m, addNoteCmd(m.client, m.selectedIncident.ID, content, m.notePinned)
|
||||
}
|
||||
|
||||
return m, nil
|
||||
|
||||
Reference in New Issue
Block a user