Skip to content

feat(pos-app): add sandbox mode and CI flag - #597

Draft
ignaciosantise wants to merge 5 commits into
mainfrom
feat/pos-app-sandbox-mode
Draft

feat(pos-app): add sandbox mode and CI flag#597
ignaciosantise wants to merge 5 commits into
mainfrom
feat/pos-app-sandbox-mode

Conversation

@ignaciosantise

@ignaciosantise ignaciosantise commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add opt-in sandbox mode for POS payment testing without merchant credentials or a wallet.
  • Simulate $0.01 success and $0.02 decline, with local transaction samples and sandbox banners.
  • Disable merchant credential editing while sandbox mode is active.
  • Add a sandbox-enabled checkbox to the Mobile POS release workflow and inject it into Android/iOS Expo builds.
  • Keep production builds explicitly controllable for Apple review.

Validation

  • YAML parsing passed for all three modified workflows.
  • git diff --check passed.
  • Prettier checks were run; the workflow files have existing formatting differences.
  • Dependency-based lint/typecheck/tests could not run because node_modules is not installed in the workspace.

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pos-demo Ready Ready Preview Aug 28, 2026 12:54pm
react-native-walletkit Ready Ready Preview Aug 28, 2026 12:54pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
react-native-appkit Ignored Ignored Preview Aug 28, 2026 12:54pm

Request Review

@claude

claude Bot commented Aug 24, 2026

Copy link
Copy Markdown

Claude finished @ignaciosantise's task in 3m 38s —— View job


Code Review

  • Gather context
  • Read changed files
  • Run breaking changes subagent — ✅ No breaking changes found
  • Run data classification subagent — ✅ No data classification issues found
  • Post findings

Found 3 issue(s)

Issue 1: Success/decline condition ($0.01 magic value) not surfaced to testers

ID: scan-sandbox-magic-amount-3f9a
File: dapps/pos-app/app/scan.tsx:231
Severity: MEDIUM
Category: code_quality

Context:

  • Pattern: amountToCents(amount) === 1 decides whether sandbox payment succeeds or declines — 1 cent ($0.01) succeeds, every other amount declines
  • Risk: Testers who enter any "natural" amount will always see a decline and may think the feature is broken; there is no in-app cue explaining the trigger rule
  • Impact: Poor DX; friction during QA sessions; misleading test results
  • Trigger: Any sandbox payment initiated with an amount other than $0.01

Recommendation: Document the rule in the sandbox banner or instruction text. Minimal change — update SandboxBanner or the instruction label on the scan screen:

// sandbox-banner.tsx or scan.tsx instruction text
"Sandbox mode · Enter $0.01 to approve, any other amount to decline"

Alternatively, make the threshold a named constant and document it in a comment.

Fix this →


Issue 2: "Copy payment link" copies a non-functional sandbox URL

ID: scan-sandbox-copy-url-a2c1
File: dapps/pos-app/app/scan.tsx:147
Severity: LOW
Category: code_quality

Context:

  • Pattern: handleCopyPaymentUrl copies qrUri to clipboard; in sandbox mode qrUri is sandbox_${Date.now()}?amount=... — not a real payment URL
  • Risk: A tester who taps the QR code copies a fake, unparseable string and may try to share/use it
  • Impact: Confusing UX; misleading "Payment link copied" toast
  • Trigger: Any tap on the QR code while sandbox mode is active

Recommendation: Disable the copy handler in sandbox mode or suppress the toast:

const handleCopyPaymentUrl = async () => {
  if (isSandboxPayment) return; // no real URL to copy
  await Clipboard.setStringAsync(qrUri);
  showSuccessToast("Payment link copied");
};

Fix this →


Issue 3: Missing accessibility label on SandboxBanner

ID: sandbox-banner-a11y-7d3e
File: dapps/pos-app/components/sandbox-banner.tsx:13
Severity: LOW
Category: code_quality

Context:

  • Pattern: The banner View has no accessibilityRole or accessibilityLabel; screen readers will read only the raw text without announcing it as a status/alert region
  • Risk: Low-vision users may not know they are in a non-production mode
  • Impact: Accessibility gap for screen reader users
  • Trigger: Any time the sandbox banner is visible

Recommendation:

<View
  accessibilityRole="alert"
  accessibilityLabel="Sandbox mode active. Payments are simulated."
  style={[styles.container, { backgroundColor: theme["bg-warning"] }, style]}
>

Breaking changes: ✅ None — store migration (v19→v20) initialises sandboxMode: false; workflow sandbox-enabled input defaults to false; all changes are additive behind the EXPO_PUBLIC_SANDBOX_ENABLED build-time flag.

Data classification: ✅ None — no real credentials or PII in sandbox data; secrets remain in secureStorage; CI workflows use ${{ secrets.* }} correctly.

…mode

# Conflicts:
#	dapps/pos-app/app/amount.tsx
#	dapps/pos-app/app/scan.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant