Skip to content

[HOLD for payment 2025-05-05] Cards - Adding a card & refreshing page displays learn more page briefly #60533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 8 tasks
IuliiaHerets opened this issue Apr 19, 2025 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Monthly KSv2 Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Apr 19, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: V9.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: No
Email or phone of affected tester (no customers): Slottwo1 [email protected]
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Workspace Settings

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Go to workspace settings - company cards
  3. Add a american express corporate card
  4. Refresh the page

Expected Result:

Adding a card & refreshing page must not display learn more page briefly.

Actual Result:

Adding a card & refreshing page displays learn more page briefly before updating to cards page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6806886_1745036499692.Screenrecorder-2025-04-19-09-43-21-595.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Apr 19, 2025
Copy link

melvin-bot bot commented Apr 19, 2025

Triggered auto assignment to @VictoriaExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added the Daily KSv2 label Apr 19, 2025
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 19, 2025
Copy link

melvin-bot bot commented Apr 19, 2025

Triggered auto assignment to @arosiclair (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Apr 19, 2025

💬 A slack conversation has been started in #expensify-open-source

@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Adding a card & refreshing page displays learn more page briefly before updating to cards page.

What is the root cause of that problem?

This comes from #60261

They forgot to pass isLoading to cardFeeds in this memo

return Object.values(allFeeds).reduce<CardFeeds & {settings: Required<CardFeeds['settings']>}>(

So isLoading here will be false

const isLoading = !isOffline && (!cardFeeds || (!!cardFeeds.isLoading && isEmptyObject(cardsList)));

So instead of displaying ActivityIndicator here:

{!!isLoading && (
<ActivityIndicator
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
style={styles.flex1}
color={theme.spinner}
/>
)}

Empty state here will be displayed instead:

{isNoFeed && <WorkspaceCompanyCardPageEmptyState route={route} />}

What changes do you think we should make in order to solve the problem?

Pass isLoading to cardFeeds as well after here

(acc, feed) => {

acc.isLoading = feed?.isLoading ?? !feed;

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@mountiny
Copy link
Contributor

Cc @VickyStash @puneetlath

@arosiclair
Copy link
Contributor

Looks like a new feature so I'll just demote this

@arosiclair arosiclair added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2 labels Apr 21, 2025
@puneetlath
Copy link
Contributor

Yes, I agree it doesn't need to be a deploy blocker. @VickyStash mind taking a look?

@VickyStash
Copy link
Contributor

I'll take a look at it today!

@thelullabyy
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Adding a card & refreshing page displays learn more page briefly before updating to cards page.

What is the root cause of that problem?

Recently, we migated to use useCardFeeds, but we forget to pass isLoading to result of useCardFeeds

What changes do you think we should make in order to solve the problem?

In useCardFeeds hook, we need to ensure to return isLoading is true if there is at lease one feed has isLoading is true

       const isLoading = Object.values(allFeeds).some(feed => feed?.isLoading)

And then adding isLoading to initial acc

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@VickyStash
Copy link
Contributor

@puneetlath One more issue I've found: OpenPolicyProfilePage returns workspace feed key, but not the domain feed key data.

Image

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 22, 2025
@VickyStash
Copy link
Contributor

The PR was opened for review. cc @DylanDylann

@puneetlath puneetlath changed the title Cards - Adding a card & refreshing page displays learn more page briefly [HOLD for payment 2025-05-05] Cards - Adding a card & refreshing page displays learn more page briefly May 6, 2025
@puneetlath
Copy link
Contributor

Looks like the automation didn't work but this is ready for payment @VictoriaExpensify

@melvin-bot melvin-bot bot removed the Weekly KSv2 label May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

This issue has not been updated in over 15 days. @puneetlath, @VickyStash, @VictoriaExpensify eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

9 participants