Skip to content

chore(ailab): mechanical migration of @code-dot-org/ml-playground into the monorepo#73025

Merged
sanchitmalhotra126 merged 1388 commits into
stagingfrom
ailab-migration-v2
Jun 3, 2026
Merged

chore(ailab): mechanical migration of @code-dot-org/ml-playground into the monorepo#73025
sanchitmalhotra126 merged 1388 commits into
stagingfrom
ailab-migration-v2

Conversation

@sanchitmalhotra126

Copy link
Copy Markdown
Contributor

Caution

MERGE WITH A MERGE COMMIT — DO NOT SQUASH (and do not rebase).
This PR's entire purpose is to preserve 1,385 commits of upstream history. Squashing collapses it all into one commit and destroys the lineage, git log --follow, blame, tags, and the cross-repo PR links. (Re-do of #72976, which was squashed by accident and reverted in #73024.)

Why

@code-dot-org/ml-playground (the AI Lab / ML Playground curriculum lab) is published from a separate repo on a standalone Webpack + Babel + Jest toolchain, requiring a manual npm-publish loop and invisible to this repo's CI / lint / typecheck.

This PR is the mechanical migration only, following the paradigm of #72539 (oceans-lab). It inlines the upstream package into frontend/packages/labs/ailab/ with its full git history. No code modernization, no toolchain swap, no consumer rewiring.

What this PR contains

chore(ailab): register package in frontend workspace lockfile
chore(ailab): mechanical migration of @code-dot-org/ml-playground into the monorepo
Merge remote-tracking branch 'ailab-src/main'   ← 1385 commits of ml-playground history
(origin/staging — merge-base)

History preservation

Brought over via git filter-repo --strip-blobs-bigger-than 5M --to-subdirectory-filter frontend/packages/labs/ailab --message-callback … + git merge --allow-unrelated-histories. git log -- frontend/packages/labs/ailab/ shows ~1231 commits that touched files now under the package; git log --follow -- frontend/packages/labs/ailab/i18n/mlPlayground.json traces back to the original authors. Tags v0.0.9, v0.0.10, v1.0.1 repoint into this history.

Two history rewrites done in the filter-repo pass

  1. Large historical-only blobs stripped (>5 MiB). Notably public/datasets/food.csv (~50 MB, deleted upstream long ago). The current tree is byte-for-byte unaffected; the largest blob anywhere in the imported history is now ~5 MB.
  2. PR references rewritten to cross-repo form. GitHub autolinks #NNN to this repo, so 295 imported commits (283 Merge pull request #NNN from … + 12 Title (#NNN)) would have linked to unrelated code-dot-org PRs. They were rewritten to code-dot-org/ml-playground#NNN, which links to the original repo's PRs. (Requires the ml-playground repo to stay accessible.)

Mechanical-move commit

  • package.json#name renamed @code-dot-org/ml-playground@code-dot-org/ailab; private: true; homepage + repository.directory re-pointed at the monorepo path.
  • Dropped npm-publish lifecycle scripts (preversion/version/postversion) + files.
  • Dropped build/dev/start and typecheck scripts so the un-modernized package does not participate in the turbo pipeline yet (the webpack build and a TS6 papaparse-typings typecheck error are deferred to the Vite/TS follow-up). lint, prettier, and the jest suite (108 tests) pass and stay wired.
  • Removed standalone-repo cruft: .github/, LICENSE, .nvmrc, standalone yarn.lock (the workspace frontend/yarn.lock manages deps now).
  • Converted all public/ binary assets (44 jpg, 5 png) to Git LFS per the repo .gitattributes policy, matching frontend/packages/labs/oceans.

What this PR does NOT do

  • No toolchain swap. Still has webpack.config.js, babel.config.json, Jest config.
  • No source changes other than package.json metadata.
  • No consumer-side changes. Root apps/ still pulls @code-dot-org/ml-playground@0.0.51 from npm; the new workspace package is @code-dot-org/ailab (different name → no resolution collision) and is currently unused.

Risk

Near zero — the package is workspace-registered but no consumer points at it.

Test plan

  • CI passes (package is private; no build/typecheck wired into turbo).
  • git log -- frontend/packages/labs/ailab/ shows the ml-playground lineage; --follow on i18n/mlPlayground.json resolves to original authors.
  • Commit-message PR refs link to code-dot-org/ml-playground, not code-dot-org.
  • yarn workspace @code-dot-org/ailab test → 108 passed; prettier clean.
  • Root apps/ still consumes npm @code-dot-org/ml-playground@0.0.51 (no /s/ regressions).

