chore(lint): enforce react/no-unstable-nested-components#25111

merged1
lint-rules/react-static-components
lint-rules/react-no-unstable-nested-components
opened5d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Promote react/no-unstable-nested-components to an error. Name render callbacks as callbacks and document the native navigator layout callback.

This PR changes only this rule and its existing call sites. Each changed rule has its own PR.

Stack validation: rebased onto b76a110. The earlier 234-file test run passed, and the cancellation regression test passes after its local exception. Rebased format, lint, Knip, and all 34 affected-package typecheck tasks pass. The final local test rerun and fresh CI are pending.

Model: GPT-6.1 Sol. Harness: Codex.

Checks

24 successful · 11 skipped · 1 neutral
All checks passed
08c4f74
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—5.0 KiB—6.8 KiB✅
CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
CodexLive turn messages—2—8✅
ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
ClaudeLive turn messages—2—8✅

Baseline: unavailable · PR result: 08c4f74 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The PR primarily enables a new lint rule and mechanically renames render callbacks without changing product behavior. It also adds a targeted oxlint suppression for an existing mobile navigation callback, so the change requires human review.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • chore(lint): enforce react/no-unstable-nested-components08c4f74
Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between b088a85526d50cce02036d64e6ca2830122c798d and 08c4f74719d246e0a9ba8d33ac2784d3057de68f.

External image Files selected for processing: 3
  • apps/mobile/src/Stack.tsx
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx
  • vite.config.ts

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The lint configuration now treats react/no-unstable-nested-components as an error. Thread inspector renderers are passed as callbacks, and the root navigator has a scoped Oxlint suppression.

Changes: Nested-component lint enforcement

Layer / File(s)Summary
Enable and apply the lint rule
apps/mobile/src/features/threads/ThreadRouteScreen.tsx, vite.config.ts, apps/mobile/src/Stack.tsx
Thread inspector renderers are passed as callbacks. The lint rule is set to error, with a scoped suppression around the root navigator.

Priority: External image Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: t3dotgg, macroscopeapp

Merge Risk: External image Minimal · up to 08c4f

The lint enforcement changes preserve existing mobile rendering behavior and introduce no identified merge-blocking risk.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description follows the template's general intent. It states the problem-level goal (promote the rule to an error, name render callbacks as callbacks, document the native navigator layout callback…Add a Problem section that explains why the rule must become an error. Add a Change section that lists the edits in apps/mobile/src/Stack.tsx, apps/mobile/src/features/threads/ThreadRouteScreen.tsx, and vite.config.ts. Add a Scope and appro…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title "chore(lint): enforce react/no-unstable-nested-components" is a conventional commit title that names the main change: the rule is promoted to an error. It is specific and matches the changes…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore(lint): enforce react/no-unstable-nested-components" is a conventional commit title that names the main change: the rule is promoted to an error. It is specific and matches the changeset, which sets the rule to error in vite.config.ts and adds suppression and callback renames in the app files. It does not mention the callback renames or the documentation comment, which is acceptable for a title.

Full details: Description check

Explanation

The description follows the template's general intent. It states the problem-level goal (promote the rule to an error, name render callbacks as callbacks, document the native navigator layout callback) and explains the scope limit to this rule and its call sites. It does not follow the template's required sections. The Problem section is missing. The Change section is only implied. The Scope and approval section has no link to a triaged issue or maintainer discussion, and no explanation of why the change qualifies as a focused configuration change. The Verification section gives some results, but it does not describe the focused tests or the observed results for the changed behavior in a clear way. It also does not state what could not be checked, and it does not say whether the agent or model line is required. The description is mostly a status report, and it leaves the required approval and problem statement out.

Resolution

Add a Problem section that explains why the rule must become an error. Add a Change section that lists the edits in apps/mobile/src/Stack.tsx, apps/mobile/src/features/threads/ThreadRouteScreen.tsx, and vite.config.ts. Add a Scope and approval section that links the triaged issue or maintainer discussion with the approval comment, or explains why this focused configuration change needs no prior approval. Rewrite the Verification section to list the specific tests and lint checks run and their observed results, and state what was not checked, including the pending final test rerun and CI. Keep the model and harness line at the end.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Comment @coderabbitai help to get the list of available commands.