fix: reconcile stale detection streams

This commit is contained in:
proxyctl coordinator
2026-07-17 21:30:46 +08:00
parent fdc59b1400
commit c4214ab8b2
2 changed files with 28 additions and 1 deletions
+6 -1
View File
@@ -176,7 +176,12 @@ func (m Model) Update(message tea.Msg) (tea.Model, tea.Cmd) {
}
if progress.closed {
// A stale Application generation closes without claiming an
// authoritative completion snapshot.
// authoritative completion snapshot. Reconcile with the Application
// so this Model does not strand rows in its superseded Checking frame.
formerCatalog := newTargetCatalog(m.snapshot, m.showUnavailable, m.selectedTargetID)
formerIndex := formerCatalog.index(m.selectedTargetID)
m.snapshot = m.application.Snapshot()
m.selectedTargetID = newTargetCatalog(m.snapshot, m.showUnavailable, m.selectedTargetID).retain(m.selectedTargetID, formerIndex)
m.refreshing = false
m.detectionUpdates = nil
return m, m.deferredQuit()