@testerpaykit/expo 0.4.1 → 0.7.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 +111 -0
- package/README.md +46 -3
- package/app.plugin.js +65 -0
- package/dist/index.d.mts +79 -11
- package/dist/index.d.ts +79 -11
- package/dist/index.js +300 -91
- package/dist/index.mjs +300 -90
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,117 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@testerpaykit/expo` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.7.0 — 2026-08-06
|
|
6
|
+
|
|
7
|
+
**Three umkreis dogfood findings: a real bug report could be a
|
|
8
|
+
fabrication, the report window hid the bug it described, and the
|
|
9
|
+
language picker never actually did anything.**
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `VoiceBugInputSheetProps.sheetOpacity?: number` (default `1`,
|
|
13
|
+
unchanged) — scales the backdrop and sheet alpha together so a host
|
|
14
|
+
can keep the screen behind the sheet legible while a tester records.
|
|
15
|
+
Previously the sheet was fully opaque no matter what.
|
|
16
|
+
- `VoiceBugInputSheetProps.voiceLanguage?: 'auto' | string` — forces
|
|
17
|
+
the Whisper language hint (any ISO-639-1 code, not just `'de'`/
|
|
18
|
+
`'en'`) instead of leaving it to the tester's chip tap. Useful for a
|
|
19
|
+
host whose tester pool speaks one known language.
|
|
20
|
+
- `VoiceExtractResult.transcriptConfidence: number` and
|
|
21
|
+
`.lowConfidence: boolean` — the server's own confidence in the
|
|
22
|
+
Whisper transcript. Below the server's threshold, `title`/
|
|
23
|
+
`description` are the RAW transcript rather than an LLM paraphrase;
|
|
24
|
+
surface this in host UI so a tester (or a coordinator, via the new
|
|
25
|
+
`bug_reports.transcript_confidence` column) can tell a clean
|
|
26
|
+
transcript from a guess.
|
|
27
|
+
- `VoiceExtractResult.detectedLanguage?: string` — Whisper's own
|
|
28
|
+
language guess, present whenever the request sent no explicit hint.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- The sheet's language chip now defaults to the **device locale**
|
|
32
|
+
(best-effort `expo-localization`, peer-optional) instead of always
|
|
33
|
+
starting at `'auto'`. In practice nobody taps a small chip mid-bug-
|
|
34
|
+
report, so `'auto'` was the value every real recording shipped with
|
|
35
|
+
— and Whisper's own auto-detect degrades on short/noisy clips.
|
|
36
|
+
- `VoiceExtractAudio.language` widened from `'de' | 'en'` to `string`
|
|
37
|
+
so a detected device locale or a host's `voiceLanguage` can pass
|
|
38
|
+
through unconstrained.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- **The language picker chip did nothing.** The client sent
|
|
42
|
+
`{ language: 'de' }`; the server route reads `body['source_language']`
|
|
43
|
+
— so the DE/EN toggle never reached Whisper, even on the rare
|
|
44
|
+
occasion a tester tapped it. Renamed to the field the server
|
|
45
|
+
actually reads.
|
|
46
|
+
- `VoiceExtractResult.sourceLanguage` was only ever set when the
|
|
47
|
+
request carried an explicit language hint — meaning it, and the
|
|
48
|
+
`bug_reports.tester_language` column it feeds, stayed `null` for
|
|
49
|
+
every voice report recorded in `'auto'` mode (which was all of
|
|
50
|
+
them). Now falls back to the server's own `detectedLanguage`.
|
|
51
|
+
|
|
52
|
+
## 0.6.1 — 2026-07-28
|
|
53
|
+
|
|
54
|
+
**Four umkreis dogfood findings from a real TestFlight integration
|
|
55
|
+
(Expo SDK 57), ordered by severity.**
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
- **Bug submission failed silently** without `crypto.getRandomValues`
|
|
59
|
+
— the `uuid` package was gone from the runtime. New `src/uuid.ts`
|
|
60
|
+
generates v4 ids via a graceful chain (`crypto.randomUUID` →
|
|
61
|
+
`crypto.getRandomValues` → `expo-crypto` → seeded `Math.random`);
|
|
62
|
+
the `react-native-get-random-values` polyfill is no longer needed.
|
|
63
|
+
- Voice notes used the dead `expo-av` API. `VoiceBugInputSheet` now
|
|
64
|
+
uses `expo-audio` (`AudioModule.AudioRecorder`, flattened
|
|
65
|
+
`RecordingPresets`); file reads go through new shared
|
|
66
|
+
`fs-legacy.ts` (`expo-file-system/legacy` first, SDK 54's split),
|
|
67
|
+
deduplicating three copies of the same fallback logic.
|
|
68
|
+
- Optional peer dependencies failed silently at the worst moment —
|
|
69
|
+
new `setup-check.ts` logs once at init (dev only) which optional
|
|
70
|
+
modules are missing and which feature each absence turns off.
|
|
71
|
+
- FAB menu ran off-screen on the right half of the display (iPhone
|
|
72
|
+
17 Pro Max) — the anchor now pins via the horizontal counterpart of
|
|
73
|
+
the existing `openUp` logic, plus a `maxWidth` so labels wrap
|
|
74
|
+
instead of clipping.
|
|
75
|
+
|
|
76
|
+
## 0.6.0 — 2026-07-10
|
|
77
|
+
|
|
78
|
+
**Hosts can place the feedback FAB — and it finally sits where you put it.**
|
|
79
|
+
|
|
80
|
+
### Added
|
|
81
|
+
- `TesterPayKitWrapper` prop `buttonPosition?: { x, y }` — passed
|
|
82
|
+
through to `FloatingFeedbackButton`'s existing `position` prop, so
|
|
83
|
+
hosts can move the FAB out of the way of their own UI (e.g.
|
|
84
|
+
bottom-left above a tab dock) without composing the FAB manually.
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
- `FloatingFeedbackButton.position` now positions the **FAB itself**.
|
|
88
|
+
Previously the collapsed (invisible) menu still occupied layout space
|
|
89
|
+
above the button, so the FAB rendered ~300 px below the requested
|
|
90
|
+
`y` — mid-screen for the default `(16, 100)` — and covered host
|
|
91
|
+
content. The anchor is now pinned on the FAB's side; the menu opens
|
|
92
|
+
downward from an upper-half FAB and upward from a lower-half FAB,
|
|
93
|
+
without ever moving the button. A bottom-anchored FAB no longer
|
|
94
|
+
pushes itself (or its menu) off-screen.
|
|
95
|
+
|
|
96
|
+
## 0.5.0 — 2026-06-27
|
|
97
|
+
|
|
98
|
+
**Voice bug reports no longer crash on missing native permissions.**
|
|
99
|
+
|
|
100
|
+
### Added
|
|
101
|
+
- **Expo config plugin** (`app.plugin.js`). Add `"@testerpaykit/expo"`
|
|
102
|
+
to your app's `plugins` array and it injects the microphone
|
|
103
|
+
permission the voice-bug feature needs:
|
|
104
|
+
- iOS `NSMicrophoneUsageDescription` (customisable via the
|
|
105
|
+
`microphonePermission` prop; `false` opts out).
|
|
106
|
+
- Android `android.permission.RECORD_AUDIO`.
|
|
107
|
+
|
|
108
|
+
Previously the package shipped no config plugin, so integrating it
|
|
109
|
+
added nothing to native config. On iOS this meant touching the
|
|
110
|
+
microphone (voice bug report) without a usage description was a hard
|
|
111
|
+
native crash the SDK's `try/catch` could not catch. The fix is the
|
|
112
|
+
Info.plist key — now supplied automatically. **Requires a fresh
|
|
113
|
+
native build** (`npx expo prebuild --clean` / new dev-client / EAS) —
|
|
114
|
+
config-plugin changes do not apply via fast-refresh.
|
|
115
|
+
|
|
5
116
|
## 0.2.0 — 2026-05-19
|
|
6
117
|
|
|
7
118
|
**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;
|
|
@@ -1629,11 +1633,17 @@ interface VoiceExtractAudio {
|
|
|
1629
1633
|
/** MIME type of the audio. Whisper accepts m4a / aac / wav / mp3 /
|
|
1630
1634
|
* webm; the server forwards whatever we send. */
|
|
1631
1635
|
mimeType: string;
|
|
1632
|
-
/**
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
|
|
1636
|
+
/**
|
|
1637
|
+
* Optional ISO-639-1 language hint forwarded to Whisper (any code
|
|
1638
|
+
* Whisper accepts, e.g. `'de'`, `'tr'`, `'ru'` — not just DE/EN;
|
|
1639
|
+
* widened from the original `'de' | 'en'` union so a host's
|
|
1640
|
+
* `voiceLanguage` prop or a detected device locale can pass through
|
|
1641
|
+
* unconstrained). When set, transcription skips language detection
|
|
1642
|
+
* and treats the audio as the given language — faster + more
|
|
1643
|
+
* accurate when the tester's language is known. Omit to let
|
|
1644
|
+
* Whisper detect.
|
|
1645
|
+
*/
|
|
1646
|
+
language?: string;
|
|
1637
1647
|
}
|
|
1638
1648
|
interface VoiceExtractResult {
|
|
1639
1649
|
/** Raw Whisper transcript. */
|
|
@@ -1645,11 +1655,38 @@ interface VoiceExtractResult {
|
|
|
1645
1655
|
/** Server enum — same set the BugReportSheet's Frequency chips use. */
|
|
1646
1656
|
frequency: 'always' | 'often' | 'sometimes' | 'rarely';
|
|
1647
1657
|
/**
|
|
1648
|
-
* Voice-bug split (A2): ISO-639-1 code the tester spoke in.
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1658
|
+
* Voice-bug split (A2): ISO-639-1 code the tester spoke in. When
|
|
1659
|
+
* the request carried an explicit hint that wins; otherwise this
|
|
1660
|
+
* is the server's OWN Whisper-detected guess (`detectedLanguage`
|
|
1661
|
+
* below) — umkreis finding #1's third ask was "fill this in even
|
|
1662
|
+
* in auto mode", not just when the host bothered to set the chip.
|
|
1651
1663
|
*/
|
|
1652
1664
|
sourceLanguage?: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* 0..1 confidence the server had in the Whisper transcript. Below
|
|
1667
|
+
* ~0.5 (see bug_enrichment.dart's `lowConfidenceThreshold`), title
|
|
1668
|
+
* and description above are the RAW transcript, not an LLM
|
|
1669
|
+
* paraphrase — the server skipped extraction rather than asking a
|
|
1670
|
+
* model to polish something it couldn't reliably read (umkreis
|
|
1671
|
+
* finding #1, 2026-08-06). Thread this through to
|
|
1672
|
+
* `BugReportDraft.transcriptConfidence` so it lands on the stored
|
|
1673
|
+
* report for a coordinator to see.
|
|
1674
|
+
*/
|
|
1675
|
+
transcriptConfidence: number;
|
|
1676
|
+
/**
|
|
1677
|
+
* Convenience flag — `transcriptConfidence < lowConfidenceThreshold`,
|
|
1678
|
+
* computed server-side so the client doesn't need to know the
|
|
1679
|
+
* threshold. Host UI can show "this looks garbled, please
|
|
1680
|
+
* re-record?" when true.
|
|
1681
|
+
*/
|
|
1682
|
+
lowConfidence: boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* ISO-639-1 code Whisper guessed on its own — only present when the
|
|
1685
|
+
* request sent no language hint (i.e. `audio.language` was unset /
|
|
1686
|
+
* `'auto'`). Unmapped Whisper language names pass through
|
|
1687
|
+
* lowercased rather than being dropped.
|
|
1688
|
+
*/
|
|
1689
|
+
detectedLanguage?: string;
|
|
1653
1690
|
}
|
|
1654
1691
|
/**
|
|
1655
1692
|
* Send an audio recording to the voice-extract endpoint and return
|
|
@@ -1696,13 +1733,35 @@ interface VoiceBugInputSheetProps {
|
|
|
1696
1733
|
/** Accent colour for the mic + active chip. Default `#D83232`
|
|
1697
1734
|
* (bug-red). Hosts that want a brand-tint can override. */
|
|
1698
1735
|
accentColor?: string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Opacity of the backdrop + sheet, together, on a 0..1 scale.
|
|
1738
|
+
* Default `1` — fully opaque, unchanged from before this prop
|
|
1739
|
+
* existed. A tester describing a bug describes what's on the
|
|
1740
|
+
* screen behind this sheet; at `1` that screen is completely
|
|
1741
|
+
* hidden while they're doing it. Lower values (e.g. `0.35`, close
|
|
1742
|
+
* to the ~30% overall coverage a host asked for) keep both layers
|
|
1743
|
+
* translucent together so the failing screen stays legible.
|
|
1744
|
+
* (umkreis finding #2, 2026-08-06.)
|
|
1745
|
+
*/
|
|
1746
|
+
sheetOpacity?: number;
|
|
1747
|
+
/**
|
|
1748
|
+
* Force the Whisper language hint instead of letting the tester
|
|
1749
|
+
* pick via the chip. Any ISO-639-1 code Whisper accepts (`'de'`,
|
|
1750
|
+
* `'tr'`, …), or `'auto'` to explicitly keep auto-detect. Use this
|
|
1751
|
+
* when the host knows its audience speaks one language —
|
|
1752
|
+
* `voiceLanguage="de"` for an all-German tester pool, say.
|
|
1753
|
+
* Overrides the device-locale default below entirely; the tester
|
|
1754
|
+
* can still tap the chip to cycle away from it.
|
|
1755
|
+
* (umkreis finding #2, 2026-08-06.)
|
|
1756
|
+
*/
|
|
1757
|
+
voiceLanguage?: 'auto' | string;
|
|
1699
1758
|
/** Host-side string overrides. Any missing key falls back to the
|
|
1700
1759
|
* German default copy. */
|
|
1701
1760
|
strings?: VoiceBugStrings;
|
|
1702
1761
|
style?: StyleProp<ViewStyle>;
|
|
1703
1762
|
testID?: string;
|
|
1704
1763
|
}
|
|
1705
|
-
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1764
|
+
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1706
1765
|
/** Maps the sheet's classification onto the BugReportSheet's
|
|
1707
1766
|
* BugReportType union. Exported so the host can call it when
|
|
1708
1767
|
* building the initialDraft for the bug sheet. */
|
|
@@ -1811,6 +1870,15 @@ interface TesterPayKitWrapperProps {
|
|
|
1811
1870
|
retestCount?: number;
|
|
1812
1871
|
onShowRetests?: () => void;
|
|
1813
1872
|
onViewDashboard?: () => void;
|
|
1873
|
+
/** Initial position of the floating feedback button (top-left corner
|
|
1874
|
+
* of the 56×56 FAB). Default (16, 100). Testers can still drag it —
|
|
1875
|
+
* this only sets where it starts, e.g. bottom-left above a host tab
|
|
1876
|
+
* dock so it stops covering app content. The menu opens upward when
|
|
1877
|
+
* the FAB sits in the lower half of the window. */
|
|
1878
|
+
buttonPosition?: {
|
|
1879
|
+
x: number;
|
|
1880
|
+
y: number;
|
|
1881
|
+
};
|
|
1814
1882
|
/** AI-Tester support. When all three are provided, the FAB shows an
|
|
1815
1883
|
* "Auto Test (AI)" menu entry that opens the AiRemoteControl
|
|
1816
1884
|
* surface. Phase-1 demo wiring: only the developer / coordinator
|
|
@@ -1831,7 +1899,7 @@ interface TesterPayKitWrapperProps {
|
|
|
1831
1899
|
theme?: Partial<TpkTheme>;
|
|
1832
1900
|
testID?: string;
|
|
1833
1901
|
}
|
|
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;
|
|
1902
|
+
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
1903
|
|
|
1836
1904
|
interface TpkAnnotatedProps {
|
|
1837
1905
|
/** 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;
|
|
@@ -1629,11 +1633,17 @@ interface VoiceExtractAudio {
|
|
|
1629
1633
|
/** MIME type of the audio. Whisper accepts m4a / aac / wav / mp3 /
|
|
1630
1634
|
* webm; the server forwards whatever we send. */
|
|
1631
1635
|
mimeType: string;
|
|
1632
|
-
/**
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
|
|
1636
|
+
/**
|
|
1637
|
+
* Optional ISO-639-1 language hint forwarded to Whisper (any code
|
|
1638
|
+
* Whisper accepts, e.g. `'de'`, `'tr'`, `'ru'` — not just DE/EN;
|
|
1639
|
+
* widened from the original `'de' | 'en'` union so a host's
|
|
1640
|
+
* `voiceLanguage` prop or a detected device locale can pass through
|
|
1641
|
+
* unconstrained). When set, transcription skips language detection
|
|
1642
|
+
* and treats the audio as the given language — faster + more
|
|
1643
|
+
* accurate when the tester's language is known. Omit to let
|
|
1644
|
+
* Whisper detect.
|
|
1645
|
+
*/
|
|
1646
|
+
language?: string;
|
|
1637
1647
|
}
|
|
1638
1648
|
interface VoiceExtractResult {
|
|
1639
1649
|
/** Raw Whisper transcript. */
|
|
@@ -1645,11 +1655,38 @@ interface VoiceExtractResult {
|
|
|
1645
1655
|
/** Server enum — same set the BugReportSheet's Frequency chips use. */
|
|
1646
1656
|
frequency: 'always' | 'often' | 'sometimes' | 'rarely';
|
|
1647
1657
|
/**
|
|
1648
|
-
* Voice-bug split (A2): ISO-639-1 code the tester spoke in.
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1658
|
+
* Voice-bug split (A2): ISO-639-1 code the tester spoke in. When
|
|
1659
|
+
* the request carried an explicit hint that wins; otherwise this
|
|
1660
|
+
* is the server's OWN Whisper-detected guess (`detectedLanguage`
|
|
1661
|
+
* below) — umkreis finding #1's third ask was "fill this in even
|
|
1662
|
+
* in auto mode", not just when the host bothered to set the chip.
|
|
1651
1663
|
*/
|
|
1652
1664
|
sourceLanguage?: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* 0..1 confidence the server had in the Whisper transcript. Below
|
|
1667
|
+
* ~0.5 (see bug_enrichment.dart's `lowConfidenceThreshold`), title
|
|
1668
|
+
* and description above are the RAW transcript, not an LLM
|
|
1669
|
+
* paraphrase — the server skipped extraction rather than asking a
|
|
1670
|
+
* model to polish something it couldn't reliably read (umkreis
|
|
1671
|
+
* finding #1, 2026-08-06). Thread this through to
|
|
1672
|
+
* `BugReportDraft.transcriptConfidence` so it lands on the stored
|
|
1673
|
+
* report for a coordinator to see.
|
|
1674
|
+
*/
|
|
1675
|
+
transcriptConfidence: number;
|
|
1676
|
+
/**
|
|
1677
|
+
* Convenience flag — `transcriptConfidence < lowConfidenceThreshold`,
|
|
1678
|
+
* computed server-side so the client doesn't need to know the
|
|
1679
|
+
* threshold. Host UI can show "this looks garbled, please
|
|
1680
|
+
* re-record?" when true.
|
|
1681
|
+
*/
|
|
1682
|
+
lowConfidence: boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* ISO-639-1 code Whisper guessed on its own — only present when the
|
|
1685
|
+
* request sent no language hint (i.e. `audio.language` was unset /
|
|
1686
|
+
* `'auto'`). Unmapped Whisper language names pass through
|
|
1687
|
+
* lowercased rather than being dropped.
|
|
1688
|
+
*/
|
|
1689
|
+
detectedLanguage?: string;
|
|
1653
1690
|
}
|
|
1654
1691
|
/**
|
|
1655
1692
|
* Send an audio recording to the voice-extract endpoint and return
|
|
@@ -1696,13 +1733,35 @@ interface VoiceBugInputSheetProps {
|
|
|
1696
1733
|
/** Accent colour for the mic + active chip. Default `#D83232`
|
|
1697
1734
|
* (bug-red). Hosts that want a brand-tint can override. */
|
|
1698
1735
|
accentColor?: string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Opacity of the backdrop + sheet, together, on a 0..1 scale.
|
|
1738
|
+
* Default `1` — fully opaque, unchanged from before this prop
|
|
1739
|
+
* existed. A tester describing a bug describes what's on the
|
|
1740
|
+
* screen behind this sheet; at `1` that screen is completely
|
|
1741
|
+
* hidden while they're doing it. Lower values (e.g. `0.35`, close
|
|
1742
|
+
* to the ~30% overall coverage a host asked for) keep both layers
|
|
1743
|
+
* translucent together so the failing screen stays legible.
|
|
1744
|
+
* (umkreis finding #2, 2026-08-06.)
|
|
1745
|
+
*/
|
|
1746
|
+
sheetOpacity?: number;
|
|
1747
|
+
/**
|
|
1748
|
+
* Force the Whisper language hint instead of letting the tester
|
|
1749
|
+
* pick via the chip. Any ISO-639-1 code Whisper accepts (`'de'`,
|
|
1750
|
+
* `'tr'`, …), or `'auto'` to explicitly keep auto-detect. Use this
|
|
1751
|
+
* when the host knows its audience speaks one language —
|
|
1752
|
+
* `voiceLanguage="de"` for an all-German tester pool, say.
|
|
1753
|
+
* Overrides the device-locale default below entirely; the tester
|
|
1754
|
+
* can still tap the chip to cycle away from it.
|
|
1755
|
+
* (umkreis finding #2, 2026-08-06.)
|
|
1756
|
+
*/
|
|
1757
|
+
voiceLanguage?: 'auto' | string;
|
|
1699
1758
|
/** Host-side string overrides. Any missing key falls back to the
|
|
1700
1759
|
* German default copy. */
|
|
1701
1760
|
strings?: VoiceBugStrings;
|
|
1702
1761
|
style?: StyleProp<ViewStyle>;
|
|
1703
1762
|
testID?: string;
|
|
1704
1763
|
}
|
|
1705
|
-
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1764
|
+
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1706
1765
|
/** Maps the sheet's classification onto the BugReportSheet's
|
|
1707
1766
|
* BugReportType union. Exported so the host can call it when
|
|
1708
1767
|
* building the initialDraft for the bug sheet. */
|
|
@@ -1811,6 +1870,15 @@ interface TesterPayKitWrapperProps {
|
|
|
1811
1870
|
retestCount?: number;
|
|
1812
1871
|
onShowRetests?: () => void;
|
|
1813
1872
|
onViewDashboard?: () => void;
|
|
1873
|
+
/** Initial position of the floating feedback button (top-left corner
|
|
1874
|
+
* of the 56×56 FAB). Default (16, 100). Testers can still drag it —
|
|
1875
|
+
* this only sets where it starts, e.g. bottom-left above a host tab
|
|
1876
|
+
* dock so it stops covering app content. The menu opens upward when
|
|
1877
|
+
* the FAB sits in the lower half of the window. */
|
|
1878
|
+
buttonPosition?: {
|
|
1879
|
+
x: number;
|
|
1880
|
+
y: number;
|
|
1881
|
+
};
|
|
1814
1882
|
/** AI-Tester support. When all three are provided, the FAB shows an
|
|
1815
1883
|
* "Auto Test (AI)" menu entry that opens the AiRemoteControl
|
|
1816
1884
|
* surface. Phase-1 demo wiring: only the developer / coordinator
|
|
@@ -1831,7 +1899,7 @@ interface TesterPayKitWrapperProps {
|
|
|
1831
1899
|
theme?: Partial<TpkTheme>;
|
|
1832
1900
|
testID?: string;
|
|
1833
1901
|
}
|
|
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;
|
|
1902
|
+
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
1903
|
|
|
1836
1904
|
interface TpkAnnotatedProps {
|
|
1837
1905
|
/** Task this element belongs to. */
|