Skip to content

feat(code): add pganalyze as a signal source#2064

Open
rafaeelaudibert wants to merge 1 commit intomainfrom
add-pganalyze-signal-source
Open

feat(code): add pganalyze as a signal source#2064
rafaeelaudibert wants to merge 1 commit intomainfrom
add-pganalyze-signal-source

Conversation

@rafaeelaudibert
Copy link
Copy Markdown
Member

@rafaeelaudibert rafaeelaudibert commented May 6, 2026

Summary

  • Mirrors PostHog/posthog#57752 into the code app so the new pganalyze warehouse source shows up in the inbox alongside GitHub, Linear, and Zendesk.
  • New inline PgAnalyzeIcon SVG that inherits currentColor so it adapts to light/dark mode like the Phosphor icons (matches the PR's approach for the inbox surface).
  • Added pganalyze to the source filter menu, the External Connections toggle column, the SignalSourceConfig/SourceProduct unions, the warehouse-source map, the SignalCard source-line label, and a new PgAnalyzeSetup form (org slug + API key) in DataSourceSetup.

Test plan

  • pnpm --filter code typecheck clean
  • pnpm lint clean
  • pnpm --filter code test --run inboxSignalsFilterStore (10/10 pass)
  • pnpm --filter code test --run filterReports (17/17 pass)
  • Spot-check the toggle, filter chip, and setup form render correctly in light + dark mode against a project where the upstream PostHog PR is deployed

🤖 Generated with Claude Code

Mirrors PostHog/posthog#57752 so the new pganalyze warehouse source
shows up in the inbox alongside GitHub, Linear, and Zendesk. Includes
an inline currentColor SVG icon so it adapts to dark mode like the
Phosphor icons, plus an API key + organization slug setup form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafaeelaudibert rafaeelaudibert requested review from a team, Twixes and skoob13 May 6, 2026 17:03
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Comments Outside Diff (1)

  1. apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts, line 56 (link)

    P2 servers table not ensured on re-toggle

    DATA_WAREHOUSE_SOURCES records only requiredTable: "issues" for pganalyze, but the setup form creates two schemas — issues and servers (see REQUIRED_SCHEMAS in DataSourceSetup.tsx). When a user toggles pganalyze off and back on, ensureRequiredTableSyncing finds and restarts only the issues schema. If servers has been manually disabled or never synced, it will stay disabled after re-toggle.

    If both tables are needed for pganalyze signals to be useful, consider either adding servers as a second requiredTable or changing requiredTable to a list so ensureRequiredTableSyncing can iterate over all required schemas.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts
    Line: 56
    
    Comment:
    **`servers` table not ensured on re-toggle**
    
    `DATA_WAREHOUSE_SOURCES` records only `requiredTable: "issues"` for pganalyze, but the setup form creates two schemas — `issues` **and** `servers` (see `REQUIRED_SCHEMAS` in `DataSourceSetup.tsx`). When a user toggles pganalyze off and back on, `ensureRequiredTableSyncing` finds and restarts only the `issues` schema. If `servers` has been manually disabled or never synced, it will stay disabled after re-toggle.
    
    If both tables are needed for pganalyze signals to be useful, consider either adding `servers` as a second `requiredTable` or changing `requiredTable` to a list so `ensureRequiredTableSyncing` can iterate over all required schemas.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts:56
**`servers` table not ensured on re-toggle**

`DATA_WAREHOUSE_SOURCES` records only `requiredTable: "issues"` for pganalyze, but the setup form creates two schemas — `issues` **and** `servers` (see `REQUIRED_SCHEMAS` in `DataSourceSetup.tsx`). When a user toggles pganalyze off and back on, `ensureRequiredTableSyncing` finds and restarts only the `issues` schema. If `servers` has been manually disabled or never synced, it will stay disabled after re-toggle.

If both tables are needed for pganalyze signals to be useful, consider either adding `servers` as a second `requiredTable` or changing `requiredTable` to a list so `ensureRequiredTableSyncing` can iterate over all required schemas.

Reviews (1): Last reviewed commit: "feat(code): add pganalyze as a signal so..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant