Repository navigation
[WIP] [HOLD on #104977, #104978] [LegendList 6/9] feat: migrate report actions to chronological LegendList - #100733
chrispader wants to merge 95 commits into
Conversation
1bac411 to
c067b0c
Compare
c067b0c to
e784ebe
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f616302cdb
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f616302 to
2a3323a
Compare
|
|
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
|
@chrispader We have conflicts |
Co-authored-by: Codex <noreply@openai.com>
|
Conflicts resolved |
Co-authored-by: Codex <noreply@openai.com>
Keep 500 cached actions while measuring a 50-action displayed page. The LegendList Jest mock eagerly renders every supplied row, which exhausted the performance runner heap with the unbounded fixture. Verify that edits update a displayed row and start renderer-specific baselines for the new fixture. Co-authored-by: Codex <noreply@openai.com>
Fixed ✅
Detailsbug1.mp4
Detailshttps://github.com/user-attachments/assets/0c461e30-fcc8-450a-847b-29a837e2115d
Details**Steps to reproduce:**
bug4.mp4
Detailsbug1.mp4
Detailsbug2.mp4
Detailsbug3.mp4
Detailsbug4.mp4
Detailsbug71.mp4
Detailsbug8.mp4The keyboard appears briefly: Detailsbug5.mp4The keyboard doesn't appear when editing a long comment: Detailsbug6.mp4On Android, the highlighted item is out of the viewport if there is a long comment above it: Detailsbug7.mp4Unable to test due to a new bug: The app automatically navigates back to the Home screen when "Reply in thread". Detailsbug2.mp4Android: The highlighted item scrolls down and then back up: bug1.mp4Android: Scrolling slightly right after the loading state disappears causes the list to jump: bug3.mp4Web: The "Submit" badge needs to be clicked multiple times (sometimes 3–4 times) to scroll to the highlighted item. Sometimes, the top of the highlighted item or the bottom of the last item in the list is obscured. bug4.mp4Bug: Automatically scroll to the highlighted item when opening the PDF viewer: Detailsbug1.mp4Bug: In a DM chat, the initial viewport isn't scrolled to the bottom when there's a new message, especially when the chat contains an IOU. Detailsbug2.mp4Web: The chat in a thread isn't inverted. Detailsbug3.mp4Remaining
|
|
|
||
| // Report actions are stored newest-first. LegendList intentionally has no inverted mode, so | ||
| // give it chronological data and use its normal start/end and scrolling semantics. | ||
| const listData = reportActionsToRender.toReversed(); |
There was a problem hiding this comment.
I just realized that using toReversed could cause compatibility issues with older browser versions. We also don't use toReversed anywhere else in our app, and we don't have a polyfill for it.
|
Thanks @dmkt9. Since the scope of this PR is already pretty big (70+ files) and there are more and more bugs coming in every review round and fixing one set of bugs seems to re-introduce others, i'll split this PR up into three smaller PRs:
I've also analyzed whether some of the changes can be slimmed down even further. I will check that and do some more testing before i hand it over to @dmkt9 and @roryabraham 🙌🏼 Update: The split is now in layers 4 through 6 of the nine-part rollout:
Layers 4 and 5 are independent and share no changed files. Merge both before layer 6, then sync |
Resolve the current composer after delayed focus, reserve notification-banner space on initial layout, and keep inverted-list scroll events scoped to their existing callers. Expose local and realtime notification sources with a backward-compatible callback signature. Co-authored-by: Codex <noreply@openai.com>
|
Yep. This PR has quite a broad impact. I asked Codex to generate a testing checklist, and it came up with a lot of test cases. |
Share the report list imperative contract while retaining a compatibility export for inverted FlashList. Keep row-local preview state tied to its action and let money-report edit scroll requests survive until the list commits its layout. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Merge the independently reviewable composer and row-state preparation branches without rewriting the existing migration history. The migration-only comparison is 35 files, with the legacy FlashList type bridge as the only shared path. Drop the unrelated telemetry cleanup and restore the existing iOS callback structure. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Infer the action subscriber callback type without exporting its event source. Co-authored-by: Codex <noreply@openai.com>
Remove the upstreamed Fabric content-size patch and port the Android end-clamp patch to the new release. Co-authored-by: Codex <noreply@openai.com>
The report-actions list currently uses inversion, so rendering order and scroll coordinates differ from chronological message order. This PR moves the main chat list to LegendList and updates pagination, unread tracking, message editing, recycling, and initial loading behavior to work with chronological data.
@roryabraham @dmkt9
@Expensify/design Please review the initial chat-loading skeleton shown below.
Explanation of Change
This is layer 6 of the nine-part LegendList series. It moves the main report-actions list to chronological LegendList data and updates pagination, unread tracking, linked-message positioning, end following, and the initial loading cover. LegendList 3.7.0 includes the upstream Fabric content-size fix. The Android end-clamp and React Native scroll-preservation patches remain with this migration.
Composer focus and notification preparation are in layer 4, #104977. Shared list refs, row state, and money-report edit scrolling are in layer 5, #104978. Both preparations must merge before this PR.
Review the 34-file migration-only diff. The Files changed tab includes the preparation work until both PRs merge and
mainis synced. The only shared file in the isolated diffs is the temporary FlashList type export, which layer 5 adds for compatibility and this layer removes with the inverted wrapper.Review and merge order: nine-part LegendList rollout. Layers 4 and 5 are independent preparations; merge both before layer 6.
Fixed Issues
$ #98994
$ #99202
This PR is part of the migration split from #98270. No approved proposal is linked.
Tests
Offline tests
QA Steps
Same as Tests and Offline tests.
PR Author Checklist
I reviewed every item for this PR. A checked conditional item means I verified it or determined that it does not apply. I attached the available native evidence below; Android screen recordings are still TBD, and web recordings are deferred. The checked recordings item records that review and the available evidence, not that every platform has a video.
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
iOS: Native
Cold chat open and initial loading
FlashList is on the left and LegendList is on the right. FlashList leaves the report body blank during loading; LegendList shows the report-action skeleton before messages appear.
LegendListLoadingSkeletonVsFlashList.mp4
Cold expense-chat open
FlashList is on the left and LegendList is on the right. Both progress from the loading skeleton to an expense preview and its surrounding report actions.
ExpenseChatCold.mp4
Warm expense-chat open
FlashList is on the left and LegendList is on the right. Both open the cached expense preview and report actions from the inbox.
ExpenseChatWarm.mp4
Warm chat open
Side-by-side opens of the same cached chat, ending on the same report-action history. The implementations are not labeled in this recording.
LegendListWarmReportOpen.mp4
Android: Native
Cold chat open and initial loading
FlashList is on the left and LegendList is on the right. FlashList leaves the report body blank during loading; LegendList shows the report-action skeleton before messages appear.
ColdOpenLoading.mp4
Cold expense-chat open
FlashList is on the left and LegendList is on the right. Both progress from the loading skeleton to an expense preview and its surrounding report actions.
Android screen recording TBD.
Warm expense-chat open
FlashList is on the left and LegendList is on the right. Both open the cached expense preview and report actions from the inbox.
Android screen recording TBD.
Warm chat open
Side-by-side opens of the same cached chat, ending on the same report-action history. The implementations are not labeled in this recording.
Android screen recording TBD.
Web recordings are deferred.