You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attachment - Unable to focus on the subject by tapping on the screen when taking photo #87443
Version Number: 9.3.55-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#86981 Email or phone of affected tester (no customers):jsdjosidjiojisojio3@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Chat Report View
Action Performed:
Precondition:
App camera access is allowed.
Launch Expensify app.
Go to workspace chat.
Tap + > Create expense > Scan.
Tap on the screen.
→ User can focus on the subject by tapping on the screen.
Tap back button.
Tap + > Add attachment > Take photo.
Tap on the screen.
Expected Result:
User should be able to focus on the subject by tapping on the screen, similar to taking a receipt from Step 4.
Actual Result:
User is not able to focus on the subject by tapping on the screen.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
PR #86981 introduced AttachmentCamera (src/components/AttachmentPicker/AttachmentCamera.tsx) which renders a raw VisionCamera with no tap-to-focus handling. The "Create expense > Scan" flow works because it uses the useNativeCamera hook (src/hooks/useNativeCamera.ts:69-103) which wraps the camera in a GestureDetector with a Gesture.Tap() that calls camera.focus(point) and shows an animated focus indicator. AttachmentCamera was written from scratch and this functionality was not included.
What changes do you think we should make in order to solve the problem?
Add tap-to-focus to AttachmentCamera.tsx by extracting the focus logic from useNativeCamera.ts:69-103 into AttachmentCamera:
Add shared values for the focus indicator (opacity, scale, position) using react-native-reanimated
Add a Gesture.Tap() handler (enabled when device.supportsFocus) that calls camera.current.focus(point) and triggers the focus indicator animation
Wrap the <VisionCamera> in a <GestureDetector> and add an <Animated.View> with styles.cameraFocusIndicator as a sibling for the visual indicator
What alternative solutions did you explore? (Optional)
Reusing useNativeCamera directly was considered but it depends on useFocusEffect (requires React Navigation screen context — AttachmentCamera is in a plain Modal), FullScreenLoaderContext, and Onyx state that are IOURequestStepScan-specific. A cleaner long-term approach would be extracting just the tap-to-focus logic into a small standalone hook (e.g., useCameraFocus) that both useNativeCamera and AttachmentCamera could share, but the inline approach is simpler and avoids changing the existing scan flow.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Apr 9, 2026
@srikarparsi recently merged #86981, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon Apr 9, 2026
Triggered auto assignment to @cead22 (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Apr 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 9, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Apr 9, 2026
Investigation Summary - Classification: Frontend bug - Causing PR: #86981 fix: use in-app VisionCamera for chat attachments with proper permission handling by @srikarparsi (High confidence) - Recommendation: REVERT - PR #86981 introduced AttachmentCamera.tsx for Add attachment > Take photo but omitted tap-to-focus gesture handler present in receipt scan camera. Staging-only bug. Assigned: @srikarparsi (PR author), @ShridharGoel (approving reviewer). Labels: DeployBlockerCash kept.
MelvinBot commentedon Apr 9, 2026
Proposal
What is the root cause of that problem?
PR #86981 introduced
AttachmentCamera(src/components/AttachmentPicker/AttachmentCamera.tsx) which renders a rawVisionCamerawith no tap-to-focus handling. The "Create expense > Scan" flow works because it uses theuseNativeCamerahook (src/hooks/useNativeCamera.ts:69-103) which wraps the camera in aGestureDetectorwith aGesture.Tap()that callscamera.focus(point)and shows an animated focus indicator.AttachmentCamerawas written from scratch and this functionality was not included.What changes do you think we should make in order to solve the problem?
Add tap-to-focus to
AttachmentCamera.tsxby extracting the focus logic fromuseNativeCamera.ts:69-103intoAttachmentCamera:react-native-reanimatedGesture.Tap()handler (enabled whendevice.supportsFocus) that callscamera.current.focus(point)and triggers the focus indicator animation<VisionCamera>in a<GestureDetector>and add an<Animated.View>withstyles.cameraFocusIndicatoras a sibling for the visual indicatorWhat alternative solutions did you explore? (Optional)
Reusing
useNativeCameradirectly was considered but it depends onuseFocusEffect(requires React Navigation screen context —AttachmentCamerais in a plain Modal),FullScreenLoaderContext, and Onyx state that are IOURequestStepScan-specific. A cleaner long-term approach would be extracting just the tap-to-focus logic into a small standalone hook (e.g.,useCameraFocus) that bothuseNativeCameraandAttachmentCameracould share, but the inline approach is simpler and avoids changing the existing scan flow.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.cead22 commentedon Apr 9, 2026
@srikarparsi looks like you got this covered. Let me know if you need anything from me
IuliiaHerets commentedon Apr 10, 2026
iPhone 13 / iOS 26.4
v9.3.57-1
not repro
focus.screen.MP4
lakchote commentedon Apr 10, 2026
Removing the blocker label.