Fix: Card name in card list and card name field are blank on admin side - #93554
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@aimane-chnaif 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4134c87666
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 520b30f75d
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 335d9cf331
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
|
@nyomanjyotisa please pull main |
|
🤖 Code review — the App-side changes are clean and consistent, but there are two things worth confirming before this merges. 1. This relies on a backend change that isn't linked hereThe approved proposal took the front-end-only route — fall back to This PR instead implements that proper, shared approach: it reads/writes a new
If the backend doesn't do this, the new name survives only in the editor's local Onyx until reload and never reaches other admins. There's no 2. Failure-rollback inconsistencyThe two rollbacks for the same edit use different removal semantics:
On a failed save for a card that never had a custom name, the personal NVP would keep showing the failed value while the shared NVP rolls back. Use Minor nits (non-blocking)
The strongest follow-up is confirming the backend persists |
| const [countryByIp] = useOnyx(ONYXKEYS.COUNTRY); | ||
| const [personalDetails, personalDetailsMetadata] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
| const [customCardNames] = useOnyx(ONYXKEYS.NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES); | ||
| const [workspaceCardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${domainOrWorkspaceAccountID}`); |
There was a problem hiding this comment.
Use Onyx selector. No need to subscribe to the entire CardFeeds object
|
@aimane-chnaif PR updated |
|
🤖 Code review (commit Failure-rollback inconsistency (still present)The two NVP rollbacks for the same failed edit use different removal semantics:
When a card had no prior custom name, Fix: use Backend persistence — please confirmStill no Verified safe
|
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
#93554 (comment) - can we get some tests for this PR? 🙏 |
|
Added a test case 👍 the failing test is unrelated to these changes |
|
looks like those being fixed in #94864 👍 |
|
@nyomanjyotisa please pull main again as that fix has just been merged 😬 |
|
@Beamanator Merged with main! |
|
🚧 Beamanator has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.4.26-0 🚀
|
|
🤖 I reviewed the changes in this PR against the help site files under No help site changes are required. This PR is a bug fix: it makes a company card's custom name display consistently for both the card owner and workspace admins (previously the card name was blank on the admin side) by reading the name from the shared workspace NVP. It doesn't add a new feature, change a documented workflow, or rename any UI labels. I checked the company card help articles, and the individual assigned-card Card name (rename) feature isn't documented on the help site:
Since this fix restores the intended behavior of a feature that isn't described on the help site, there's nothing to update. No draft PR was created. @nyomanjyotisa, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Reads company card names from the shared workspace NVP (
NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES), so admins see the same custom card names as the card owner (vice versa)Fixed Issues
$ #78832
PROPOSAL: #78832 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Precondition:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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.Screenshots/Videos
Android: Native
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.Chrome.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-mWeb.Safari.mp4
MacOS: Chrome / Safari
MacOS-Chrome.mp4