Skip to content

Attachment - Unable to focus on the subject by tapping on the screen when taking photo #87443

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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.
  1. Launch Expensify app.
  2. Go to workspace chat.
  3. Tap + > Create expense > Scan.
  4. Tap on the screen.
    → User can focus on the subject by tapping on the screen.
  5. Tap back button.
  6. Tap + > Add attachment > Take photo.
  7. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 9, 2026
  2. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    @srikarparsi recently merged #86981, but they are OOO right now, so I'll auto-assign someone else.

  3. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    Triggered auto assignment to @cead22 (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Apr 9, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Apr 9, 2026

    @OSBotify
    Contributor

    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.

  7. MelvinBot commented on Apr 9, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    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:

    1. Add shared values for the focus indicator (opacity, scale, position) using react-native-reanimated
    2. Add a Gesture.Tap() handler (enabled when device.supportsFocus) that calls camera.current.focus(point) and triggers the focus indicator animation
    3. 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.

  8. cead22 commented on Apr 9, 2026

    @cead22
    Contributor

    @srikarparsi looks like you got this covered. Let me know if you need anything from me

  9. IuliiaHerets commented on Apr 10, 2026

    @IuliiaHerets

    iPhone 13 / iOS 26.4
    v9.3.57-1
    not repro

    focus.screen.MP4
  10. lakchote commented on Apr 10, 2026

    @lakchote
    Contributor

    Removing the blocker label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions