@skyvexsoftware/stratos-sdk 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,17 +85,19 @@ export function useTrackingSession() {
85
85
  const recoverFlight = useCallback(async () => {
86
86
  const result = await api("/recover", "POST");
87
87
  if (result.success) {
88
- queryClient.setQueryData(trackingSessionKeys.state, (prev) => (prev ? { ...prev, pendingRecovery: null } : prev));
88
+ // Refetch full state to ensure UI updates even if Socket.io
89
+ // broadcast was missed (e.g. socket not yet connected)
90
+ await refetch();
89
91
  }
90
92
  return result.success;
91
- }, [queryClient]);
93
+ }, [refetch]);
92
94
  const dismissRecovery = useCallback(async () => {
93
95
  const result = await api("/dismiss-recovery", "POST");
94
96
  if (result.success) {
95
- queryClient.setQueryData(trackingSessionKeys.state, (prev) => (prev ? { ...prev, pendingRecovery: null } : prev));
97
+ await refetch();
96
98
  }
97
99
  return result.success;
98
- }, [queryClient]);
100
+ }, [refetch]);
99
101
  const flight = currentFlight;
100
102
  const isActive = flight !== null &&
101
103
  (flight.status === "active" || flight.status === "paused");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software",