@testerpaykit/expo 0.8.0 → 0.9.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 CHANGED
@@ -2,6 +2,62 @@
2
2
 
3
3
  All notable changes to `@testerpaykit/expo` are documented here.
4
4
 
5
+ ## 0.9.1 — 2026-10-28
6
+
7
+ **German tester surface, report sheet clear of the status bar.**
8
+
9
+ No API or core changes; works with `@testerpaykit/core` 1.2.0 and
10
+ `@testerpaykit/api-client` 1.4.0.
11
+
12
+ ### Fixed
13
+ - The bug report sheet, the screenshot editor and the end-session dialog
14
+ open as full-screen modals; their header sat under the status bar (the
15
+ clock covered the title) and the footer under the home indicator. They
16
+ now keep the safe-area insets (from `react-native-safe-area-context`
17
+ when installed, new optional peer).
18
+
19
+ ### Added
20
+ - German and English for the floating-button menu, the whole bug report
21
+ sheet and the voice sheet, chosen by device language (German devices
22
+ get German, all others English). `TesterPayKitWrapper` takes
23
+ `language="de" | "en"` to pin one. Exported: `TpkLanguageProvider`,
24
+ `useTpkLanguage`, `useTpkStrings`, `detectDeviceLanguage`,
25
+ `TPK_STRINGS`, `TpkLanguage`, `TpkStrings`.
26
+ - The voice sheet's built-in texts follow the same language (they were
27
+ German only); the `strings` prop still overrides them.
28
+
29
+ ## 0.9.0 — 2026-10-28
30
+
31
+ **Quick actions, retests judged step by step, update notice.**
32
+
33
+ Requires `@testerpaykit/core` 1.2.0 and `@testerpaykit/api-client` 1.4.0
34
+ (published together; `ai-tester` stays 0.5.0) and an API from 2026-10-28
35
+ (api.testerpaykit.com).
36
+
37
+ ### Fixed
38
+ - `getMyRetests` returned the response envelope instead of the list, so
39
+ every retest screen built on it stayed empty (`@testerpaykit/api-client`).
40
+
41
+ ### Added
42
+ - Retest acceptance steps: `RetestItem.acceptanceSteps`, and
43
+ `verifyRetest(bugId, stepVerdicts?)` / `reopenRetest(bugId, reason?,
44
+ stepVerdicts?)` send the per-step verdicts (`RetestStepVerdicts`, needs
45
+ an API from 2026-10-28). `@testerpaykit/react`'s `TpkRetestScreen` lets
46
+ the tester judge each step; "confirmed" stays disabled until all passed.
47
+ - Development builds log a warning when the API reports a newer
48
+ `@testerpaykit/expo` release than the one running, with the update
49
+ command (`npx expo install @testerpaykit/expo@latest`). The API also
50
+ mails the project's coordinator once per release and shows a notice on
51
+ the project page in the console.
52
+ - Quick actions in the voice sheet: "Geht nicht", "Versteh ich nicht",
53
+ "Sieht kaputt aus", "Fehlt mir". One tap captures the screen behind the
54
+ sheet, the API drafts the report from the screenshot
55
+ (`POST /v1/testers/me/bug-reports/quick-draft`, needs an API from
56
+ 2026-10-28), and the tester reviews it before it is submitted. Shown
57
+ when the sheet gets `captureScreen`; `TesterPayKitWrapper` passes it.
58
+ Exported: `quickDraftBug`, `QuickActionKind`.
59
+ - Expo web: screenshots need the optional `html2canvas-pro` package.
60
+
5
61
  ## 0.8.0 — 2026-10-25
6
62
 
7
63
  **AI test runs can be started from outside the app.**
package/README.md CHANGED
@@ -21,6 +21,7 @@ time, not in the moment a tester hits the feature:
21
21
  | Missing module | Feature that is OFF |
22
22
  |---|---|
23
23
  | `react-native-view-shot` | automatic screenshots on bug reports |
24
+ | `html2canvas-pro` (web only) | screenshots on Expo web — bug reports and the screens AI test runs judge |
24
25
  | `react-native-record-screen` | screen recording attachments |
25
26
  | `@shopify/react-native-skia` | screenshot annotation editor |
26
27
  | `react-native-draggable-flatlist` | annotation layer reordering |
@@ -323,6 +324,21 @@ if (note) {
323
324
  }
