chore(lint): enforce react/static-components#25110

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

Promote react/static-components to an error. Keep component definitions stable. Document the cached native view resolver boundary.

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
b088a85
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB+7 B (+0.1%)6.8 KiB✅
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
CodexLive turn WebSocket wire1.2 KiB1.2 KiB+7 B (+0.6%)2.0 KiB✅
CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
CodexLive turn messages220 (0.0%)8✅
ClaudeTotal thread wire5.0 KiB5.0 KiB+7 B (+0.1%)6.8 KiB✅
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+7 B (+0.6%)2.0 KiB✅
ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB0 B (0.0%)29.3 KiB✅
ClaudeLive turn messages220 (0.0%)8✅

Baseline: 53896ae · PR result: b088a85 · 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 — This small change promotes react/static-components to an error and adds two inline exceptions for cached native component resolvers. Because it introduces line-level static-analysis suppressions, the exceptions warrant human review.

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

Synced from GitHub

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 54ae29a51b5998b2de4e904fa3b7e60d13898fef and b088a85526d50cce02036d64e6ca2830122c798d.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 43f86e30fc7ba4c72a8f8dc94badd14334b77eb4 and 54ae29a51b5998b2de4e904fa3b7e60d13898fef.

External image Files selected for processing: 3
  • apps/mobile/src/features/review/ReviewSheet.tsx
  • apps/mobile/src/features/terminal/NativeTerminalSurface.tsx
  • vite.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The Oxlint configuration now treats react/static-components violations as errors. Two native component render sites have targeted suppressions. These changes do not alter runtime behavior.

Changes: Static component linting

Layer / File(s)Summary
Enable rule and add targeted suppressions
vite.config.ts, apps/mobile/src/features/review/ReviewSheet.tsx, apps/mobile/src/features/terminal/NativeTerminalSurface.tsx
The Oxlint configuration sets react/static-components to error. The two native component render sites suppress the rule and note their cached, stable identity.

Priority: External image Low

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

Possibly related PRs

  • pingdotgg/t3code#24826: Changes the native diff and native surface rendering paths that receive the targeted suppressions.
  • pingdotgg/t3code#24783: Changes NativeTerminalSurface output delivery in the same implementation path.

Suggested reviewers: maria-rcks, macroscopeapp

Merge Risk: External image Minimal · up to 54ae2

This lint-only change is safe to merge.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the main change and lists several validation results, but it omits the required Problem and Scope and approval sections. It also does not provide focused verification details …Add Problem, Change, Scope and approval, and Verification sections. Explain the underlying problem and expected behavior, provide the issue or maintainer approval or explain why this focused configuration change qualifies for an exemption, …
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the primary change: enforcing the react/static-components lint rule.
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: Description check

Explanation

The description explains the main change and lists several validation results, but it omits the required Problem and Scope and approval sections. It also does not provide focused verification details in the required section structure.

Resolution

Add Problem, Change, Scope and approval, and Verification sections. Explain the underlying problem and expected behavior, provide the issue or maintainer approval or explain why this focused configuration change qualifies for an exemption, and document the exact checks performed, observed results, and pending checks.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 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

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

Added 1 commit

  • chore(lint): enforce react/static-componentsb088a85