adaptable-debug

View as Markdown

Summary

  • Diagnoses a Grid that is on screen and not doing what you expect
  • Reads the running Grid before it changes any source

The adaptable-debug AI Skill works out why a running Grid is not doing what you expect.

The AI Skill can help you with:

  • A feature (e.g. Layout, Format Column, Styled Column, Calculated Column, Alert etc.) that is not applied
  • Wrong columns or rows displayed
  • State that does not save, load or migrate
  • What the Grid is doing right now
  • A support case, or feedback on the Skills, when it cannot be fixed

Caution

  • Do not use this for compile or type errors, or to add a feature (use adaptable-dev)
  • Nor to add AdapTable for the first time (use adaptable-setup) or to upgrade (use adaptable-upgrade)
adaptable-debugAI Skill

The Trades layout is in the dropdown but not applied at start-up — why?


The Negative PnL Format Column is not showing in the browser — why?


The Grid is blank and there is nothing in the console — what is wrong?


Why are these rows missing from the Grid?

How it Works

The running Grid is the evidence the Skill requires.

The agent reads your Grid before it touches your source.

The workflow is as follows:

  • It confirms which app and page the Grid is on, and that the dev server is the one on screen
  • It reads the page, then checks what it collected against your columns
  • It compares the live State with the initialState in your source
  • It fixes the source, never the saved State, then reloads and reads the page again

Note

  • The bug it finds most often is saved State sitting on top of a source edit
  • A user, or an earlier session, saved a section, and every source edit since has merged underneath it
  • The fix is a Revision on that section of initialState, which replaces just that section on the next load
  • Clearing the store would discard the user's saved work
Deep Dive

What it reads from the page, and the files every Skill shares

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
  • Which Grid, when a page has several
  • Before it restores State or discards saved State, and it says what that discards
  • Before it includes any row values in a support case, and whether the row field names are sensitive
What it writes
  • Scratch files with what it read: the columns, the State and the logs
  • ADAPTABLE_SUPPORT_CASE.md for a support ticket, scrubbed unless you say otherwise
  • ADAPTABLE_FEEDBACK.md for feedback on the Skills and the CLI
  • You review the file and send it. The Skill never sends anything
What it runs
  • You do not run these — the agent does: detect, check state --kind persistent, check expression, check setup and anonymise
  • With the app running, it reads the page through the DevTools API
  • If it cannot open the page, it asks you to paste getPersistentState(), getColumns() and getLogs() into the browser console and paste the results back
When it is finished
  • The cause is stated, with the evidence that proves it
  • A fix in the source is applied or proposed
  • It reloads and checks, or hands that check to you
  • Or a support case or feedback file is ready for you to review and send
Deep Dive

Taking a look inside the Skill

Examples

Fix a running Grid

Skill

A Layout that does not apply

1
You ask
adaptable-debugAI Skill

The Trades layout is in the dropdown but not applied at start-up — why?

2
The Skill does
  1. Confirms which app and page the Grid is on, and that it is running
  2. Reads the running Grid through the DevTools In-page API with its browser tool (or asks you to paste three lines into the browser console): errors and warnings, recent actions, the columns, and the Layout part of State
  3. Checks the State it read against your columns
  4. Compares it with the initialState in your source: a Layout saved in the browser from an earlier session is loading on top of your edit
  5. Proposes the fix at the source — a Revision on the Layout section, so your change replaces the saved one on the next load — instead of clearing the browser storage, which would wipe users' saved work
3
You get back

The cause, the evidence that proves it (the saved Layout next to the one in your source), and a one-line change to the source.

After the change, the agent reloads the page and reads the Layout again: it matches the source and the logs are clean.

Skill

A Format Column that does not show

Skill

Layouts and filters lost on reload

Skill

What changed recently

Get help

Skill

An anonymised support case

Skill

Feedback on a Skill