324
325
  ```
325
326
 
327
+ ## Language
328
+
329
+ Menu, bug report and voice sheet speak German on German devices and
330
+ English everywhere else (device language via `expo-localization`). To
331
+ pin one language for all testers:
332
+
333
+ ```tsx
334
+ <TesterPayKitWrapper tpk={tpk} language="de">
335
+ <YourApp />
336
+ </TesterPayKitWrapper>
337
+ ```
338
+
339
+ Standalone sheets outside the wrapper take the same setting from
340
+ `<TpkLanguageProvider language="de">`.
341
+
326
342
  ## AI test runs started from outside
327
343
 
328
344
  The wrapper can hand the app to an AI tester that a coordinator starts
package/dist/index.d.mts CHANGED
@@ -1613,6 +1613,115 @@ interface TpkIconProps {
1613
1613
  }
1614
1614
  declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
1615
1615
 
1616
+ type TpkLanguage = 'de' | 'en';
1617
+ /** The device's UI language, reduced to `de` / `en`. */
1618
+ declare function detectDeviceLanguage(): TpkLanguage;
1619
+ /** Pins the UI language for every TPK surface below it. `undefined`
1620
+ * keeps device detection. */
1621
+ declare function TpkLanguageProvider({ language, children, }: {
1622
+ language?: TpkLanguage;
1623
+ children: ReactNode;
1624
+ }): React.JSX.Element;
1625
+ declare function useTpkLanguage(): TpkLanguage;
1626
+ declare function useTpkStrings(): TpkStrings;
1627
+ interface TpkStrings {
1628
+ menuReportBug: string;
1629
+ menuFeedback: string;
1630
+ menuAutoTest: string;
1631
+ menuCachedCrashes: (count: number) => string;
1632
+ menuWorkboard: string;
1633
+ menuMyBugs: string;
1634
+ menuSessionDetails: string;
1635
+ menuMessages: string;
1636
+ menuRetests: string;
1637
+ menuDebugLogs: string;
1638
+ menuEndSession: string;
1639
+ menuSessionEarnings: string;
1640
+ menuOpen: string;
1641
+ menuClose: string;
1642
+ reportTitle: string;
1643
+ reportClose: string;
1644
+ reportSpeak: string;
1645
+ stepTitles: readonly [string, string, string, string, string];
1646
+ cancel: string;
1647
+ back: string;
1648
+ continue: string;
1649
+ submit: string;
1650
+ typeBug: string;
1651
+ typeBugDescription: string;
1652
+ typeCrash: string;
1653
+ typeCrashDescription: string;
1654
+ typeUiIssue: string;
1655
+ typeUiIssueDescription: string;
1656
+ typePerformance: string;
1657
+ typePerformanceDescription: string;
1658
+ typeFeature: string;
1659
+ typeFeatureDescription: string;
1660
+ typeFeedback: string;
1661
+ typeFeedbackDescription: string;
1662
+ severityCritical: string;
1663
+ severityCriticalDescription: string;
1664
+ severityHigh: string;
1665
+ severityHighDescription: string;
1666
+ severityMedium: string;
1667
+ severityMediumDescription: string;
1668
+ severityLow: string;
1669
+ severityLowDescription: string;
1670
+ frequencyAlways: string;
1671
+ frequencyOften: string;
1672
+ frequencySometimes: string;
1673
+ frequencyOnce: string;
1674
+ fieldTitle: string;
1675
+ fieldTitlePlaceholder: string;
1676
+ fieldDescription: string;
1677
+ fieldDescriptionPlaceholder: string;
1678
+ fieldExpected: string;
1679
+ fieldExpectedPlaceholder: string;
1680
+ fieldActual: string;
1681
+ fieldActualPlaceholder: string;
1682
+ fieldFrequency: string;
1683
+ fieldComponent: string;
1684
+ fieldComponentPlaceholder: string;
1685
+ attachments: string;
1686
+ attachScreenshot: string;
1687
+ attachImage: string;
1688
+ attachFile: string;
1689
+ attachA11y: (label: string) => string;
1690
+ removeA11y: (name: string) => string;
1691
+ stepsAdd: string;
1692
+ stepsPlaceholder: string;
1693
+ stepsAddA11y: string;
1694
+ stepsEmpty: string;
1695
+ stepsReorderHint: string;
1696
+ stepsDragA11y: (n: number) => string;
1697
+ stepsRemoveA11y: (n: number) => string;
1698
+ reviewType: string;
1699
+ reviewSeverity: string;
1700
+ reviewTitle: string;
1701
+ reviewDescription: string;
1702
+ reviewExpected: string;
1703
+ reviewActual: string;
1704
+ reviewFrequency: string;
1705
+ reviewComponent: string;
1706
+ reviewSteps: string;
1707
+ reviewAttachments: string;
1708
+ reviewEmpty: string;
1709
+ errorRejected: string;
1710
+ errorFailed: string;
1711
+ errorAttachmentLimit: (max: number) => string;
1712
+ errorAttachmentSize: (maxMB: number) => string;
1713
+ errorNoCaptureRef: string;
1714
+ errorNeedsViewShot: string;
1715
+ errorScreenshotFailed: string;
1716
+ errorNeedsImagePicker: string;
1717
+ errorImageNoData: string;
1718
+ errorImagePickFailed: string;
1719
+ errorNeedsDocumentPicker: string;
1720
+ errorFileUnreadable: string;
1721
+ errorFilePickFailed: string;
1722
+ }
1723
+ declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
1724
+
1616
1725
  interface TpkTheme {
1617
1726
  primary: string;
1618
1727
  errorColour: string;
@@ -1720,10 +1829,25 @@ interface VoiceExtractResult {
1720
1829
  * surface a retry UI.
1721
1830
  */
1722
1831
  declare function extractVoiceBug(tpk: Pick<TpkExpo, 'api'>, audio: VoiceExtractAudio): Promise<VoiceExtractResult>;
1832
+ /** One-tap report kinds of the sheet's quick actions (server wire names). */
1833
+ type QuickActionKind = 'broken' | 'confusing' | 'looks_broken' | 'missing';
1834
+ /**
1835
+ * Ask the server for a report draft written from a screenshot of the
1836
+ * screen the tester is on — the quick-action path next to voice. Returns
1837
+ * the same shape as {@link extractVoiceBug} so the review step and the
1838
+ * bug-report pre-fill stay one code path; `transcript` is empty because
1839
+ * nobody spoke.
1840
+ */
1841
+ declare function quickDraftBug(tpk: Pick<TpkExpo, 'api'>, input: {
1842
+ action: QuickActionKind;
1843
+ screenshotBase64: string;
1844
+ screenName?: string;
1845
+ language?: string;
1846
+ }): Promise<VoiceExtractResult>;
1723
1847
 
1724
1848
  type VoiceClassification = 'bug' | 'featureRequest' | 'idea' | 'issue';
1725
1849
  /** Per-string overrides — pass to host-localise. Any unset value
1726
- * falls back to the German default (matches the Flutter consumer). */
1850
+ * falls back to the default for the UI language (German or English). */
1727
1851
  interface VoiceBugStrings {
1728
1852
  languagePickerLabel?: string;
1729
1853
  classificationBug?: string;
@@ -1744,6 +1868,15 @@ interface VoiceBugStrings {
1744
1868
  retry?: string;
1745
1869
  useExtracted?: string;
1746
1870
  rerecord?: string;
1871
+ quickHint?: string;
1872
+ quickBroken?: string;
1873
+ quickConfusing?: string;
1874
+ quickLooksBroken?: string;
1875
+ quickMissing?: string;
1876
+ quickProcessingDescription?: string;
1877
+ quickExtractedDescription?: string;
1878
+ quickNoScreenshot?: string;
1879
+ back?: string;
1747
1880
  }
1748
1881
  interface VoiceBugInputSheetProps {
1749
1882
  visible: boolean;
@@ -1781,12 +1914,21 @@ interface VoiceBugInputSheetProps {
1781
1914
  */
1782
1915
  voiceLanguage?: 'auto' | string;
1783
1916
  /** Host-side string overrides. Any missing key falls back to the
1784
- * German default copy. */
1917
+ * default copy for the UI language. */
1785
1918
  strings?: VoiceBugStrings;
1919
+ /**
1920
+ * Base64 PNG of the app screen behind the sheet. When set, the sheet
1921
+ * offers the quick actions (Geht nicht / Versteh ich nicht / Sieht
1922
+ * kaputt aus / Fehlt mir): one tap, and a vision model drafts the
1923
+ * report from this screenshot. The wrapper passes its root capture.
1924
+ */
1925
+ captureScreen?: () => Promise<string | null>;
1926
+ /** Screen name sent along with a quick action (model context). */
1927
+ currentScreen?: string;
1786
1928
  style?: StyleProp<ViewStyle>;
1787
1929
  testID?: string;
1788
1930
  }
1789
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1931
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1790
1932
  /** Maps the sheet's classification onto the BugReportSheet's
1791
1933
  * BugReportType union. Exported so the host can call it when
1792
1934
  * building the initialDraft for the bug sheet. */
@@ -1930,9 +2072,13 @@ interface TesterPayKitWrapperProps {
1930
2072
  * bug-red + slate defaults. See `TpkTheme` for the four
1931
2073
  * supported tokens. */
1932
2074
  theme?: Partial<TpkTheme>;
2075
+ /** UI language of the tester surface (menu, bug report, voice
2076
+ * sheet): 'de' or 'en'. Default: the device language (German on
2077
+ * German devices, English otherwise). */
2078
+ language?: TpkLanguage;
1933
2079
  testID?: string;
1934
2080
  }
1935
- declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiRemoteTrigger, aiRemotePollSeconds, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
2081
+ declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiRemoteTrigger, aiRemotePollSeconds, aiProjectId, aiApiBaseUrl, theme, language, testID, }: TesterPayKitWrapperProps): React.ReactElement;
1936
2082
 
1937
2083
  interface TpkAnnotatedProps {
1938
2084
  /** Task this element belongs to. */
@@ -2273,5 +2419,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
2273
2419
  payoutLimit?: number;
2274
2420
  }): UseEarningsResult;
2275
2421
 
2276
- export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkWelcomeSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureView, classificationToBugType, createBugReportDraft, deriveTaskProgress, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, findAssignmentForTask, getAppSnapshot, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, mockBugFixes, mockBuildInfo, mockFocusAreas, mockWelcomeBrief, mockWelcomeTasks, mockWidgets, parseVersionRange, pathToSvgD, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
2277
- export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, CircleShape, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, FeedbackCategory, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, Point, QueueFlushOptions, QueueFlushResult, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, SubmitBugInput, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkWelcomeSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };
2422
+ export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_STRINGS, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkWelcomeSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureView, classificationToBugType, createBugReportDraft, deriveTaskProgress, detectDeviceLanguage, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, findAssignmentForTask, getAppSnapshot, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, mockBugFixes, mockBuildInfo, mockFocusAreas, mockWelcomeBrief, mockWelcomeTasks, mockWidgets, parseVersionRange, pathToSvgD, quickDraftBug, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkStrings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
2423
+ export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, CircleShape, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, FeedbackCategory, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, SubmitBugInput, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkWelcomeSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };
package/dist/index.d.ts CHANGED
@@ -1613,6 +1613,115 @@ interface TpkIconProps {
1613
1613
  }
1614
1614
  declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
1615
1615
 
1616
+ type TpkLanguage = 'de' | 'en';
1617
+ /** The device's UI language, reduced to `de` / `en`. */
1618
+ declare function detectDeviceLanguage(): TpkLanguage;
1619
+ /** Pins the UI language for every TPK surface below it. `undefined`
1620
+ * keeps device detection. */
1621
+ declare function TpkLanguageProvider({ language, children, }: {
1622
+ language?: TpkLanguage;
1623
+ children: ReactNode;
1624
+ }): React.JSX.Element;
1625
+ declare function useTpkLanguage(): TpkLanguage;
1626
+ declare function useTpkStrings(): TpkStrings;
1627
+ interface TpkStrings {
1628
+ menuReportBug: string;
1629
+ menuFeedback: string;
1630
+ menuAutoTest: string;
1631
+ menuCachedCrashes: (count: number) => string;
1632
+ menuWorkboard: string;
1633
+ menuMyBugs: string;
1634
+ menuSessionDetails: string;
1635
+ menuMessages: string;
1636
+ menuRetests: string;
1637
+ menuDebugLogs: string;
1638
+ menuEndSession: string;
1639
+ menuSessionEarnings: string;
1640
+ menuOpen: string;
1641
+ menuClose: string;
1642
+ reportTitle: string;
1643
+ reportClose: string;
1644
+ reportSpeak: string;
1645
+ stepTitles: readonly [string, string, string, string, string];
1646
+ cancel: string;
1647
+ back: string;
1648
+ continue: string;
1649
+ submit: string;
1650
+ typeBug: string;
1651
+ typeBugDescription: string;
1652
+ typeCrash: string;
1653
+ typeCrashDescription: string;
1654
+ typeUiIssue: string;
1655
+ typeUiIssueDescription: string;
1656
+ typePerformance: string;
1657
+ typePerformanceDescription: string;
1658
+ typeFeature: string;
1659
+ typeFeatureDescription: string;
1660
+ typeFeedback: string;
1661
+ typeFeedbackDescription: string;
1662
+ severityCritical: string;
1663
+ severityCriticalDescription: string;
1664
+ severityHigh: string;
1665
+ severityHighDescription: string;
1666
+ severityMedium: string;
1667
+ severityMediumDescription: string;
1668
+ severityLow: string;
1669
+ severityLowDescription: string;
1670
+ frequencyAlways: string;
1671
+ frequencyOften: string;
1672
+ frequencySometimes: string;
1673
+ frequencyOnce: string;
1674
+ fieldTitle: string;
1675
+ fieldTitlePlaceholder: string;
1676
+ fieldDescription: string;
1677
+ fieldDescriptionPlaceholder: string;
1678
+ fieldExpected: string;
1679
+ fieldExpectedPlaceholder: string;
1680
+ fieldActual: string;
1681
+ fieldActualPlaceholder: string;
1682
+ fieldFrequency: string;
1683
+ fieldComponent: string;
1684
+ fieldComponentPlaceholder: string;
1685
+ attachments: string;
1686
+ attachScreenshot: string;
1687
+ attachImage: string;
1688
+ attachFile: string;
1689
+ attachA11y: (label: string) => string;
1690
+ removeA11y: (name: string) => string;
1691
+ stepsAdd: string;
1692
+ stepsPlaceholder: string;
1693
+ stepsAddA11y: string;
1694
+ stepsEmpty: string;
1695
+ stepsReorderHint: string;
1696
+ stepsDragA11y: (n: number) => string;
1697
+ stepsRemoveA11y: (n: number) => string;
1698
+ reviewType: string;
1699
+ reviewSeverity: string;
1700
+ reviewTitle: string;
1701
+ reviewDescription: string;
1702
+ reviewExpected: string;
1703
+ reviewActual: string;
1704
+ reviewFrequency: string;
1705
+ reviewComponent: string;
1706
+ reviewSteps: string;
1707
+ reviewAttachments: string;
1708
+ reviewEmpty: string;
1709
+ errorRejected: string;
1710
+ errorFailed: string;
1711
+ errorAttachmentLimit: (max: number) => string;
1712
+ errorAttachmentSize: (maxMB: number) => string;
1713
+ errorNoCaptureRef: string;
1714
+ errorNeedsViewShot: string;
1715
+ errorScreenshotFailed: string;
1716
+ errorNeedsImagePicker: string;
1717
+ errorImageNoData: string;
1718
+ errorImagePickFailed: string;
1719
+ errorNeedsDocumentPicker: string;
1720
+ errorFileUnreadable: string;
1721
+ errorFilePickFailed: string;
1722
+ }
1723
+ declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
1724
+
1616
1725
  interface TpkTheme {
1617
1726
  primary: string;
1618
1727
  errorColour: string;
@@ -1720,10 +1829,25 @@ interface VoiceExtractResult {
1720
1829
  * surface a retry UI.
1721
1830
  */
1722
1831
  declare function extractVoiceBug(tpk: Pick<TpkExpo, 'api'>, audio: VoiceExtractAudio): Promise<VoiceExtractResult>;
1832
+ /** One-tap report kinds of the sheet's quick actions (server wire names). */
1833
+ type QuickActionKind = 'broken' | 'confusing' | 'looks_broken' | 'missing';
1834
+ /**
1835
+ * Ask the server for a report draft written from a screenshot of the
1836
+ * screen the tester is on — the quick-action path next to voice. Returns
1837
+ * the same shape as {@link extractVoiceBug} so the review step and the
1838
+ * bug-report pre-fill stay one code path; `transcript` is empty because
1839
+ * nobody spoke.
1840
+ */
1841
+ declare function quickDraftBug(tpk: Pick<TpkExpo, 'api'>, input: {
1842
+ action: QuickActionKind;
1843
+ screenshotBase64: string;
1844
+ screenName?: string;
1845
+ language?: string;
1846
+ }): Promise<VoiceExtractResult>;
1723
1847
 
1724
1848
  type VoiceClassification = 'bug' | 'featureRequest' | 'idea' | 'issue';
1725
1849
  /** Per-string overrides — pass to host-localise. Any unset value
1726
- * falls back to the German default (matches the Flutter consumer). */
1850
+ * falls back to the default for the UI language (German or English). */
1727
1851
  interface VoiceBugStrings {
1728
1852
  languagePickerLabel?: string;
1729
1853
  classificationBug?: string;
@@ -1744,6 +1868,15 @@ interface VoiceBugStrings {
1744
1868
  retry?: string;
1745
1869
  useExtracted?: string;
1746
1870
  rerecord?: string;
1871
+ quickHint?: string;
1872
+ quickBroken?: string;
1873
+ quickConfusing?: string;
1874
+ quickLooksBroken?: string;
1875
+ quickMissing?: string;
1876
+ quickProcessingDescription?: string;
1877
+ quickExtractedDescription?: string;
1878
+ quickNoScreenshot?: string;
1879
+ back?: string;
1747
1880
  }
1748
1881
  interface VoiceBugInputSheetProps {
1749
1882
  visible: boolean;
@@ -1781,12 +1914,21 @@ interface VoiceBugInputSheetProps {
1781
1914
  */
1782
1915
  voiceLanguage?: 'auto' | string;
1783
1916
  /** Host-side string overrides. Any missing key falls back to the
1784
- * German default copy. */
1917
+ * default copy for the UI language. */
1785
1918
  strings?: VoiceBugStrings;
1919
+ /**
1920
+ * Base64 PNG of the app screen behind the sheet. When set, the sheet
1921
+ * offers the quick actions (Geht nicht / Versteh ich nicht / Sieht
1922
+ * kaputt aus / Fehlt mir): one tap, and a vision model drafts the
1923
+ * report from this screenshot. The wrapper passes its root capture.
1924
+ */
1925
+ captureScreen?: () => Promise<string | null>;
1926
+ /** Screen name sent along with a quick action (model context). */
1927
+ currentScreen?: string;
1786
1928
  style?: StyleProp<ViewStyle>;
1787
1929
  testID?: string;
1788
1930
  }
1789
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1931
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1790
1932
  /** Maps the sheet's classification onto the BugReportSheet's
1791
1933
  * BugReportType union. Exported so the host can call it when
1792
1934
  * building the initialDraft for the bug sheet. */
@@ -1930,9 +2072,13 @@ interface TesterPayKitWrapperProps {
1930
2072
  * bug-red + slate defaults. See `TpkTheme` for the four
1931
2073
  * supported tokens. */
1932
2074
  theme?: Partial<TpkTheme>;
2075
+ /** UI language of the tester surface (menu, bug report, voice
2076
+ * sheet): 'de' or 'en'. Default: the device language (German on
2077
+ * German devices, English otherwise). */
2078
+ language?: TpkLanguage;
1933
2079
  testID?: string;
1934
2080
  }
1935
- declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiRemoteTrigger, aiRemotePollSeconds, aiProjectId, aiApiBaseUrl, theme, testID, }: TesterPayKitWrapperProps): React.ReactElement;
2081
+ declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, buttonPosition, currentScreen, sessionStartedAt, aiCoordinatorToken, aiRemoteTrigger, aiRemotePollSeconds, aiProjectId, aiApiBaseUrl, theme, language, testID, }: TesterPayKitWrapperProps): React.ReactElement;
1936
2082
 
1937
2083
  interface TpkAnnotatedProps {
1938
2084
  /** Task this element belongs to. */
@@ -2273,5 +2419,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
2273
2419
  payoutLimit?: number;
2274
2420
  }): UseEarningsResult;
2275
2421
 
2276
- export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkWelcomeSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureView, classificationToBugType, createBugReportDraft, deriveTaskProgress, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, findAssignmentForTask, getAppSnapshot, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, mockBugFixes, mockBuildInfo, mockFocusAreas, mockWelcomeBrief, mockWelcomeTasks, mockWidgets, parseVersionRange, pathToSvgD, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
2277
- export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, CircleShape, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, FeedbackCategory, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, Point, QueueFlushOptions, QueueFlushResult, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, SubmitBugInput, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkWelcomeSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };
2422
+ export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_STRINGS, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkWelcomeSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureView, classificationToBugType, createBugReportDraft, deriveTaskProgress, detectDeviceLanguage, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, findAssignmentForTask, getAppSnapshot, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, mockBugFixes, mockBuildInfo, mockFocusAreas, mockWelcomeBrief, mockWelcomeTasks, mockWidgets, parseVersionRange, pathToSvgD, quickDraftBug, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkStrings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
2423
+ export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, CircleShape, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, FeedbackCategory, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, SubmitBugInput, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkWelcomeSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };