Skip to content

refactor: extract useMoneyRequestReportVisibleActions and adapt useMarkAsRead/useUnreadMarker - #100025

Merged
mountiny merged 19 commits into
Expensify:mainfrom
callstack-internal:decompose/money-request-report-transactions-a2
Sep 15, 2026
Merged

mountiny merged 19 commits into
Expensify:mainfrom
callstack-internal:decompose/money-request-report-transactions-a2

Conversation

@sosek108

@sosek108 sosek108 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

This is PR 3 of a 10-PR stack decomposing the MoneyRequestReport list components (MoneyRequestReportActionsList / MoneyRequestReportTransactionList) into focused hooks and presentational sub-components.

This slice extracts the visible-actions derivation into a dedicated hook and replaces the monolith's inline unread-marker / mark-as-read logic with the hooks already shared with the chat list:

Performance test
image

We can see reduced number of renders for unrelated report's actions.

Fixed Issues

$ #99919
PROPOSAL:

Tests

  1. Open an expense report with transactions and comments — verify the transaction table and the comments render as before
  2. From another account, send a message to that report while scrolled up — verify the unread marker and the "Latest messages" floating button appear
  3. Tap "Latest messages" — verify the list scrolls to the bottom and the report is marked as read (marker clears)
  4. Switch to another report and back — verify the unread marker state resets correctly per report
  5. Keep a chat report open in another tab/window at the same time — verify read/unread behavior of the chat list is unaffected
  6. Run npx jest tests/unit/useUnreadMarkerTest.ts tests/unit/useMarkAsReadTest.ts tests/ui/MoneyRequestReportActionsListRejectModalTest.tsx and verify they pass
  • Verify that no errors appear in the JS console

Offline tests

  1. Go offline, receive no new data — verify the report renders identically
  2. While offline, verify actions pending deletion remain visible (strikethrough) in the comments section

QA Steps

  1. Open an expense report with transactions and comments — verify the transaction table and the comments render as before
  2. From another account, send a message to that report while scrolled up — verify the unread marker and the "Latest messages" floating button appear
  3. Tap "Latest messages" — verify the list scrolls to the bottom and the report is marked as read (marker clears)
  4. Switch to another report and back — verify the unread marker state resets correctly per report
  5. Keep a chat report open in another tab/window at the same time — verify read/unread behavior of the chat list is unaffected
  • 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
  • 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 followed proper code patterns (see Reviewing the code)
    • 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 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)
  • 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)
  • 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.
  • 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
Nagranie.z.ekranu.2026-09-9.o.10.15.03.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-09-9.o.10.07.35.mov

@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...stReportView/MoneyRequestReportTransactionList.tsx 0.28% <ø> (ø)
...equestReportView/MoneyRequestReportUnifiedList.tsx 12.22% <ø> (ø)
src/hooks/useUnreadMarker.ts 94.87% <100.00%> (+0.27%) ⬆️
...equestReportView/MoneyRequestReportActionsList.tsx 80.48% <96.66%> (+19.91%) ⬆️
...tReportView/useMoneyRequestReportVisibleActions.ts 94.73% <94.73%> (ø)
src/hooks/useMarkAsRead.ts 96.07% <94.28%> (+0.18%) ⬆️
... and 16 files with indirect coverage changes

…compose/money-request-report-transactions-a2
…compose/money-request-report-transactions-a2

# Conflicts:
#	src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx
@sosek108

sosek108 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review
@MelvinBot review

@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: 73fad601de

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

hasOnceLoadedReportActions: !!reportLoadingState?.hasOnceLoadedReportActions,
});

const {markNewestActionAsRead, completeSkippedMarkAsRead} = useMarkAsRead({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the initial read on the visible list position

When an unread money-request report opens around a linked historical action, the list can have hasNewerActions set or be positioned away from the end. This newly adopted hook nevertheless runs its initial effect and calls readNewestAction without checking either hasNewerActions or isScrolledToEnd, advancing lastReadTime past newer messages the user has not seen; the removed inline implementation conditioned the read on being at the bottom. Gate the initial read for this surface on the supplied pagination and scroll state.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like a valid concern here as step 5 fails as demonstrated in test video below.

Precondition:
• Account A (Submitter / Viewer)
• Account B (Approver / Co-worker)
• An expense report with enough items (e.g. 5+ expenses/transactions) so that the comments section at the bottom is pushed off-screen below the viewport.

Test Scenario:
1 Log in to Account A and Account B in separate browser windows or devices.
2 In Account A, navigate to the expense report for which we will post a new comment from Account B.
3 In Account B, open the expense report and post a new comment (e.g. "Testing unread marker").
4 In Account A, look at the Left Hand Navigation (LHN)
5 Verify the expense report item is bold and remains unread. (FAILS)
6 Scroll down to the bottom of the list (or tap the "Latest messages" button)
7 Verify that the green "New" unread marker line is visible above the new comment from Account B. Once at the bottom, the unread marker clears and the report is marked as read.

100025-web-chrome-issue-001.mp4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Now working same as staging.

Nagranie.z.ekranu.2026-09-10.o.11.30.58.mov

Comment thread src/hooks/useMarkAsRead.ts Resolved
@MelvinBot

Copy link
Copy Markdown
Contributor

Review

The decomposition itself looks good — the hook boundaries are sensible and MoneyRequestReportEmptyStateView is a clean lift. My main concern is the "Pure refactor — no behavior change" claim: adopting useMarkAsRead swaps the money-request view onto the chat list's read/unread semantics, and those differ from the inline logic this PR deletes in several concrete ways. That may well be the intent (converging the two surfaces), but it should be stated and QA'd rather than described as a no-op.


1. Read/unread semantics change for the money-request view

The deleted inline effects and useMarkAsRead do not agree on when a report gets marked read:

Behavior Deleted inline logic useMarkAsRead
Initial mark-as-read on open Gated on ((isVisible && Visibility.hasFocus()) || isFromNotification) && isScrolledToEnd, else deferred via readActionSkipped Unconditional — useMarkAsRead.ts:108-116 fires readNewestAction on mount whenever the report is unread
Archived reports Returned early when nothing new was in view Marks read anyway — useMarkAsRead.ts:186 short-circuits the guard for archived reports
hasNewerActions Not considered Blocks both paths (L131, L170) — safer, but different
Completing a skipped read onUnreadActionVisible fired regardless of window focus Requires Visibility.hasFocus() — useMarkAsRead.ts:205
Unread scan input Raw reportActions, compared on actorAccountID sortedVisibleReportActions, with isReportPreviewAction ? childLastActorAccountID : actorAccountID

The first row is the one I'd verify by hand: opening an unread expense report while parked at the top of a long list, or in a background tab, now consumes the unread state where it previously deferred. That is exactly what PR test steps 2 and 3 exercise, so it is worth an explicit pass.

2. scopeKey only isolates the two named surfaces

prevReportIDByScope is keyed by a static literal per surface, so chat vs. money-request is fixed, but two concurrently mounted instances of the same surface still clobber each other. Is an expense report in a wide RHP over another expense report reachable? If so the guard at L122/L157 is still racy. (Entries are also never deleted — harmless at two keys, but a one-line comment saying so would help.)

3. No tests for the two new hook params

scopeKey and isReversed are new public params on two shared hooks, and neither tests/unit/useMarkAsReadTest.ts nor tests/unit/useUnreadMarkerTest.ts was touched. Codecov puts the new hook at 52.63%. The cross-scope clobbering scopeKey fixes is precisely the kind of thing manual QA misses — a test that mounts both scopes at once would lock it in.

Smaller notes

earliestReceivedOfflineMessageIndex domain mismatch (pre-existing, now inherited). useUnreadMarker.ts:100-107 computes the index over sortedReportActions (full paginated chain, newest-first), but getUnreadMarkerReportAction uses it as a scan bound and an index === earliestReceivedOfflineMessageIndex comparison against sortedVisibleReportActions. For this view that array is both filtered and oldest-first, so the offline anchor lands on an unrelated action. The old code passed the same mismatched pair, so this is not a regression — but this refactor is the natural place to fix or document it.

key={reportIDFromRoute} can be undefined, in which case React treats it as no key at all. key={reportIDFromRoute ?? ''} is free insurance.

Remount-per-report is a real UX change. Instance reuse previously preserved pagination and scroll state when navigating back to a report you had already opened; the key wrapper drops it. Intentional per the description, and it is what makes deleting the backfill-ref reset safe — just worth covering in test step 4.

Memoization now rides on React Compiler. useMoneyRequestReportVisibleActions.ts:63-89 drops the explicit useMemos the monolith had. visibleReportActions and renderReportAction feed a memo()-wrapped MoneyRequestReportTransactionList, so if the compiler ever bails on this file the render counts in your screenshot regress silently. The compliance check is green, so this is a "confirm", not a defect.


Nothing here blocks the shape of the decomposition — items 1 and 3 are what I'd want resolved before merge.

@sosek108
sosek108 marked this pull request as ready for review September 9, 2026 11:20
@sosek108
sosek108 requested review from a team as code owners September 9, 2026 11:20
@melvin-bot
melvin-bot Bot requested review from garrettmknight and rojiphil and removed request for a team September 9, 2026 11:20
@melvin-bot

melvin-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

@rojiphil 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 removed the request for review from a team September 9, 2026 11:20
Comment thread src/hooks/useUnreadMarker.ts Resolved
Comment thread src/hooks/useMarkAsRead.ts Resolved

@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: 19f21ed12f

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@sosek108 sosek108 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rojiphil I've responded to your comments.

Thank you for reviewing!

hasOnceLoadedReportActions: !!reportLoadingState?.hasOnceLoadedReportActions,
});

