Skip to content

[Due for payment 2026-11-09] [$175] Concierge-Transition from landscape to portrait Concierge page misaligned. #102091

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: V9.2.92
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #100886
Email or phone of affected tester (no customers): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: Chat Report View

Action Performed:

  1. Launch app - use Expensifail account with control workspace
  2. Tap Concierge icon on top
  3. Turn landscape
  4. Turn to portrait

Expected Result:

Transition from landscape to portrait Concierge page must not misalign.

Actual Result:

Transition from landscape to portrait Concierge page misaligned.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7267251_1790167187867.Screenrecorder-2026-09-23-18-00-22-474.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7267251

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. applause-bot commented on Sep 23, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/4f1de02468f8154a703c56db095156d3484edc7f603a830e9a447d6ecfd8e2bb

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2026
  3. MelvinBot commented on Sep 23, 2026

    @MelvinBot
    Contributor

    ⚠️ Preliminary analysis (low confidence) — treat as a starting point, not a conclusion. I could not reproduce this (browser control was unavailable in this run, and this is an Android-native-only repro anyway).

    Blocker: the Applause attachment isn't embedded and the Screenshots/Videos section is still _To be added by Applause Leads_. "Misaligned" is ambiguous — a horizontal shift and a vertical shift point at completely different code. Please attach the video; it will cut the candidate list below down to one.

    Leading hypothesis: the Concierge welcome-state background is parallax-driven by the device gyroscope, and its offset is never reset. In AnimatedEmptyStateBackground.tsx:36-54, xOffset/yOffset accumulate gyroscope velocity and are clamped to ±30px / ±20px, but nothing ever returns them to 0. Physically rotating the phone to landscape and back injects a large rotation, pinning both offsets at their clamp — so the welcome artwork stays permanently offset by up to 30px horizontally and 20px vertically. This only shows up on a real device with a gyroscope (the reporter used a Redmi Note 10s), which is why emulator rotation wouldn't reproduce it.

    Other candidates, and what to rule out first

    Useful framing: on Android native, rotation does not flip the responsive breakpoint — isSmallScreenWidth is hardcoded true in useResponsiveLayout/index.native.ts:37. Only isInLandscapeMode, isExtraSmallScreenHeight/Width, safe-area insets, and measured layout values change. So the bug is in one of those four.

    1. Gyroscope offsets (above) — a horizontal/vertical shift of the background artwork only, header and text still aligned. Fix would be resetting xOffset/yOffset on an orientation change, or dropping the sensor offset when dimensions change.
    2. Collapsible header height — CollapsibleHeaderOnKeyboard/index.native.tsx:98-105 wraps ReportHeader on every report screen (ReportScreen.tsx:136-139) and restores a cached naturalHeight on landscape→portrait. This file already carries fixes titled "Fix landscape->portrait not restoring header original height" and "Claim offer banner is cut off after rotating device to portrait", so it has failed this exact way before. It matters here because the Concierge onboarding header is variable-height — it can carry the stacked Book-a-call button, the onboarding help dropdown, and EarlyDiscountBanner (HeaderView.tsx:541-547). Symptom would be a clipped header / everything below shifted up. I traced the restore-vs-onLayout ordering and it appears to self-correct, so I'd rank this second — but it's the first thing to check if the video shows a vertical shift.
    3. Stale left/right safe-area insets — useWindowDimensions/index.native.ts:10 reads useSafeAreaFrame(), and SafeArea/index.native.tsx applies left/right edges with landscape-specific handling. Android landscape adds left/right nav-bar/cutout insets; if they don't clear on the way back to portrait, the whole page sits shifted. Symptom would be the entire page offset horizontally, with a blank strip on one side.

    Ruled out: SafeAreaProvider is not seeded from initialWindowMetrics, and the insets → padding chain (useSafeAreaPaddings → ScreenWrapper → ScreenWrapperContainer) recomputes correctly on every inset change — no stale memo there.

    Possibly related (same rotation-handling cluster on Android, worth checking for a shared root cause):

    None of these look like a duplicate — different surfaces, different symptoms.

    One note on the report: the linked PR feat: use Table component for Add existing expense flow is just the PR under regression test. It touches the Add-existing-expense table and doesn't go near rotation, the report screen, or safe areas, so it isn't the cause.


    Next Steps: Attach the Applause video, then reply with @MelvinBot <your feedback> to refine this analysis.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 23, 2026
  5. melvin-bot commented on Sep 23, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

  6. melvin-bot commented on Sep 23, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  7. ashusatyarthi-wq commented on Sep 27, 2026

    @ashusatyarthi-wq

    Proposal

    Problem

    When opening Concierge chat on mobile and rotating from portrait to landscape and back to portrait, the Concierge empty/welcome state background artwork becomes misaligned.

    Root Cause

    1. In src/pages/inbox/report/AnimatedEmptyStateBackground.tsx, device gyroscope velocity is accumulated to create a parallax tilt effect for the welcome background:
      const {x, y} = animatedSensor.sensor.get();
      xOffset.set((value) => clamp(value + y * ANIMATION_GYROSCOPE_VALUE, -IMAGE_OFFSET_X, IMAGE_OFFSET_X));
      yOffset.set((value) => clamp(value - x * ANIMATION_GYROSCOPE_VALUE, -IMAGE_OFFSET_Y, IMAGE_OFFSET_Y));
    2. When the user physically rotates the device between landscape and portrait, the gyroscope registers a large angular velocity, driving xOffset and yOffset to their maximum clamped values (IMAGE_OFFSET_X = ±30px, IMAGE_OFFSET_Y = ±20px).
    3. Because the accumulation formula has no decay towards zero when the device returns to rest (x = 0, y = 0 produces value + 0 = value), the background offsets remain permanently pinned at the clamp boundaries.
    4. Furthermore, on orientation changes (isInLandscapeMode), neither xOffset nor yOffset is reset to its initial centered position (0), leaving the artwork permanently shifted and misaligned after rotating back to portrait.

    Proposed Changes

    1. Reset the shared animation offsets on orientation changes in src/pages/inbox/report/AnimatedEmptyStateBackground.tsx:
      const {isInLandscapeMode, shouldUseNarrowLayout} = useResponsiveLayout();
      
      useEffect(() => {
          xOffset.set(withSpring(0));
          yOffset.set(withSpring(0));
      }, [isInLandscapeMode, xOffset, yOffset]);
    2. In addition, apply a slight decay factor (or decay towards 0) in the worklet when velocity drops to zero, ensuring the parallax naturally recenters when the device is held stationary:
      const DECAY_FACTOR = 0.95;
      xOffset.set((value) => clamp(value * DECAY_FACTOR + y * ANIMATION_GYROSCOPE_VALUE, -IMAGE_OFFSET_X, IMAGE_OFFSET_X));
      yOffset.set((value) => clamp(value * DECAY_FACTOR - x * ANIMATION_GYROSCOPE_VALUE, -IMAGE_OFFSET_Y, IMAGE_OFFSET_Y));

    Why this solution is best:

    • Accurately addresses the root cause of the parallax shift.
    • Prevents orientation changes from permanently locking the artwork at its maximum displacement.
    • Adds natural recentering when stationary without degrading the interactive parallax feel.

    Test Plan

    1. Open the Expensify app on a physical Android or iOS device.
    2. Tap the Concierge icon to open the Concierge chat with the welcome empty state.
    3. Observe the initial centered position of the welcome background artwork.
    4. Rotate the device to landscape mode.
    5. Rotate the device back to portrait mode.
    6. Verify that the welcome background smoothly recenters and remains properly aligned.
  8. melvin-bot commented on Sep 28, 2026

    @melvin-bot

    @situchan Eep! 4 days overdue now. Issues have feelings too...

  9. zeryns commented on Sep 30, 2026

    @zeryns

    Hi @situchan, I think Melvin's analysis is looking at the wrong thing. It blames the gyroscope offsets in AnimatedEmptyStateBackground. Meanwhile the video shows the "Claim offer" banner in the concierge header collapsing after rotating back to portrait which make the title gets squeezed and the button stays on the same row. The background artwork isn't what's misaligned

    RCA

    In portrait, the "Claim offer" button is pushed onto its own line by giving the right component flexBasis: '100%' inside the flexWrap row of BillingBanner

    const smallScreenStyle = shouldDisplayButtonsInSeparateLine ? [styles.flex0, styles.flexBasis100, styles.justifyContentCenter] : [];
    return (
    <View style={[styles.flexRow, styles.gap2, smallScreenStyle, styles.alignItemsCenter]}>

    <View style={[styles.pv4, styles.ph5, styles.flexRow, styles.flexWrap, styles.gap3, styles.w100, styles.alignItemsCenter, styles.trialBannerBackgroundColor, style]}>

    In landscape this style is dropped so everything sits in one row. When we rotate back to portrait, flexBasis: '100%' is applied again to the already mounted view, but on android the percentage flex basis isn't re-resolved after the orientation relayout. So the row doesn't wrap anymore and the button stays on the same line as the icon and the title gets squeezed

    This is the same issue we had with the "Learn more" banner in #97156, which uses the same BillingBanner layout and was fixed in #97953

    const smallScreenStyle = shouldDisplayActionInSeparateLine ? [styles.flex0, styles.mnw100, styles.maxWidth100Percentage, styles.justifyContentCenter] : [];
    return (
    <View
    key={shouldDisplayActionInSeparateLine ? 'separate-line' : 'inline'}
    style={[styles.flexRow, styles.gap2, smallScreenStyle]}
    >

    Solution

    We can apply the same fix as #97953 to EarlyDiscountBanner to use styles.mnw100 with styles.maxWidth100Percentage instead of styles.flexBasis100, and add a key based on shouldDisplayButtonsInSeparateLine so the right component is remounted with a fresh layout when the orientation changes

            const smallScreenStyle = shouldDisplayButtonsInSeparateLine ? [styles.flex0, styles.mnw100, styles.maxWidth100Percentage, styles.justifyContentCenter] : [];
            return (
                <View
                    key={shouldDisplayButtonsInSeparateLine ? 'separate-line' : 'inline'}
                    style={[styles.flexRow, styles.gap2, smallScreenStyle, styles.alignItemsCenter]}
                >

    const smallScreenStyle = shouldDisplayButtonsInSeparateLine ? [styles.flex0, styles.flexBasis100, styles.justifyContentCenter] : [];
    return (
    <View style={[styles.flexRow, styles.gap2, smallScreenStyle, styles.alignItemsCenter]}>

    POC

    Before After
    Before.mov
    After.mov

    I'd be happy to post a proposal in the correct format for this issue if this looks right. Thanks!

  10. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    @situchan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  11. melvin-bot commented on Oct 2, 2026

    @melvin-bot

    @situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  12. 30 remaining items

  13. melvin-bot commented on Nov 6, 2026

    @melvin-bot

    @situchan Still overdue 6 days?! Let's take care of this!

  14. melvin-bot commented on Nov 8, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. melvin-bot commented on Nov 8, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  16. zeryns commented on Nov 9, 2026

    @zeryns

    Hi @mallenexpensify, it seems like Melvin's PR implemented the fix from my comment (#102091 (comment)), while Melvin's proposal pointed to a completely different cause. Based on this discussion, would it be possible to consider partial compensation for this one? Thanks!

    Image
  17. mallenexpensify commented on Nov 11, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    I'll pay these tomorrow, apologies for the delay

  18. situchan commented on Nov 11, 2026

    @situchan
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: N/A
      Link to the comment on the Issue:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    Test:

    Android: Native

    1. Open the app and tap the Concierge icon at the top.
    2. Verify the early discount banner shows with the "Claim offer" button on its own line below the icon and title.
    3. Rotate the device to landscape.
    4. Verify the banner shows the "Claim offer" button inline on the same row as the title.
    5. Rotate the device back to portrait.
    6. Verify the "Claim offer" button wraps back onto its own line, and the title is not squeezed.
    7. Repeat steps 3-6 a few times and verify the layout is correct each time.

    All other platforms (regression test)

    1. Open the Concierge chat on a narrow screen (mobile web, or a resized desktop window).
    2. Verify the "Claim offer" button shows on its own line below the title.
    3. Open the Concierge chat on a wide screen.
    4. Verify the "Claim offer" button shows inline next to the title, followed by the close (X) button when the 25% discount is active.
    5. Tap "Claim offer" and verify it opens the Subscription page.

    Do we agree 👍 or 👎

  19. zeryns commented on Nov 11, 2026

    @zeryns

    @mallenexpensify gentle bump on my question above, thanks!

  20. mallenexpensify commented on Nov 11, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @situchan due $175 via NewDot

    @zeryns unfortunately, currently, we're unable to compensate for issues where Help Wanted wasn't added. I created an internal issue earlier today that could be the first step for something to change, it's still TBD though. Are you part of #expensify-open-source? I'll post there and also update CONTRIBUTING.md if the update takes place.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions