Skip to content

refactor: the new-transaction highlight rail and the wide RHP width model - #98744

Open
TaduJR wants to merge 21 commits into
Expensify:mainfrom
TaduJR:refactor-Reports-newTransactionHighlight-and-RHPLayout-followups
Open

refactor: the new-transaction highlight rail and the wide RHP width model#98744
TaduJR wants to merge 21 commits into
Expensify:mainfrom
TaduJR:refactor-Reports-newTransactionHighlight-and-RHPLayout-followups

Conversation

@TaduJR

@TaduJR TaduJR commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Follow-up to #89585, which shipped the duplicate-expense highlight. The behaviour is the same duplicating an expense still highlights the new row and widens the panel but the code behind it is simpler and a few rough edges are fixed.

Marking a new expense. Each mark now records when it was written, so clearing an old mark can't wipe a newer one for the same expense. And only one place decides whether to write a mark, instead of two that could disagree about it.

The wide panel. Which screens show wide is now worked out from the navigation state as it renders, instead of being kept in a second copy that had to be updated by hand. That removes the two functions doing the syncing, plus an API nothing read. A panel that's closing also keeps its width until the animation finishes, rather than snapping narrow straight away.

The animation. The row appears as soon as it's added, and only the flash waits until the screen is in front so an expense added while you're looking at something else is still highlighted when you come back. A highlight now also survives the list re-sorting underneath it.

One thing worth knowing when reviewing: the stored shape of pendingNewTransactionIDs changed. Marks written by the current production build are ignored rather than read. Nothing needs migrating old entries are cleaned up the first time they're read.

Fixed Issues

$ #96327
PROPOSAL:

Tests

**Prerequisite: **

  • Report A: an expense report on a workspace with 2 or more expenses.
  • Report B: an expense report with exactly 1 expense.
  • Report C: an empty expense report — create one if you don't have it.
  • The workspace matters: on a personal report a duplicate may be moved to a new report, and no highlight is expected there.

⚠️ A known unrelated bug you will probably see
Re-opening a chat you already visited in the same session can make existing expenses flash in that chat's expense cards. That is issue #98308 — already live in production, neither caused nor fixed by this PR, and it reproduces identically without these changes. Please don't file it against this PR, but do mention it if you see it, because it can be mistaken for a failure of test 7.


1. A duplicated expense is highlighted

  1. Open report A.
  2. Click an expense row to open its details in the side panel.
  3. Click More in that panel.
  4. Click Duplicate expense.
  5. Verify a copy appears in the report list.
  6. Verify the list scrolls so the copy is centred on screen.
  7. Verify the copy fades in and then flashes once.
  8. Verify no other row flashes.

2. The first expense on a report is not highlighted

  1. Open report C (the empty one).
  2. Add one expense to it.
  3. Verify the expense appears.
  4. Verify it does not flash.

3. Editing an existing expense does not highlight it

  1. Open report A.
  2. Click an expense that is already on the report.
  3. Change its amount or description and save.
  4. Close the panel and return to the report list.
  5. Verify the row shows the new value.
  6. Verify the row does not flash.

4. Two additions in a row each get their own highlight

  1. Open report A.
  2. Duplicate an expense.
  3. Verify the copy is scrolled to and flashes.
  4. Wait about 3 seconds.
  5. Duplicate a different expense.
  6. Verify the second copy is also scrolled to.
  7. Verify it also flashes.

5. A highlight survives the row moving

  1. Open report A.
  2. Duplicate an expense and watch the new row closely.
  3. Verify it flashes.
  4. Verify that if the row shifts position on its own moments later, the highlight continues rather than cutting out.
  5. Duplicate another expense.
  6. While it is still flashing, click a column header (Date, Merchant, Category or Amount) to re-sort.
  7. Verify the row keeps its highlight through the re-sort.

6. Deleting and re-adding highlights again

  1. Open report A.
  2. Click an expense row, click More, then click Delete.
  3. Verify the expense is removed.
  4. Duplicate another expense.
  5. Verify the newly added one flashes.

7. Switching between expense reports does not highlight

  1. Open report A (the expense report itself, not the chat).
  2. Switch directly to report B.
  3. Verify no row on report B flashes — including right after the switch, while the list is still filling in.
  4. Switch back to report A.
  5. Verify no row flashes.
  6. Repeat steps 2–5 quickly several times.
  7. Verify nothing flashes on either report.
  8. If you see flashing in a chat's expense cards rather than in the report table, that is the known bug above, not this test.

