feat: konnect sync integration#9795
Conversation
96f556c to
c4b8f4c
Compare
c4b8f4c to
af2575a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a Kong Konnect integration to Insomnia, enabling users to store a Konnect PAT, then sync Konnect control planes/services/routes into Insomnia projects/collections/requests and manage them from a new “Konnect” sidebar tab.
Changes:
- Introduces Konnect API + sync engine with retry, mapping Konnect entities into Insomnia data models.
- Adds UI for PAT validation/storage and a sidebar “Konnect” tab to trigger/cancel sync and show progress/errors.
- Extends data models, analytics events, org feature gating, and test coverage (unit + smoke) for the new integration.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/ui/hooks/use-konnect-sync.ts | Hook to run/cancel sync, update progress, revalidate, and emit analytics. |
| packages/insomnia/src/ui/components/settings/konnect-settings.tsx | New settings panel to validate/save/clear Konnect PAT in secret storage. |
| packages/insomnia/src/ui/components/project/project-list-sidebar.tsx | Adds sidebar “Konnect” tab with sync controls and Konnect project list. |
| packages/insomnia/src/ui/components/panes/grpc-request-pane.tsx | Adjusts gRPC reflection behavior to preserve method selection when still valid. |
| packages/insomnia/src/ui/components/modals/settings-modal.tsx | Adds feature-gated “Konnect” settings tab. |
| packages/insomnia/src/ui/analytics.ts | Adds Segment event names for Konnect PAT validation and sync completion. |
| packages/insomnia/src/routes/organization.$organizationId.project._index.tsx | Passes org feature flag to sidebar to enable Konnect sync UI. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId._index.tsx | Passes org feature flag to sidebar to enable Konnect sync UI. |
| packages/insomnia/src/routes/organization.$organizationId.permissions.tsx | Extends fallback org features to include konnectSync. |
| packages/insomnia/src/models/mocks/uuid.ts | Adds resetV4Counter helper for deterministic tests. |
| packages/insomnia/src/konnect/sync.ts | Core sync implementation: upserts projects/workspaces/requests and deletes stale entities. |
| packages/insomnia/src/konnect/api.ts | Konnect API client helpers: region extraction, pagination, and 429 retry/backoff. |
| packages/insomnia/src/konnect/tests/sync.test.ts | Extensive unit tests for sync behavior across protocols and resync semantics. |
| packages/insomnia/src/konnect/tests/api.test.ts | Unit tests for API helpers, pagination, and retry logic. |
| packages/insomnia/src/insomnia-data/src/models/workspace.ts | Adds konnectServiceId field for Konnect-managed collections. |
| packages/insomnia/src/insomnia-data/src/models/websocket-request.ts | Adds konnectRouteKey to track Konnect-managed WS requests. |
| packages/insomnia/src/insomnia-data/src/models/settings.ts | Adds hasKonnectPat setting default. |
| packages/insomnia/src/insomnia-data/src/models/request.ts | Adds konnectRouteKey to track Konnect-managed HTTP requests. |
| packages/insomnia/src/insomnia-data/src/models/request-group.ts | Adds konnectRouteId to tag Konnect-managed folders. |
| packages/insomnia/src/insomnia-data/src/models/project.ts | Adds konnectControlPlaneId / konnectClusterType fields for Konnect-managed projects. |
| packages/insomnia/src/insomnia-data/src/models/grpc-request.ts | Adds konnectRouteKey to track Konnect-managed gRPC requests. |
| packages/insomnia/src/common/settings.ts | Extends shared Settings interface with hasKonnectPat. |
| packages/insomnia/src/common/constants.ts | Adds getKonnectApiBaseURL() for configuring Konnect API base URL. |
| packages/insomnia-smoke-test/tests/smoke/git-sync.test.ts | Enables konnectSync feature flag in smoke test org features. |
| packages/insomnia-smoke-test/server/insomnia-api.ts | Seeds konnectSync in mocked organization features response. |
| packages/insomnia-smoke-test/playwright/test.ts | Seeds a fake Konnect PAT in test setup so Konnect-enabled UI can render. |
| packages/insomnia-api/src/organizations.ts | Extends FeatureList type to include konnectSync. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c9c8dd6 to
801ff24
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
801ff24 to
2940821
Compare
| projectsCount={projectsCount} | ||
| storageRules={storageRules} | ||
| onCreateProject={() => setIsNewProjectModalOpen(true)} | ||
| konnectSyncEnabled={features.konnectSync.enabled} |
There was a problem hiding this comment.
Ensure the backend change is deployed to production before merge the PR.
Otherwise the app will crash when connecting to production environments.
Or we can add a fallback logic to set features.konnectSync to false if not exists
Add a Kong Konnect integration to Insomnia that syncs control planes, gateway services and routes into projects, collections, and requests. Users configure a Konnect PAT in settings, then use a "Konnect" tab in the sidebar to trigger sync.