Skip to content

Genie issues #162

@keugenek

Description

@keugenek

Issue 1: apps init — Go template markers not rendered in scaffolded files

Title: apps init: Go template markers not rendered in scaffolded files

Description

When running databricks apps init --features analytics --warehouse-id <ID> --name <NAME> --run none, the scaffolded project contains raw Go template markers instead of rendered values in multiple files.

Affected Files

  • package.json — contains {{.projectName}} and {{.appDescription}} instead of actual values
  • client/src/App.tsx — contains {{if .plugins.analytics}}, {{if .plugins.genie}}, etc.
  • client/src/pages/analytics/AnalyticsPage.tsx — wrapped in {{if .plugins.analytics}}...{{end}}
  • client/src/pages/genie/GeniePage.tsx — wrapped in {{if .plugins.genie}}...{{end}}
  • client/src/pages/lakebase/LakebasePage.tsx — wrapped in {{if .plugins.lakebase}}...{{end}}
  • server/server.ts — contains {{range}} loops instead of rendered plugin imports

Steps to Reproduce

databricks apps init \
  --description "Test app" \
  --features analytics \
  --warehouse-id <any-valid-id> \
  --name test-app \
  --run none \
  --profile DEFAULT

Then inspect any of the files listed above — they contain Go template syntax instead of rendered TypeScript/JSON.

Expected Behavior

All Go template markers should be processed during apps init. The resulting files should be valid TypeScript/JSON with:

  • {{.projectName}} replaced with the app name
  • {{.appDescription}} replaced with the description
  • Conditional blocks resolved based on --features selection
  • Only relevant plugin pages/imports included

Environment

  • @databricks/appkit: 0.15.0
  • Databricks CLI: latest
  • Platform: macOS (Apple Silicon)

Issue 2: apps initconfig/queries/ directory not created with --features analytics

Title: apps init: config/queries directory not created with --features analytics

Description

When scaffolding a project with --features analytics, the config/queries/ directory is not created, and the sample SQL query files (hello_world.sql, mocked_sales.sql) referenced by the template AnalyticsPage.tsx are missing.

This causes:

  1. npm run typegen warns "No queries found" and skips type generation
  2. appKitTypes.d.ts is not generated
  3. Build fails with TypeScript errors in AnalyticsPage.tsx because query result types default to {}

Steps to Reproduce

databricks apps init \
  --description "Test app" \
  --features analytics \
  --warehouse-id <any-valid-id> \
  --name test-app \
  --run none \
  --profile DEFAULT

cd test-app
npm run typegen  # warns: No queries found
npm run build    # fails: Type 'unknown' is not assignable to type 'ReactNode'

Expected Behavior

apps init should create config/queries/ with the SQL files that AnalyticsPage.tsx references:

  • config/queries/hello_world.sqlSELECT :message AS value
  • config/queries/mocked_sales.sql — sample sales data query

Environment

  • @databricks/appkit: 0.15.0
  • Databricks CLI: latest
  • Platform: macOS (Apple Silicon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions