@pgflow/client 0.7.1 → 0.7.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @pgflow/client
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - c22a1e5: Fix missing realtime broadcasts for step:started and step:completed events
8
+
9
+ **Critical bug fix:** Clients were not receiving `step:started` events when steps transitioned to Started status, and `step:completed` events for empty map steps and cascade completions were also missing.
10
+
11
+ **Root cause:** PostgreSQL query optimizer was eliminating CTEs containing `realtime.send()` calls because they were not referenced by subsequent operations or the final RETURN statement.
12
+
13
+ **Solution:** Moved `realtime.send()` calls directly into RETURNING clauses of UPDATE statements, ensuring they execute atomically with state changes and cannot be optimized away.
14
+
15
+ **Changes:**
16
+
17
+ - `start_ready_steps()`: Broadcasts step:started and step:completed events in RETURNING clauses
18
+ - `cascade_complete_taskless_steps()`: Broadcasts step:completed events atomically with cascade completion
19
+ - `complete_task()`: Added PERFORM statements for run:failed and step:failed broadcasts
20
+ - Client: Added `applySnapshot()` methods to FlowRun and FlowStep for proper initial state hydration without event emission
21
+
22
+ - Updated dependencies [c22a1e5]
23
+ - @pgflow/core@0.7.2
24
+ - @pgflow/dsl@0.7.2
25
+
3
26
  ## 0.7.1
4
27
 
5
28
  ### Patch Changes