Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
72052ef
initial v9 branch commit. setup temp app for testing with yarn constr…
cb-ekuersch Jan 26, 2026
af65e3a
React 19 & CMR v7 (#350)
cb-ekuersch Feb 10, 2026
4189185
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 10, 2026
82ebc15
fix: lint and typecheck issue (#389)
haoruikun-cb Feb 12, 2026
5f63387
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 12, 2026
c47c886
feat: Partial application of theme vars (#391)
cb-ekuersch Feb 12, 2026
61b830d
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 12, 2026
cac94ed
chore: dedupe
cb-ekuersch Feb 12, 2026
d87f722
chore: expclude new expo app from build task in CI
cb-ekuersch Feb 12, 2026
642fac0
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 12, 2026
69ad7f6
Harryhao/cds 1513 consolidate listcell border props (#352)
haoruikun-cb Feb 12, 2026
5310927
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 13, 2026
6a11ffd
Merge branch 'master' into hunter/v9-master-feb-18
hcopp Feb 18, 2026
82dc77e
Merge pull request #404 from coinbase/hunter/v9-master-feb-18
hcopp Feb 18, 2026
8f6a31b
Merge branch 'master' into cds-v9
cb-ekuersch Feb 18, 2026
2474ee0
feat: deprecate individual Text components and add default a11yRole f…
haoruikun-cb Feb 20, 2026
0118b5b
feat(CDS-1612) implement the button variant change (#407)
haoruikun-cb Feb 20, 2026
8c2c1da
Harryhao/cds 1268 shorten interactable css variables (#410)
haoruikun-cb Feb 20, 2026
b48ec52
chore: Remove fixed dimensions (#398)
cb-ekuersch Feb 22, 2026
0e206e9
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Feb 22, 2026
df03dec
chore: fix resize regression in select dropdown after recent changes …
cb-ekuersch Feb 22, 2026
b12cf83
fix: layout issue with Toast - use safe area insets to avoid bottom n…
cb-ekuersch Feb 22, 2026
f606fe2
fix: lint error for previous mobile Toast component changes
cb-ekuersch Feb 22, 2026
f304449
chore: update restricted imports to prevent using React 19 features
cb-ekuersch Feb 23, 2026
d57b21b
fix: restricted React imports (new eslint rule in prev. commit) in mo…
cb-ekuersch Feb 23, 2026
a8d9ea3
chore: update versions for v9 (#406)
hcopp Feb 23, 2026
8ef8d8f
chore: carousel v9 updates (#420)
hcopp Feb 23, 2026
65ed4bc
chore: adjust alert spacing to match latest design (#425)
hcopp Feb 24, 2026
c92aa6e
feat: migrate Stepper from React Spring to Framer Motion (#424)
adrienzheng-cb Feb 25, 2026
f22ab56
chore: merge master into v9 branch (#436)
adrienzheng-cb Feb 25, 2026
e25d761
fix: mobile running issue (#442)
haoruikun-cb Feb 25, 2026
2591612
chore: remove common deps on react-native/floating-ui (#447)
adrienzheng-cb Feb 26, 2026
7f37fe5
feat(CDS-1634): mobile Select/Combobox in new tray (#448)
haoruikun-cb Feb 26, 2026
87c685a
chore: merge master into cds-v9 (#450)
hcopp Feb 27, 2026
bea8fe5
chore: Remove React Spring from SlideButton APIs (#419)
cb-ekuersch Feb 27, 2026
c094094
Drop PopperJS in favor of Floating UI (#418)
cb-ekuersch Feb 27, 2026
3aaba52
Merge branch 'master' into cds-v9
hcopp Feb 27, 2026
d6681bf
Fix changelog
hcopp Feb 27, 2026
6803220
Merge pull request #454 from coinbase/hunter/cds-v9-merge-no-squash
hcopp Feb 27, 2026
0fe118e
feat(cds 1615) deprecate dangerouslySetBackground/dangerouslySetColor…
haoruikun-cb Feb 27, 2026
56e93e5
feat: Avatar name variant fixes (#443)
haoruikun-cb Mar 3, 2026
6492ecd
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Mar 4, 2026
21fdb27
fix: stabilize SegmentedTabs test environment by providing explicit i…
haoruikun-cb Mar 4, 2026
5182c33
refactor(CDS-828): refactor components with conditional wrapper (#441)
haoruikun-cb Mar 5, 2026
10c8919
feat: support foregroundMuted but mark it as deprecated (#471)
haoruikun-cb Mar 5, 2026
4d5fd81
Merge branch 'master' into cds-v9
cb-ekuersch Mar 5, 2026
843fcc5
Merge branch 'master' into cds-v9
adrienzheng-cb Mar 6, 2026
db3163e
fix: transition test (#475)
adrienzheng-cb Mar 6, 2026
0215217
feat: set up open source migrator package (#390)
adrienzheng-cb Mar 6, 2026
74f7e41
fix: address test-expo build failure (#479)
haoruikun-cb Mar 6, 2026
6721524
feat: restore paginationVariant in Carousel and marked it as deprecat…
haoruikun-cb Mar 6, 2026
7022b58
Merge branch 'master' into cds-v9
cb-ekuersch Mar 9, 2026
761f262
Merge branch 'master' into cds-v9
cb-ekuersch Mar 9, 2026
7f08983
feat: restore breaking changes in v9 and use deprecation instead (#480)
haoruikun-cb Mar 9, 2026
e63ca6d
feat: spread props last eslint (#485)
hcopp Mar 9, 2026
e7f8991
Merge branch 'master' into v9-merge-master-03-10
adrienzheng-cb Mar 10, 2026
65d5344
lint + test fix
adrienzheng-cb Mar 10, 2026
53a7825
Merge pull request #489 from coinbase/v9-merge-master-03-10
adrienzheng-cb Mar 10, 2026
46dd4e2
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Mar 11, 2026
fb66e62
chore: deprecate cross-platform layout types, use platform-specific t…
adrienzheng-cb Mar 11, 2026
5f2e988
chore: deprecate select-related components
adrienzheng-cb Mar 12, 2026
2a3bc9d
minor fix
adrienzheng-cb Mar 13, 2026
8be8b27
Merge pull request #490 from coinbase/adrien/remove-dimension-value
adrienzheng-cb Mar 13, 2026
7b81d40
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Mar 13, 2026
0132915
chore: prevent stetching on mobile IconButton and update Button docs …
cb-ekuersch Mar 15, 2026
e5a6a18
chore: Add IconButton's padding logic to LikeButton for easier positi…
cb-ekuersch Mar 15, 2026
2d732c7
Merge branch 'cds-v9' into adrien/deprecate-select
adrienzheng-cb Mar 16, 2026
e2f0e04
update jsdocs
adrienzheng-cb Mar 16, 2026
071dacf
Merge pull request #497 from coinbase/adrien/deprecate-select
adrienzheng-cb Mar 16, 2026
2128176
chore: merge master into cds-v9 (#514)
hcopp Mar 17, 2026
36bb38c
Merge branch 'master' into cds-v9
cb-ekuersch Mar 20, 2026
5233f2f
Merge remote-tracking branch 'origin/master' into cds-v9
adrienzheng-cb Mar 22, 2026
5bd5fcd
Merge branch 'master' into cds-v9
cb-ekuersch Mar 23, 2026
0963a4c
fix: mobile test & doc metadata (#532)
adrienzheng-cb Mar 23, 2026
c6a91eb
fix: remove last couple of Dimension value. (#530)
adrienzheng-cb Mar 24, 2026
1a947ce
Merge branch 'master' into cds-v9
cb-ekuersch Mar 25, 2026
1cb54f9
feat (CDS-1613): button variant migrator (#544)
haoruikun-cb Mar 25, 2026
5d19725
fix: tab navigation deprecation (#548)
haoruikun-cb Mar 25, 2026
1fe93bd
Merge branch 'master' into cds-v9
cb-ekuersch Mar 27, 2026
01398d6
chore: rework mobile visreg to run on new expo app set up to run cds …
cb-ekuersch Mar 27, 2026
8afa010
Merge branch 'master' into cds-v9
cb-ekuersch Mar 28, 2026
42b04c8
Merge remote-tracking branch 'origin/master' into cds-v9
cb-ekuersch Mar 29, 2026
083ad14
fix: restore renamed props and constants. (#547)
adrienzheng-cb Mar 30, 2026
89c5bcb
chore: merge master (#564)
adrienzheng-cb Mar 30, 2026
5b4d737
chore: deprecate visualization packages (#567)
cb-ekuersch Apr 1, 2026
162aba4
feat: add transform for useMergerefs (#531)
adrienzheng-cb Apr 1, 2026
ae7e62b
feat: add agent skill to write jscodeshift transform (#569)
adrienzheng-cb Apr 2, 2026
6c80b7f
fix: scrubber beacon label immediate updates (#570)
hcopp Mar 31, 2026
2367aae
fix: mobile scrubber initial load glitch (#573)
hcopp Apr 1, 2026
6445ae2
feat: Cds skills improvement (#574)
haoruikun-cb Apr 1, 2026
44702b1
[StepSecurity] Apply security best practices (#572)
stepsecurity-app[bot] Apr 1, 2026
38dfecf
feat: add script to generate concatenated docs for llm (#576)
adrienzheng-cb Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
133 changes: 133 additions & 0 deletions .claude/skills/cds-migrator-transform/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
name: cds-migrator-transform
description: |
End-to-end workflow for adding a jscodeshift migration to packages/migrator: clarify symbol and
target behavior, decide web vs mobile vs shared transforms, research real usage with Sourcegraph MCP,
split automatable vs manual cases (confirm with user), implement codemods and TODO markers, add
fixtures and tests, register presets when applicable. Use when the user asks to add a CDS migrator
transform, codemod, jscodeshift migration, major-upgrade migration (e.g. v8-to-v9), or a
**standalone** codemod not tied to a version bump. Also when migrating consumer imports/APIs for a
CDS release.
allowed-tools: Read, Grep, Glob, StrReplace, Bash(yarn nx run:*), call_mcp_tool
argument-hint: '<symbol or API change> — <target behavior> — [preset or standalone] — [web|mobile|both] — [optional: Sourcegraph scope / repos / queries the user supplies]'
---

# CDS migrator transform (jscodeshift)

Adds or updates a **jscodeshift** transform under `packages/migrator/src/transforms/`.

**Where to put files** is **not** always a “version” folder. Choose a subdirectory (or root) that fits the work:

- **Major / preset migrations** often use a version-style folder (`v9/`, `v10/`, …) aligned with a preset such as `v8-to-v9`.
- **Other codemods** (rename, internal API move, one-off cleanup) can live under any clear grouping the team agrees on (`v9/` still, a feature folder, or directly under `transforms/` like `example-transform.ts`).

Follow the steps in order unless the user already locked scope.

## Prerequisites

- **Nx + yarn**: run migrator commands as `yarn nx run migrator:<target>` (see repo `AGENTS.md`).
- **Sourcegraph MCP (strongly recommended)**: Before calling Sourcegraph tools, read the tool schema under `mcps/user-sourcegraph/tools/` (e.g. `sourcegraph_search.json`, `sourcegraph_fetch_file.json`). If Sourcegraph is not configured, tell the user to add the **Sourcegraph** MCP server in Cursor MCP settings and authenticate if required, then continue with workspace `grep` or whatever source the user provides. **Do not invent search queries or repo filters in this skill**—use the symbols, repositories, queries, or links the **user** gives you; if they omitted search context, ask what to search before assuming scope.

---

## 1 — Define the migration

Capture explicitly:

1. **Symbol(s)** to migrate (export name, import path, prop name, type name, etc.).
2. **Desired outcome**: rename, change import path/module, replace expression, map enum/string values, add local type alias, etc.
3. **Preset (if any) and on-disk location**: whether this ships in a preset (`packages/migrator/src/presets/<preset>/manifest.json`) or runs **only via `-t <name>`** without a preset entry. Pick the directory under `transforms/` for the new files (versioned `v9/` / `v10/`, or another name, or `transforms/` root). **Align the manifest `file` field with that path** when you add an entry (see step 7).

If anything is ambiguous, ask the user before coding.

---

## 2 — Platform scope: one transform or two?

1. **Web-only** (e.g. CSS, DOM, `@coinbase/cds-web`): single transform, typically under `transforms/<subdir>/<name>-web.ts` or a neutral name if only web is affected.
2. **Mobile-only** (e.g. React Native, `@coinbase/cds-mobile`): single transform for mobile.
3. **Both** with **different** replacement rules (e.g. `DimensionValue` → web local alias vs RN import): **two** transforms (`…-web.ts`, `…-mobile.ts`) plus optional **`…-shared.ts`** for pure helpers (no jscodeshift import in shared if workers load it—keep shared logic environment-safe; follow existing layout-type splits).
4. **Both** with **identical** AST changes: one transform is enough.

Document in the transform file header **what** is migrated and **what is not** (re-exports, `require`, dynamic import, etc.).

---

## 3 — Research usage (Sourcegraph + repo)

1. **Inputs from the user**: They should supply what to look for—symbol names, old/new APIs, repos or orgs to include, example file paths, or concrete Sourcegraph queries. **Follow that source of truth**; do not rely on fixed query templates in this skill.
2. **Sourcegraph MCP**: Run searches and fetches using the user’s queries and scope. Read MCP tool schemas first. Use `sourcegraph_fetch_file` when line previews are not enough.
3. **This monorepo**: Supplement with `grep` / `Glob` under `packages/` when the migration touches CDS itself or when the user asks for in-repo usage.

Record a short list of **patterns you actually saw** in the results (import style, re-exports, edge cases)—derived from discovery, not from a checklist in this doc.

---

## 4 — Case matrix and user confirmation

From research, build a table:

| Case | Example | Automate in codemod? | If not: strategy |
| ---- | ------- | -------------------- | ------------------------------ |
| … | … | Yes / No | TODO comment / skip / doc only |

**Stop and confirm with the user** which rows to automate vs leave manual/TODO-only before implementing non-trivial logic. Call out gaps that **their** search surfaced but the AST transform will not handle (re-exports, dynamic imports, etc., as applicable).

---

## 5 — Implement transforms

**Location**: `packages/migrator/src/transforms/<subdir>/<name>.ts`, or `transforms/<name>.ts` at the transforms root. The manifest `file` value (when used) must be the path **relative to `transforms/`** without extension, e.g. `v9/my-transform`, `v10/my-transform`, or `my-oneoff/my-transform`.

**Patterns**:

- Default export: `export default function transformer(file, api, options)`; eslint may require `// eslint-disable-next-line no-restricted-exports` for default export.
- Import **`transformLogger`**, **`addTodoComment`**, **`hasMigrationTodo`** from `transform-utils`. Typical depths: **`../../utils/transform-utils`** from `transforms/<subdir>/<name>.ts`; **`../utils/transform-utils`** from `transforms/<name>.ts`. If you nest deeper under `transforms/`, add one `../` per extra level.
- **Package scope from jscodeshift `options`**: When matching or rewriting **`@<scope>/cds-…`** import paths, use **`getPackageScopeFromOptions(options)`** from **`../../utils/package-scope`** (same depth pattern as `transform-utils`). The cds-migrator CLI forwards **`--packageScope`** / **`-ps`** into `options.packageScope` (`coinbase` or `@coinbase` both normalize to `@coinbase`). **If set**, only rewrite modules under that scope; **if omitted**, match any scope (e.g. regex like `@…/cds-common/…`). State this in the transform’s file header so consumers know they can narrow runs. Reference: `packages/migrator/src/transforms/v9/migrate-use-merge-refs.ts` and `packages/migrator/src/utils/package-scope.ts`.
- Prefer **constants** and small helpers; for shared module strings (e.g. allowed import sources), centralize in a `*-shared.ts` sibling when web/mobile share rules.
- **Idempotency**: second run should no-op when migration is complete.
- **TODO path**: for dynamic or ambiguous AST, insert a standard CDS migration TODO via `addTodoComment` and log with `transformLogger.warn`.

Reference examples in-repo: major-style folder `transforms/v9/` (`migrate-use-merge-refs.ts`, `button-variant-values.ts`, `migrate-layout-types-*.ts`); root-level `example-transform.ts` shows a transform not under a version subfolder.

---

## 6 — Tests and fixtures

1. **Fixtures directory**: colocate with the transform, e.g. `packages/migrator/src/transforms/<subdir>/__testfixtures__/<suite-name>/` with paired `*.input.tsx` and `*.output.tsx` (names aligned with scenario). Deeper trees may need different relative paths in tests.
2. **Tests**: `packages/migrator/src/transforms/<subdir>/__tests__/<name>.test.ts` using `readTransformFixture` from `../../../test-utils/readTransformFixture` when `__tests__/` is one level under `transforms/<subdir>/` (three hops up to `src/`). **Re-check** `readTransformFixture` and any local imports if `<subdir>` depth changes.
3. Mock **`console.log` / `console.warn`** if transforms log during tests (see existing migrator tests).
4. Cover: happy paths that match **patterns the user’s research identified**, every scope or import shape they asked you to support, idempotency, no-op when nothing to migrate, edge cases the user approved. For **scope-aware** transforms, pass **`packageScope`** in the third argument to `applyTransform` when testing the narrowed behavior (e.g. `applyTransform(transform, { packageScope: '@coinbase' }, { source }, { parser: 'tsx' })`).
5. **`__testfixtures__` is in `.prettierignore`**—outputs must match the codemod exactly; do not rely on Prettier rewriting fixtures.

**Run until green**:

```bash
yarn nx run migrator:test --testPathPattern='<your-test-pattern>'
yarn nx run migrator:typecheck
yarn nx format:write --files=<changed non-fixture files>
```

---

## 7 — Preset manifest

**Only if** this codemod should appear in a preset (major upgrade bundle, curated migration set, etc.): add an entry to `packages/migrator/src/presets/<preset>/manifest.json`:

- **`name`**: stable CLI identifier.
- **`description`**: short, user-facing.
- **`file`**: path relative to `transforms/` without extension—must match where the file actually lives (e.g. `v9/my-transform`, `v10/my-transform`, or `some-group/my-transform`).

**Non-version / standalone codemods** may **omit** the preset entirely and still be run with the migrator CLI (e.g. `-t <name>`). See `packages/migrator/docs/PRESETS_AND_TRANSFORMS.md`. If omitted from any preset, say so in the PR/summary.

---

## Checklist (before finishing)

- [ ] User confirmed automatable vs manual cases.
- [ ] Web/mobile split matches real replacement behavior.
- [ ] Coverage matches **sources, scopes, and cases** the user specified (anything out of scope is documented).
- [ ] Tests + fixtures added; `migrator:test` and `migrator:typecheck` pass; formatting applied to non-fixture sources.
- [ ] If the transform is preset-backed: manifest entry added and `file` matches the real path under `transforms/` (no mismatch between folder name and `file`). If standalone: team knows how to invoke it (CLI / docs).
- [ ] Transform header documents limitations (`export … from`, `require`, dynamic import, etc.).
- [ ] If the transform is **scope-aware**: behavior with and without `options.packageScope` / CLI `-ps` is documented and covered by tests where relevant.
6 changes: 0 additions & 6 deletions .claude/skills/component-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ packages/web/src/[source-category]/[ComponentName].tsx # for web
packages/mobile/src/[source-category]/[ComponentName].tsx # for mobile
```

Also check visualization packages if applicable:

- `packages/web-visualization/src/...`
- `packages/mobile-visualization/src/...`

Also check for Storybook stories (`packages/*/src/**/__stories__/[ComponentName].stories.tsx`). If one exists, add the `storybook` field to webMetadata.json.

### Check for Styles
Expand Down Expand Up @@ -695,4 +690,3 @@ Before completing, verify:
3. Ensure all examples work and have proper code snippets
4. Include accessibility section with specific examples
5. Test all examples and props tables render correctly
6. For visualization components, use paths like `web-visualization` or `mobile-visualization` instead of `web` or `mobile`
2 changes: 0 additions & 2 deletions .claude/skills/component-styles/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Find the component source file:
```bash
packages/web/src/[source-category]/[ComponentName].tsx # for web
packages/mobile/src/[source-category]/[ComponentName].tsx # for mobile
packages/web-visualization/src/[source-category]/[ComponentName].tsx # for web visualization
packages/mobile-visualization/src/[source-category]/[ComponentName].tsx # for mobile visualization
```

## Step 2: Evaluate Component Structure
Expand Down
Loading
Loading