stablyai/orca · warning
open the review file before sending
Error message
open the review file before sending
What it means
Thrown by getPendingBundleForUpload when the pending bundle exists but its previewOpened flag is false. The upload path is only allowed after the user has opened the review file preview — both as a UX gate (the user should review what is sent) and because the uploaded payload is the redacted bytes retained before the preview file became user-editable.
Source
Thrown at src/main/ipc/diagnostics.ts:119
}
function getPendingBundleForUpload(bundleSubmissionId: unknown): {
readonly bundle: CollectedBundle
readonly payload: string
} {
if (
typeof bundleSubmissionId !== 'string' ||
!/^[A-Za-z0-9_-]{16,64}$/.test(bundleSubmissionId)
) {
throw new Error('bundleSubmissionId has invalid format')
}
prunePendingBundles()
const pending = pendingBundles.get(bundleSubmissionId)
if (!pending) {
throw new Error('review file has expired; create a new one before sending')
}
if (!pending.previewOpened) {
throw new Error('open the review file before sending')
}
// Why: the preview file is user-editable once opened in the OS. Upload only
// the redacted bytes main collected and retained before preview.
return { bundle: pending.bundle, payload: pending.bundle.payload }
}
function getPendingPreviewFilePath(bundleSubmissionId: unknown): string {
if (
typeof bundleSubmissionId !== 'string' ||
!/^[A-Za-z0-9_-]{16,64}$/.test(bundleSubmissionId)
) {
throw new Error('bundleSubmissionId has invalid format')
}
prunePendingBundles()
const pending = pendingBundles.get(bundleSubmissionId)
if (!pending) {
throw new Error('review file has expired; create a new one before opening')
}View on GitHub (pinned to 1136503c6a)
Solutions
- Open the review file preview first (the open-preview IPC), then send.
- If the preview-open call failed, retry it and confirm the preview window appeared before sending.
- Verify the renderer sets previewOpened=true only after a successful open confirmation.
Defensive patterns
Strategy: validation
Validate before calling
function isPreviewOpened(id: string): boolean {
return pendingBundles.get(id)?.previewOpened === true
} Type guard
function isBundlePreviewOpened(entry: unknown): boolean {
return typeof entry === 'object' && entry !== null && (entry as any).previewOpened === true
} Try / catch
try {
return getPendingBundleForUpload(id)
} catch (error) {
if (error instanceof Error && /open the review file before sending/.test(error.message)) {
await openPreview(id)
return getPendingBundleForUpload(id)
}
throw error
} Prevention
- Always trigger the open-preview IPC before enabling the send action.
- Disable the send button in the UI until previewOpened is true.
- Confirm the preview window opened successfully before marking previewOpened.
When it happens
Trigger: Calling send/upload on a bundle whose preview was never opened. The bundle is still pending (not expired), but the preview-open step was skipped — e.g. the user clicked send directly from a different UI flow without opening the preview first.
Common situations: User attempts to send from a list/action without first opening the preview; a buggy flow wires the send button before the open action; the preview-open IPC failed silently so the flag was never set.
Related errors
- review file has expired; create a new one before sending
- review file has expired; create a new one before opening
- creating review files is disabled
- sending diagnostics is disabled
- Electron trial failed (${result.error?.message ?? result.sig
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/430dfdbc2121ace6.
Report an issue: GitHub.