Repository navigation
Revert #81280 - #83738
Revert #81280#83738chuckdries wants to merge 1 commit into
Conversation
|
Conflicts already 😩 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 603f8fbf44
ℹ️ 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".
| const reportNameValuePairs = allReportNameValuePairsOnyxConnect?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${reportID}`]; | ||
| const isReportArchived = !!reportNameValuePairs?.private_isArchived; | ||
| const isWriteActionAllowed = canUserPerformWriteAction(report, isReportArchived); | ||
|
|
There was a problem hiding this comment.
Recompute visible-action cache on report access changes
This cache entry is computed from private_isArchived/write access, but it is only refreshed inside the REPORT_ACTIONS subscription. When a report is archived/unarchived (or permissions change via report metadata/name-value pairs) without a new action arriving, lastVisibleReportActions stays stale and downstream callers (LHN subtitle/actor/message preview) can render the wrong last action until another action update happens.
Useful? React with 👍 / 👎.
| (reportAction, actionKey) => | ||
| (!(isWhisperAction(reportAction) && !isReportPreviewAction(reportAction) && !isMoneyRequestAction(reportAction)) || isActionableMentionWhisper(reportAction)) && | ||
| shouldReportActionBeVisible(reportAction, actionKey, isWriteActionAllowed) && |
There was a problem hiding this comment.
Pass stable action key to visibility filter
The filter now passes the array position (actionKey) into shouldReportActionBeVisible, but that function interprets the key as the original collection key for deprecation checks. Using an index can incorrectly classify valid actions as deprecated (or miss deprecated-key filtering), which can pick the wrong last visible action for a report in migrated data that still includes sequenceNumber fields.
Useful? React with 👍 / 👎.
|
This revert's conflicts are kinda gnarly, and the fix forward is simple. Closing in favor of #83742 |
Explanation of Change
Reverts #81280
This reverts commit a152afa, reversing changes made to 12565a6.
This was not a straight revert
Fixed Issues
$ #83735
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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