manual-pairing-fallback: Manual pairing fallback #4

Open
std-bot wants to merge 1 commit from task/manual-pairing-fallback into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Add a manual add-device fallback on the QR scanning screen for users who cannot grant camera access or scan a valid Muxy pairing code.

Task intent: Update the upstream ScanPairScreen so the user can navigate to /add-device manually from the camera-permission-denied state and from the invalid-QR error state, while preserving the existing valid pairing QR behavior.

Benchmark plan: Construct the task package from commit fc029f37073af0fc634432f6fec4f0285b822485 with solver instructions to edit only app/scan-pair.tsx. The work requirement should specify an exact CTA text and accessibility label of Enter pairing details manually, an accessible button role, and a manual navigation action using router.replace('/add-device') with no host, port, auto, service, or label params. The package should include a hidden test_outputs.py verifier that checks the final repo state.

Environment plan: The task environment is the materialized Expo/React Native repo plus the hidden verifier; no physical camera, emulator, or QR image fixture is required. The repo environment remains the existing upstream app at the fixed commit, with app/scan-pair.tsx using expo-camera, expo-router, parsePairUri, and React Native components.

Verifier plan: test_outputs.py should inspect app/scan-pair.tsx and fail unless the exact text Enter pairing details manually is rendered, the same exact string is used as an accessibility label, a Pressable or equivalent button declares accessibilityRole="button", and there is a manual router.replace('/add-device') call distinct from the existing QR-success router.replace({ pathname: '/add-device', params: ... }). It should also check that the existing invalid QR message and valid QR params for host, port, auto, service, and label remain present.

Oracle plan: The oracle solution edits app/scan-pair.tsx by adding a useCallback such as openManualPairing that calls router.replace('/add-device'), then renders a styled accessible Pressable with the exact manual-entry label in the permission-not-granted branch and alongside the invalid QR error UI. Existing camera permission request handling and successful QR parsing/navigation are left intact.

Difficulty plan: Current coding systems may add the fallback in only one UI branch, use router.push instead of the required replacement navigation, accidentally reuse the auto-pairing params, omit accessibility metadata, or disturb the valid QR callback while touching nearby routing code.

Repo patch scope: Expected upstream edits are limited to app/scan-pair.tsx, including any local style additions in that file. Do not modify routing files, state parsing, package manifests, dependencies, or unrelated components.

Anti-leakage notes: Do not expose any solver-facing benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present this only as ordinary product work for the mobile app.

Approach: Add one shared manual navigation callback, reuse it for both fallback buttons, keep the existing invalid QR message, and ensure the manual action goes to the plain add-device screen without auto-fill params.

Verification: Run python3 test_outputs.py; it verifies app/scan-pair.tsx for the manual CTA, accessibility attributes, plain /add-device replacement navigation, and preservation of existing QR success behavior.

Risk: Static verification can miss subtle rendering placement issues, so the verifier should combine exact-string checks with structural checks around Pressable and router.replace to reduce false positives.

Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.

Agent context

Task slug: manual-pairing-fallback
Branch: task/manual-pairing-fallback

## Assigned idea Benchmark authoring specification. Summary: Add a manual add-device fallback on the QR scanning screen for users who cannot grant camera access or scan a valid Muxy pairing code. Task intent: Update the upstream `ScanPairScreen` so the user can navigate to `/add-device` manually from the camera-permission-denied state and from the invalid-QR error state, while preserving the existing valid pairing QR behavior. Benchmark plan: Construct the task package from commit `fc029f37073af0fc634432f6fec4f0285b822485` with solver instructions to edit only `app/scan-pair.tsx`. The work requirement should specify an exact CTA text and accessibility label of `Enter pairing details manually`, an accessible button role, and a manual navigation action using `router.replace('/add-device')` with no host, port, auto, service, or label params. The package should include a hidden `test_outputs.py` verifier that checks the final repo state. Environment plan: The task environment is the materialized Expo/React Native repo plus the hidden verifier; no physical camera, emulator, or QR image fixture is required. The repo environment remains the existing upstream app at the fixed commit, with `app/scan-pair.tsx` using `expo-camera`, `expo-router`, `parsePairUri`, and React Native components. Verifier plan: `test_outputs.py` should inspect `app/scan-pair.tsx` and fail unless the exact text `Enter pairing details manually` is rendered, the same exact string is used as an accessibility label, a `Pressable` or equivalent button declares `accessibilityRole="button"`, and there is a manual `router.replace('/add-device')` call distinct from the existing QR-success `router.replace({ pathname: '/add-device', params: ... })`. It should also check that the existing invalid QR message and valid QR params for host, port, auto, service, and label remain present. Oracle plan: The oracle solution edits `app/scan-pair.tsx` by adding a `useCallback` such as `openManualPairing` that calls `router.replace('/add-device')`, then renders a styled accessible `Pressable` with the exact manual-entry label in the permission-not-granted branch and alongside the invalid QR error UI. Existing camera permission request handling and successful QR parsing/navigation are left intact. Difficulty plan: Current coding systems may add the fallback in only one UI branch, use `router.push` instead of the required replacement navigation, accidentally reuse the auto-pairing params, omit accessibility metadata, or disturb the valid QR callback while touching nearby routing code. Repo patch scope: Expected upstream edits are limited to `app/scan-pair.tsx`, including any local style additions in that file. Do not modify routing files, state parsing, package manifests, dependencies, or unrelated components. Anti-leakage notes: Do not expose any solver-facing benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present this only as ordinary product work for the mobile app. Approach: Add one shared manual navigation callback, reuse it for both fallback buttons, keep the existing invalid QR message, and ensure the manual action goes to the plain add-device screen without auto-fill params. Verification: Run `python3 test_outputs.py`; it verifies `app/scan-pair.tsx` for the manual CTA, accessibility attributes, plain `/add-device` replacement navigation, and preservation of existing QR success behavior. Risk: Static verification can miss subtle rendering placement issues, so the verifier should combine exact-string checks with structural checks around `Pressable` and `router.replace` to reduce false positives. Path rules: task package is tasks/<slug>; mutable upstream checkout is tasks/<slug>/environment/repo; benchmark package files are under tasks/<slug>/task; verifier/container environment belongs under tasks/<slug>/task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest. ## Agent context Task slug: manual-pairing-fallback Branch: task/manual-pairing-fallback <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/manual-pairing-fallback:task/manual-pairing-fallback
git switch task/manual-pairing-fallback

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/manual-pairing-fallback
git switch task/manual-pairing-fallback
git rebase main
git switch main
git merge --ff-only task/manual-pairing-fallback
git switch task/manual-pairing-fallback
git rebase main
git switch main
git merge --no-ff task/manual-pairing-fallback
git switch main
git merge --squash task/manual-pairing-fallback
git switch main
git merge --ff-only task/manual-pairing-fallback
git switch main
git merge task/manual-pairing-fallback
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-fa5dc9ae42094b!4
No description provided.