Skip to content

LegendList + Relay integration bug repro#350

Draft
MarceloPrado wants to merge 6 commits intoLegendApp:mainfrom
MarceloPrado:mprado-catch-bug
Draft

LegendList + Relay integration bug repro#350
MarceloPrado wants to merge 6 commits intoLegendApp:mainfrom
MarceloPrado:mprado-catch-bug

Conversation

@MarceloPrado
Copy link

Context

There is some gnarly issue happening between LegendList row caching and Relay. More context here and a reproduction here.

This PR adds two integration tests, one with LegendList and another with a mocked FlatList.

The LegendList fails the test, since it's throwing the console.error reported above. My goal is this may help the team investigate the issue. I don't expect this code to land - it's very specific to relay usecase, but feel free to take it over/modify as you please.

How to repro

  1. Run bun install to install all dependencies required for the test
  2. Run bun relay-compiler to generate the GraphQL codegen artifacts
  3. Run bun test:integration to run the tests.

It should succeed for both FlatList and LegendList. Currently failing on LegendList.

@MarceloPrado MarceloPrado marked this pull request as draft November 6, 2025 19:14
Copy link

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

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.

ℹ️ 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 on lines +25 to +33
import type {
LegendListRelayWarningTest_ConversationQuery,
LegendListRelayWarningTest_ConversationQuery$data,
} from "./__generated__/LegendListRelayWarningTest_ConversationQuery.graphql";
import type {
LegendListRelayWarningTest_messageRowFragment$data,
LegendListRelayWarningTest_messageRowFragment$key,
} from "./__generated__/LegendListRelayWarningTest_messageRowFragment.graphql";
import type { LegendListRelayWarningTest_PostMessageMutation } from "./__generated__/LegendListRelayWarningTest_PostMessageMutation.graphql";

Choose a reason for hiding this comment

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

P1 Badge Integration tests depend on missing Relay artifacts

The new integration suite imports generated files from jest-tests/integration/__generated__, but those files are ignored from source control and the test:integration script only invokes Jest. Running the script on a fresh clone (after bun install) will immediately throw Cannot find module './__generated__/LegendListRelayWarningTest_*' because no step generates the Relay artifacts. To make the command reliable for CI and other developers, the script should run relay-compiler (or commit the generated files) before starting Jest; otherwise the added tests cannot execute.

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.

1 participant