git.iko.soy/parseable-macos
on master help sign in
Fix stale stream/filter list shown during server switch
commitf609dc4ce8a4055039a93dbf14ec331174b0f599 authoriko <mail@iko.soy> dateSun 21 Jun 2026, 15:11 (3 months ago) parent172566c
1 file changed+7
ParseableViewer/App/AppState.swift+7
ParseableViewer/App/AppState.swift+7
@@ -141,6 +141,13 @@ final class AppState {
141141 if activeConnection?.id != connection.id {
142142 selectedStream = nil
143143 streamLoadError = nil
144+ // Drop the previous server's stream list and filters too — otherwise the
145+ // sidebar keeps rendering server A's streams/filters (with selection
146+ // already nilled) throughout the reconnect window. Same rationale as
147+ // `serverAbout` below; matches the failure path and `disconnect()`. Both
148+ // are repopulated once the new server's listStreams/listFilters respond.
149+ streams = []
150+ filters = []
144151 // Drop the previous server's cached `about` so views seeding from it
145152 // (ServerInfoView) don't paint the old server's details while the new
146153 // one loads. It's repopulated below once the new server responds.