Testing on staging
yarn tsx devTools/callAdminApi.ts get <chartId> --branch <branch>/set <chartId> '<jsonPatch>' --branch <branch>/unset <chartId> <field> --branch <branch>: inspect or change a chart's config on anystaging-site-<branch>(or--hostfor local/prod) without the browser.- Auth is
ADMIN_API_KEYin.env— one shared key works against every staging server (not per-branch), sinceadmin_api_keysships in the private data dump every staging build restores from (seedb/exportMetadataTables.ts). It's the same key etl already uses; no need to mint a new one. - Don't wait for the static-site rebake (~10-13 min) to check or share a chart —
http://staging-site-<branch>/admin/charts/<id>/previewreflects both chart-config edits and pushed code changes within ~1-3 min. Default to this link (not the public/grapher/<slug>page) whenever pointing someone at a chart on staging. - A branch's
/searchand/api/search404/500 with "index does not exist" unless the PR carries thestaging-algolialabel (likestaging-typesense/staging-bake) — that label is what triggers the per-branch Algolia reindex during bake, and it isn't applied by default. Staging and production Algolia data also live in separate Algolia applications, so don't probe a staging index with production'sappId/key to check whether it exists; test through the deployed/searchor/api/search, which uses whatever env that deployment is configured with.