const {markNewestActionAsRead, completeSkippedMarkAsRead} = useMarkAsRead({

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Now working same as staging.

Nagranie.z.ekranu.2026-09-10.o.11.30.58.mov

Comment thread src/hooks/useMarkAsRead.ts Resolved
Comment thread src/hooks/useMarkAsRead.ts Resolved
@sosek108

Copy link
Copy Markdown
Contributor Author

I've run performance tests again after review.

image

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rojiphil

Copy link
Copy Markdown
Contributor

@sosek108 Thanks for the updated PR. The issue with the web version is fixed but native versions still do not show the expense report item as bold in LHN. Here are the videos for this.

100025-ios-hybrid-issue-001.mp4
100025-android-hybrid-issue-001.mp4

@rojiphil

rojiphil commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (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 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)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
100025-android-hybrid-001.mp4
Android: mWeb Chrome
100025-mweb-android-001.mp4
iOS: HybridApp
100025-ios-hybrid-001.mp4
iOS: mWeb Safari
100025-mweb-safari-001.mp4
MacOS: Chrome / Safari
100025-web-chrome-001.mp4

@sosek108

Copy link
Copy Markdown
Contributor Author

@sosek108 Thanks for the updated PR. The issue with the web version is fixed but native versions still do not show the expense report item as bold in LHN. Here are the videos for this.

100025-ios-hybrid-issue-001.mp4
100025-android-hybrid-issue-001.mp4

Isn't it that because you're logged in on the same account on both devices and in browser?

Nagranie.z.ekranu.2026-09-11.o.11.56.10.mov

@rojiphil

Copy link
Copy Markdown
Contributor

Isn't it that because you're logged in on the same account on both devices and in browser?

It does not seem so. I just tried again with the user logged in only on ios native version but the LHN did not turn bold on receiving a new message.

100025-web-chrome-issue-002.mp4

@sosek108

Copy link
Copy Markdown
Contributor Author

Isn't it that because you're logged in on the same account on both devices and in browser?

It does not seem so. I just tried again with the user logged in only on ios native version but the LHN did not turn bold on receiving a new message.

100025-web-chrome-issue-002.mp4

So can you confirm that you have the same account on both Mobile and Web? If so, this behaves the same way as on staging / prod.

I can guess only by Avatar - same letter, same colour.

@rojiphil

Copy link
Copy Markdown
Contributor

So can you confirm that you have the same account on both Mobile and Web? If so, this behaves the same way as on staging / prod.

I can guess only by Avatar - same letter, same colour.

Oh! Sorry about this. That was silly of me. I didn't notice that the accounts were same. And thanks for pointing it out.
I have confirmed that the fix works well in native versions also.

@rojiphil rojiphil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @sosek108. Works well.

@mountiny LGTM. Over to you for review. Thanks.

@melvin-bot
melvin-bot Bot requested a review from mountiny September 11, 2026 18:31

@mountiny mountiny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just one thing to please keep in mind in other prs and you can tag the comments in another pr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you make sure al the tests follow the Given, When, Then comments structures

@mountiny
mountiny merged commit c427619 into Expensify:main Sep 15, 2026
35 of 36 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@mountiny

Copy link
Copy Markdown
Contributor

@MelvinBot please create payment issue for @rojiphil

@MelvinBot

MelvinBot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Payment issue created: #101204

One thing to fix: this PR merged today and hasn't reached staging or production yet (OSBotify said it deploys to staging after the next production release). The 2026-09-24 due date in the title is an estimate — please update it to 7 days after the actual production deploy.


view run · no recording available

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.80-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes are required for this PR. I did not create a docs PR.

Why: This is a pure internal refactor. It moves logic between files and adds tests — it changes no user-facing behavior, copy, or UI.

What I checked

Files changed (9):

File Change
src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx Inline visible-action / unread-marker logic removed in favor of shared hooks
src/components/MoneyRequestReportView/useMoneyRequestReportVisibleActions.ts New hook extracted from the monolith
src/hooks/useMarkAsRead.ts, src/hooks/useUnreadMarker.ts Adapted so the expense report list can share them with the chat list
MoneyRequestReportTransactionList.tsx, MoneyRequestReportUnifiedList.tsx Prop plumbing only (2–3 lines each)
3 test files New and expanded unit tests

No documentation triggers found:

  • No src/languages/* files touched — no new or changed user-facing copy
  • No new feature, setting, tab, button, or menu item
  • No change to any flow a member or admin performs — the unread marker, the Latest messages button, and the expense report view all behave exactly as before
  • The PR's own test plan is written entirely as "verify X renders/behaves as before"

Help site articles under docs/articles document what users can do, not how the client derives a list of report actions. Nothing in that set describes the behavior this PR touches, so there is nothing to update.

If you expected a user-visible change from one of the other PRs in this 10-PR stack, point me at that PR number and I'll scope the docs work there instead.

@sosek108, no help site PR was created because no documentation changes are required — so there is nothing to review or mark Ready for review.


view run

@jponikarchuk

Copy link
Copy Markdown

@sosek108 @rojiphil Could you please confirm if we can test step 6?

run.1.mp4

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.80-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

@sosek108

Copy link
Copy Markdown
Contributor Author

@jponikarchuk Step 6 is only for dev. I've updated QA steps so there is no more commotion

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.

6 participants