You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today every collection in AppStore is flat (devices, groups, bridgeInfo, deviceStates, etc.). To hold both bridges' data simultaneously, every collection needs a bridge dimension. This is the largest pure-refactor of Phase 2.
What
Convert collections in Shellbee/Core/Store/AppStore.swift:
logEntries: [LogEntry] → LogEntry gains a bridgeID field; the array stays flat (so the master Logs view can show all-bridges-merged), but every consumer can filter by bridge.
operationErrors, pendingRenames, pendingRemovals, identifyInProgress, touchlinkDevices → all bridgeID-keyed.
Why
Today every collection in
AppStoreis flat (devices, groups, bridgeInfo, deviceStates, etc.). To hold both bridges' data simultaneously, every collection needs a bridge dimension. This is the largest pure-refactor of Phase 2.What
Convert collections in
Shellbee/Core/Store/AppStore.swift:devices: [Device]→devices: [BridgeID: [Device]]groups: [Group]→[BridgeID: [Group]]bridgeInfo: BridgeInfo?→[BridgeID: BridgeInfo]bridgeHealth: BridgeHealth?→[BridgeID: BridgeHealth]deviceStates: [String: [String:JSONValue]]→[BridgeID: [String: [String:JSONValue]]]deviceAvailability: [String: Bool]→[BridgeID: [String: Bool]]otaUpdates: [String: OTAUpdateStatus]→[BridgeID: [String: OTAUpdateStatus]]logEntries: [LogEntry]→LogEntrygains abridgeIDfield; the array stays flat (so the master Logs view can show all-bridges-merged), but every consumer can filter by bridge.operationErrors,pendingRenames,pendingRemovals,identifyInProgress,touchlinkDevices→ all bridgeID-keyed.deviceFirstSeen— already per-bridge from Implement stateful Z2M engine and enhance UI test coverage #1.4.Add accessors:
devices(for: BridgeID) -> [Device],device(named: in: BridgeID),state(name: in:),isAvailable(_: in:),groups(for:).allDevices,allLogs.apply(_:)inAppStore+Events.swifttakes aBridgeID(orScopedEvent) and routes mutations to the correct slot.reset()becomesreset(bridge: BridgeID)andresetAll().Files
Shellbee/Core/Store/AppStore.swiftShellbee/Core/Store/AppStore+*.swiftextensions.Verification
apply(event, bridge: A)does not mutate any slot keyed under bridge B.resetAll()clears all slots;reset(bridge: A)clears only A's slots.Phase
Phase 2 of multi-bridge support. Depends on #2.1.