diff --git a/Makefile b/Makefile index 0a57cee7d0..fe6214d28e 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,7 @@ generate: .PHONY: lint lintfull tidy lintcheck fmt fmtfull test test-unit test-acc test-slow test-slow-unit test-slow-acc cover showcover build snapshot snapshot-release schema integration integration-short acc-cover acc-showcover docs ws wsfix links checks test-update test-update-templates generate-out-test-toml test-update-aws test-update-all generate-validation test-exp-aitools: - make test TEST_PACKAGES="./experimental/aitools/..." ACCEPTANCE_TEST_FILTER="TestAccept/idontexistyet/aitools" + make test TEST_PACKAGES="./experimental/aitools/..." ACCEPTANCE_TEST_FILTER="TestAccept/apps" test-exp-ssh: make test TEST_PACKAGES="./experimental/ssh/..." ACCEPTANCE_TEST_FILTER="TestAccept/ssh" diff --git a/acceptance/apps/init-template/app/output.txt b/acceptance/apps/init-template/app/output.txt index 7c1d12ea3e..2832dbb335 100644 --- a/acceptance/apps/init-template/app/output.txt +++ b/acceptance/apps/init-template/app/output.txt @@ -91,7 +91,15 @@ export const querySchemas = { }; ``` -**Step 3: Add visualization to your app** +**Step 3: Run typegen (REQUIRED after any schema change)** + +```bash +npm run typegen +``` + +This regenerates `client/src/appKitTypes.d.ts` with your new query types. **Without this step, TypeScript will not recognize your query keys and builds will fail.** + +**Step 4: Add visualization to your app** ```typescript // client/src/App.tsx @@ -102,9 +110,9 @@ import { BarChart } from '@databricks/appkit-ui/react'; **That's it!** The component handles data fetching, loading states, and rendering automatically. -**To refresh TypeScript types after adding queries:** -- Run `npm run typegen` OR run `npm run dev` - both auto-generate type definitions in `client/src/appKitTypes.d.ts` -- DO NOT manually edit `appKitTypes.d.ts` +**⚠️ CRITICAL: Always run `npm run typegen` after modifying files in `config/queries/`** +- DO NOT manually edit `client/src/appKitTypes.d.ts` - it is auto-generated +- If you see errors like `'"my_query"' is not assignable to parameter of type`, run `npm run typegen` ## Installation