@testerpaykit/expo 0.4.1 → 0.6.1
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 +40 -0
- package/README.md +46 -3
- package/app.plugin.js +65 -0
- package/dist/index.d.mts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +259 -82
- package/dist/index.mjs +259 -81
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@testerpaykit/expo` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.6.0 — 2026-07-10
|
|
6
|
+
|
|
7
|
+
**Hosts can place the feedback FAB — and it finally sits where you put it.**
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- `TesterPayKitWrapper` prop `buttonPosition?: { x, y }` — passed
|
|
11
|
+
through to `FloatingFeedbackButton`'s existing `position` prop, so
|
|
12
|
+
hosts can move the FAB out of the way of their own UI (e.g.
|
|
13
|
+
bottom-left above a tab dock) without composing the FAB manually.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- `FloatingFeedbackButton.position` now positions the **FAB itself**.
|
|
17
|
+
Previously the collapsed (invisible) menu still occupied layout space
|
|
18
|
+
above the button, so the FAB rendered ~300 px below the requested
|
|
19
|
+
`y` — mid-screen for the default `(16, 100)` — and covered host
|
|
20
|
+
content. The anchor is now pinned on the FAB's side; the menu opens
|
|
21
|
+
downward from an upper-half FAB and upward from a lower-half FAB,
|
|
22
|
+
without ever moving the button. A bottom-anchored FAB no longer
|
|
23
|
+
pushes itself (or its menu) off-screen.
|
|
24
|
+
|
|
25
|
+
## 0.5.0 — 2026-06-27
|
|
26
|
+
|
|
27
|
+
**Voice bug reports no longer crash on missing native permissions.**
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- **Expo config plugin** (`app.plugin.js`). Add `"@testerpaykit/expo"`
|
|
31
|
+
to your app's `plugins` array and it injects the microphone
|
|
32
|
+
permission the voice-bug feature needs:
|
|
33
|
+
- iOS `NSMicrophoneUsageDescription` (customisable via the
|
|
34
|
+
`microphonePermission` prop; `false` opts out).
|
|
35
|
+
- Android `android.permission.RECORD_AUDIO`.
|
|
36
|
+
|
|
37
|
+
Previously the package shipped no config plugin, so integrating it
|
|
38
|
+
added nothing to native config. On iOS this meant touching the
|
|
39
|
+
microphone (voice bug report) without a usage description was a hard
|
|
40
|
+
native crash the SDK's `try/catch` could not catch. The fix is the
|
|
41
|
+
Info.plist key — now supplied automatically. **Requires a fresh
|
|
42
|
+
native build** (`npx expo prebuild --clean` / new dev-client / EAS) —
|
|
43
|
+
config-plugin changes do not apply via fast-refresh.
|
|
44
|
+
|
|
5
45
|
## 0.2.0 — 2026-05-19
|
|
6
46
|
|
|
7
47
|
**Tier-4 — Ship-ready.**
|
package/README.md
CHANGED
|
@@ -14,9 +14,52 @@ npx expo install \
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Native modules are peer-optional. Without them the related feature
|
|
17
|
-
no-ops or falls back
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
no-ops or falls back — and since 0.6.x a **dev-mode setup check** logs
|
|
18
|
+
one line per missing module at init so gaps surface at integration
|
|
19
|
+
time, not in the moment a tester hits the feature:
|
|
20
|
+
|
|
21
|
+
| Missing module | Feature that is OFF |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `react-native-view-shot` | automatic screenshots on bug reports |
|
|
24
|
+
| `react-native-record-screen` | screen recording attachments |
|
|
25
|
+
| `@shopify/react-native-skia` | screenshot annotation editor |
|
|
26
|
+
| `react-native-draggable-flatlist` | annotation layer reordering |
|
|
27
|
+
| `expo-audio` | voice bug reports (recording) |
|
|
28
|
+
| `expo-file-system` | voice note / recording upload |
|
|
29
|
+
| `expo-sensors` | shake-to-report |
|
|
30
|
+
| `expo-device` / `expo-application` | device metadata on reports |
|
|
31
|
+
|
|
32
|
+
No polyfill is required for bug-report submission: ids are generated
|
|
33
|
+
with a built-in fallback chain (`crypto.randomUUID` → `crypto.
|
|
34
|
+
getRandomValues` → `expo-crypto` → seeded `Math.random`), so
|
|
35
|
+
`react-native-get-random-values` is optional, not a hidden must.
|
|
36
|
+
|
|
37
|
+
### Microphone permission (voice bug reports)
|
|
38
|
+
|
|
39
|
+
Voice bug reports record audio. iOS **crashes** the first time the app
|
|
40
|
+
touches the microphone if `NSMicrophoneUsageDescription` is missing from
|
|
41
|
+
Info.plist — and that crash happens in the native layer, so the SDK's
|
|
42
|
+
error handling cannot catch it. Add this package's config plugin to
|
|
43
|
+
inject the iOS usage description **and** the Android `RECORD_AUDIO`
|
|
44
|
+
permission:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
// app.json
|
|
48
|
+
{
|
|
49
|
+
"expo": {
|
|
50
|
+
"plugins": [
|
|
51
|
+
["@testerpaykit/expo", {
|
|
52
|
+
"microphonePermission": "Allow $(PRODUCT_NAME) to record voice bug reports."
|
|
53
|
+
}]
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`microphonePermission` is optional (a sensible default is used) and can
|
|
60
|
+
be set to `false` to opt out entirely. **Config-plugin changes require a
|
|
61
|
+
fresh native build** (`npx expo prebuild --clean`, a new dev-client, or
|
|
62
|
+
an EAS build) — they do not apply via Metro fast-refresh.
|
|
20
63
|
|
|
21
64
|
## Quick start
|
|
22
65
|
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Expo config plugin for @testerpaykit/expo.
|
|
2
|
+
//
|
|
3
|
+
// The voice-bug feature (VoiceBugInputSheet) records audio through
|
|
4
|
+
// expo-audio. Two native facts the JS layer cannot paper over:
|
|
5
|
+
//
|
|
6
|
+
// • iOS — accessing the microphone without an
|
|
7
|
+
// NSMicrophoneUsageDescription in Info.plist is a HARD NATIVE
|
|
8
|
+
// CRASH. It happens inside the native module, so the SDK's
|
|
9
|
+
// try/catch around startRecording() can never catch it. The only
|
|
10
|
+
// fix is the usage-description key.
|
|
11
|
+
// • Android — without the RECORD_AUDIO permission the request
|
|
12
|
+
// returns { granted: false } and voice quietly disables.
|
|
13
|
+
//
|
|
14
|
+
// This plugin injects both so integrators get a working microphone by
|
|
15
|
+
// adding one line:
|
|
16
|
+
//
|
|
17
|
+
// // app.json
|
|
18
|
+
// "plugins": ["@testerpaykit/expo"]
|
|
19
|
+
//
|
|
20
|
+
// // …or with a custom iOS prompt:
|
|
21
|
+
// "plugins": [["@testerpaykit/expo", { "microphonePermission": "…" }]]
|
|
22
|
+
//
|
|
23
|
+
// Pass microphonePermission: false to opt out entirely (e.g. you don't
|
|
24
|
+
// use voice bug reports and don't want the permission on your store
|
|
25
|
+
// listing).
|
|
26
|
+
//
|
|
27
|
+
// ⚠️ Config-plugin changes only take effect after a FRESH NATIVE BUILD
|
|
28
|
+
// (`npx expo prebuild --clean`, a new dev-client, or an EAS build) —
|
|
29
|
+
// never via Metro fast-refresh.
|
|
30
|
+
|
|
31
|
+
const DEFAULT_MIC_MESSAGE =
|
|
32
|
+
'Allow $(PRODUCT_NAME) to record voice bug reports.';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @param {object} config the Expo app config
|
|
36
|
+
* @param {{ microphonePermission?: string | false }} [props]
|
|
37
|
+
*/
|
|
38
|
+
module.exports = function withTesterPayKit(config, props = {}) {
|
|
39
|
+
const micMessage =
|
|
40
|
+
props.microphonePermission === undefined
|
|
41
|
+
? DEFAULT_MIC_MESSAGE
|
|
42
|
+
: props.microphonePermission;
|
|
43
|
+
|
|
44
|
+
// Explicit opt-out — touch nothing.
|
|
45
|
+
if (micMessage === false) return config;
|
|
46
|
+
|
|
47
|
+
// iOS — required, or the app crashes on first mic access.
|
|
48
|
+
config.ios = config.ios || {};
|
|
49
|
+
config.ios.infoPlist = config.ios.infoPlist || {};
|
|
50
|
+
if (!config.ios.infoPlist.NSMicrophoneUsageDescription) {
|
|
51
|
+
config.ios.infoPlist.NSMicrophoneUsageDescription =
|
|
52
|
+
typeof micMessage === 'string' ? micMessage : DEFAULT_MIC_MESSAGE;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Android — RECORD_AUDIO uses-permission.
|
|
56
|
+
config.android = config.android || {};
|
|
57
|
+
config.android.permissions = config.android.permissions || [];
|
|
58
|
+
if (
|
|
59
|
+
!config.android.permissions.includes('android.permission.RECORD_AUDIO')
|
|
60
|
+
) {
|
|
61
|
+
config.android.permissions.push('android.permission.RECORD_AUDIO');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return config;
|
|
65
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -899,7 +899,11 @@ interface FloatingFeedbackButtonProps {
|
|
|
899
899
|
/** Notification badge value (top-right of the FAB) + the
|
|
900
900
|
* "Send N cached crashes" row count. */
|
|
901
901
|
notificationCount?: number;
|
|
902
|
-
/** Initial position
|
|
902
|
+
/** Initial position of the FAB itself (top-left corner of the 56×56
|
|
903
|
+
* button). Default (16, 100). The user can drag it. The menu opens
|
|
904
|
+
* downward when the FAB sits in the upper half of the window and
|
|
905
|
+
* upward when it sits in the lower half, so a bottom-anchored FAB
|
|
906
|
+
* (e.g. above a host tab dock) never pushes the menu off-screen. */
|
|
903
907
|
position?: {
|
|
904
908
|
x: number;
|
|
905
909
|
y: number;
|
|
@@ -1811,6 +1815,15 @@ interface TesterPayKitWrapperProps {
|
|
|
1811
1815
|
retestCount?: number;
|
|
1812
1816
|
onShowRetests?: () => void;
|
|
1813
1817
|
onViewDashboard?: () => void;
|
|
1818
|
+
/** Initial position of the floating feedback button (top-left corner
|
|
1819
|
+
* of the 56×56 FAB). Default (16, 100). Testers can still drag it —
|
|
1820
|
+
* this only sets where it starts, e.g. bottom-left above a host tab
|
|
1821
|
+
* dock so it stops covering app content. The menu opens upward when
|
|
1822
|
+
* the FAB sits in the lower half of the window. */
|
|
1823
|
+
buttonPosition?: {
|
|
1824
|
+
x: number;
|
|
1825
|
+
y: number;
|
|
1826
|
+
};
|
|
1814
1827
|
/** AI-Tester support. When all three are provided, the FAB shows an
|
|
1815
1828
|
* "Auto Test (AI)" menu entry that opens the AiRemoteControl
|
|
1816
1829
|
* surface. Phase-1 demo wiring: only the developer / coordinator
|
|
@@ -1831,7 +1844,7 @@ interface TesterPayKitWrapperProps {
|
|
|
1831
1844
|
theme?: Partial<TpkTheme>;
|
|
1832
1845
|
testID?: string;
|
|
1833
1846
|
}
|
|
1834
|
-
declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, currentScreen, sessionStartedAt, aiCoordinatorToken, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
|
|
1847
|
+
declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
|
|
1835
1848
|
|
|
1836
1849
|
interface TpkAnnotatedProps {
|
|
1837
1850
|
/** Task this element belongs to. */
|
package/dist/index.d.ts
CHANGED
|
@@ -899,7 +899,11 @@ interface FloatingFeedbackButtonProps {
|
|
|
899
899
|
/** Notification badge value (top-right of the FAB) + the
|
|
900
900
|
* "Send N cached crashes" row count. */
|
|
901
901
|
notificationCount?: number;
|
|
902
|
-
/** Initial position
|
|
902
|
+
/** Initial position of the FAB itself (top-left corner of the 56×56
|
|
903
|
+
* button). Default (16, 100). The user can drag it. The menu opens
|
|
904
|
+
* downward when the FAB sits in the upper half of the window and
|
|
905
|
+
* upward when it sits in the lower half, so a bottom-anchored FAB
|
|
906
|
+
* (e.g. above a host tab dock) never pushes the menu off-screen. */
|
|
903
907
|
position?: {
|
|
904
908
|
x: number;
|
|
905
909
|
y: number;
|
|
@@ -1811,6 +1815,15 @@ interface TesterPayKitWrapperProps {
|
|
|
1811
1815
|
retestCount?: number;
|
|
1812
1816
|
onShowRetests?: () => void;
|
|
1813
1817
|
onViewDashboard?: () => void;
|
|
1818
|
+
/** Initial position of the floating feedback button (top-left corner
|
|
1819
|
+
* of the 56×56 FAB). Default (16, 100). Testers can still drag it —
|
|
1820
|
+
* this only sets where it starts, e.g. bottom-left above a host tab
|
|
1821
|
+
* dock so it stops covering app content. The menu opens upward when
|
|
1822
|
+
* the FAB sits in the lower half of the window. */
|
|
1823
|
+
buttonPosition?: {
|
|
1824
|
+
x: number;
|
|
1825
|
+
y: number;
|
|
1826
|
+
};
|
|
1814
1827
|
/** AI-Tester support. When all three are provided, the FAB shows an
|
|
1815
1828
|
* "Auto Test (AI)" menu entry that opens the AiRemoteControl
|
|
1816
1829
|
* surface. Phase-1 demo wiring: only the developer / coordinator
|
|
@@ -1831,7 +1844,7 @@ interface TesterPayKitWrapperProps {
|
|
|
1831
1844
|
theme?: Partial<TpkTheme>;
|
|
1832
1845
|
testID?: string;
|
|
1833
1846
|
}
|
|
1834
|
-
declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, currentScreen, sessionStartedAt, aiCoordinatorToken, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
|
|
1847
|
+
declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
|
|
1835
1848
|
|
|
1836
1849
|
interface TpkAnnotatedProps {
|
|
1837
1850
|
/** Task this element belongs to. */
|