8. Bulk duplicate

  1. Open report A.
  2. Tick the checkbox on two or more expense rows.
  3. Verify a button appears showing the count, e.g. "2 selected".
  4. Click it.
  5. Click Duplicate expense.
  6. Verify a copy appears for each selected expense.
  7. Verify every copy is highlighted, not only the first.

9. The panel opens at the right width (web/desktop, maximised)

  1. Click the Spend tab in the top navigation. (Not the "Search" button inside a chat — that is a different feature.)
  2. Select the Expenses tab.
  3. Verify the results are grouped into expense reports. If not, use the grouping control and choose Expense reports.
  4. Click a report row that has more than one expense.
  5. Verify the side panel opens at its widest immediately.
  6. Verify it does not open narrow then jump wider.
  7. Go back and click a report row with exactly one expense.
  8. Verify it opens at the medium width.

10. The panel keeps its width while closing (web/desktop, maximised)

  1. From Spend → Expenses, open a report with more than one expense (widest).
  2. Close it with the back button.
  3. Watch the very first moment of the closing animation.
  4. Verify it slides out at full width.
  5. Verify it does not snap narrow first.
  6. Reopen it and close it with the Escape key; verify the same.
  7. Repeat with a single-expense report at the medium width.

11. Closing one screen off a stack keeps the width (web/desktop, maximised)

  1. From Spend → Expenses, open a report with several expenses.
  2. From inside it, click one expense so a second screen stacks on top.
  3. Close only that second screen.
  4. Watch the report panel behind it during the animation.
  5. Verify it stays at full width throughout.
  6. Verify it does not flicker narrower as the top screen slides away.

12. The panel shrinks when the report loses expenses (web/desktop, maximised)

  1. From Spend → Expenses, open a report with more than one expense (widest).
  2. Leave the panel open.
  3. Delete expenses one at a time (row → MoreDelete) until one remains.
  4. Verify the panel shrinks to the medium width.
  5. Verify it does so without being closed and reopened.

13. Switching tabs while the panel is open (web/desktop, maximised)

  1. From Spend → Expenses, open a report with several expenses.
  2. Without closing it, switch to another tab (Inbox or Workspaces).
  3. Verify the new tab lays out normally.
  4. Verify there is no leftover wide panel and no stray dimmed area.
  5. Return to Spend and verify the panel comes back at its proper width.

14. Moving between expenses with the arrows (web/desktop, maximised)

  1. From Spend → Expenses, open a single expense in the side panel.
  2. Click the next arrow.
  3. Verify it opens at a sensible width with no flicker.
  4. Step through several more using next and previous.
  5. Verify each behaves the same.
  6. Verify the position counter stays in step with the list you came from.

15. On a wide screen the highlight plays behind a stacked panel (web/desktop, maximised)

  1. From Spend → Expenses, open a report with several expenses.
  2. From inside it, click one expense so a second screen stacks on top.
  3. Verify the report behind is still visible and dimmed to the left.
  4. From the top screen, click More then Duplicate expense.
  5. Verify the new row flashes in the dimmed report behind you, while you are still on the top screen.
  6. Click the dimmed area.
  7. Verify it returns you to the report.

16. On mobile the highlight waits for you (iOS, Android, or a narrow browser window)

  1. Open report A.
  2. Click one expense so it fully covers the report.
  3. Click More then Duplicate expense.
  4. Verify no flash is visible while the report is covered.
  5. Go back to the report.
  6. Verify the new row is fully visible — correct height, not blank or collapsed.
  7. Verify it flashes on arrival.
  8. Repeat once, but stay on the covering screen for two minutes before going back. Verify the row is still fully visible and still flashes — the wait has no time limit.

Offline tests

Same as tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Mac-Chrome.mp4

TaduJR added 20 commits July 15, 2026 23:15
…ports-newTransactionHighlight-and-RHPLayout-followups

# Conflicts:
#	src/selectors/ReportMetaData.ts
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups

# Conflicts:
#	src/selectors/ReportMetaData.ts
…ports-newTransactionHighlight-and-RHPLayout-followups

# Conflicts:
#	src/components/Search/index.tsx
#	src/libs/actions/IOU/MoneyRequestBuilder.ts
#	src/pages/iou/request/step/confirmation/useExpenseSubmission.ts
#	tests/actions/IOU/GetMoneyRequestInformationTest.ts
@TaduJR
TaduJR requested review from a team as code owners August 17, 2026 05:59
@melvin-bot
melvin-bot Bot requested a review from abzokhattab August 17, 2026 05:59
@melvin-bot

