Skip to content

Commit 49191d8

Browse files
Reconcile cross-document inconsistencies in testing docs
Align fixture counts and salesforce match numbers between TESTING_PLAN.md and TESTING_REPORT.md, reword the report's bottom-line regression claim to match the resolved list, add a headline-repo column so summary verdicts match the numbers shown, and mark Phase 2 priorities as sampled where the report has already closed the loop. Made-with: Cursor
1 parent b2b5605 commit 49191d8

2 files changed

Lines changed: 35 additions & 31 deletions

File tree

TESTING_PLAN.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ We searched public GitHub repos for the exact code patterns each of our 6 React
3131
| Repo | Stars | React Version | Patterns Found | Language |
3232
|------|-------|---------------|----------------|----------|
3333
| **[youzan/zent](https://github.com/youzan/zent)** | 2.2k | 17.0.x (dev), ^17 (peer) | `ReactDOM.render` (~398), `react-dom/test-utils` (~17), `useContext` | TypeScript 65% |
34-
| **[salesforce/design-system-react](https://github.com/salesforce/design-system-react)** | ~1k | ^17.0.2 (dev), >=16.8 (peer) | `ReactDOM.render` (~315), `useContext` | JavaScript |
34+
| **[salesforce/design-system-react](https://github.com/salesforce/design-system-react)** | ~1k | ^17.0.2 (dev), >=16.8 (peer) | `ReactDOM.render` (~315 grep matches / ~316 files under `components/`), `useContext` | JavaScript |
3535
| **[atlassian/react-beautiful-dnd](https://github.com/atlassian/react-beautiful-dnd)** | 33k | 16.13.1 (dev), ^16.8.5‖^17‖^18 (peer) | `react-dom/test-utils` (multiple), `ReactDOM.render` | JS + Flow |
3636
| **[calcom/cal.com](https://github.com/calcom/cal.com)** (redirects to [`calcom/cal.diy`](https://github.com/calcom/cal.diy)) | 41.4k | 18.2.0 in `apps/web`, `^18 || ^19` across workspace packages | `useContext` (~47 raw refs, 30 actual codemod hits), `react-dom/test-utils` (1) | TypeScript |
3737

3838
### Tier 2 — Single-Pattern Repos (well-known, good signal)
3939

40-
| Repo | React Version | Primary Pattern | Match Count |
40+
| Repo | React Version | Primary Pattern | Grep matches |
4141
|------|---------------|-----------------|-------------|
4242
| **[MetaMask/metamask-extension](https://github.com/MetaMask/metamask-extension)** | 13.1k stars, React ^16.12.0 | `react-dom/test-utils` | ~18 |
4343
| **[rsuite/rsuite](https://github.com/rsuite/rsuite)** | React ^19.0.0 (dev), >=18 (peer) | `ReactDOM.render` | ~776 |
@@ -59,13 +59,13 @@ We searched public GitHub repos for the exact code patterns each of our 6 React
5959

6060
**Pattern:** `ReactDOM.render(element, container)``createRoot(container).render(element)`
6161

62-
| Repo | Matches | Notes |
63-
|------|---------|-------|
62+
| Repo | Grep matches | Notes |
63+
|------|--------------|-------|
6464
| rsuite/rsuite | ~776 | Largest count, but already on React 19 dev |
6565
| alibaba-fusion/next | ~657 | Alibaba component library |
6666
| kingdee/kdesign | ~482 | React component design system |
6767
| **youzan/zent** | ~398 | ★ React 17, TypeScript, ideal target |
68-
| **salesforce/design-system-react** | ~315 | ★ React 17, enterprise library |
68+
| **salesforce/design-system-react** | ~315 | ★ React 17, enterprise library (~316 real JS/JSX files under `components/` on rollout inspection) |
6969
| nfl/react-helmet | ~100+ | Widely used, small scope |
7070

7171
**Recommended test repo:** `youzan/zent` (React 17 + TypeScript + high match count)
@@ -78,8 +78,8 @@ We searched public GitHub repos for the exact code patterns each of our 6 React
7878

7979
**Pattern:** `import { act } from 'react-dom/test-utils'``import { act } from 'react'`
8080

81-
| Repo | Matches | Notes |
82-
|------|---------|-------|
81+
| Repo | Grep matches | Notes |
82+
|------|--------------|-------|
8383
| **OnsenUI/OnsenUI** | ~37 | ★ Highest count |
8484
| Foundry376/Mailspring | ~23 | Electron email client |
8585
| **MetaMask/metamask-extension** | ~18 | ★ Very well-known, React 16 |
@@ -97,8 +97,8 @@ We searched public GitHub repos for the exact code patterns each of our 6 React
9797

9898
**Pattern:** `React.PropTypes.xxx``import PropTypes from 'prop-types'; PropTypes.xxx`
9999

100-
| Repo | Matches | Notes |
101-
|------|---------|-------|
100+
| Repo | Grep matches | Notes |
101+
|------|--------------|-------|
102102
| jianliaoim/talk-os | ~253 | CoffeeScript + React, older |
103103
| **nylas/nylas-mail** | ~193 | ★ Archived, also has string refs |
104104
| **azat-co/react-quickly** | ~155 | ★ Book examples, also has string refs |
@@ -116,8 +116,8 @@ We searched public GitHub repos for the exact code patterns each of our 6 React
116116

117117
**Pattern:** `ref="myRef"` in JSX inside class components → `ref={(ref) => { this.myRef = ref; }}`
118118

119-
| Repo | Matches | Notes |
120-
|------|---------|-------|
119+
| Repo | Grep matches | Notes |
120+
|------|--------------|-------|
121121
| **azat-co/react-quickly** | ~120 | ★ Highest count, also has PropTypes |
122122
| cockpit-project/cockpit | ~54 | Active Linux admin tool |
123123
| nicehash/whistle | ~52 | Network debugging tool |
@@ -182,22 +182,24 @@ For modern React 18/19 coverage, `calcom/cal.com` is a strong fourth repo even t
182182

183183
The codemods below were imported into the current branch from `align-with-legacy-codemods` on 2026-04-20. Because many of them target legacy code patterns that are harder to find reliably in modern public repos, the first evaluation pass should rely on their curated fixture suites, differential tests, and targeted error/warning tests.
184184

185+
The **Next Real-Repo Priority** column reflects *pre-sampling* planning intent. Rows whose real-repo pass has since been completed in `TESTING_REPORT.md` are marked **Sampled** with a one-line outcome — those rows no longer need further real-repo work to unblock parity decisions.
186+
185187
| Codemod | Initial Evaluation Surface | Next Real-Repo Priority |
186188
|---------|----------------------------|-------------------------|
187-
| `create-element-to-jsx` | 34 fixtures + error/differential tests | High |
188-
| `error-boundaries` | 2 fixtures | Medium |
189+
| `create-element-to-jsx` | 34 fixtures + error/differential tests | **Sampled** (parity on `react-quickly`) |
190+
| `error-boundaries` | 2 fixtures | **Sampled** (parity on `DataTurks`) |
189191
| `find-dom-node` | 9 fixtures | High |
190-
| `manual-bind-to-arrow` | 11 fixtures | Medium |
192+
| `manual-bind-to-arrow` | 12 fixtures | **Sampled** (parity on `react-quickly` after fix) |
191193
| `pure-component` | 11 fixtures + warning/differential tests | High |
192194
| `pure-render-mixin` | 7 fixtures | Medium |
193-
| `react-dom-to-react-dom-factories` | 10 fixtures | Low |
194-
| `react-native-view-prop-types` | 12 fixtures | Low |
195+
| `react-dom-to-react-dom-factories` | 11 fixtures | **Sampled** (parity on `react-quickly` after fix) |
196+
| `react-native-view-prop-types` | 12 fixtures | **Sampled** (JSSG safer on `react-native-snap-carousel`) |
195197
| `react-to-react-dom` | 14 fixtures + error tests | High |
196-
| `remove-context-provider` | 7 fixtures | Medium |
197-
| `remove-forward-ref` | 17 fixtures | Medium |
198-
| `rename-unsafe-lifecycles` | 9 fixtures | High |
198+
| `remove-context-provider` | 7 fixtures | **Sampled** (parity on `calcom/cal.diy`) |
199+
| `remove-forward-ref` | 18 fixtures | **Sampled** (JSSG ahead on `calcom/cal.diy` after fix) |
200+
| `rename-unsafe-lifecycles` | 9 fixtures | **Sampled** (parity on `nylas-mail`) |
199201
| `sort-comp` | 11 fixtures | Medium |
200-
| `update-react-imports` | 33 fixtures | High |
202+
| `update-react-imports` | 33 fixtures | **Sampled, inconclusive** (legacy parser failure on `youzan/zent`; cleaner comparison target still needed) |
201203

202204
For these imported codemods, the recommended evaluation order is:
203205

@@ -265,7 +267,7 @@ Additional real-repo candidate matches confirmed on 2026-04-21:
265267

266268
## Notes
267269

268-
- Match counts are approximate (from grep.app searches, may include comments/docs)
270+
- **Match counts in the per-codemod tables above are raw grep.app hits — not file counts.** They are approximate and may include comments, docs, or multiple occurrences in the same file. The authoritative *files transformed* numbers live in `TESTING_REPORT.md`, where they are consistently smaller than the raw match counts reported here.
269271
- Some repos are archived/unmaintained — that's fine for testing, the code patterns are what matter
270272
- `useFormState` testing is synthetic-only; recommend documenting this proactively for the React team
271273
- `useContext` is so widespread that any React 16.8+ repo works; no need for a dedicated test repo

TESTING_REPORT.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@
1616

1717
## Summary
1818

19-
| Codemod | Verdict | JSSG Files | Legacy Files | Notes |
20-
|---------|---------|:----------:|:------------:|-------|
21-
| `replace-reactdom-render` | **Safe but conservative** | 4 | 4 | `youzan/zent` remains clean; on `salesforce/design-system-react`, JSSG now skips unsafe helper patterns that rely on the return value of `ReactDOM.render(...)` |
22-
| `replace-act-import` | **JSSG wins** | **18** | 18 | `react-beautiful-dnd` still shows the 6× coverage win; `MetaMask` adds an 18-file semantic-parity check |
23-
| `use-context-hook` | **JSSG wins** | **30** | 29 | `youzan/zent` was byte-identical; `cal.com` adds 2 real call sites and avoids 1 unused-import false positive; `salesforce/design-system-react` adds a 6-file JS spot-check |
24-
| `replace-string-ref` | **JSSG wins** | **5** | 0 | Legacy skips `.jsx` files entirely |
25-
| `replace-use-form-state` | **Perfect parity** | 1 | 1 | Fixed: now moves import from `react-dom` to `react` |
26-
| `react-proptypes-to-prop-types` | **JSSG wins** | **135** | 109 | Official legacy transform is not on the registry, but local jscodeshift evaluation shows JSSG handles 26 additional real files that the upstream transform errors on |
27-
28-
**Bottom line**: real-repo coverage is broader than before. The last confirmed functional regression class from this pass was in `replace-reactdom-render`, and it is now closed by conservatively skipping return-value-dependent helper patterns instead of rewriting them unsafely. The imported codemods also gained two stronger real-repo signals: `error-boundaries` now has exact-source parity on `DataTurks`, and `react-native-view-prop-types` now has a real-world safety win on `react-native-snap-carousel`.
19+
> **Reading this table**: each codemod was exercised against more than one repo slice. The `JSSG Files / Legacy Files` columns below show the **headline repo** for that codemod (identified in the `Source repo` column), not a union across all slices. Per-repo breakdowns live in the detailed sections.
20+
21+
| Codemod | Verdict | Source repo | JSSG Files | Legacy Files | Notes |
22+
|---------|---------|-------------|:----------:|:------------:|-------|
23+
| `replace-reactdom-render` | **Safe but conservative** | `youzan/zent` | 4 | 4 | `youzan/zent` remains clean; on `salesforce/design-system-react`, JSSG transforms 1 file and legacy transforms 6 because JSSG now skips unsafe helper patterns that rely on the return value of `ReactDOM.render(...)` (see §1) |
24+
| `replace-act-import` | **JSSG wins** | `MetaMask/metamask-extension` | **18** | 18 | Shown repo is a parity check; the "JSSG wins" verdict comes from `react-beautiful-dnd` where JSSG transforms 6 files vs legacy 1 (see §2) |
25+
| `use-context-hook` | **JSSG wins** | `calcom/cal.diy` (`v6.2.0`) | **30** | 29 | `youzan/zent` was byte-identical 47/47 (see §3); `cal.com` adds 2 real call sites and avoids 1 unused-import false positive; `salesforce/design-system-react` adds a 6-file JS spot-check |
26+
| `replace-string-ref` | **JSSG wins** | `azat-co/react-quickly` | **5** | 0 | Legacy skips `.jsx` files entirely |
27+
| `replace-use-form-state` | **Perfect parity** | synthetic fixture | 1 | 1 | Fixed: now moves import from `react-dom` to `react` |
28+
| `react-proptypes-to-prop-types` | **JSSG wins** | `nylas/nylas-mail` | **135** | 109 | Official legacy transform is not on the registry, but local jscodeshift evaluation shows JSSG handles 26 additional real files that the upstream transform errors on |
29+
30+
**Bottom line**: real-repo coverage is broader than before. Every functional regression surfaced during this pass has been resolved (see the full list in *Resolved Regressions* below); the most recent coverage-shaped gap in `replace-reactdom-render` is now closed by conservatively skipping return-value-dependent helper patterns instead of rewriting them unsafely. The imported codemods also gained two stronger real-repo signals: `error-boundaries` now has exact-source parity on `DataTurks`, and `react-native-view-prop-types` now has a real-world safety win on `react-native-snap-carousel`.
2931

3032
## Speed Benchmarks
3133

0 commit comments

Comments
 (0)