@@ -31,6 +31,8 @@ internal struct EditorTabPayload: Codable, Hashable {
3131 internal let skipAutoExecute : Bool
3232 /// Whether this tab is a preview (temporary) tab
3333 internal let isPreview : Bool
34+ /// Initial filter state (for FK navigation — pre-applies a WHERE filter)
35+ internal let initialFilterState : TabFilterState ?
3436
3537 internal init (
3638 id: UUID = UUID ( ) ,
@@ -42,7 +44,8 @@ internal struct EditorTabPayload: Codable, Hashable {
4244 isView: Bool = false ,
4345 showStructure: Bool = false ,
4446 skipAutoExecute: Bool = false ,
45- isPreview: Bool = false
47+ isPreview: Bool = false ,
48+ initialFilterState: TabFilterState ? = nil
4649 ) {
4750 self . id = id
4851 self . connectionId = connectionId
@@ -54,6 +57,7 @@ internal struct EditorTabPayload: Codable, Hashable {
5457 self . showStructure = showStructure
5558 self . skipAutoExecute = skipAutoExecute
5659 self . isPreview = isPreview
60+ self . initialFilterState = initialFilterState
5761 }
5862
5963 internal init ( from decoder: Decoder ) throws {
@@ -68,6 +72,7 @@ internal struct EditorTabPayload: Codable, Hashable {
6872 showStructure = try container. decodeIfPresent ( Bool . self, forKey: . showStructure) ?? false
6973 skipAutoExecute = try container. decodeIfPresent ( Bool . self, forKey: . skipAutoExecute) ?? false
7074 isPreview = try container. decodeIfPresent ( Bool . self, forKey: . isPreview) ?? false
75+ initialFilterState = try container. decodeIfPresent ( TabFilterState . self, forKey: . initialFilterState)
7176 }
7277
7378 /// Whether this payload is a "connection-only" payload — just a connectionId
@@ -89,5 +94,6 @@ internal struct EditorTabPayload: Codable, Hashable {
8994 self . showStructure = tab. showStructure
9095 self . skipAutoExecute = skipAutoExecute
9196 self . isPreview = false
97+ self . initialFilterState = nil
9298 }
9399}
0 commit comments