@concavejs/devtools 0.0.1-alpha.5 → 0.0.1-alpha.6

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.
@@ -59,6 +59,7 @@ export declare class WebSocketInterceptor {
59
59
  */
60
60
  private handleActionResponse;
61
61
  private handleAuthErrorResponse;
62
+ private resolveOperationTimings;
62
63
  private emitAuthEvent;
63
64
  /**
64
65
  * Extract and emit log events from logLines
@@ -5,6 +5,14 @@
5
5
  import type { EventStore } from "../store/event-store";
6
6
  interface ActivityPanelProps {
7
7
  eventStore: EventStore;
8
+ panelConnectionState?: {
9
+ waitingForConnection: boolean;
10
+ needsReload: boolean;
11
+ onReload: () => void;
12
+ agentAttached?: boolean;
13
+ socketSeen?: boolean;
14
+ captureLive?: boolean;
15
+ };
8
16
  }
9
- export declare function ActivityPanel({ eventStore }: ActivityPanelProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ActivityPanel({ eventStore, panelConnectionState }: ActivityPanelProps): import("react/jsx-runtime").JSX.Element;
10
18
  export {};
@@ -6,6 +6,14 @@ interface DevToolbarProps {
6
6
  eventStore: EventStore;
7
7
  position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
8
8
  mode?: "overlay" | "panel";
9
+ panelConnectionState?: {
10
+ waitingForConnection: boolean;
11
+ needsReload: boolean;
12
+ onReload: () => void;
13
+ agentAttached?: boolean;
14
+ socketSeen?: boolean;
15
+ captureLive?: boolean;
16
+ };
9
17
  }
10
- export declare function DevToolbar({ eventStore, position, mode }: DevToolbarProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function DevToolbar({ eventStore, position, mode, panelConnectionState, }: DevToolbarProps): import("react/jsx-runtime").JSX.Element;
11
19
  export {};
@@ -7,6 +7,15 @@
7
7
  import type { DevToolsEvent, ActiveSubscription, PerformanceMetrics } from "../types";
8
8
  export type EventListener = (event: DevToolsEvent) => void;
9
9
  export type FocusListener = (eventId: string | null) => void;
10
+ export type SettingsListener = (settings: DevToolsSettings) => void;
11
+ export interface DevToolsSettings {
12
+ persistEvents: boolean;
13
+ maxEvents: number;
14
+ captureLogLines: boolean;
15
+ autoPauseOnError: boolean;
16
+ wsLatencyMs: number;
17
+ wsJitterMs: number;
18
+ }
10
19
  export interface StoreSnapshot {
11
20
  timestamp: number;
12
21
  events: DevToolsEvent[];
@@ -32,6 +41,7 @@ export declare class EventStore {
32
41
  private maxEvents;
33
42
  private listeners;
34
43
  private focusListeners;
44
+ private settingsListeners;
35
45
  private subscriptions;
36
46
  private snapshots;
37
47
  private maxSnapshots;
@@ -58,6 +68,10 @@ export declare class EventStore {
58
68
  * Subscribe to focus/navigation changes across panels
59
69
  */
60
70
  subscribeFocus(listener: FocusListener): () => void;
71
+ /**
72
+ * Subscribe to settings changes
73
+ */
74
+ subscribeSettings(listener: SettingsListener): () => void;
61
75
  /**
62
76
  * Set the currently focused event (for cross-panel navigation)
63
77
  */
@@ -146,6 +160,12 @@ export declare class EventStore {
146
160
  * Load settings from localStorage
147
161
  */
148
162
  private loadSettings;
163
+ /**
164
+ * Push latency settings to the shared window config object
165
+ * that the WebSocket interceptors read on every send/receive.
166
+ */
167
+ private syncLatencyConfig;
168
+ private notifySettingsChanged;
149
169
  /**
150
170
  * Persist events to localStorage
151
171
  */
@@ -161,5 +181,9 @@ export declare class EventStore {
161
181
  private sanitizeEvents;
162
182
  private isEventLike;
163
183
  private normalizeMaxEvents;
184
+ private isOperationEvent;
185
+ private isTerminalOperationEvent;
186
+ private isMatchingPendingOperation;
187
+ private reconcilePendingOperation;
164
188
  }
165
189
  export declare function getGlobalEventStore(): EventStore;
package/dist/types.d.ts CHANGED
@@ -30,7 +30,18 @@ export interface QueryEvent extends BaseEvent {
30
30
  result?: JSONValue;
31
31
  error?: string;
32
32
  logLines?: string[];
33
+ /**
34
+ * Backend/network round-trip time measured when the WS frame is received.
35
+ */
33
36
  duration?: number;
37
+ /**
38
+ * Simulated client-side delivery delay applied by devtools latency settings.
39
+ */
40
+ simulatedDelayMs?: number;
41
+ /**
42
+ * End-to-end perceived latency = duration + simulatedDelayMs.
43
+ */
44
+ endToEndDurationMs?: number;
34
45
  /** ID of the mutation that likely triggered this query update */
35
46
  triggeredBy?: string;
36
47
  }
@@ -47,7 +58,18 @@ export interface MutationEvent extends BaseEvent {
47
58
  result?: JSONValue;
48
59
  error?: string;
49
60
  logLines?: string[];
61
+ /**
62
+ * Backend/network round-trip time measured when the WS frame is received.
63
+ */
50
64
  duration?: number;
65
+ /**
66
+ * Simulated client-side delivery delay applied by devtools latency settings.
67
+ */
68
+ simulatedDelayMs?: number;
69
+ /**
70
+ * End-to-end perceived latency = duration + simulatedDelayMs.
71
+ */
72
+ endToEndDurationMs?: number;
51
73
  }
52
74
  /**
53
75
  * Action execution event (captured from ActionRequest + ActionResponse)
@@ -62,7 +84,18 @@ export interface ActionEvent extends BaseEvent {
62
84
  result?: JSONValue;
63
85
  error?: string;
64
86
  logLines?: string[];
87
+ /**
88
+ * Backend/network round-trip time measured when the WS frame is received.
89
+ */
65
90
  duration?: number;
91
+ /**
92
+ * Simulated client-side delivery delay applied by devtools latency settings.
93
+ */
94
+ simulatedDelayMs?: number;
95
+ /**
96
+ * End-to-end perceived latency = duration + simulatedDelayMs.
97
+ */
98
+ endToEndDurationMs?: number;
66
99
  }
67
100
  /**
68
101
  * Subscription event (captured from ModifyQuerySet)