chore: drop duplicate getBackendConnectorName (template-connectors v2, PR 4)#9330
Draft
royendo wants to merge 2 commits intoroyendo/template-connectors-v2-frontendfrom
Draft
chore: drop duplicate getBackendConnectorName (template-connectors v2, PR 4)#9330royendo wants to merge 2 commits intoroyendo/template-connectors-v2-frontendfrom
getBackendConnectorName (template-connectors v2, PR 4)#9330royendo wants to merge 2 commits intoroyendo/template-connectors-v2-frontendfrom
Conversation
31cd853 to
49a87dd
Compare
This export was a stale duplicate of the same function in `web-common/src/features/sources/modal/connector-schemas.ts`. Both live consumers (`AddAiConnectorDialog.svelte`, `add-data/manager/ steps/utils.ts`) already import from `connector-schemas.ts`; the `schema-utils.ts` copy had zero importers outside its own file. The broader cleanup the PRD called out — deleting the per-connector schema TS files, `sourceUtils.ts`, and `submitAddDataForm.ts` — is deferred until the new add-data manager flow at `web-common/src/features/add-data/` is also rewired through `GenerateFile`. Path 2 currently shares those helpers with the modal, so they cannot be removed yet without breaking it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deletes 22 hand-written `MultiStepFormSchema` TS files for source connectors. They were only imported by `connector-schemas.ts`, which the previous commit on the PR 3 branch refactored to populate its schema cache dynamically from `ListTemplates`. The runtime templates under `runtime/templates/definitions/` are now the single source of truth for these connectors' form metadata. Files removed: athena, azure, bigquery, clickhouse, delta, druid, duckdb, gcs, https, iceberg, local_file, motherduck, mysql, pinot, postgres, redshift, s3, salesforce, snowflake, sqlite, starrocks, supabase. Kept (still loaded statically; not driven by `ListTemplates`): - `claude.ts`, `gemini.ts`, `openai.ts` — AI connectors. AI add-data flow is separate from the templates system per the PRD. - `ducklake.ts`, `ducklake-utils.ts` — DuckLake's "parameters" tab composes the `attach` clause client-side via `composeDuckLakeAttach`, which needs the schema synchronously. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49a87dd to
bd339db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 4 of 4 from
PRD-template-connectors-v2.md. Stacked on top of #9329 (and #9326, #9325). Smaller than the PRD originally scoped — see "Why so small" below.getBackendConnectorNameexport fromweb-common/src/features/templates/schema-utils.ts. Both live consumers (AddAiConnectorDialog.svelteandadd-data/manager/steps/utils.ts) already import fromweb-common/src/features/sources/modal/connector-schemas.ts; theschema-utils.tscopy had zero importers outside its own file.Why so small
The PRD's PR 4 scope listed deletion of the per-connector schema TS files (
templates/schemas/*.ts),sources/sourceUtils.ts,sources/modal/submitAddDataForm.ts, andtemplates/JSONSchemaFormRenderer.svelte. None of those are safe to delete yet:sourceUtils.ts(compileSourceYAML,prepareSourceFormData) is still imported byadd-data/form/SourceForm.svelte,add-data/manager/steps/import.ts, andadd-data/form/yaml-preview.ts. The new add-data manager flow (web-common/src/features/add-data/) was not in PR 3's scope and still uses these helpers for client-side YAML compilation.submitAddDataForm.tsis still imported byAddDataFormManager.saveConnector(the connector test-and-save path) and byconnectors/ai/saveAiConnector.ts.JSONSchemaFormRenderer.svelteis still imported byAddDataForm.svelte,MultiStepConnectorFlow.svelte, andadd-data/form/AddDataFormStructure.svelte.s3.ts,gcs.ts,postgres.ts, etc.) are only imported byconnector-schemas.ts, butmultiStepFormSchemasis still seeded from those static imports. Dropping them would meangetConnectorSchemareturns null untilListTemplatesresolves andregisterTemplateSchemaruns — which means an empty form on first render and broken specs that don't seed viapopulateSchemaCache. The PRD even calls this out as one of the open decisions and recommends doing it but it needs to come with the test updates.A follow-up PR (call it 4b) should:
web-common/src/features/add-data/throughGenerateFileso it stops importingsourceUtils/submitAddDataForm.connector-schemas.spec.tsto seed viapopulateSchemaCache.Checklist:
Developed in collaboration with Claude Code