Skip to content

[No QA][LegendList 11/15] chore: rebuild the LegendList patches from their upstream PRs - #106626

Open
chrispader wants to merge 3 commits into
Expensify:mainfrom
margelo:@chrispader/chore/legend-list-upstream-patches
Open

chrispader wants to merge 3 commits into
Expensify:mainfrom
margelo:@chrispader/chore/legend-list-upstream-patches

Conversation

@chrispader

@chrispader chrispader commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

@dmkt9 @roryabraham

Explanation of Change

#100733 moves the chat message list to LegendList and depends on several LegendList patches. Each patch should match an open upstream PR exactly, so we can drop it once LegendList releases the fix. Some patches still differed from their PRs: they only changed the web bundles, or they contained fixes their PR didn't. This PR rebuilds every patch from its upstream PR, so each one changes exactly what the PR changes. No list on main renders LegendList yet, so this has no visible effect until #100733 lands.

  • Patch 002 now adds an explicit anchor: "end" option to maintainVisibleContentPosition (LegendApp/legend-list#597), instead of changing how every list with alignItemsAtEnd keeps its content in place.
  • Patches 004 and 006 follow the new split between LegendApp/legend-list#600 and #604.
  • Patch 007 is new. It keeps native content in place when the list header resizes above the viewport (LegendApp/legend-list#607), which the chat needs when its offline history placeholder disappears.

patches/@legendapp/list/details.md explains each patch.

Fixed Issues

$ #98994
PROPOSAL: N/A

Tests

No list on main renders LegendList yet, so the patched behavior can only be tested in #100733.

  1. Install the dependencies.
  2. Verify that all seven @legendapp/list patches apply without errors.
  • Verify that no errors appear in the JS console

Offline tests

None. This PR doesn't change anything that renders on main.

QA Steps

No QA. This PR doesn't change anything that renders on main, so it can't be tested in a staging build.

  • 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 verified any copy / text that was added to the app 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 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 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 the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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

None. No list on main renders LegendList yet, so this PR has no visible change.

🤖 Generated with Claude Code

chrispader and others added 3 commits November 11, 2026 13:20
Each LegendList patch is now the build output of its upstream PR, so the
patches change exactly what the PRs change, in every bundle the PRs touch.

- 001 and 003 now also patch the native bundles, as their PRs change shared
  code.
- 002 adds the explicit maintainVisibleContentPosition anchor option that
  LegendApp/legend-list#597 now proposes, instead of anchoring the last
  visible item in every list with alignItemsAtEnd.
- 004 contains LegendApp/legend-list#600, which now also skips deferred
  adjustments that a later native scroll already includes and moves the
  initial scroll target with each adjustment.
- 006 keeps only the silent-retry fix from LegendApp/legend-list#604.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otes

LegendList patch 005 places its scroll anchor at 1,000,000 points instead of
10,000,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LegendList only keeps the visible items in place for header size changes on
web. The chat migration shows a loading placeholder as the list header while
offline, and when it disappeared on reconnect, the messages on screen moved
by its height on iOS and Android. This patch is the build output of
LegendApp/legend-list#607, which applies the header adjustment on every
platform and reuses LegendList's Android clamp handling for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

@chrispader chrispader changed the title [No QA] chore: rebuild the LegendList patches from their upstream PRs [No QA][LegendList 11/15] chore: rebuild the LegendList patches from their upstream PRs Nov 11, 2026
@chrispader
chrispader marked this pull request as ready for review November 11, 2026 13:00
@chrispader
chrispader requested a review from a team as a code owner November 11, 2026 13:00
@melvin-bot
melvin-bot Bot requested review from dmkt9 and removed request for a team November 11, 2026 13:00
@melvin-bot

melvin-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T13:14:19.482251Z 92b6fbe Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@roryabraham

Copy link
Copy Markdown
Contributor

@chrispader rather than syncing the patches, is it feasible to just get the fixes merged and published upstream? We can wait a few days if needed...

@chrispader

chrispader commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@chrispader rather than syncing the patches, is it feasible to just get the fixes merged and published upstream? We can wait a few days if needed...

The PRs in LegendList are already open, i'm waiting for Jay's reply and for him to have time to review them. I've contacted him again. We can of course hold merging the LegendList migration on the upstream PRs, but i'm not sure how long that will take

I've recently just re-organized and simplified the patches in E/App and also updated the upstream PRs

This branch has not been deployed

No deployments
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.

2 participants