31 Commits
Author SHA1 Message Date
yaoweiprcandClaude Sonnet 5 0d549eb8be feat(konnect): move Konnect projects into a global Control Planes organization [INS-3148] (#10315)
* Move Konnect projects into a global Control Planes organization

* fix: break new circular dependency in Konnect organization utils

useKonnectOrganization() imported useRootLoaderData from ~/root to read
accountId, but organization-utils.ts is itself reached from root.tsx via
the settings modal chain, closing a new import cycle flagged by CI's
dependency-cruiser check. Pass accountId in from the caller
(useOrganizations), which already has it, instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Konnect moved onboarding nudge.

* Can sync when the konnect org is empty.

* fix: guard two develop-introduced hooks against the Konnect organization

use-organization-storage-rule.ts and use-remote-files.ts's
useRemoteBackendProjects were added by develop's account-data refactor
after this plan's original API-guard audit, and both issued real
network/IPC calls for the local-only Konnect organization:

- useOrganizationStorageRule called the raw API directly and only
  checked isScratchpadOrganizationId, missing Konnect. Fixed by
  delegating to fetchAndCacheOrganizationStorageRule (which already
  returns the correct local-only rules with no network call) instead
  of gating with `enabled`, since a naive gate would fall back to the
  permissive DEFAULT_STORAGE_RULES and surface Cloud Sync/Git Sync
  inside Control Planes.
- useRemoteBackendProjects had no organization guard at all, firing
  window.main.sync.remoteBackendProjectsOfTeam for an org whose
  projects never have a remoteId. Fixed with an isLocalOrganizationId
  check on its `enabled` gate.

Re-audited every other organizationId-scoped API guard in the plan;
no further gaps found. Plan doc updated with both findings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: disable Connect & Sync in Konnect settings modal without entitlement

The modal let a user validate and store a PAT even when the account
lacks the Konnect control-planes entitlement, even though syncing
could never run in that state — the sidebar's Sync button was already
disabled here but the modal's own Connect & Sync button was not.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: re-fetch Konnect entitlements after logging back into the same account

refreshKonnectAccess deduped by accountId, but signing in never
reloads the renderer, so its module-level guard survives a logout —
and a fresh login into the same account keeps the same accountId,
silently skipping the re-fetch of /v1/user/entitlements.

Key the guard on sessionId instead: a new login always mints a new
session token even for the same account, so this still dedupes the
normal cold-start case (startup call and post-login loader share one
session) while correctly re-resolving after logout/login.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: navigate away when the Konnect organization becomes invisible

Deleting a user's last Konnect project (one at a time via the project
delete action, or in bulk via Disconnect) could leave them stranded on
a URL for an organization that no longer appears in the dropdown, with
no automatic navigation elsewhere.

Add getKonnectOrganizationEscapeRoute(organizationId), which re-checks
visibility with a fresh local project count (no network call — only
that half can change from a plain NeDB delete) combined with the
last-resolved entitlement, updates the shared access store so
useOrganizations() reflects it immediately, and returns the account's
first real organization to redirect to when the org just went dark.

Call it from both places that can remove the last Konnect project:
- organization.$organizationId._index.tsx's loader, which every
  "no reachable project" fallback already redirects through
- organization.$organizationId.project.$projectId.delete.tsx's
  action, which previously short-circuited straight back into the
  same (now invisible) organization instead of going through that
  loader

Extracted the shared "recompute + store update" logic into
reconcileKonnectAccess() to avoid duplicating it between
refreshKonnectAccess() and the new escape-route check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Migrate after login

* Force fetch storage rule

* Replace Konnect sync module-var trigger with event bus

