mirror of
https://github.com/Kong/insomnia.git
synced 2026-08-04 11:52:33 -04:00
* Close konnect configure modal after validating PAT. * Remove unused file * refactor: update delete/remove terminology for projects and workspaces based on konnect control plane presence * Prevent users from changing the sync type for konnect projects * Show Konnect tab when their are no projects under org. * tmp * Only create necessary konnect proxy env vars (#10005) * Apply icons for konnect projects * fix: remove Buffer class usage in renderer code (#10031) * Streamline workspace create & settings form [INS-2621] (#9940) * fix: skip file name collision validation when file name is unchanged The validate callback parameter shadowed the outer `fileName` variable (which holds the original name with extension). The folder-children filter compared against the bare input value instead of the full `fileName`, so the current file was never excluded — causing a false "already exists" error whenever only the workspace name was edited. Renaming the parameter to `inputValue` restores access to the outer `fileName` so the filter correctly excludes the existing file before checking for collisions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: make .yaml extension shift with input text in workspace settings The invisible sizer span that drives the CSS grid column width had static content (the initial filename), so the column never resized as the user typed and the .yaml suffix stayed at a fixed position. Switching the TextField to controlled mode (value + onChange) lets the sizer span reflect the live input value, causing the .yaml label to follow the text as characters are added or removed. Also removed the excess pr-7 right-padding since the extension is now positioned by the grid rather than by padding offset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: allow workspace filename input to adapt down to zero width inputs * fix: sanitize file name value in workspace settings modal Apply safeToUseInsomniaFileName to the TextField value prop so the displayed and submitted value is always sanitized, matching the pattern used in new-workspace-modal. Previously the controlled value reflected raw input directly, bypassing character replacement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: minor right padding correction for consistency between new/edit workspace settings filename input * fix: remove unnecessary w-min from new workspace modal as well --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: enhance konnect sync UX with tooltip for last synced time * feat: enhance konnect sync UX by navigating to the first project after sync * feat: add onboarding modal for Konnect environment setup after first sync * feat: refactor getKonnectDeploymentType for improved control plane type handling * Fix flaky Konnect smoke test sync assertion * Update packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/konnect-env-onboarding.tsx Co-authored-by: Missy Turco <60163079+mcturco@users.noreply.github.com> * Update packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/konnect-env-onboarding.tsx Co-authored-by: Missy Turco <60163079+mcturco@users.noreply.github.com> * refactor: remove click and escape handlers from KonnectEnvOnboarding component * fix: remove unnecessary filter for proxy defaults in upsertProjectEnvVars function * Keep in Konnect tab after deleting konnect projects. * Fix Konnect proxy env var creation on sync * Add Kubernetes Ingress Controller SVG icon to project navigation sidebar * feat: add k8sIngressController deployment type and corresponding icon - Updated getKonnectDeploymentType to return 'k8sIngressController' for K8SIngressController control plane type. - Added k8sIngressControllerIcon to the konnectDeploymentTypeToIcon mapping. - Fixed the path for serverless.svg and added a new serverless.svg file with the appropriate SVG content. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * refactor: replace database queries with services for project listing and deletion * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * refactor: update control plane configuration to enforce cloud_gateway property and improve deployment type handling * fix: memoize createInProjectActionList to prevent DOM detachment in menu * fix: remove proxy defaults check in upsertProjectEnvVars function * fix: update sync logic to handle environment onboarding and navigation for first successful sync * fix: add LastSyncedLabel component for improved sync status display * fix: simplify active tab update logic in project navigation sidebar * fix: update environment variable mapping tests for proxy vars handling --------- Co-authored-by: Ryan Willis <ryan.willis@konghq.com> Co-authored-by: Vivek Thuravupala <2700229+godfrzero@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Missy Turco <60163079+mcturco@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
insomnia-data
A runtime-agnostic data layer for Insomnia, based on interface + IoC.
Core idea
src/: runtime-agnostic contracts (IDatabase,Services, model metadata/types)node-src/: Node/main concrete implementations (createNedbDatabase,servicesNodeImpl)- entry points wire once:
initDatabase(impl)initServices(impl)
After wiring, business code always uses the same APIs: database, services, models.
Process flows
Database (main / renderer / inso)
flowchart LR
subgraph Renderer
R0[initDatabase] --> R1[clientDatabase implementation]
R2[feature code] --> R3[database from insomnia-data]
R3 --> R1
R1 --> R4[window.database.invoke]
R4 --> R5[ipcRenderer.invoke database.invoke]
end
subgraph Main
M0[initDatabase] --> M1[mainDatabase implementation]
M1 --> M2[createNedbDatabase impl]
M2 --> M3[(NeDB)]
M4[main feature code] --> M5[database from insomnia-data]
M5 --> M1
M6[ipcMain.handle database.invoke] --> M1
M1 --> M7[webContents.send db.changes]
end
subgraph Inso
I0[initDatabase] --> I1[inso database implementation]
I1 --> I2[createNedbDatabase impl]
I2 --> I3[(NeDB)]
I4[inso feature code] --> I5[database from insomnia-data]
I5 --> I1
end
R5 --> M6
M7 -.notify.-> R2
Services (main / renderer / inso)
flowchart LR
subgraph Renderer
R0[initServices] --> R1[preload servicesProxy implementation]
R2[feature code] --> R3[services from insomnia-data]
R3 --> R1
R1 --> R4[ipcRenderer.invoke services.invoke]
end
subgraph Main
M0[initServices] --> M1[servicesNodeImpl]
M2[feature code] --> M3[services from insomnia-data]
M3 --> M1
M1 --> M4[service logic]
M4 --> M5[database]
M5 --> M6[(NeDB)]
M7[ipcMain.handle services.invoke] --> M1
end
subgraph Inso
I0[initServices] --> I1[servicesNodeImpl]
I2[feature code] --> I3[services from insomnia-data]
I3 --> I1
I1 --> I6[(NeDB)]
end
R4 --> M7
Renderer services path:
services.xxx -> preload proxy -> IPC -> main handler -> servicesNodeImpl -> database.
Why this design
- Same API across runtimes: main, renderer, inso.
- Feature code is decoupled from Electron/IPC/NeDB details.
- Renderer has a safer boundary (bridge + IPC, no direct DB internals and node API access).
- Easy to test or swap implementations by injecting at startup.
Minimal usage
Main
import { initDatabase, initServices } from 'insomnia-data';
import { mainDatabase } from '~/main/database.main';
import { servicesNodeImpl } from 'insomnia-data/node';
await initDatabase(mainDatabase);
initServices(servicesNodeImpl);
Renderer
import { initDatabase, initServices } from 'insomnia-data';
import { clientDatabase } from '~/ui/database.client';
await initDatabase(clientDatabase);
initServices(window._dataServices);
Inso / Node
import { initDatabase, initServices } from 'insomnia-data';
import { createNedbDatabase, servicesNodeImpl } from 'insomnia-data/node';
await initDatabase(createNedbDatabase());
initServices(servicesNodeImpl);
Consuming
import { services, models, type Request } from 'insomnia-data';
const mcpRequest = await services.mcpRequest.create({ url: 'http://localhost:3000' });
const all = await services.mcpRequest.all();
const request: Request = {};
const requestType = models.request.type;