@shivaedev/test-story 0.42.1 → 0.43.0

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.43.0 - 2026-11-06
4
+
5
+ ### Breaking
6
+
7
+ - Screen drivers using the default contract activity signal wait for commands and first query results. Use `activityScreenSignal(activity, isClientIdle)` for stories that need full finite-work settling, and start `nextLiveHint()` before the outside write when waiting for a live change.
8
+
3
9
  ## 0.42.1 - 2026-11-05
4
10
 
5
11
  ### Changed
package/README.md CHANGED
@@ -1029,7 +1029,9 @@ yield* screen.settle();
1029
1029
  expect(screen.text("output")).toBe("Saved title");
1030
1030
  ```
1031
1031
 
1032
- `settle()` waits until every supplied source is idle together, then flushes the renderer before returning. A source that becomes busy while another finishes keeps the wait open. `pending` and `transport` each accept the same sampler, boolean stream or `ScreenSignal` shape; `activity` accepts a `ScreenSignal`; contract owns the projection from native `ClientActivity`. It observes changes from all three without sleeps, quiet windows or polling. Finite RPC calls, coalesced invalidations and refreshing query atoms all keep it waiting; subscription streams themselves do not. `find()` waits for idle client activity and a matching target, including a target rendered by a later DOM mutation. Keep live coalescing enabled. `nextLiveHint()` waits for the next subscription update received after the verb starts, including initial or resync updates; it does not wait for a refresh. Start the wait before another viewer writes, then settle before reading the resulting screen. If the client activity stream ends without a new hint, the wait fails with `SignalNotReceived` from `server/until.ts`. It needs `activity` or a `ScreenSignal` in `pending`; a callback-only driver fails with `MissingClientActivity`. Existing `pending: activityScreenSignal(clientActivity(client))` wiring remains supported.
1032
+ `settle()` waits until every supplied source is settled together, then flushes the renderer before returning. A source that becomes busy while another finishes keeps the wait open. `pending` and `transport` each accept the same sampler, boolean stream or `ScreenSignal` shape; `activity` accepts a `ScreenSignal`; contract owns the projection from native `ClientActivity`. It observes changes from all three without sleeps, quiet windows or polling. With `activityScreenSignal(clientActivity(client))`, the default is commands in flight and each mounted query's first result. A live query that has already delivered, including one awaiting a later refresh, is normal screen state and keeps no wait open. Contract uses its query/command declarations, so kits list no queries as settling exceptions. `find()` waits for settled activity and a matching target, including a target rendered by a later DOM mutation. To wait for a particular changed value, use `findText()` or an explicit live-change wait.
1033
+
1034
+ Keep live coalescing enabled. `nextLiveHint()` waits for the next subscription update received after the verb starts, including initial or resync updates; it does not wait for a refresh. Start the wait before another viewer writes, then use a driver with `activityScreenSignal(activity, isClientIdle)` to settle through the resulting finite calls, coalesced invalidations and refreshing query atoms before reading the screen. Both functions come from `@shivaedev/contract/clientActivity.ts`. If the client activity stream ends without a new hint, the wait fails with `SignalNotReceived` from `server/until.ts`. It needs `activity` or a `ScreenSignal` in `pending`; a callback-only driver fails with `MissingClientActivity`. Existing `pending: activityScreenSignal(clientActivity(client))` wiring remains supported.
1033
1035
 
1034
1036
  For screens with runtime timers, acquire `const clock = yield* watchedClock` from `server/watchedClock.ts` during kit creation and pass `clock` to `screenDriver({ act, clock, pending, root, tell })`. Supply that same Clock to the application's atom runtime. While the supplied completion sources are busy, screen waits advance to the next registered sleep inside the supplied renderer `act`, then check completion again. Canceled sleeps are removed. A debounced search can therefore use `enter` followed by `settle` without a real wait or its debounce duration in a kit verb. Clock advancement is opt-in; the driver leaves time alone without `clock`. It advances the shared clock, including other scheduled work, so use explicit `clock.adjust(duration)` inside `act` when a story needs to observe a time boundary, such as holding a diary row for a long press.
1035
1037
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/test-story",
3
- "version": "0.42.1",
3
+ "version": "0.43.0",
4
4
  "description": "Tests that read like stories over the real engine: a story kit per engine with its own it, traits per feature, and a failure that prints the story, where it stopped and the engine's state",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/test-story#readme",
6
6
  "bugs": {
@@ -42,9 +42,9 @@
42
42
  "README.md"
43
43
  ],
44
44
  "dependencies": {
45
- "@shivaedev/contract": "0.40.0",
45
+ "@shivaedev/contract": "0.41.0",
46
46
  "@shivaedev/test": "0.17.0",
47
- "@shivaedev/test-sql": "0.24.1",
47
+ "@shivaedev/test-sql": "0.24.2",
48
48
  "dom-accessibility-api": "0.7.1"
49
49
  },
50
50
  "devDependencies": {
@@ -52,8 +52,8 @@
52
52
  "@effect/platform-node": "4.1.0",
53
53
  "@effect/sql-pg": "4.1.0",
54
54
  "@effect/vitest": "4.1.0",
55
- "@shivaedev/quality": "0.66.0",
56
- "@shivaedev/react": "0.44.1",
55
+ "@shivaedev/quality": "0.67.0",
56
+ "@shivaedev/react": "0.44.2",
57
57
  "@types/node": "24.19.2",
58
58
  "@types/react": "19.3.0",
59
59
  "@types/react-dom": "19.3.0",