@testerpaykit/expo 0.8.0 → 0.9.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 +32 -0
- package/README.md +1 -0
- package/dist/index.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +150 -10
- package/dist/index.mjs +149 -10
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@testerpaykit/expo` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.9.0 — 2026-10-28
|
|
6
|
+
|
|
7
|
+
**Quick actions, retests judged step by step, update notice.**
|
|
8
|
+
|
|
9
|
+
Requires `@testerpaykit/core` 1.2.0 and `@testerpaykit/api-client` 1.4.0
|
|
10
|
+
(published together; `ai-tester` stays 0.5.0) and an API from 2026-10-28
|
|
11
|
+
(api.testerpaykit.com).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `getMyRetests` returned the response envelope instead of the list, so
|
|
15
|
+
every retest screen built on it stayed empty (`@testerpaykit/api-client`).
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Retest acceptance steps: `RetestItem.acceptanceSteps`, and
|
|
19
|
+
`verifyRetest(bugId, stepVerdicts?)` / `reopenRetest(bugId, reason?,
|
|
20
|
+
stepVerdicts?)` send the per-step verdicts (`RetestStepVerdicts`, needs
|
|
21
|
+
an API from 2026-10-28). `@testerpaykit/react`'s `TpkRetestScreen` lets
|
|
22
|
+
the tester judge each step; "confirmed" stays disabled until all passed.
|
|
23
|
+
- Development builds log a warning when the API reports a newer
|
|
24
|
+
`@testerpaykit/expo` release than the one running, with the update
|
|
25
|
+
command (`npx expo install @testerpaykit/expo@latest`). The API also
|
|
26
|
+
mails the project's coordinator once per release and shows a notice on
|
|
27
|
+
the project page in the console.
|
|
28
|
+
- Quick actions in the voice sheet: "Geht nicht", "Versteh ich nicht",
|
|
29
|
+
"Sieht kaputt aus", "Fehlt mir". One tap captures the screen behind the
|
|
30
|
+
sheet, the API drafts the report from the screenshot
|
|
31
|
+
(`POST /v1/testers/me/bug-reports/quick-draft`, needs an API from
|
|
32
|
+
2026-10-28), and the tester reviews it before it is submitted. Shown
|
|
33
|
+
when the sheet gets `captureScreen`; `TesterPayKitWrapper` passes it.
|
|
34
|
+
Exported: `quickDraftBug`, `QuickActionKind`.
|
|
35
|
+
- Expo web: screenshots need the optional `html2canvas-pro` package.
|
|
36
|
+
|
|
5
37
|
## 0.8.0 — 2026-10-25
|
|
6
38
|
|
|
7
39
|
**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 |
|
package/dist/index.d.mts
CHANGED
|
@@ -1720,6 +1720,21 @@ interface VoiceExtractResult {
|
|
|
1720
1720
|
* surface a retry UI.
|
|
1721
1721
|
*/
|
|
1722
1722
|
declare function extractVoiceBug(tpk: Pick<TpkExpo, 'api'>, audio: VoiceExtractAudio): Promise<VoiceExtractResult>;
|
|
1723
|
+
/** One-tap report kinds of the sheet's quick actions (server wire names). */
|
|
1724
|
+
type QuickActionKind = 'broken' | 'confusing' | 'looks_broken' | 'missing';
|
|
1725
|
+
/**
|
|
1726
|
+
* Ask the server for a report draft written from a screenshot of the
|
|
1727
|
+
* screen the tester is on — the quick-action path next to voice. Returns
|
|
1728
|
+
* the same shape as {@link extractVoiceBug} so the review step and the
|
|
1729
|
+
* bug-report pre-fill stay one code path; `transcript` is empty because
|
|
1730
|
+
* nobody spoke.
|
|
1731
|
+
*/
|
|
1732
|
+
declare function quickDraftBug(tpk: Pick<TpkExpo, 'api'>, input: {
|
|
1733
|
+
action: QuickActionKind;
|
|
1734
|
+
screenshotBase64: string;
|
|
1735
|
+
screenName?: string;
|
|
1736
|
+
language?: string;
|
|
1737
|
+
}): Promise<VoiceExtractResult>;
|
|
1723
1738
|
|
|
1724
1739
|
type VoiceClassification = 'bug' | 'featureRequest' | 'idea' | 'issue';
|
|
1725
1740
|
/** Per-string overrides — pass to host-localise. Any unset value
|
|
@@ -1744,6 +1759,15 @@ interface VoiceBugStrings {
|
|
|
1744
1759
|
retry?: string;
|
|
1745
1760
|
useExtracted?: string;
|
|
1746
1761
|
rerecord?: string;
|
|
1762
|
+
quickHint?: string;
|
|
1763
|
+
quickBroken?: string;
|
|
1764
|
+
quickConfusing?: string;
|
|
1765
|
+
quickLooksBroken?: string;
|
|
1766
|
+
quickMissing?: string;
|
|
1767
|
+
quickProcessingDescription?: string;
|
|
1768
|
+
quickExtractedDescription?: string;
|
|
1769
|
+
quickNoScreenshot?: string;
|
|
1770
|
+
back?: string;
|
|
1747
1771
|
}
|
|
1748
1772
|
interface VoiceBugInputSheetProps {
|
|
1749
1773
|
visible: boolean;
|
|
@@ -1783,10 +1807,19 @@ interface VoiceBugInputSheetProps {
|
|
|
1783
1807
|
/** Host-side string overrides. Any missing key falls back to the
|
|
1784
1808
|
* German default copy. */
|
|
1785
1809
|
strings?: VoiceBugStrings;
|
|
1810
|
+
/**
|
|
1811
|
+
* Base64 PNG of the app screen behind the sheet. When set, the sheet
|
|
1812
|
+
* offers the quick actions (Geht nicht / Versteh ich nicht / Sieht
|
|
1813
|
+
* kaputt aus / Fehlt mir): one tap, and a vision model drafts the
|
|
1814
|
+
* report from this screenshot. The wrapper passes its root capture.
|
|
1815
|
+
*/
|
|
1816
|
+
captureScreen?: () => Promise<string | null>;
|
|
1817
|
+
/** Screen name sent along with a quick action (model context). */
|
|
1818
|
+
currentScreen?: string;
|
|
1786
1819
|
style?: StyleProp<ViewStyle>;
|
|
1787
1820
|
testID?: string;
|
|
1788
1821
|
}
|
|
1789
|
-
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1822
|
+
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1790
1823
|
/** Maps the sheet's classification onto the BugReportSheet's
|
|
1791
1824
|
* BugReportType union. Exported so the host can call it when
|
|
1792
1825
|
* building the initialDraft for the bug sheet. */
|
|
@@ -2273,5 +2306,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
|
|
|
2273
2306
|
payoutLimit?: number;
|
|
2274
2307
|
}): UseEarningsResult;
|
|
2275
2308
|
|
|
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 };
|
|
2309
|
+
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, quickDraftBug, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
|
|
2310
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1720,6 +1720,21 @@ interface VoiceExtractResult {
|
|
|
1720
1720
|
* surface a retry UI.
|
|
1721
1721
|
*/
|
|
1722
1722
|
declare function extractVoiceBug(tpk: Pick<TpkExpo, 'api'>, audio: VoiceExtractAudio): Promise<VoiceExtractResult>;
|
|
1723
|
+
/** One-tap report kinds of the sheet's quick actions (server wire names). */
|
|
1724
|
+
type QuickActionKind = 'broken' | 'confusing' | 'looks_broken' | 'missing';
|
|
1725
|
+
/**
|
|
1726
|
+
* Ask the server for a report draft written from a screenshot of the
|
|
1727
|
+
* screen the tester is on — the quick-action path next to voice. Returns
|
|
1728
|
+
* the same shape as {@link extractVoiceBug} so the review step and the
|
|
1729
|
+
* bug-report pre-fill stay one code path; `transcript` is empty because
|
|
1730
|
+
* nobody spoke.
|
|
1731
|
+
*/
|
|
1732
|
+
declare function quickDraftBug(tpk: Pick<TpkExpo, 'api'>, input: {
|
|
1733
|
+
action: QuickActionKind;
|
|
1734
|
+
screenshotBase64: string;
|
|
1735
|
+
screenName?: string;
|
|
1736
|
+
language?: string;
|
|
1737
|
+
}): Promise<VoiceExtractResult>;
|
|
1723
1738
|
|
|
1724
1739
|
type VoiceClassification = 'bug' | 'featureRequest' | 'idea' | 'issue';
|
|
1725
1740
|
/** Per-string overrides — pass to host-localise. Any unset value
|
|
@@ -1744,6 +1759,15 @@ interface VoiceBugStrings {
|
|
|
1744
1759
|
retry?: string;
|
|
1745
1760
|
useExtracted?: string;
|
|
1746
1761
|
rerecord?: string;
|
|
1762
|
+
quickHint?: string;
|
|
1763
|
+
quickBroken?: string;
|
|
1764
|
+
quickConfusing?: string;
|
|
1765
|
+
quickLooksBroken?: string;
|
|
1766
|
+
quickMissing?: string;
|
|
1767
|
+
quickProcessingDescription?: string;
|
|
1768
|
+
quickExtractedDescription?: string;
|
|
1769
|
+
quickNoScreenshot?: string;
|
|
1770
|
+
back?: string;
|
|
1747
1771
|
}
|
|
1748
1772
|
interface VoiceBugInputSheetProps {
|
|
1749
1773
|
visible: boolean;
|
|
@@ -1783,10 +1807,19 @@ interface VoiceBugInputSheetProps {
|
|
|
1783
1807
|
/** Host-side string overrides. Any missing key falls back to the
|
|
1784
1808
|
* German default copy. */
|
|
1785
1809
|
strings?: VoiceBugStrings;
|
|
1810
|
+
/**
|
|
1811
|
+
* Base64 PNG of the app screen behind the sheet. When set, the sheet
|
|
1812
|
+
* offers the quick actions (Geht nicht / Versteh ich nicht / Sieht
|
|
1813
|
+
* kaputt aus / Fehlt mir): one tap, and a vision model drafts the
|
|
1814
|
+
* report from this screenshot. The wrapper passes its root capture.
|
|
1815
|
+
*/
|
|
1816
|
+
captureScreen?: () => Promise<string | null>;
|
|
1817
|
+
/** Screen name sent along with a quick action (model context). */
|
|
1818
|
+
currentScreen?: string;
|
|
1786
1819
|
style?: StyleProp<ViewStyle>;
|
|
1787
1820
|
testID?: string;
|
|
1788
1821
|
}
|
|
1789
|
-
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1822
|
+
declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
|
|
1790
1823
|
/** Maps the sheet's classification onto the BugReportSheet's
|
|
1791
1824
|
* BugReportType union. Exported so the host can call it when
|
|
1792
1825
|
* building the initialDraft for the bug sheet. */
|
|
@@ -2273,5 +2306,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
|
|
|
2273
2306
|
payoutLimit?: number;
|
|
2274
2307
|
}): UseEarningsResult;
|
|
2275
2308
|
|
|
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 };
|
|
2309
|
+
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, quickDraftBug, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkTheme, versionSatisfies, widgetDiscovery, withNativeCapture };
|
|
2310
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -190,6 +190,7 @@ __export(index_exports, {
|
|
|
190
190
|
mockWidgets: () => mockWidgets,
|
|
191
191
|
parseVersionRange: () => parseVersionRange,
|
|
192
192
|
pathToSvgD: () => pathToSvgD,
|
|
193
|
+
quickDraftBug: () => quickDraftBug,
|
|
193
194
|
resetOnboardingState: () => resetOnboardingState,
|
|
194
195
|
resetWelcomeBriefAck: () => resetWelcomeBriefAck,
|
|
195
196
|
resetWidgetTourSeen: () => resetWidgetTourSeen,
|
|
@@ -1208,7 +1209,7 @@ function findAssignmentForTask(tasks, key) {
|
|
|
1208
1209
|
}
|
|
1209
1210
|
|
|
1210
1211
|
// package.json
|
|
1211
|
-
var version = "0.
|
|
1212
|
+
var version = "0.9.0";
|
|
1212
1213
|
|
|
1213
1214
|
// src/version.ts
|
|
1214
1215
|
var SDK_VERSION = `@testerpaykit/expo/${version}`;
|
|
@@ -1903,6 +1904,12 @@ async function startServerSession(api, projectId) {
|
|
|
1903
1904
|
appVersion: appSnapshot.version,
|
|
1904
1905
|
sdkVersion: SDK_VERSION
|
|
1905
1906
|
});
|
|
1907
|
+
if (typeof __DEV__ !== "undefined" && __DEV__ && session.sdkUpdate) {
|
|
1908
|
+
const u = session.sdkUpdate;
|
|
1909
|
+
console.warn(
|
|
1910
|
+
`[testerpaykit/expo] ${u.package} ${u.current} is outdated \u2014 ${u.latest} is out. Update: ${u.command}`
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1906
1913
|
return session.id;
|
|
1907
1914
|
}
|
|
1908
1915
|
async function loadPersistedSession(storage, projectId, testerCode) {
|
|
@@ -7727,6 +7734,25 @@ async function extractVoiceBug(tpk, audio) {
|
|
|
7727
7734
|
sourceLanguage: audio.language ?? result.detectedLanguage
|
|
7728
7735
|
};
|
|
7729
7736
|
}
|
|
7737
|
+
async function quickDraftBug(tpk, input) {
|
|
7738
|
+
const client = tpk.api.client;
|
|
7739
|
+
if (!client) {
|
|
7740
|
+
throw new Error("TpkExpo client did not expose an axios instance.");
|
|
7741
|
+
}
|
|
7742
|
+
const response = await client.post("/v1/testers/me/bug-reports/quick-draft", {
|
|
7743
|
+
action: input.action,
|
|
7744
|
+
screenshot_base64: input.screenshotBase64,
|
|
7745
|
+
...input.screenName ? { screen_name: input.screenName } : {},
|
|
7746
|
+
...input.language ? { language: input.language } : {}
|
|
7747
|
+
});
|
|
7748
|
+
return {
|
|
7749
|
+
...response.data,
|
|
7750
|
+
transcript: "",
|
|
7751
|
+
transcriptConfidence: 1,
|
|
7752
|
+
lowConfidence: false,
|
|
7753
|
+
sourceLanguage: input.language
|
|
7754
|
+
};
|
|
7755
|
+
}
|
|
7730
7756
|
|
|
7731
7757
|
// src/VoiceBugInputSheet.tsx
|
|
7732
7758
|
var DEFAULT_STRINGS = {
|
|
@@ -7748,8 +7774,38 @@ var DEFAULT_STRINGS = {
|
|
|
7748
7774
|
cancel: "Abbrechen",
|
|
7749
7775
|
retry: "Nochmal versuchen",
|
|
7750
7776
|
useExtracted: "\xDCbernehmen \u2192",
|
|
7751
|
-
rerecord: "Nochmal aufnehmen"
|
|
7777
|
+
rerecord: "Nochmal aufnehmen",
|
|
7778
|
+
quickHint: "Oder mit einem Tipp \u2014 wir lesen den Screen:",
|
|
7779
|
+
quickBroken: "Geht nicht",
|
|
7780
|
+
quickConfusing: "Versteh ich nicht",
|
|
7781
|
+
quickLooksBroken: "Sieht kaputt aus",
|
|
7782
|
+
quickMissing: "Fehlt mir",
|
|
7783
|
+
quickProcessingDescription: "Die KI schaut sich den Screen an und schreibt einen Entwurf. ~3-5 Sekunden.",
|
|
7784
|
+
quickExtractedDescription: "Entwurf aus dem Screenshot \u2014 pr\xFCf jede Zeile, bevor du \xFCbernimmst. Nichts wird ohne dich gesendet.",
|
|
7785
|
+
quickNoScreenshot: "Vom Screen lie\xDF sich kein Bild aufnehmen.",
|
|
7786
|
+
back: "Zur\xFCck"
|
|
7752
7787
|
};
|
|
7788
|
+
var QUICK_ACTIONS = [
|
|
7789
|
+
{ kind: "broken", emoji: "\u{1F6AB}", label: "quickBroken", classification: "bug" },
|
|
7790
|
+
{
|
|
7791
|
+
kind: "confusing",
|
|
7792
|
+
emoji: "\u{1F914}",
|
|
7793
|
+
label: "quickConfusing",
|
|
7794
|
+
classification: "issue"
|
|
7795
|
+
},
|
|
7796
|
+
{
|
|
7797
|
+
kind: "looks_broken",
|
|
7798
|
+
emoji: "\u{1F9E9}",
|
|
7799
|
+
label: "quickLooksBroken",
|
|
7800
|
+
classification: "issue"
|
|
7801
|
+
},
|
|
7802
|
+
{
|
|
7803
|
+
kind: "missing",
|
|
7804
|
+
emoji: "\u2795",
|
|
7805
|
+
label: "quickMissing",
|
|
7806
|
+
classification: "featureRequest"
|
|
7807
|
+
}
|
|
7808
|
+
];
|
|
7753
7809
|
var CLASSIFICATIONS = [
|
|
7754
7810
|
"bug",
|
|
7755
7811
|
"featureRequest",
|
|
@@ -7766,6 +7822,8 @@ function VoiceBugInputSheet({
|
|
|
7766
7822
|
sheetOpacity = 1,
|
|
7767
7823
|
voiceLanguage,
|
|
7768
7824
|
strings,
|
|
7825
|
+
captureScreen,
|
|
7826
|
+
currentScreen,
|
|
7769
7827
|
style,
|
|
7770
7828
|
testID = "tpk-voice-bug-sheet"
|
|
7771
7829
|
}) {
|
|
@@ -7778,6 +7836,7 @@ function VoiceBugInputSheet({
|
|
|
7778
7836
|
const [seconds, setSeconds] = (0, import_react16.useState)(0);
|
|
7779
7837
|
const [error, setError] = (0, import_react16.useState)(null);
|
|
7780
7838
|
const [result, setResult] = (0, import_react16.useState)(null);
|
|
7839
|
+
const [quickMode, setQuickMode] = (0, import_react16.useState)(false);
|
|
7781
7840
|
const [language, setLanguage] = (0, import_react16.useState)(
|
|
7782
7841
|
voiceLanguage ?? "auto"
|
|
7783
7842
|
);
|
|
@@ -7921,10 +7980,37 @@ function VoiceBugInputSheet({
|
|
|
7921
7980
|
recorderRef.current = null;
|
|
7922
7981
|
onCancel();
|
|
7923
7982
|
}, [onCancel]);
|
|
7983
|
+
const runQuick = (0, import_react16.useCallback)(
|
|
7984
|
+
async (action) => {
|
|
7985
|
+
if (phase !== "idle" || !captureScreen) return;
|
|
7986
|
+
setQuickMode(true);
|
|
7987
|
+
setClassification(action.classification);
|
|
7988
|
+
setError(null);
|
|
7989
|
+
setPhase("uploading");
|
|
7990
|
+
try {
|
|
7991
|
+
const shot = await captureScreen();
|
|
7992
|
+
if (!shot) throw new Error(S.quickNoScreenshot);
|
|
7993
|
+
if (!tpk) throw new Error("SDK not ready \u2014 try again in a moment.");
|
|
7994
|
+
const draft = await quickDraftBug(tpk, {
|
|
7995
|
+
action: action.kind,
|
|
7996
|
+
screenshotBase64: shot,
|
|
7997
|
+
screenName: currentScreen,
|
|
7998
|
+
language: language === "auto" ? void 0 : language
|
|
7999
|
+
});
|
|
8000
|
+
setResult(draft);
|
|
8001
|
+
setPhase("extracted");
|
|
8002
|
+
} catch (e) {
|
|
8003
|
+
setPhase("error");
|
|
8004
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
8005
|
+
}
|
|
8006
|
+
},
|
|
8007
|
+
[phase, captureScreen, tpk, currentScreen, language, S]
|
|
8008
|
+
);
|
|
7924
8009
|
const useResult = (0, import_react16.useCallback)(() => {
|
|
7925
8010
|
if (result) onExtracted(result, classification);
|
|
7926
8011
|
}, [result, classification, onExtracted]);
|
|
7927
8012
|
const retryFresh = (0, import_react16.useCallback)(() => {
|
|
8013
|
+
setQuickMode(false);
|
|
7928
8014
|
setResult(null);
|
|
7929
8015
|
setSeconds(0);
|
|
7930
8016
|
setError(null);
|
|
@@ -7951,13 +8037,13 @@ function VoiceBugInputSheet({
|
|
|
7951
8037
|
case "recording":
|
|
7952
8038
|
return S.recordingDescription;
|
|
7953
8039
|
case "uploading":
|
|
7954
|
-
return S.processingDescription;
|
|
8040
|
+
return quickMode ? S.quickProcessingDescription : S.processingDescription;
|
|
7955
8041
|
case "extracted":
|
|
7956
|
-
return S.extractedDescription;
|
|
8042
|
+
return quickMode ? S.quickExtractedDescription : S.extractedDescription;
|
|
7957
8043
|
case "error":
|
|
7958
8044
|
return error ?? S.errorDescriptionFallback;
|
|
7959
8045
|
}
|
|
7960
|
-
}, [phase, error, S]);
|
|
8046
|
+
}, [phase, error, S, quickMode]);
|
|
7961
8047
|
const classificationLabel = (0, import_react16.useCallback)(
|
|
7962
8048
|
(c) => {
|
|
7963
8049
|
switch (c) {
|
|
@@ -8108,7 +8194,7 @@ function VoiceBugInputSheet({
|
|
|
8108
8194
|
style: styles11.extractedScroll,
|
|
8109
8195
|
contentContainerStyle: styles11.extractedScrollContent
|
|
8110
8196
|
},
|
|
8111
|
-
/* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.transcriptCard }, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.transcriptLabel }, "Transcript"), /* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.transcriptText }, result.transcript || "(empty)")),
|
|
8197
|
+
quickMode ? null : /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.transcriptCard }, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.transcriptLabel }, "Transcript"), /* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.transcriptText }, result.transcript || "(empty)")),
|
|
8112
8198
|
/* @__PURE__ */ import_react16.default.createElement(ExtractField, { label: "Title", value: result.title }),
|
|
8113
8199
|
/* @__PURE__ */ import_react16.default.createElement(
|
|
8114
8200
|
ExtractField,
|
|
@@ -8132,7 +8218,22 @@ function VoiceBugInputSheet({
|
|
|
8132
8218
|
}
|
|
8133
8219
|
),
|
|
8134
8220
|
/* @__PURE__ */ import_react16.default.createElement(ExtractField, { label: "Frequency", value: result.frequency })
|
|
8135
|
-
), /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.
|
|
8221
|
+
), isIdle && captureScreen ? /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.quickBlock }, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.quickHint }, S.quickHint), /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.quickGrid }, QUICK_ACTIONS.map((a) => /* @__PURE__ */ import_react16.default.createElement(
|
|
8222
|
+
import_react_native16.Pressable,
|
|
8223
|
+
{
|
|
8224
|
+
key: a.kind,
|
|
8225
|
+
accessibilityRole: "button",
|
|
8226
|
+
accessibilityLabel: S[a.label],
|
|
8227
|
+
testID: `tpk-quick-${a.kind}`,
|
|
8228
|
+
onPress: () => void runQuick(a),
|
|
8229
|
+
style: ({ pressed }) => [
|
|
8230
|
+
styles11.quickButton,
|
|
8231
|
+
pressed && { opacity: 0.8 }
|
|
8232
|
+
]
|
|
8233
|
+
},
|
|
8234
|
+
/* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.quickEmoji }, a.emoji),
|
|
8235
|
+
/* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.quickLabel }, S[a.label])
|
|
8236
|
+
)))) : null, /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { style: styles11.primaryRow }, isIdle && /* @__PURE__ */ import_react16.default.createElement(
|
|
8136
8237
|
import_react_native16.Pressable,
|
|
8137
8238
|
{
|
|
8138
8239
|
accessibilityRole: "button",
|
|
@@ -8176,7 +8277,7 @@ function VoiceBugInputSheet({
|
|
|
8176
8277
|
pressed && { opacity: 0.85 }
|
|
8177
8278
|
]
|
|
8178
8279
|
},
|
|
8179
|
-
/* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.secondaryButtonLabel }, isError ? S.retry : S.rerecord)
|
|
8280
|
+
/* @__PURE__ */ import_react16.default.createElement(import_react_native16.Text, { style: styles11.secondaryButtonLabel }, quickMode ? S.back : isError ? S.retry : S.rerecord)
|
|
8180
8281
|
), isExtracted && /* @__PURE__ */ import_react16.default.createElement(
|
|
8181
8282
|
import_react_native16.Pressable,
|
|
8182
8283
|
{
|
|
@@ -8468,6 +8569,41 @@ var styles11 = import_react_native16.StyleSheet.create({
|
|
|
8468
8569
|
marginTop: 8,
|
|
8469
8570
|
lineHeight: 20
|
|
8470
8571
|
},
|
|
8572
|
+
quickBlock: {
|
|
8573
|
+
marginTop: 16
|
|
8574
|
+
},
|
|
8575
|
+
quickHint: {
|
|
8576
|
+
color: "#94A3B8",
|
|
8577
|
+
fontSize: 13,
|
|
8578
|
+
textAlign: "center",
|
|
8579
|
+
marginBottom: 8
|
|
8580
|
+
},
|
|
8581
|
+
quickGrid: {
|
|
8582
|
+
flexDirection: "row",
|
|
8583
|
+
flexWrap: "wrap",
|
|
8584
|
+
gap: 8
|
|
8585
|
+
},
|
|
8586
|
+
quickButton: {
|
|
8587
|
+
flexGrow: 1,
|
|
8588
|
+
flexBasis: "45%",
|
|
8589
|
+
flexDirection: "row",
|
|
8590
|
+
alignItems: "center",
|
|
8591
|
+
gap: 8,
|
|
8592
|
+
paddingHorizontal: 12,
|
|
8593
|
+
paddingVertical: 12,
|
|
8594
|
+
borderRadius: 12,
|
|
8595
|
+
backgroundColor: "rgba(255,255,255,0.08)",
|
|
8596
|
+
borderWidth: 1,
|
|
8597
|
+
borderColor: "rgba(255,255,255,0.15)"
|
|
8598
|
+
},
|
|
8599
|
+
quickEmoji: {
|
|
8600
|
+
fontSize: 18
|
|
8601
|
+
},
|
|
8602
|
+
quickLabel: {
|
|
8603
|
+
color: "#F1F5F9",
|
|
8604
|
+
fontSize: 14,
|
|
8605
|
+
fontWeight: "600"
|
|
8606
|
+
},
|
|
8471
8607
|
timer: {
|
|
8472
8608
|
fontSize: 40,
|
|
8473
8609
|
fontWeight: "700",
|
|
@@ -10401,7 +10537,8 @@ function TesterPayKitWrapper({
|
|
|
10401
10537
|
// Voice-bug split (A2): the title/description above are the
|
|
10402
10538
|
// tester's O-Ton. Carry the transcript + language so submit
|
|
10403
10539
|
// stores the author view + derives the English enriched fields.
|
|
10404
|
-
|
|
10540
|
+
// Quick actions have no spoken O-Ton — leave it unset then.
|
|
10541
|
+
transcript: result.transcript || void 0,
|
|
10405
10542
|
sourceLanguage: result.sourceLanguage
|
|
10406
10543
|
});
|
|
10407
10544
|
setVoiceOpen(false);
|
|
@@ -10501,7 +10638,9 @@ function TesterPayKitWrapper({
|
|
|
10501
10638
|
visible: voiceOpen,
|
|
10502
10639
|
tpk,
|
|
10503
10640
|
onCancel: () => setVoiceOpen(false),
|
|
10504
|
-
onExtracted: handleVoiceExtracted
|
|
10641
|
+
onExtracted: handleVoiceExtracted,
|
|
10642
|
+
currentScreen: currentScreen ?? void 0,
|
|
10643
|
+
captureScreen: async () => (await captureView(rootRef))?.base64 ?? null
|
|
10505
10644
|
}
|
|
10506
10645
|
),
|
|
10507
10646
|
/* @__PURE__ */ import_react23.default.createElement(
|
|
@@ -11012,6 +11151,7 @@ function useTpkEarnings(tpk, options = {}) {
|
|
|
11012
11151
|
mockWidgets,
|
|
11013
11152
|
parseVersionRange,
|
|
11014
11153
|
pathToSvgD,
|
|
11154
|
+
quickDraftBug,
|
|
11015
11155
|
resetOnboardingState,
|
|
11016
11156
|
resetWelcomeBriefAck,
|
|
11017
11157
|
resetWidgetTourSeen,
|
package/dist/index.mjs
CHANGED
|
@@ -1003,7 +1003,7 @@ function findAssignmentForTask(tasks, key) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
1005
|
// package.json
|
|
1006
|
-
var version = "0.
|
|
1006
|
+
var version = "0.9.0";
|
|
1007
1007
|
|
|
1008
1008
|
// src/version.ts
|
|
1009
1009
|
var SDK_VERSION = `@testerpaykit/expo/${version}`;
|
|
@@ -1698,6 +1698,12 @@ async function startServerSession(api, projectId) {
|
|
|
1698
1698
|
appVersion: appSnapshot.version,
|
|
1699
1699
|
sdkVersion: SDK_VERSION
|
|
1700
1700
|
});
|
|
1701
|
+
if (typeof __DEV__ !== "undefined" && __DEV__ && session.sdkUpdate) {
|
|
1702
|
+
const u = session.sdkUpdate;
|
|
1703
|
+
console.warn(
|
|
1704
|
+
`[testerpaykit/expo] ${u.package} ${u.current} is outdated \u2014 ${u.latest} is out. Update: ${u.command}`
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1701
1707
|
return session.id;
|
|
1702
1708
|
}
|
|
1703
1709
|
async function loadPersistedSession(storage, projectId, testerCode) {
|
|
@@ -7633,6 +7639,25 @@ async function extractVoiceBug(tpk, audio) {
|
|
|
7633
7639
|
sourceLanguage: audio.language ?? result.detectedLanguage
|
|
7634
7640
|
};
|
|
7635
7641
|
}
|
|
7642
|
+
async function quickDraftBug(tpk, input) {
|
|
7643
|
+
const client = tpk.api.client;
|
|
7644
|
+
if (!client) {
|
|
7645
|
+
throw new Error("TpkExpo client did not expose an axios instance.");
|
|
7646
|
+
}
|
|
7647
|
+
const response = await client.post("/v1/testers/me/bug-reports/quick-draft", {
|
|
7648
|
+
action: input.action,
|
|
7649
|
+
screenshot_base64: input.screenshotBase64,
|
|
7650
|
+
...input.screenName ? { screen_name: input.screenName } : {},
|
|
7651
|
+
...input.language ? { language: input.language } : {}
|
|
7652
|
+
});
|
|
7653
|
+
return {
|
|
7654
|
+
...response.data,
|
|
7655
|
+
transcript: "",
|
|
7656
|
+
transcriptConfidence: 1,
|
|
7657
|
+
lowConfidence: false,
|
|
7658
|
+
sourceLanguage: input.language
|
|
7659
|
+
};
|
|
7660
|
+
}
|
|
7636
7661
|
|
|
7637
7662
|
// src/VoiceBugInputSheet.tsx
|
|
7638
7663
|
var DEFAULT_STRINGS = {
|
|
@@ -7654,8 +7679,38 @@ var DEFAULT_STRINGS = {
|
|
|
7654
7679
|
cancel: "Abbrechen",
|
|
7655
7680
|
retry: "Nochmal versuchen",
|
|
7656
7681
|
useExtracted: "\xDCbernehmen \u2192",
|
|
7657
|
-
rerecord: "Nochmal aufnehmen"
|
|
7682
|
+
rerecord: "Nochmal aufnehmen",
|
|
7683
|
+
quickHint: "Oder mit einem Tipp \u2014 wir lesen den Screen:",
|
|
7684
|
+
quickBroken: "Geht nicht",
|
|
7685
|
+
quickConfusing: "Versteh ich nicht",
|
|
7686
|
+
quickLooksBroken: "Sieht kaputt aus",
|
|
7687
|
+
quickMissing: "Fehlt mir",
|
|
7688
|
+
quickProcessingDescription: "Die KI schaut sich den Screen an und schreibt einen Entwurf. ~3-5 Sekunden.",
|
|
7689
|
+
quickExtractedDescription: "Entwurf aus dem Screenshot \u2014 pr\xFCf jede Zeile, bevor du \xFCbernimmst. Nichts wird ohne dich gesendet.",
|
|
7690
|
+
quickNoScreenshot: "Vom Screen lie\xDF sich kein Bild aufnehmen.",
|
|
7691
|
+
back: "Zur\xFCck"
|
|
7658
7692
|
};
|
|
7693
|
+
var QUICK_ACTIONS = [
|
|
7694
|
+
{ kind: "broken", emoji: "\u{1F6AB}", label: "quickBroken", classification: "bug" },
|
|
7695
|
+
{
|
|
7696
|
+
kind: "confusing",
|
|
7697
|
+
emoji: "\u{1F914}",
|
|
7698
|
+
label: "quickConfusing",
|
|
7699
|
+
classification: "issue"
|
|
7700
|
+
},
|
|
7701
|
+
{
|
|
7702
|
+
kind: "looks_broken",
|
|
7703
|
+
emoji: "\u{1F9E9}",
|
|
7704
|
+
label: "quickLooksBroken",
|
|
7705
|
+
classification: "issue"
|
|
7706
|
+
},
|
|
7707
|
+
{
|
|
7708
|
+
kind: "missing",
|
|
7709
|
+
emoji: "\u2795",
|
|
7710
|
+
label: "quickMissing",
|
|
7711
|
+
classification: "featureRequest"
|
|
7712
|
+
}
|
|
7713
|
+
];
|
|
7659
7714
|
var CLASSIFICATIONS = [
|
|
7660
7715
|
"bug",
|
|
7661
7716
|
"featureRequest",
|
|
@@ -7672,6 +7727,8 @@ function VoiceBugInputSheet({
|
|
|
7672
7727
|
sheetOpacity = 1,
|
|
7673
7728
|
voiceLanguage,
|
|
7674
7729
|
strings,
|
|
7730
|
+
captureScreen,
|
|
7731
|
+
currentScreen,
|
|
7675
7732
|
style,
|
|
7676
7733
|
testID = "tpk-voice-bug-sheet"
|
|
7677
7734
|
}) {
|
|
@@ -7684,6 +7741,7 @@ function VoiceBugInputSheet({
|
|
|
7684
7741
|
const [seconds, setSeconds] = useState11(0);
|
|
7685
7742
|
const [error, setError] = useState11(null);
|
|
7686
7743
|
const [result, setResult] = useState11(null);
|
|
7744
|
+
const [quickMode, setQuickMode] = useState11(false);
|
|
7687
7745
|
const [language, setLanguage] = useState11(
|
|
7688
7746
|
voiceLanguage ?? "auto"
|
|
7689
7747
|
);
|
|
@@ -7827,10 +7885,37 @@ function VoiceBugInputSheet({
|
|
|
7827
7885
|
recorderRef.current = null;
|
|
7828
7886
|
onCancel();
|
|
7829
7887
|
}, [onCancel]);
|
|
7888
|
+
const runQuick = useCallback7(
|
|
7889
|
+
async (action) => {
|
|
7890
|
+
if (phase !== "idle" || !captureScreen) return;
|
|
7891
|
+
setQuickMode(true);
|
|
7892
|
+
setClassification(action.classification);
|
|
7893
|
+
setError(null);
|
|
7894
|
+
setPhase("uploading");
|
|
7895
|
+
try {
|
|
7896
|
+
const shot = await captureScreen();
|
|
7897
|
+
if (!shot) throw new Error(S.quickNoScreenshot);
|
|
7898
|
+
if (!tpk) throw new Error("SDK not ready \u2014 try again in a moment.");
|
|
7899
|
+
const draft = await quickDraftBug(tpk, {
|
|
7900
|
+
action: action.kind,
|
|
7901
|
+
screenshotBase64: shot,
|
|
7902
|
+
screenName: currentScreen,
|
|
7903
|
+
language: language === "auto" ? void 0 : language
|
|
7904
|
+
});
|
|
7905
|
+
setResult(draft);
|
|
7906
|
+
setPhase("extracted");
|
|
7907
|
+
} catch (e) {
|
|
7908
|
+
setPhase("error");
|
|
7909
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
7910
|
+
}
|
|
7911
|
+
},
|
|
7912
|
+
[phase, captureScreen, tpk, currentScreen, language, S]
|
|
7913
|
+
);
|
|
7830
7914
|
const useResult = useCallback7(() => {
|
|
7831
7915
|
if (result) onExtracted(result, classification);
|
|
7832
7916
|
}, [result, classification, onExtracted]);
|
|
7833
7917
|
const retryFresh = useCallback7(() => {
|
|
7918
|
+
setQuickMode(false);
|
|
7834
7919
|
setResult(null);
|
|
7835
7920
|
setSeconds(0);
|
|
7836
7921
|
setError(null);
|
|
@@ -7857,13 +7942,13 @@ function VoiceBugInputSheet({
|
|
|
7857
7942
|
case "recording":
|
|
7858
7943
|
return S.recordingDescription;
|
|
7859
7944
|
case "uploading":
|
|
7860
|
-
return S.processingDescription;
|
|
7945
|
+
return quickMode ? S.quickProcessingDescription : S.processingDescription;
|
|
7861
7946
|
case "extracted":
|
|
7862
|
-
return S.extractedDescription;
|
|
7947
|
+
return quickMode ? S.quickExtractedDescription : S.extractedDescription;
|
|
7863
7948
|
case "error":
|
|
7864
7949
|
return error ?? S.errorDescriptionFallback;
|
|
7865
7950
|
}
|
|
7866
|
-
}, [phase, error, S]);
|
|
7951
|
+
}, [phase, error, S, quickMode]);
|
|
7867
7952
|
const classificationLabel = useCallback7(
|
|
7868
7953
|
(c) => {
|
|
7869
7954
|
switch (c) {
|
|
@@ -8014,7 +8099,7 @@ function VoiceBugInputSheet({
|
|
|
8014
8099
|
style: styles11.extractedScroll,
|
|
8015
8100
|
contentContainerStyle: styles11.extractedScrollContent
|
|
8016
8101
|
},
|
|
8017
|
-
/* @__PURE__ */ React14.createElement(View11, { style: styles11.transcriptCard }, /* @__PURE__ */ React14.createElement(Text10, { style: styles11.transcriptLabel }, "Transcript"), /* @__PURE__ */ React14.createElement(Text10, { style: styles11.transcriptText }, result.transcript || "(empty)")),
|
|
8102
|
+
quickMode ? null : /* @__PURE__ */ React14.createElement(View11, { style: styles11.transcriptCard }, /* @__PURE__ */ React14.createElement(Text10, { style: styles11.transcriptLabel }, "Transcript"), /* @__PURE__ */ React14.createElement(Text10, { style: styles11.transcriptText }, result.transcript || "(empty)")),
|
|
8018
8103
|
/* @__PURE__ */ React14.createElement(ExtractField, { label: "Title", value: result.title }),
|
|
8019
8104
|
/* @__PURE__ */ React14.createElement(
|
|
8020
8105
|
ExtractField,
|
|
@@ -8038,7 +8123,22 @@ function VoiceBugInputSheet({
|
|
|
8038
8123
|
}
|
|
8039
8124
|
),
|
|
8040
8125
|
/* @__PURE__ */ React14.createElement(ExtractField, { label: "Frequency", value: result.frequency })
|
|
8041
|
-
), /* @__PURE__ */ React14.createElement(View11, { style: styles11.
|
|
8126
|
+
), isIdle && captureScreen ? /* @__PURE__ */ React14.createElement(View11, { style: styles11.quickBlock }, /* @__PURE__ */ React14.createElement(Text10, { style: styles11.quickHint }, S.quickHint), /* @__PURE__ */ React14.createElement(View11, { style: styles11.quickGrid }, QUICK_ACTIONS.map((a) => /* @__PURE__ */ React14.createElement(
|
|
8127
|
+
Pressable9,
|
|
8128
|
+
{
|
|
8129
|
+
key: a.kind,
|
|
8130
|
+
accessibilityRole: "button",
|
|
8131
|
+
accessibilityLabel: S[a.label],
|
|
8132
|
+
testID: `tpk-quick-${a.kind}`,
|
|
8133
|
+
onPress: () => void runQuick(a),
|
|
8134
|
+
style: ({ pressed }) => [
|
|
8135
|
+
styles11.quickButton,
|
|
8136
|
+
pressed && { opacity: 0.8 }
|
|
8137
|
+
]
|
|
8138
|
+
},
|
|
8139
|
+
/* @__PURE__ */ React14.createElement(Text10, { style: styles11.quickEmoji }, a.emoji),
|
|
8140
|
+
/* @__PURE__ */ React14.createElement(Text10, { style: styles11.quickLabel }, S[a.label])
|
|
8141
|
+
)))) : null, /* @__PURE__ */ React14.createElement(View11, { style: styles11.primaryRow }, isIdle && /* @__PURE__ */ React14.createElement(
|
|
8042
8142
|
Pressable9,
|
|
8043
8143
|
{
|
|
8044
8144
|
accessibilityRole: "button",
|
|
@@ -8082,7 +8182,7 @@ function VoiceBugInputSheet({
|
|
|
8082
8182
|
pressed && { opacity: 0.85 }
|
|
8083
8183
|
]
|
|
8084
8184
|
},
|
|
8085
|
-
/* @__PURE__ */ React14.createElement(Text10, { style: styles11.secondaryButtonLabel }, isError ? S.retry : S.rerecord)
|
|
8185
|
+
/* @__PURE__ */ React14.createElement(Text10, { style: styles11.secondaryButtonLabel }, quickMode ? S.back : isError ? S.retry : S.rerecord)
|
|
8086
8186
|
), isExtracted && /* @__PURE__ */ React14.createElement(
|
|
8087
8187
|
Pressable9,
|
|
8088
8188
|
{
|
|
@@ -8374,6 +8474,41 @@ var styles11 = StyleSheet11.create({
|
|
|
8374
8474
|
marginTop: 8,
|
|
8375
8475
|
lineHeight: 20
|
|
8376
8476
|
},
|
|
8477
|
+
quickBlock: {
|
|
8478
|
+
marginTop: 16
|
|
8479
|
+
},
|
|
8480
|
+
quickHint: {
|
|
8481
|
+
color: "#94A3B8",
|
|
8482
|
+
fontSize: 13,
|
|
8483
|
+
textAlign: "center",
|
|
8484
|
+
marginBottom: 8
|
|
8485
|
+
},
|
|
8486
|
+
quickGrid: {
|
|
8487
|
+
flexDirection: "row",
|
|
8488
|
+
flexWrap: "wrap",
|
|
8489
|
+
gap: 8
|
|
8490
|
+
},
|
|
8491
|
+
quickButton: {
|
|
8492
|
+
flexGrow: 1,
|
|
8493
|
+
flexBasis: "45%",
|
|
8494
|
+
flexDirection: "row",
|
|
8495
|
+
alignItems: "center",
|
|
8496
|
+
gap: 8,
|
|
8497
|
+
paddingHorizontal: 12,
|
|
8498
|
+
paddingVertical: 12,
|
|
8499
|
+
borderRadius: 12,
|
|
8500
|
+
backgroundColor: "rgba(255,255,255,0.08)",
|
|
8501
|
+
borderWidth: 1,
|
|
8502
|
+
borderColor: "rgba(255,255,255,0.15)"
|
|
8503
|
+
},
|
|
8504
|
+
quickEmoji: {
|
|
8505
|
+
fontSize: 18
|
|
8506
|
+
},
|
|
8507
|
+
quickLabel: {
|
|
8508
|
+
color: "#F1F5F9",
|
|
8509
|
+
fontSize: 14,
|
|
8510
|
+
fontWeight: "600"
|
|
8511
|
+
},
|
|
8377
8512
|
timer: {
|
|
8378
8513
|
fontSize: 40,
|
|
8379
8514
|
fontWeight: "700",
|
|
@@ -10371,7 +10506,8 @@ function TesterPayKitWrapper({
|
|
|
10371
10506
|
// Voice-bug split (A2): the title/description above are the
|
|
10372
10507
|
// tester's O-Ton. Carry the transcript + language so submit
|
|
10373
10508
|
// stores the author view + derives the English enriched fields.
|
|
10374
|
-
|
|
10509
|
+
// Quick actions have no spoken O-Ton — leave it unset then.
|
|
10510
|
+
transcript: result.transcript || void 0,
|
|
10375
10511
|
sourceLanguage: result.sourceLanguage
|
|
10376
10512
|
});
|
|
10377
10513
|
setVoiceOpen(false);
|
|
@@ -10471,7 +10607,9 @@ function TesterPayKitWrapper({
|
|
|
10471
10607
|
visible: voiceOpen,
|
|
10472
10608
|
tpk,
|
|
10473
10609
|
onCancel: () => setVoiceOpen(false),
|
|
10474
|
-
onExtracted: handleVoiceExtracted
|
|
10610
|
+
onExtracted: handleVoiceExtracted,
|
|
10611
|
+
currentScreen: currentScreen ?? void 0,
|
|
10612
|
+
captureScreen: async () => (await captureView(rootRef))?.base64 ?? null
|
|
10475
10613
|
}
|
|
10476
10614
|
),
|
|
10477
10615
|
/* @__PURE__ */ React21.createElement(
|
|
@@ -10989,6 +11127,7 @@ export {
|
|
|
10989
11127
|
mockWidgets,
|
|
10990
11128
|
parseVersionRange,
|
|
10991
11129
|
pathToSvgD,
|
|
11130
|
+
quickDraftBug,
|
|
10992
11131
|
resetOnboardingState,
|
|
10993
11132
|
resetWelcomeBriefAck,
|
|
10994
11133
|
resetWidgetTourSeen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testerpaykit/expo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "TesterPayKit Expo / React-Native bindings — shake-to-report, device info, bug-report hook",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"CHANGELOG.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@testerpaykit/core": "1.2.0",
|
|
23
24
|
"@testerpaykit/ai-tester": "0.5.0",
|
|
24
|
-
"@testerpaykit/api-client": "1.
|
|
25
|
-
"@testerpaykit/core": "1.1.0"
|
|
25
|
+
"@testerpaykit/api-client": "1.4.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@expo/vector-icons": ">=14.0.0",
|