Follow-ups

  1. Vite + TypeScript + Vitest toolchain swap (restores a green typecheck + build; register as a lazy-loaded studio lab).
  2. Rewire apps/ to consume the workspace package instead of the npm release.

🤖 Generated with Claude Code

dancodedotorg and others added 30 commits June 24, 2021 06:35
…elector-refactor

Refactor to leverage selectors
…olumn-inspector-refactor

ColumnInspector refactor
wilkie and others added 20 commits April 9, 2026 00:25
…patch-1

Update dataset description - fix typo "music" to phobias
…pgrade-to-webpack-5

Upgrades to webpack 5 and upgrades babel.
Employed the common pattern of wrapping the affected property in a ref.
…witch-to-function-components

Switch to React functional components
* Updates to TypeScript.

* Updates the TypeScript configuration to be strict like /frontend.

* Use refs to track data.

* Removes 'any' types.

* Lint issues and upgrades fontawesome.

* Converts function form into constant form.

* Updates to clean up relaxed undefineds in the TypeScript check.

* Adds actual prettier and conform it to the main repo.

* Updates the broken test since we return an empty string for the name.

The empty string is so that the function is always typed to a string
since everything downstream just expects it to be a string anyway. This
is still falsey and I don't think it can ever be undefined anyway.
* Localizes values.

* Adds localization to the model card column values for label/features.

* Adds simple unit tests for the getLocalized* functions.
* Bumps version to 0.0.48.

* Fixes prettier issues, fixes export issues.
* Bumps version to 0.0.48.

* Fixes prettier issues, fixes export issues.
* Fixes issues with redux.

We need to make this package's redux the same version as the apps main.

We also need to make sure we don't update state inside a reducer and
instead queue a microtask. Otherwise the app crashes when selecting
datasets.

* Removes optimistic use of state.
* Fixes dev mode asset path.

* Fixes chart labels.
…o the monorepo

Inlines the standalone @code-dot-org/ml-playground npm package into
frontend/packages/labs/ailab/ with its full git history (merge commit
brings 1385 commits + tags v0.0.9/v0.0.10/v1.0.1). Mechanical only — no
toolchain swap, no src changes, no consumer rewiring (apps/ still pulls
the npm-published @code-dot-org/ml-playground).

- package.json: rename to @code-dot-org/ailab, private: true, re-point
  homepage/repository.directory to the monorepo path, drop npm-publish
  lifecycle scripts (preversion/version/postversion) + files.
- Drop build/dev/start and typecheck scripts so the un-modernized package
  does not participate in the turbo pipeline yet (webpack build + a TS6
  papaparse-typings typecheck error are deferred to the Vite/TS follow-up).
  lint, prettier, and the jest test suite (108 tests) pass and stay wired.
- Remove standalone-repo cruft: .github/, LICENSE, .nvmrc, standalone
  yarn.lock (the workspace yarn.lock manages deps now).
- Convert all public/ binary assets (44 jpg, 5 png) to Git LFS per the
  repo .gitattributes policy, matching frontend/packages/labs/oceans.

The imported history was rewritten during the filter-repo pass to (a) strip
large historical-only dataset blobs (>5 MiB, e.g. food.csv ~50 MB, deleted
upstream; current tree unaffected, largest remaining blob ~5 MB) and
(b) rewrite PR references in commit messages from bare #NNN to the cross-repo
form code-dot-org/ml-playground#NNN, so they link to the original repo's PRs
instead of unrelated code-dot-org PRs of the same number.

Follow-ups: Vite + TypeScript + Vitest toolchain swap (restores a green
typecheck + build); rewire apps/ to consume the workspace package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yarn install after adding @code-dot-org/ailab to packages/labs/*.
Package is registered but unused (no consumer points at it yet).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sanchitmalhotra126 sanchitmalhotra126 requested review from a team, stephenliang and wilkie June 3, 2026 18:08
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🖼️ Storybook Visual Comparison Report

✅ No Storybook eyes differences detected!

@sanchitmalhotra126 sanchitmalhotra126 merged commit 54c8eeb into staging Jun 3, 2026
30 checks passed
@sanchitmalhotra126 sanchitmalhotra126 deleted the ailab-migration-v2 branch June 3, 2026 18:39
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.