Skip to content

Commit de5a20e

Browse files
Merge main and retarget native capture onto 0.8.12
Keep published 0.8.12 as the session identity stamp. Fold native CPU capture and overlay identity into 0.8.13, and lockstep tugboat_dio. Co-authored-by: Chinmay Kabi <chinmay@blend.to>
2 parents 630a92b + f99997f commit de5a20e

18 files changed

Lines changed: 156 additions & 96 deletions

File tree

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ gates, canaries) are not listed below.
5858

5959
## Current compatibility
6060

61-
- package version: `0.8.13` on this branch (`0.8.12` native capture line plus overlay identity);
62-
- native runtime: `com.tugboat.sdk:capture-runtime` `0.1.0` (local Maven, experimental);
61+
- package version: `0.8.13` (`0.8.x` patch after published `0.8.12`);
62+
- native runtime: `capture-runtime` `0.1.0` compiled from monorepo sources (unpublished);
6363
- planned first native-capable adapter: Flutter `0.9.0` after privacy and performance gates;
6464
- session JSON schema: `10`;
6565
- fingerprint schema: `6`;

docs/architecture/repository-scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ older OS versions report `unsupportedApi` and Flutter falls back.
8585
## Flutter adapter scope
8686

8787
`package:tugboat` stays the public Dart API. First native-capable version is
88-
planned as `0.9.0`. This Phase 0/1 line is `0.8.12` and does not enable
88+
planned as `0.9.0`. This Phase 0/1 line is `0.8.13` and does not enable
8989
native capture.
9090

9191
In scope for the Android and Apple CPU betas:

docs/decisions/0008-independent-versioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ Public runtime API / C ABI changes bump `capture-runtime`. Adapter source
2323
changes bump `tugboat` and update
2424
[compatibility.md](../releases/compatibility.md).
2525

26-
This `0.8.12` line is not the first native-capable public adapter; `0.9.0`
26+
This `0.8.13` line is not the first native-capable public adapter; `0.9.0`
2727
is planned after privacy and performance gates, still mapped to
2828
`capture-runtime` `0.1.x`.

docs/integration/collector.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,15 @@ not uploaded before this handshake completes.
204204

205205
Session payloads may include:
206206

