[CP Staging] Revert "fix: prevent download button flash when opening broken image attachment"#92048
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b70f2d142
ℹ️ 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".
| return url; | ||
| } | ||
|
|
||
| return url.replace(ORIGIN_PATTERN, apiRoot); |
There was a problem hiding this comment.
Preserve already-proxied staging attachment URLs
When the web staging proxy is active, getApiRoot({shouldUseSecure: false}) returns /staging/, so running this replacement on an attachment URL that is already proxy-relative (for example /staging/api/Download?..., which can be fed back through callers such as attachment rendering/download helpers) rewrites only the leading slash and produces /staging/staging/api/.... That broken URL makes the attachment/receipt fail to load or download in the staging web proxy context; the reverted guard was the only check preventing this double-prefix case.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @cristipaval 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…e-download-button-flash Revert "fix: prevent download button flash when opening broken image attachment" (cherry picked from commit fd3907d) (cherry-picked to staging by cristipaval)
|
🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.3.89-2 🚀
Bundle Size Analysis (Sentry): |
|
|
Reverts #90925
$ #92027
The reverted PR fixes a rarer use case than the one where the introduced deploy blocker occurs.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.