melvin-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

@abzokhattab 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]

@melvin-bot
melvin-bot Bot requested review from garrettmknight and removed request for a team August 17, 2026 05:59
@TaduJR
TaduJR marked this pull request as draft August 17, 2026 06:00
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 94.85% <ø> (ø)
...equestReportView/MoneyRequestReportActionsList.tsx 60.26% <100.00%> (ø)
...portActionItem/MoneyRequestReportPreview/index.tsx 92.72% <100.00%> (ø)
...onents/ScreenWrapper/ScreenWrapperStatusContext.ts 100.00% <ø> (ø)
src/components/ScreenWrapper/index.tsx 92.68% <100.00%> (ø)
...archList/ListItem/TransactionGroupListExpanded.tsx 67.69% <ø> (ø)
src/components/WideRHPContextProvider/default.ts 42.85% <ø> (+15.58%) ⬆️
...s/WideRHPContextProvider/getIsRHPDisplayedBelow.ts 100.00% <100.00%> (+100.00%) ⬆️
...s/WideRHPContextProvider/getVisibleRHPRouteKeys.ts 95.65% <100.00%> (+95.65%) ⬆️
...onents/WideRHPContextProvider/useRHPWidth/index.ts 95.65% <100.00%> (+95.65%) ⬆️
... and 15 more
... and 19 files with indirect coverage changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71b330f5f7

ℹ️ 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".

Comment thread src/selectors/ReportMetaData.ts
Comment thread src/components/WideRHPContextProvider/useRHPWidth/index.ts
Comment thread src/components/WideRHPContextProvider/useRHPWidth/index.ts Outdated
Comment thread src/libs/PendingNewTransactionFlags.ts
@TaduJR

TaduJR commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 1d40ac7687

ℹ️ 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".

@abzokhattab

Copy link
Copy Markdown
Contributor

@MelvinBot @codex review the PR and check for regressions, breaking changes or bugs

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 1d40ac7687

ℹ️ 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".

@MelvinBot

Copy link
Copy Markdown
Contributor

PR Review — regressions, breaking changes & bugs

Verdict: Solid, well-tested refactor. No High-severity defects, no crashes, and no data-correctness issues. The Onyx shape change is backward-safe, all changed signatures are fully propagated, and the wide-RHP width derivation reproduces the old hand-synced behavior. Everything I flag below is highlight/flash cosmetics or a deliberate behavior change — nothing blocks correctness. I reviewed the three subsystems (marking, wide-RHP width, animation) against 1d40ac7.

Worth a look before merge

1. A deferred flash can be dropped after 4s when a wide RHP covers the report preview (low–med, cosmetic; please verify manually)
The rail sweep + diff-latch window now start a 4s timer as soon as isReportVisible is true (useNewTransactions.ts:98-124), but the pulse defers until focus arrives (useAnimatedHighlightStyle/index.ts:142-148). In MoneyRequestReportPreview, isReportVisible is computed from the physical width (MoneyRequestReportPreview/index.tsx:146), so on a wide screen it's true even while a wide RHP covers the pane and the pulse is still awaitingFocus. If focus takes >4s, the sweep empties the add-set → shouldHighlight flips false → the focus listener returns without playing. The row stays revealed (so the PR's "still highlighted when you come back" mostly holds), but the one-shot pulse never fires. MoneyRequestReportActionsList is not affected — there isReportVisible tracks the wide-RHP-adjusted narrow value, which aligns with the pulse's deferral.
Repro to confirm: on a wide viewport, add a 2nd expense to a report whose preview is covered by a wide RHP, wait >4s, then focus it — is the flash lost?

2. 60s freshness window silently drops a legitimately-delayed highlight (behavior change vs main, intended tradeoff)
Marks are stamped optimistically at expense-creation time; the selector expires any mark older than PENDING_TRANSACTION_FRESHNESS_WINDOW (60s) (ReportMetaData.ts:64-67). If a user creates a 2nd expense and doesn't open the target report within 60s (locks phone, gets distracted), the highlight is dropped — on main there was no window, so it showed whenever the report was eventually opened. Slow API does not trigger this (the optimistic mark persists regardless of latency); only wall-clock-before-view matters. Flagging as a deliberate design choice, not a bug.

