Fix landscape mode layout on Agents pages - #97782
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@m-natarajan would you be able to check if this is still happening for you here? I tested Android on different simulators and on my Android 16 physical device, but I'm not able to reproduce this bug so I just want to confirm this needs a separate fix Screen.Recording.2026-08-04.at.13.15.58.mov |
|
@GCyganek Screenrecorder-2026-08-04-16-40-08-799.mp4 |
|
@m-natarajan thank you, from what I see you tested version without the changes from this PR, but the bug I linked in my previous comment is what caused the revert, so I wanted to make sure it is not reproducible on this PR. Are you able to do that in any way? I'd be really grateful as I can't reproduce it on my end, but you were able to first time these changes were merged to main. I can ask someone for an ad-hoc build if it's needed |
|
@GCyganek Share the Ad-hoc build when its ready and ping, Will retest the same. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
@m-natarajan build is ready |
|
@GCyganek Passed in the Ad-hoc build Screenrecorder-2026-08-05-17-23-28-822.mp4 |
Thank you! |
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b04699907
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@mkhutornyi 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] |
|
@truph01 could you review again as you reviewed the reverted PRs? I only added a few small changes to the reverted PRs, although the QA that reported the bug that triggered the revert confirmed it's not reproducible anymore even though I haven't changed anything before the test |
|
@GCyganek Sure. I will review this one. |
|
@trjExpensify Could you help assign me to this PR? |
|
Added you as a reviewer @truph01 |
|
Bug 1: There is no padding bottom below the submit button in test 2: Screen.Recording.2026-08-19.at.11.24.17.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-08-19.at.11.56.43.moviOS: HybridAppTest 1: Screen.Recording.2026-08-19.at.11.13.34.movScreen.Recording.2026-08-19.at.11.14.49.movTest 2: Screen.Recording.2026-08-19.at.11.29.20.movScreen.Recording.2026-08-19.at.11.29.32.movTest 3: Screen.Recording.2026-08-19.at.11.34.51.movScreen.Recording.2026-08-19.at.11.35.10.movTest 4: Screen.Recording.2026-08-19.at.11.42.03.movScreen.Recording.2026-08-19.at.11.43.32.movTest 5: Screen.Recording.2026-08-19.at.11.48.56.moviOS: mWeb SafariTest 1: Screen.Recording.2026-08-19.at.11.17.00.movTest 2: Screen.Recording.2026-08-19.at.11.30.19.movTest 3: Screen.Recording.2026-08-19.at.11.36.17.movTest 4: Screen.Recording.2026-08-19.at.11.44.43.movMacOS: Chrome / SafariScreen.Recording.2026-08-19.at.11.57.52.mov |
|
@Expensify/design Do you think this behavior is fine? |
|
Have we considered making it where the green button is not fixed and you would need to scroll or dismiss the keyboard to get to it? |


Explanation of Change
Changes from #97214 and #94565 that were reverted because of this #97196 (comment)
Fixes landscape layout on Agents/Agent Rules pages when the keyboard is open. Replaces the scrollable-form layout with a collapsing header, shrinks multiline prompt inputs to a fixed height while the keyboard is active, and renders Save/Delete in one row in landscape.
Also corrects the header collapse math for the top safe area inset. Fixes not restoring header height after device rotation to portrait mode. Also adding isKeyboardFullyOpen check and add naturalHeightRef.current !== height comparison in onLayout to make sure duplicated onLayout height updates do not cancel ongoing animationwhen rotating from portrait to landscape with opened keyboard
Fixed Issues
$ #93631, #97196
PROPOSAL: N/A
Tests
Test 1: Add agent page in landscape
Test 2: Edit agent page in landscape
Test 3: Edit agent rule in landscape (Save + Delete in one row)
Test 4: Add agent rule tabs + Profile page
Test 5
Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-08-06.at.13.31.36.mov
Screen.Recording.2026-08-06.at.13.32.51.mov
with
isRulesRevampEnabledbeta enabled:Screen.Recording.2026-08-06.at.13.38.11.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-08-06.at.13.34.39.mov
Screen.Recording.2026-08-06.at.13.35.25.mov
with
isRulesRevampEnabledbeta enabled:Screen.Recording.2026-08-06.at.13.37.14.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-06.at.13.39.28.mov
with
isRulesRevampEnabledbeta enabled:Screen.Recording.2026-08-06.at.13.39.05.mov