Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/main-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1435,22 +1435,27 @@ jobs:
disk-size: 8G
disable-animations: true
emulator-options: -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect
script: |
echo "Verifying JAVA_HOME: $JAVA_HOME"
java -version
echo "Setting up adb reverse port forwarding..."
adb reverse tcp:8000 tcp:8000
echo "Running E2E tests..."
pnpm run implementation:react-native-sdk -- test:e2e:android:run:release -- --loglevel error --retries 1 --shard=${{ matrix.shard }}/2

- name: Capture Android E2E diagnostics on failure
if: failure()
# The action runs each script line separately and tears down the emulator before returning.
# Keep tests and failure-time adb diagnostics in one shell command so adb can still reach it.
script: >-
set -e;
echo "Verifying JAVA_HOME: $JAVA_HOME";
java -version;
echo "Setting up adb reverse port forwarding...";
adb reverse tcp:8000 tcp:8000;
echo "Running E2E tests...";
if pnpm run implementation:react-native-sdk -- test:e2e:android:run:release -- --loglevel error --retries 1 --shard=${{ matrix.shard }}/2; then exit 0; else test_status=$?; fi;
mkdir -p /tmp/react-native-e2e-diagnostics || true;
timeout --signal=TERM --kill-after=5s 10s adb reverse --list > /tmp/react-native-e2e-diagnostics/adb-reverse-list.txt 2>&1 || true;
timeout --signal=TERM --kill-after=5s 20s adb logcat -d -v threadtime > /tmp/react-native-e2e-diagnostics/android-logcat.txt 2>&1 || true;
exit "$test_status"

- name: Capture host E2E diagnostics
if: always()
run: |
echo "=== Mock Server Logs ==="
cat /tmp/mock-server.log || echo "No mock server logs found"
mkdir -p /tmp/react-native-e2e-diagnostics
adb reverse --list > /tmp/react-native-e2e-diagnostics/adb-reverse-list.txt 2>&1 || true
adb logcat -d -v threadtime > /tmp/react-native-e2e-diagnostics/android-logcat.txt 2>&1 || true
find /tmp -maxdepth 1 -name '*.detox.jsonl' -exec cp {} /tmp/react-native-e2e-diagnostics/ \; 2>/dev/null || true

- name: Stop Mock Server
Expand Down
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ explicitly requests it.
impact crosses package families or is uncertain, use aggregate `pnpm size:report` for the complete
inventory, then `pnpm size:check` after classification.
- On failure, report the command, package or bundle, budget, actual size, and delta.
- For an explicitly approved increase to an exceeded budget, or a request to normalize budgets,
set each budget in the authorized scope to `ceil((measuredGzipBytes + 100) / 100) * 100`: add
100 bytes to the measured gzip size, then round up to a multiple of 100 bytes. Use the
completed build's `size:report` measurement, including reachable local chunks/assets counted by the
checker; do not calculate from the previous budget or an isolated entry file. Normalization
applies to every requested entry, including budgets that decrease or already satisfy their
limit. This calculation does not authorize additional budget changes or waive the approval,
failure-classification, scope, and validation rules in this section.
- Allowed remediation is limited to confirmed current-change regressions, dependency/import
mistakes, and measurement issues. Every remediation must preserve maintainability: do not make
code harder to read, type, test, debug, or change just to reduce bytes. Prefer fixes such as
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ that surface.
The published package surface is intentionally layered. The table below is a package inventory and
high-level role summary.

| Package | Kind | Runtime | Role | Package README |
| -------------------------------------------- | --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `@contentful/optimization-web` | Environment SDK | Browser | Stateful browser SDK for optimization, tracking, and consent | [Web SDK](./packages/web/web-sdk/README.md) |
| `@contentful/optimization-react-web` | Framework SDK | React on the web | React integration layer on top of the Web SDK | [React Web SDK](./packages/web/frameworks/react-web-sdk/README.md) |
| `@contentful/optimization-nextjs` | Framework SDK | Next.js | Next.js adapter for explicit App Router and Pages Router bound components, SSR, client tracking, and request composition | [Next.js SDK](./packages/web/frameworks/nextjs-sdk/README.md) |
| `@contentful/optimization-node` | Environment SDK | Node.js | Stateless Node SDK for server-side and SSR integrations | [Node SDK](./packages/node/node-sdk/README.md) |
| `@contentful/optimization-react-native` | Environment SDK | React Native | React Native SDK for mobile applications | [React Native SDK](./packages/react-native-sdk/README.md) |
| `@contentful/optimization-web-preview-panel` | Tooling package | Browser | Preview tooling package for existing Web SDK instances | [Web Preview Panel](./packages/web/preview-panel/README.md) |
| `@contentful/optimization-core` | Shared SDK foundation | Runtime-agnostic | Shared optimization foundation, CDA schemas, and aggregate schema pass-throughs for runtime adapters and SDK layers | [Core SDK](./packages/universal/core-sdk/README.md) |
| `@contentful/optimization-api-client` | Universal library | Runtime-agnostic | Direct Experience API and Insights API transport with their validation schemas | [API Client](./packages/universal/api-client/README.md) |
| `@contentful/optimization-api-schemas` | Compatibility facade | Runtime-agnostic | Deprecated compatibility facade for the historical combined API-schema root surface | [API Schemas](./packages/universal/api-schemas/README.md) |
| Package | Kind | Runtime | Role | Package README |
| -------------------------------------------- | --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| `@contentful/optimization-web` | Environment SDK | Browser | Stateful browser SDK for optimization, tracking, and consent | [Web SDK](./packages/web/web-sdk/README.md) |
| `@contentful/optimization-react-web` | Framework SDK | React on the web | React integration layer on top of the Web SDK | [React Web SDK](./packages/web/frameworks/react-web-sdk/README.md) |
| `@contentful/optimization-nextjs` | Framework SDK | Next.js | Next.js adapter for request preview handoff, browser queue commitment, SSR, and router composition | [Next.js SDK](./packages/web/frameworks/nextjs-sdk/README.md) |
| `@contentful/optimization-node` | Environment SDK | Node.js | Stateless Node SDK for server-side and SSR integrations | [Node SDK](./packages/node/node-sdk/README.md) |
| `@contentful/optimization-react-native` | Environment SDK | React Native | React Native SDK for mobile applications | [React Native SDK](./packages/react-native-sdk/README.md) |
| `@contentful/optimization-web-preview-panel` | Tooling package | Browser | Preview tooling package for existing Web SDK instances | [Web Preview Panel](./packages/web/preview-panel/README.md) |
| `@contentful/optimization-core` | Shared SDK foundation | Runtime-agnostic | Shared optimization foundation, CDA schemas, and aggregate schema pass-throughs for runtime adapters and SDK layers | [Core SDK](./packages/universal/core-sdk/README.md) |
| `@contentful/optimization-api-client` | Universal library | Runtime-agnostic | Direct Experience API and Insights API transport with their validation schemas | [API Client](./packages/universal/api-client/README.md) |
| `@contentful/optimization-api-schemas` | Compatibility facade | Runtime-agnostic | Deprecated compatibility facade for the historical combined API-schema root surface | [API Schemas](./packages/universal/api-schemas/README.md) |

General selection rules:

Expand Down Expand Up @@ -133,10 +133,10 @@ patterns with intentionally minimal application code.
SDK
- [Node SSR + Web Vanilla](./implementations/node-sdk+web-sdk/README.md) - split server/browser flow
using Node and Web SDKs together
- [Next.js SDK App Router](./implementations/nextjs-sdk_app-router/README.md) - Next.js App Router
first-paint SSR with browser-side takeover after hydration
- [Next.js SDK Pages Router](./implementations/nextjs-sdk_pages-router/README.md) - Next.js Pages
Router integration using `getServerSideProps` state handoff
- [Next.js SDK App Router](./implementations/nextjs-sdk_app-router/README.md) - request-preview SSR
with browser queue commitment after hydration
- [Next.js SDK Pages Router](./implementations/nextjs-sdk_pages-router/README.md) - Pages Router
integration using `getServerSideProps` prepared handoff
- [React Native](./implementations/react-native-sdk/README.md) - mobile application integration for
Android and iOS targets
- [iOS Reference App](./implementations/ios-sdk/README.md) - native app and XCUITest surface for
Expand Down
Loading
Loading