Minor / suggestions

  • Cold-cache 1→2 marking depends on callers pre-incrementing transactionCount. When the report's transactions aren't cached, the "does this add make the report multi-transaction" check falls back to the server count that callers pre-increment (MoneyRequestBuilder.ts:698-704). A caller passing a stale count on a cold cache would miss the mark. Worth a unit test for the cold-cache path.
  • Asymmetric timer cleanup. The rail-sweep effect schedules a setTimeout with no cleanup (useNewTransactions.ts:117-123) while the sibling latch-window effect returns clearTimeout. The scheduledSweeps ref prevents double-deletes, so it's safe, but clearing it on cleanup would keep the two 4s windows in sync and reduce the surface for finding Some initial fixes and code style updates #1.
  • Deferred unmark on RHP unmount uses Promise.resolve().then(unmark) (microtask) in useRHPWidth; on a same-report re-navigation the microtask could theoretically clear the width hint before the replacing screen consumes it. Worst case is a one-frame narrower render, never a stuck-wide panel — noting for completeness.
Claims I verified as SOLID (no defect)

Marking / storage shape

  • Old-shape Onyx entries ({"123": true}) are parsed to undefined and swept, never crashed on — "ignored rather than read" is accurate and safe; no migration needed.
  • Cleanup is a real write in a useEffect/setTimeout, not inside the selector (selector is pure).
  • Timestamps use Date.now() (ms) on both write and read; clock-skew (age < 0) is explicitly swept.
  • Per-write keying (transactionID:flaggedAt) means a late sweep of an old instance can't wipe a newer mark; the selector keeps the newest instance per transaction.
  • Marking consolidation preserved every flow: the removed imperative marks in Split/TrackExpense/useExpenseSubmission (per-diem) are all covered by the builder's broadened transactionCountAfterAdd >= 2 condition. isOneToTwoTransactionTransition is fully removed with zero remaining references.

Wide-RHP width model

  • getVisibleRHPKeys(state, allWideRHPKeys, allSuperWideRHPKeys) and getIsRHPDisplayedBelow(focusedRouteKey, visibleSuperWide, visibleWide) argument orders are correct at every caller — no wide/super-wide swap.
  • The "closing panel keeps its width" fallback (visibleRHPKeys.has(key) || !keysInState.has(key)) is self-healing: a still-mounted-but-covered screen stays in keysInState (full recursive traversal) → correctly narrow; only a screen that left the tree entirely (dismiss in flight) holds width, and removeRHPRouteKey drops it on unmount. No "pin wide forever" and no unbounded registration growth.
  • Tab-change clearing is now automatic via render-time derivation (a fullscreen navigator covering the RHP yields undefined last-key → empty), reproducing the removed manual syncRHPKeys/clearWideRHPKeys. The four removed API functions have zero stragglers.
  • useSyncExternalStore returns a primitive width → stable snapshot, no tearing/loops; useLayoutEffect flips width before paint (no flash).
  • shouldUseNarrowLayoutIgnoringWideRHP web/native parity is correct; ScreenWrapper's aliasing is behavior-preserving and additive; removing the eslint-disable is safe (the rule only fires on a literal useResponsiveLayout callee).

Animation

  • Highlight is keyed by transactionID end-to-end (not list index), and useNewTransactions reuses the same latched-add-set reference across a reorder, so a re-sort doesn't misfire or restart the window.
  • No repeated-flash-on-every-refocus (the focus listener unsubscribes and resets phase on first fire); no "target computed before row exists" race; reanimated shared-value lifecycle is clean; render-phase setState guards converge.

Automated review — three focused passes over the marking, wide-RHP, and animation subsystems, with adversarial verification. Findings #1 and #3 are worth a quick manual/unit check; the rest is FYI.

@TaduJR
TaduJR marked this pull request as ready for review August 17, 2026 11:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d40ac7687

ℹ️ 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".

selector: pendingNewTransactionIDsSelector,
});
const newTransactions = useNewTransactions(reportLoadingState?.hasOnceLoadedReportActions, reportTransactions, pendingNewTransactionIDs, reportIDFromRoute, isFocused);
const newTransactions = useNewTransactions(reportLoadingState?.hasOnceLoadedReportActions, reportTransactions, pendingNewTransactionIDs, reportIDFromRoute, isReportVisible);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid consuming highlights in covered desktop reports

When a desktop report remains mounted after the user switches to another fullscreen tab, shouldUseNarrowLayout is false, so isReportVisible remains true even though isFocused is false. Passing that value here starts the four-second sweep and the highlight animation while the report is completely covered; returning after the timer therefore shows no highlight. The same regression exists in MoneyRequestReportPreview, so visibility should distinguish a report exposed behind an RHP from one covered by a fullscreen navigator.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants