refactor(inbox): key warehouse source setup by signal source - #70830
refactor(inbox): key warehouse source setup by signal source#70830rnegron wants to merge 12 commits into
Conversation
🦔 Hogbox preview · ✅ ready▶ Open the preview
commit |
|
Reviews (1): Last reviewed commit: "refactor(inbox): key warehouse source se..." | Re-trigger Greptile |
🤖 CI report✅ Bundle size — 🟢 -398 B (-0.0%)Uncompressed size of every built Total: 64.84 MiB · 🟢 -398 B (-0.0%) No file changed by more than 1000 B. Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report ✅ Eager graph — within budgetHow much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy
🟢 Largest files eagerly shipped from
|
| Size | File |
|---|---|
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 24.6 KiB | ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js |
| 6.3 KiB | ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js |
| 4.5 KiB | ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js |
| 3.9 KiB | ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.4 KiB | ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js |
| 1.3 KiB | src/RootErrorBoundary.tsx |
| 912 B | ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js |
| 789 B | src/scenes/ChunkLoadErrorBoundary.tsx |
| 762 B | src/index.tsx |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 281.3 KiB | ../node_modules/.pnpm/posthog-js@1.404.0/node_modules/posthog-js/dist/rrweb.js |
| 267.7 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 235.5 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 223.2 KiB | ../node_modules/.pnpm/posthog-js@1.404.0/node_modules/posthog-js/dist/module.js |
| 164.0 KiB | src/queries/validators.js |
| 154.3 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 105.8 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 93.3 KiB | ../packages/quill/packages/quill/dist/index.js |
Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479
✅ Dist folder size — 🟢 -51.5 KiB (-0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 1336.52 MiB · 🟢 -51.5 KiB (-0.0%)
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Thread the setup source through onDataSourceSetupComplete from DataSourceSetup's stable prop instead of reading live reducer state, so the signal still enables if the connect resolves after Back/close. Also run required-table syncs concurrently, derive WarehouseBackedSource from the registry, and drop the vestigial values wrapper.
…setup-rekey # Conflicts: # frontend/src/scenes/inbox/signalSourcesLogic.ts
6fcf638 to
a880dc8
Compare
|
superseded by #67117 |
Problem
Adding a signal source should be one entry. Today it's four product-keyed structures plus two copy-pasted
DataSourceSetupcomponents.That shape assumes one warehouse product means exactly one signal source, which breaks the moment GitHub backs a second (CI signals). It also already ships a bug: the two copies drifted, so the pganalyze wizard pre-selects
issues+serverswhile sync only forcesissues.Changes
Before:
flowchart LR S[signal source] --> P{{warehouse product}} P --> A[DATA_WAREHOUSE_SOURCE_CONFIG] P --> B[SIGNAL_SOURCE_REQUIRED_TABLES] P --> C[agentRosterMeta.dataWarehouseSource] P --> D[inline completion map] A --> X[DataSourceSetup in AgentsTab] D --> Y[DataSourceSetup in SignalSourcesPanel] classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000; classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; class S phYellow; class P phRed; class A,B,C,D phGray; class X,Y phBlue;After:
flowchart LR S[signal source] --> R[WAREHOUSE_SOURCE_SETUP] R --> X[DataSourceSetup] classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; class S phYellow; class R phGray; class X phBlue;owner/repo.issues, which the exact-name match missed, so the source sat there not syncing. NewschemasToEnableForWarning
First-time setup is still broken for qualified sources, and is not fixed here.
sourceWizardLogicmatchesrequiredTablesagainstschema.tableexactly (L1520), so connecting GitHub from the inbox fails withRequired tables not found in source: issues. That match belongs to the data warehouse wizard.Note
Backend half of the same naming bug: the signals qualified-schema PR. Independent, no file overlap, either can merge first.
How did you test this code?
signalSourcesLogic.test.tscoversschemasToEnableFor— catches a multi-repo source resolving to nothing, and only the first repo being enabled. Nothing covered qualified names beforeAutomatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted). Extracted by Claude Code from the CI signals stack; the stack absorbs this on merge.
The multi-repo fix landed here rather than in its own PR because this PR already rewrites that exact call site. A review pass found the wizard gap called out above; an earlier draft of this description wrongly implied setup was covered.