Swaps the register/run module variable in konnect-sync-trigger.ts for
uiEventBus so the sync callback is subscribed/unsubscribed via useEffect
instead of being reassigned on every render with no cleanup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Remove plan

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 09:04:12 +00:00
Insomnia 1755d42406 Bump app version to 13.2.0 (#10439) 2026-08-25 09:30:13 +00:00
Fares Osman 9d519bb071 feat: record enterprise-plan actions for request/document creation (#10337)
* feat: record enterprise-plan actions for request/document creation

* chore: address copilot feedback

* feat: adds enterprise plan type guard

* chore: formatting

* refactor: clean up

* chore: use proper types

* refactor: clean up

* chore: clean up
2026-08-10 12:00:20 -04:00
Insomnia 2fcbf833a6 Bump app version to 13.1.0 (#10296) 2026-07-24 09:50:49 +08:00
Alison Sabuwala 37e6a00220 fix: route v3 spaces SDK through proxy-aware fetch (#10265) 2026-07-16 17:22:11 +00:00
Pavlos Koutoglou 4f5a72dc16 feat(INS-2933): first-request experience A/B experiment (13.1) (#10215)
* Create new methods colors

* Implement first request logic

* feat: enhance first request treatment logic with backend support and caching

* feat: add experiment assignment analytics and related utility functions

* feat: add reportRequestsCreated function to track request creation for first-request experiments

* feat: enhance request creation reporting with session tracking

* feat: add tests for reportRequestsCreated function to validate API interactions

* feat: refactor localStorage methods for better error handling and state management

* feat: enhance accessibility of error message in FirstRequestCreation component

* feat: simplify user ownership check in project component

* feat: update user tests to include onboarding state and related functions

* feat: replace reportRequestCreated function with maybeLatchRequestThreshold for request tracking

* feat: integrate onboarding state into first request treatment logic and refactor related functions

* feat: integrate onboarding state into FirstRequestCreation component and enhance treatment logic

* feat: implement maybeLatchRequestThreshold function for tracking first-request graduation

* feat: refactor onboarding request handling and replace reportRequestsCreated with latchRequestThresholdReached

* feat: simplify first request treatment logic and remove unused functions

* feat: update latchRequestThresholdReached to use PATCH method for idempotent threshold latch

* feat: update onboarding state interface and test to use reached_request_threshold instead of has_reached_request_threshold

* feat: update latchRequestThresholdReached to use PUT method and correct endpoint for idempotent threshold latch

* feat: remove reached_request_threshold from onboarding state and related tests

* feat: integrate request tracking with maybeLatchRequestThreshold in clientAction

* feat: update onboarding state handling and treatment logic in user module

* feat: update @getinsomnia/insomnia-v3-fetch to version 1.0.20 in package-lock and package.json

* feat: add padding to request URL bar and adjust MethodSelector alignment

* feat: enhance request threshold handling by adding per-account request count baseline

* feat: update analytics event emission for treatment assignments in first request flow
2026-07-10 18:10:53 +00:00
Alison Sabuwala b43b56c38b feat: move to v3 spaces from v1 organizations call (#10185) 2026-07-06 12:01:20 -04:00
Alison Sabuwala 72ef5cf563 feat: align list and onboarding UX to unified space model (#10033) 2026-06-23 12:46:14 -04:00
Alison Sabuwala d19e58a9f6 feat: integrate v3 user endpoints (#9785)
* feat: integrate v3 user endpoints

* feat: use public sdk for insomnia-api
2026-04-22 10:25:37 -04:00
Shelby e12d66224d feat: konnect sync integration (#9795) 2026-04-14 15:39:14 +00:00
Insomnia b18f9528fc Bump app version to 12.5.1-alpha.0 2026-04-11 00:15:09 +00:00
Insomnia 33e0c2e2e2 Bump app version to 12.5.0 2026-04-01 21:51:11 +00:00
Insomnia 8f6bf2af2f Bump app version to 12.5.0-beta.0 2026-03-26 02:32:17 +00:00
Curry Yang d6b97bd207 refactor: migrate remaining apis - [INS-2162] (#9697)
* refactor: migrate remaning apis

* fix: type

* fix

* fix
2026-03-06 15:30:15 +08:00
Insomnia 0e30098049 Bump app version to 12.4.0 2026-03-04 23:55:20 +00:00
Insomnia a7dbd115f9 Bump app version to 12.4.0-beta.0 2026-02-26 04:11:02 +00:00
Curry Yang 5cbda1af5e refactor: migrate organizations apis (#9615)
* refactor: migrate organizations apis

* fix: ts check

* fix: comment
2026-02-11 15:57:06 +08:00
Curry Yang 405b3c0562 refactor: migrate collaborator api (#9605)
* refactor: migrate collaborator api

* fix: search collaborators query params undefined

* fix: comment
2026-02-11 03:31:57 +00:00
Insomnia 58cc102bf8 Bump app version to 12.3.1 2026-02-05 05:24:10 +00:00
Insomnia 5d669097a9 Bump app version to 12.3.1-beta.1 2026-02-04 08:00:05 +00:00
Insomnia a195fdf6a2 Bump app version to 12.3.1-beta.0 2026-02-02 00:05:36 +00:00
Curry Yang 9eceef3455 refactor: migrate invite api - [INS-1875] (#9590)
* refactor: migrate invite api

* fix: return type
2026-01-29 08:28:53 +00:00
Curry Yang 0bbae307fd refactor: migrate projects request to insomnia-api package - [INS-1874] (#9574)
* refactor: migrate projects request to insomnia-api package

* fix: cr

* refactor: error handling

* fix: add isApiError

* fix: error

* fix
2026-01-21 09:14:53 +00:00
Bingbing 9f7d3efbfa refactor: move enterprise apis to insomnia-api (#9552) 2026-01-19 10:18:07 +00:00
Insomnia efdc35fd43 Bump app version to 12.3.0 2026-01-15 00:38:36 +00:00
Insomnia 04a1360620 Bump app version to 12.3.0-beta.0 2026-01-08 04:55:57 +00:00
Bingbing f9e1aa0527 refactor: move trial apis to insomnia-api (#9518) 2025-12-31 02:21:21 +00:00
Insomnia da68781c30 Bump app version to 12.2.0 2025-12-19 00:24:44 +00:00
Insomnia 139791a4fb Bump app version to 12.2.0-beta.1 2025-12-16 19:56:31 +00:00
Insomnia d0f07bf1d7 Bump app version to 12.2.0-beta.0 2025-12-12 09:15:42 +00:00
Bingbing 1d625ba1c9 refactor: extract insomnia-api (#9093) 2025-12-08 03:57:47 +00:00