adaptable-upgrade

View as Markdown

Summary

  • Plans a move to a newer AdapTable major, then applies that plan in a separate session
  • Includes the AG Grid upgrade that has to move with it, and the State migration

The adaptable-upgrade AI Skill helps you to upgrade to a new AdapTable version.

It first plans a move to a newer major version of AdapTable, and then applies that plan.

The AI Skill can help you with:

  • Upgrading from AdapTable 21 or later, one step at a time or jumping several versions
  • The AG Grid version that AdapTable pairs with
  • Changed Adaptable Options, the API, object types, CSS and AdapTableQL
  • Migrating Initial State so it is compatible with the target version
  • Applying the plan in a fresh session

Caution

  • Do not use this for a Grid that is misbehaving on the version you already have (use adaptable-debug)
  • Nor to add a feature (use adaptable-dev) or to add AdapTable for the first time (use adaptable-setup)
adaptable-upgradeAI Skill

Plan our upgrade to AdapTable 24


Apply the plan in ADAPTABLE_UPGRADE_CHANGES.md with the adaptable-upgrade skill


Plan our move from AdapTable 22 to 24


Which AdapTable versions can we move to without upgrading AG Grid?

How it Works

There are two modes, and they run in two sessions:

  • Plan mode writes three files and does not touch the application
  • Apply mode starts from those files in a fresh session and changes the application.

The workflow for the Skill is as follows:

  • It finds every project, the versions, and the target you confirm
  • It checks whether AG Grid must move, and asks how: ag-update, a version bump you handle, or already handled elsewhere
  • It lists every change between the two versions that touches your code, and migrates each initialState
  • It asks you, one by one, about behaviour changes and deprecations
  • Apply mode moves the packages, applies the plan, then checks, builds and runs
Deep Dive

What the plan files hold, and how apply mode uses them

What the agent asks
  • It does not ask on every step
  • It asks only when a choice is hard to undo, and then carries on
  • Whether to resume or start fresh, when plan files already exist. It never resumes silently
  • The projects in scope, their current versions and the target major
  • How to handle AG Grid when it has to move
  • For each behaviour change or deprecation: accept the new behaviour, or keep the old one
  • In apply mode, how saved user State, remote persistence and Team Sharing roll out. It changes nothing in storage
What it writes
  • Plan mode: the three plan files only. Never application source or package.json
  • Apply mode: the application
What it runs
  • You do not run these — the agent does: detect, compat, changes, migrate state, migrate expression, check state --major <target>, check expression and check setup
When it is finished
  • Plan: the three files exist, your projects, target and AG Grid decision are recorded, and no application file changed
  • Apply: the build is green, the checks are clean, the application starts, and the report lists what is left to do by hand
Deep Dive

Taking a look inside the Skill

Examples

Upgrade an AdapTable Version

Skill

Plan an upgrade from 23 to 24

1
You ask
adaptable-upgradeAI Skill

Plan our upgrade to AdapTable 24

2
The Skill does
  1. Finds every project using AdapTable, with its framework and versions, and confirms with you the projects and the target version
  2. Checks whether AG Grid must move too, and if so asks how: through AG Grid's own ag-update Skill, as a version bump you handle, or elsewhere
  3. Lists every change between your version and 24 that touches your code, with the file and line, and migrates each initialState into a separate folder
  4. Walks you through the behaviour changes and deprecations one by one: keep the new behaviour, or keep the old one
  5. Writes three plan files, and changes nothing in the application
3
You get back

You get a plan to review:

  • ADAPTABLE_UPGRADE_SCOPE.md (projects, versions, your answers)
  • ADAPTABLE_UPGRADE_CHANGES.md (each change, where it hits your code and how to fix it)
  • ADAPTABLE_UPGRADE_STATE/ (your Initial State, already migrated)

A typical plan run would look like:

adaptable-upgradeWhat the agent reports · typical run
  1. Freshness — Skills version matches the docs site
  2. Resume check — no earlier plan files
  3. Scope — one React project on AdapTable 23; target 24 confirmed; AG Grid must move to 36.2, TypeScript meets the 5.5.4 floor
  4. AG Grid — you chose "Run ag-update now"; its plan sits next to this one and apply mode runs it first
  5. Changes — 3 BREAKING, 2 DEPRECATED and 5 BEHAVIOUR records apply; 1 initialState migrated to ADAPTABLE_UPGRADE_STATE/, 0 leftovers
  6. Trim — you kept both deprecations and accepted the 3 Adaptable Options behaviour changes; the 2 deployment notes stay
  7. Report — the plan is ready, and nothing in the application has changed. Start a new session and ask it to apply the plan in ADAPTABLE_UPGRADE_CHANGES.md with the adaptable-upgrade skill

A BREAKING entry in ADAPTABLE_UPGRADE_CHANGES.md, as the CLI writes it (shortened):

#### Swatch colour variables

- **BREAKING** · auto-migrated: n/a · id `css-color-swatch-palette`
- `--ab-color-swatch-1 … --ab-color-swatch-20` → `--ab-color-palette-13 … --ab-color-palette-32 (same colours)`
- Note: Replace every --ab-color-swatch-N with --ab-color-palette-{N+12} in theme CSS, initialState styles and code.
- Release note: https://www.adaptabletools.com/support/version-240-release-note#chg-css-color-swatch-palette
- Matches: `src/styles.css:13`

The applying session checks every rewritten State and Expression.

It then type-checks, builds and runs the application, and reports anything AdapTable could not migrate.

Apply an Upgrade Plan

Skill

Apply the plan

Which changes affect you

Skill

Which changes affect you