Skip to content

Conversation

@adrinr
Copy link
Member

@adrinr adrinr commented Jan 30, 2026

Description

Type google sheets components. No runtime changes should be made.


Summary by cubic

Migrated the Google Sheets datasource flow to TypeScript with strict types and null-safety. Improves reliability and developer experience while keeping behavior the same, with clearer errors on misconfiguration.

  • Refactors
    • Converted Svelte components to TS (GoogleAuthPrompt, GoogleButton, modal). Added typed props and event dispatcher, and used window.location.href.
    • Rewrote stores to TS (datasourceCreation, onGoogleAuth) with explicit state types, guards, and SourceName enums. Added user-facing errors if Google Sheets integration is missing. Updated tests to TS with lightweight store mocks.
    • Ported selectors to TS (selectors.ts). Added types, handled field groups via DatasourceFieldType, and exposed shouldIntegrationFetchTableNames with proper typing. Updated tests accordingly.
    • Introduced small safety helpers (ensure) and non-null assertions to prevent undefined access during creation flow.

Written for commit 835e0c3. Summary will update on new commits.

@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/m labels Jan 30, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 11 files

Confidence score: 3/5

  • Potential user-facing behavior change: onSubmit in packages/builder/src/pages/builder/workspace/[application]/data/_components/CreateExternalDatasourceModal/index.svelte now drops createDatasource's return value, so ConfigEditor may not receive keepOpen and the modal can close prematurely.
  • Given the medium severity and concrete UX impact, there is some risk to merge despite the change being localized.
  • Pay close attention to packages/builder/src/pages/builder/workspace/[application]/data/_components/CreateExternalDatasourceModal/index.svelte - ensure the keepOpen return value is preserved.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/builder/src/pages/builder/workspace/[application]/data/_components/CreateExternalDatasourceModal/index.svelte">

<violation number="1" location="packages/builder/src/pages/builder/workspace/[application]/data/_components/CreateExternalDatasourceModal/index.svelte:113">
P2: The new onSubmit wrapper drops the return value from `createDatasource`, so the modal loses the `keepOpen` signal that `ConfigEditor` expects from `onSubmit` and can close prematurely.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@adrinr adrinr marked this pull request as draft January 30, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

firestorm Data/Infra/Revenue Team size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants