Remove broken-card task and RBR after a 90-day grace period while keeping the error#93523
Draft
wildan-m wants to merge 3 commits into
Draft
Remove broken-card task and RBR after a 90-day grace period while keeping the error#93523wildan-m wants to merge 3 commits into
wildan-m wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
A personal or company card whose connection has broken keeps prompting the user indefinitely: the time-sensitive home task and the red dot (RBR) pointing at the broken connection stay forever, no matter how long the connection has gone unresolved. Both surfaces are driven by a single derived signal that only looks at the latest connection status — there is no notion of how long the connection has been failing, so a years-old broken connection nags exactly as much as one that broke yesterday.
This adds a 90-day grace period to that single signal: once a connection has been broken and unresolved for 90 days, it stops feeding the task and the red dots. The age is measured from the connection's last successful refresh, which does not advance while the connection is failing, so it accurately reflects how long the connection has been broken (and if that timestamp is missing we keep prompting, to stay on the safe side). The error stored on the card is deliberately left alone, so the card still shows as broken on its own page and stays fixable — under 90 days nothing changes, and past 90 days only the proactive prompting goes away.
Fixed Issues
$ #91451
PROPOSAL: #91451 (comment)
Tests
lastScrapeResultthat is not one of the recoverable/ignored statuses). Confirm the broken connection currently surfaces: the "Fix the connection" task appears in the Inbox time-sensitive section, and a red dot (RBR) appears — for a personal card on theAccountbutton and theWalletrow; for a company card on the workspace's company-cards surfaces.Account/Walletrows for a personal card, and on the company-cards surfaces for a company card.Offline tests
This change only gates a value derived from already-local card data and the device date — no network is involved. It behaves identically offline: a connection broken past the 90-day window stays unprompted, and one within the window keeps prompting, whether online or offline.
QA Steps
Same as Tests. Note: reproducing requires a card whose connection has been broken (non-recoverable
lastScrapeResult) with a last-successful-refresh timestamp older than 90 days; cards broken for less than 90 days must still show the task and RBR.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Verified locally on the dev server: a broken personal card's RBR red dot on the
Account>Walletrow is shown when the connection broke under 90 days ago, and is removed once the connection has been broken for 90+ days, while the card's broken status is preserved.