207+
- `userId` — current runtime user on every session lifecycle event, including
208+
`session_end`. After start, `null` is an explicit identity-clear on
209+
`user_changed` / `session_identify` and the current (possibly anonymous)
210+
identity on `traits_updated` and `session_end`;
207211
- `traits` — full traits snapshot when the host has set a bag (`session_start`,
208-
`session_identify`, `traits_updated`, `user_changed`); the collector stores
209-
the bag as-is (no server-side partial merge);
212+
`session_identify`, `traits_updated`, `user_changed`, `session_end`); the
213+
collector stores the bag as-is (no server-side partial merge);
210214
- `traitsId` — pass-through of a prior collector-issued id when no new bag is
211-
sent (for example `session_end`, or `session_start` after only an id is
215+
sent (for example `session_end` or `session_start` after only an id is
212216
cached). Ignored by the collector when `traits` is present.
213217

214218
Accepted session responses (`202`) may return `traitsId`. The SDK caches that

docs/performance/cpu-capture-baseline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pins, not with the host desktop toolchain.
7979
| Flutter min Gradle (3.47.2) | 8.14.0 |
8080
| Example min / compile SDK | min 24, compile/target 36 |
8181
| Package constraints | Dart `^3.9.2`, Flutter `>=3.35.0` |
82-
| tugboat | 0.8.12 (capture path unchanged from 0.8.11) |
82+
| tugboat | 0.8.13 (default Flutter capture path unchanged from 0.8.12) |
8383

8484
Host CMake 3.28.3 and host clang 18.1.3 were present on the lab machine. They
8585
are not the Android compile pin.

docs/releases/compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| Adapter | Adapter version | Native runtime |
44
| --- | --- | --- |
55
| Flutter `tugboat` | 0.8.13 | Android `capture-runtime` 0.1.x compiled from monorepo sources (unpublished Maven is not required). Apple `TugboatCaptureRuntime` 0.1.x compiled from monorepo sources (unpublished CocoaPod is not required). Plugin iOS floor 12; native capture still reports unsupported below iOS 15. |
6-
| Flutter `tugboat` | 0.8.12 | Android `com.tugboat.sdk:capture-runtime` 0.1.x (local Maven; experimental). Apple `TugboatCaptureRuntime` 0.1.x (local CocoaPod / SwiftPM; experimental). |
6+
| Flutter `tugboat` | 0.8.12 | none (Flutter `flutterRepaintBoundary` only; session identity stamp patch) |
77
| Flutter `tugboat` | 0.9.0 (planned) | Android `capture-runtime` 0.1.x and Apple `TugboatCaptureRuntime` 0.1.x |
88
| Apple `TugboatCaptureRuntime` | 0.1.0 | unpublished local CocoaPod / SwiftPM; iOS 15 live Flutter-layer CPU path |
99
| `@tugboat/react-native` || not started |

internal/docs/canaries/production-replay-acceptance.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ database receipt alone as proof that a replay is correct.
1212

1313
## Current acceptance status
1414

15-
The current SDK release candidate is **0.8.12**, which writes session schema
16-
**v10**. Capture, session schema, and fingerprints are unchanged from `0.8.11`.
17-
Native CPU screenshot capture is opt-in and **out of this production gate**
18-
until device privacy rows and performance gates pass. Production cohorts must
19-
keep `TugboatScreenshotCaptureBackend.flutterRepaintBoundary`.
15+
The current SDK release candidate is **0.8.13**, which writes session schema
16+
**v10**. Native CPU screenshot capture is opt-in and **out of this production
17+
gate** until device privacy rows and performance gates pass. Production
18+
cohorts must keep `TugboatScreenshotCaptureBackend.flutterRepaintBoundary`.
2019

2120
It preserves structural interaction replay while no longer emitting
2221
`controlValue`, `controlValueTransition`, `semanticAnnotation`, `stateAnchor`,
@@ -182,7 +181,7 @@ flows share a session, list the event IDs or timestamps that delimit each flow.
182181

183182
Wait until the collector session has finalized and the replay is available in
184183
the production website. Filter to the recorded Blend build and SDK version
185-
under test (`0.8.11` for this release), then open every recorded session.
184+
under test (`0.8.13` for this release), then open every recorded session.
186185

187186
For each interaction, inspect the actual replay UI and verify:
188187

platforms/android/CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Initial local Maven artifact `com.tugboat.sdk:capture-runtime:0.1.0`.
99
- Platform JPEG quality 80 and SHA-256 of the JPEG.
1010
- Public API recorded in `api.txt`.
1111

12-
Not published to Maven Central. Flutter 0.8.12 consumes this from
13-
`.local-maven` when the example/plugin is built after
14-
`tool/ci/build-android-runtime.sh`.
12+
Not published to Maven Central. Flutter 0.8.13 compiles this from monorepo
13+
sources. Local Maven (`.local-maven` after
14+
`tool/ci/build-android-runtime.sh`) is only for the standalone native Android
15+
sample.

sdks/flutter/packages/tugboat/CHANGELOG.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 0.8.13
22

3-
Patch release after `0.8.12`.
3+
Patch release after published `0.8.12`.
44

55
### Fixed
66

@@ -15,6 +15,20 @@ Patch release after `0.8.12`.
1515

1616
### Added
1717

18+
- Convert `tugboat` into a Flutter plugin with an experimental opt-in native
19+
CPU capture backend (`nativeCpuExperimental`) on Android (`PixelCopy`) and
20+
iOS (live Flutter-layer rendering). The default remains
21+
`flutterRepaintBoundary`, with automatic fallback when native capture is
22+
unavailable or fails safely.
23+
- Record a regenerable JPEG size envelope for the current Dart encoder so the
24+
native CPU capture path can compare codec output against the same buffers.
25+
- Native `encodeMicros` is the Pigeon capture round-trip only. Nested native
26+
stage timings stay on the backend trace so `TugboatFrame.captureMicros` does
27+
not double-count PixelCopy, dHash, JPEG, and SHA-256.
28+
- Published `TugboatFrame` records include `requestedBackend`,
29+
`resolvedBackend`, and `fallbackReason` so production screenshots identify
30+
Flutter vs native without `capture_diagnostic` events. HTTP `/v1/frames` is
31+
still JPEG-only.
1832
- `route_change` now splits route identity (`routeName`, `routeType`,
1933
`routeNamed`, and the matching `from*` fields) without changing `route`,
2034
`fromRoute`, or `navigation`.
@@ -25,34 +39,22 @@ Patch release after `0.8.12`.
2539
- Claimed route changes copy `causeTargetFingerprint` and `causeGesture` from
2640
the interaction. Overlay after-frames still capture under exploration
2741
screenshot suppression when `overlayKind` is not `page`.
42+
- Raise the example Android wrapper to Gradle 8.14 / AGP 8.11.1 / Kotlin 2.2.20
43+
so Flutter 3.47 can build a release APK for device-lab capture gates.
44+
- Document the mobile monorepo, native capture contracts, fallback, coverage,
45+
and path-aware version / license / API-surface checks. Native capture stays
46+
experimental.
2847

2948
## 0.8.12
3049

3150
Patch release after `0.8.11`.
3251

33-
### Added
52+
### Fixed
3453

35-
- Record a regenerable JPEG size envelope for the current Dart encoder so the
36-
native CPU capture path can compare codec output against the same buffers.
37-
- Convert `tugboat` into a Flutter plugin with an experimental opt-in Android
38-
native CPU capture backend (`nativeCpuExperimental`). The default remains
39-
`flutterRepaintBoundary`, with automatic fallback when native capture is
40-
unavailable or fails safely.
41-
- Add an experimental iOS native CPU path in `TugboatCaptureRuntime` 0.1.0
42-
(SwiftPM + CocoaPod). It renders the live Flutter layer so Metal content is
43-
present, then uses C++ masks/dHash and ImageIO JPEG. `drawHierarchy` remains
44-
an optional UIKit compatibility mode. Unpublished.
45-
- Native `encodeMicros` is the Pigeon capture round-trip only. Nested native
46-
stage timings stay on the backend trace so `TugboatFrame.captureMicros` does
47-
not double-count PixelCopy, dHash, JPEG, and SHA-256.
48-
- Published `TugboatFrame` records include `requestedBackend`, `resolvedBackend`,
49-
and `fallbackReason` so production screenshots identify Flutter vs native
50-
without `capture_diagnostic` events. HTTP `/v1/frames` is still JPEG-only.
51-
- Raise the example Android wrapper to Gradle 8.14 / AGP 8.11.1 / Kotlin 2.2.20
52-
so Flutter 3.47 can build a release APK for device-lab capture gates.
53-
- Document the mobile monorepo, native capture contracts, fallback, coverage,
54-
and path-aware version / license / API-surface checks. Native capture stays
55-
experimental; Flutter remains on the 0.8.12 line.
54+
- Stamp the current runtime `userId` and traits snapshot on every session
55+
lifecycle POST (`session_start`, `session_identify`, `traits_updated`,
56+
`user_changed`, `session_end`). Slim payloads had omitted identity from
57+
traits-only updates and omitted both fields from `session_end`.
5658

5759
## 0.8.11
5860

sdks/flutter/packages/tugboat/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ version `6`.
1111

1212
## 0.8.13
1313

14+
Experimental opt-in native CPU screenshot capture (`nativeCpuExperimental`) on
15+
Android (`PixelCopy`) and iOS (live Flutter-layer rendering). Keep
16+
`TugboatScreenshotCaptureBackend.flutterRepaintBoundary` in production.
17+
1418
`route_change` now carries split route identity (`routeName` / `routeType` /
1519
`routeNamed`), a closed overlay kind (`page`, `sheet`, `dialog`, `popup`,
1620
`unknown`), presentation-parent fields for overlay pushes, and a bounded
@@ -20,11 +24,9 @@ screenshot suppression.
2024

2125
## 0.8.12
2226

23-
Capture, session schema, and fingerprints are unchanged from `0.8.11`. This
24-
patch records the Dart JPEG size envelope used as the native CPU capture
25-
baseline and exposes an experimental opt-in native CPU backend on Android
26-
(`PixelCopy`) and iOS (live Flutter-layer rendering). Keep
27-
`TugboatScreenshotCaptureBackend.flutterRepaintBoundary` in production.
27+
Session lifecycle POSTs now stamp the current runtime `userId` and traits on
28+
`session_start`, `session_identify`, `traits_updated`, `user_changed`, and
29+
`session_end`.
2830

2931
## 0.8.11
3032

@@ -116,7 +118,7 @@ The package requires Dart 3.9.2 or newer and Flutter 3.35.0 or newer.
116118

117119
```yaml
118120
dependencies:
119-
tugboat_dio: ^0.8.11
121+
tugboat_dio: ^0.8.13
120122
```
121123
122124
See `../tugboat_dio/README.md`.

0 commit comments

Comments
 (0)