Skip to content

[CP Staging] Fix missing per diem subtitle on Android by re-adding flexRow wrapper#95164

Merged
mountiny merged 1 commit into
mainfrom
claude-perDiemSubtitleFlexRow
Jul 2, 2026
Merged

[CP Staging] Fix missing per diem subtitle on Android by re-adding flexRow wrapper#95164
mountiny merged 1 commit into
mainfrom
claude-perDiemSubtitleFlexRow

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

On Android (native), the per diem subtitle "Set per diem rates to control daily employee spend. Learn more." stopped rendering above the search field on Workspace Settings → Per Diem. This was a regression from #94912, which migrated the page to the new Table component and dropped styles.flexRow from the subtitle wrapper View.

The subtitle is rendered with RenderHTML (it contains the "Learn more" link, so it can't be a plain <Text>). On Android native, react-native-render-html collapses to zero height when its wrapping View is a flex column; it needs a flex row container to lay out. The pre-migration code wrapped it in flexRow, and the sibling WorkspaceTagsPage — which did the identical migration — kept its flexRow wrapper and renders correctly.

This change re-adds styles.flexRow to the subtitle wrapper View, matching the working WorkspaceTagsPage pattern. One-line change; no behavior change on web/iOS.

Fixed Issues

$ #95092
PROPOSAL: #95092 (comment)

Tests

  1. Precondition: a workspace with per diem rates.
  2. On Android native, go to Workspace Settings → Per Diem.
  3. Verify the "Set per diem rates to control daily employee spend. Learn more." subtitle appears above the search field.
  4. Verify the same subtitle still renders correctly on Web and iOS.
  • Verify that no errors appear in the JS console

Offline tests

Same as tests.

QA Steps

  1. Precondition: a workspace with per diem rates.
  2. On Android native, go to Workspace Settings → Per Diem.
  3. Verify the "Set per diem rates to control daily employee spend. Learn more." subtitle appears above the search field.
  4. Verify the same subtitle still renders correctly on Web and iOS.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

…Android

Co-authored-by: Cristi Paval <cristipaval@users.noreply.github.com>
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
...c/pages/workspace/perDiem/WorkspacePerDiemPage.tsx 0.00% <0.00%> (ø)
... and 12 files with indirect coverage changes

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 I looked into the failing checks — there's no code fix needed here.

The only genuinely failing check is PR Author Checklist / checklist, which fails because the author checklist is empty:

You completed 0 out of 41 checklist items with 41 unfinished items
##[error]PR Author Checklist is not completely filled out.

This one can only be resolved by a human checking the boxes in the PR description (and filling in the Tests/QA sections) — MelvinBot intentionally doesn't touch it. Every substantive automated check passes: Bun tests, all 8 test shards, typecheck, ESLint, Prettier, Storybook, spellcheck, knip, and the builds. A couple of long-running checks (perf tests + one dev build) were still running when I checked, but none were failing, and the change itself is a correct one-line styles.flexRow addition that can't affect them.

Next step: cristipaval, please fill out the PR Author Checklist and the Tests/QA sections, then the checklist check will pass. No push from me is warranted.

@situchan

situchan commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp

Before:
Screenshot 2026-07-02 at 11 31 50 AM

After:
Screenshot 2026-07-02 at 11 31 09 AM

Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot
melvin-bot Bot requested a review from cristipaval July 2, 2026 10:35
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Re-checked now that everything settled. The failing builds are not caused by this PR — no fix to push here.

Two checks are red:

  1. build (New Expensify Dev, DebugDevelopment, false) (Remote Build iOS) — a native iOS compile error, unrelated to this PR:

    ios/CertificatePinning.swift:83:82: error: cannot find type 'TSKPinningValidationResult' in scope
    

    ios/CertificatePinning.swift:83 references the TrustKit type TSKPinningValidationResult, which isn't resolving against the installed TrustKit 3.0.7. This PR only touches one line of JS (src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx) — it can't affect a native Swift file. The identical error is currently failing Remote Build iOS on main and several other branches, so it's a pre-existing, repo-wide breakage from the recent certificate-pinning work, not something to fix on this branch. Per policy I don't push fixes for unrelated/infra failures — this needs an internal engineer to address the TrustKit import in CertificatePinning.swift (likely a deploy blocker to raise separately).

  2. PR Author Checklist / checklist — fails only because the author checklist is empty (0/41). A human must check the boxes and fill in the Tests/QA sections; MelvinBot doesn't touch it.

Everything else passes (Bun tests, all 8 test shards, typecheck, ESLint, Prettier, Storybook, spellcheck, knip, and the other builds).

Next step: cristipaval, no push is warranted here. Once the main iOS-build breakage is resolved and you complete the author checklist, the remaining red checks will clear. Merging latest main into this branch afterward should pick up the fix.

@cristipaval
cristipaval marked this pull request as ready for review July 2, 2026 10:45
@cristipaval
cristipaval requested a review from a team as a code owner July 2, 2026 10:45
@melvin-bot
melvin-bot Bot requested review from situchan and trjExpensify and removed request for a team July 2, 2026 10:45
@melvin-bot

melvin-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

@situchan Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team July 2, 2026 10:45
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Update: the build (New Expensify Dev, DebugDevelopment, false) (iOS) check has now failed, but it's an infrastructure/flaky failure, not caused by this PR — no code fix is warranted.

Evidence:

  • The build ended with a generic ■ Failed: Building the app / RockError: Failed to build the project while compiling third-party Pods (PromisesObjC, RCT-Folly, Mapbox). There is no compiler diagnostic anywhere in the log — no error:, no ** BUILD FAILED **, no Command CompileC/CompileSwift/Ld failed, no killed signal.
  • It was preceded by a remote-cache miss: ▲ Remote Cache: Failed to fetch cached build … Remote cache failure error: NoSuchKey: The specified key does not exist. and [Codegen] Could not find generated autolinking output at … autolinking.json.
  • This PR's only change is a single line of TypeScript — adding styles.flexRow to a View style array in WorkspacePerDiemPage.tsx:344. That's JS bundled by Metro at runtime; it is never compiled by the native iOS xcodebuild, so it cannot cause this failure. typecheck and all JS tests already passed.

The other failing check remains PR Author Checklist / checklist — a human-only item (cristipaval, please fill out the checklist + Tests/QA sections).

Recommended next step: re-run the failed iOS build job (run 28583258269); it should pass on a clean cache. I won't push a code change since nothing in the code is broken.

@cristipaval cristipaval changed the title Fix missing per diem subtitle on Android by re-adding flexRow wrapper [CP Staging] Fix missing per diem subtitle on Android by re-adding flexRow wrapper Jul 2, 2026
@cristipaval cristipaval added the CP Staging marks PRs that have been CP'd to staging label Jul 2, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 The only failing check now is build (New Expensify Dev, DebugDevelopment, false), and it's a flaky iOS infra failure — not related to this PR. No code fix is warranted; it just needs a re-run.

cristipaval, please re-run that failed job (Actions → the failed run → Re-run failed jobs). I don't have permission to trigger the re-run myself.

Why it's flaky/unrelated
  • The only change in this PR is a one-line styles.flexRow addition in src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx:344 — pure JS/TSX, it can't affect iOS native (Swift/Xcode) compilation.
  • The failed job ends with a generic RockError: Failed to build the project from xcodebuild with no Swift/clang compile error in the log.
  • The run first hit a remote build-cache miss (S3 NoSuchKey / HTTP 404 for rock-artifacts/...zip) and fell back to a local build, which then failed without a real compile error — a classic infra/remote-build flake.
  • Every other build in the same run compiled the identical code successfully: build (Debug, true), build (Expensify Dev, Debug, true), and build (developmentDebug, false) all passed.

All other checks pass (Bun tests, all 8 test shards, typecheck, ESLint, Prettier, Storybook, spellcheck, knip, perf tests, and the checklist).

@melvin-bot
melvin-bot Bot requested a review from cristipaval July 2, 2026 10:53
@mountiny

mountiny commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Flaky as noted above

@mountiny
mountiny merged commit 6d42a39 into main Jul 2, 2026
46 of 50 checks passed
@mountiny
mountiny deleted the claude-perDiemSubtitleFlexRow branch July 2, 2026 11:00
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

OSBotify pushed a commit that referenced this pull request Jul 2, 2026
[CP Staging] Fix missing per diem subtitle on Android by re-adding flexRow wrapper

(cherry picked from commit 6d42a39)

(cherry-picked to staging by cristipaval)
@OSBotify

OSBotify commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.4.26-2 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Help site review — no changes required

I reviewed the changes in this PR against Expensify's help site files under App/docs/articles.

Conclusion: No help site updates are needed.

Why: This PR is a one-line CSS layout fix. It re-adds styles.flexRow to the subtitle wrapper View on the Per Diem page so the existing subtitle — "Set per diem rates to control daily employee spend. Learn more." — renders again on Android native after a regression from #94912.

  • No feature, workflow, setting, tab, or button label was added, removed, or renamed.
  • No user-facing copy changed (the subtitle text already existed; it was just hidden on Android).
  • The behavior described in the Per Diem help docs is unchanged — this fix only restores UI that was accidentally collapsed to zero height on one platform.

Because there's no change to documented product behavior or terminology, no draft docs PR was created.

@cristipaval, there's no linked help site PR to review since no docs changes were required. If you believe the Per Diem help content should be updated regardless, let me know and I'll draft one.

@OSBotify

OSBotify commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.4.27-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 I reviewed the changes in this PR against the help site content under App/docs/articles.

No help site changes are required.

This PR is a one-line rendering fix: it re-adds styles.flexRow to the subtitle wrapper View on WorkspacePerDiemPage so the "Set per diem rates to control daily employee spend. Learn more." subtitle renders again on Android native (a regression from #94912). It does not add or change any feature behavior, workflow, setting, tab, button label, or user-facing copy — the subtitle text itself is unchanged and simply becomes visible again on Android.

Since nothing about the documented Per Diem behavior changes, there's nothing to update in the help site articles, so I did not create a draft docs PR.

@cristipaval, there is no linked help site PR to review since no docs changes are required. If you believe a docs update is warranted, let me know what behavior should be documented and I'll create one.

@OSBotify

OSBotify commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants