6499 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
Bingbing 9ddeaae838 test: fix sidebar-focus-onboarding flake by waiting on the focus header (#10507)
expectWorkspaceActive polled focus mode and the tree's aria-selected state through
separate locator lookups:

    if (await this.isWorkspaceFocused(workspaceName)) return true;
    const gridItem = this.workspaceGridListItem(workspaceName);
    if ((await gridItem.count()) === 0) return false;
    return (await gridItem.getAttribute('aria-selected')) === 'true';

count() returns immediately, but getAttribute() retries until its selector matches. Focus
mode swaps the collection's tree row for the back-arrow header, so when that swap landed
between the two calls the second lookup waited for a row that never comes back. The
predicate never returned, so expect.poll never evaluated again and died on its own 25s
timeout, while the page snapshot taken at failure showed a healthy focused sidebar.

The fallback branch could not save it either: getSelectedItemId returns the open request
for a collection, so the collection's own row is never aria-selected while a request inside
it is open. That left the check unable to pass on any route that opens a request, i.e. every
state this spec reaches.

Wait for the focus header and then match the collection title, using web-first assertions
that re-query on every retry instead of one blocking element read. That also removes the
reload fallback added in #10489, which papered over the same hang, and the now-unused
isWorkspaceFocused helper.
2026-09-16 10:31:08 +08:00
Kent Wang 095585f5f7 change show test behavior (#10504) 2026-09-15 17:31:44 +08:00
Kent Wang f0bf6c8bcf fix: New Collection API issues and UI adjustment (#10503)
* change document header view for spec and legacy test

* fix empty state issue

* fix test failures
2026-09-15 14:35:34 +08:00
kwburns-kong 582e29f1be fix(INS-3620): tag cookie assignment origin (#10475)
* fix: limit cookie template rendering to manually-set cookies and narrow template file access

* fix: only expand nested templates for variable substitution, not direct tag output

* test: cover OAuth2 access token exposure via the request tag for nested-template regression

* sec: exclude response-sourced cookies from WebSocket/Socket.IO connect rendering

* test: fix mTLS/cert smoke tests relying on secure-read-file path-prefix bug

* test: scope mtls smoke test locator to avoid strict-mode collision

* sec: close hard-link bypass of reserved NeDB database file check

* fix: avoid doubled path separator when allowlisted folder is a filesystem root
2026-09-14 15:56:22 +00:00
Kent Wang f5f9b83866 extract the onboarding local storage key to common (#10493) 2026-09-14 08:19:14 +00:00
Bingbing e3c88cba55 feat: open Import modal with a selected tab via bare deep-link params (#10488)
## Summary

Extends the `insomnia://app/import` deep-link schema so a **bare** source param opens the Import modal with that tab selected and nothing pre-populated.

## URL schema

```
insomnia://app/import?<source>[=<value>]
```

The param **name** selects the source tab; its optional **value** pre-populates the input and auto-scans. Selector names are case-insensitive (`?CuRl` ≡ `?curl`); values are preserved verbatim.

## Examples & behavior

| Link | Behavior |
|---|---|
| `?clipboard` | Clipboard tab selected, nothing pre-filled |
| `?curl` / `?CuRl` | cURL tab selected, empty input |
| `?curl=curl%20--request%20GET%20--url%20https%3A%2F%2Fapi.example.com%2Fpets` | cURL tab pre-filled, auto-scanned |
| `?uri=https%3A%2F%2Fx%2Fspec.yaml` | URL tab pre-filled, auto-scanned |
| `?mcp=https%3A%2F%2Fmcp.example.com%2Fmcp` | MCP tab pre-filled, auto-scanned |
| `?file` | File tab selected |
| `?clipboard&curl=<value>` | Value wins → cURL tab pre-filled (order: `uri → mcp → curl → clipboard → file`) |
| `?import` with no source param | No-op (unchanged) |

Optional metadata params (unchanged, case-sensitive): `origin`, `endpoint`, `operationId` (uri/curl only), `source`, `sourceUrl`.

## Compatibility

- Previously-working links (value-bearing `uri`/`mcp`/`curl`) behave identically.
- The only changed cases are links that previously did nothing (bare/empty/unknown-case params) — they now select the tab.
- Bug fixed en route: mounting the modal with an empty cURL value no longer shows a spurious red "Invalid cURL request".

## Changes

- `common/import-deep-link.ts` — case-insensitive source-selector lookup (`satisfies`-checked against `ImportSourceType`), bare-param resolution, resource type widened to full `ImportSourceType`
- `root.tsx` — auto-scan only for value-bearing uri/mcp/curl; modal mount gate `defaultValue` → `startedAt` so valueless resources render
- `import-modal.tsx` — skip mount-time curl validation when nothing is pre-populated
- Unit tests (13) + new E2E suite (3) that drives the renderer deep-link handler via `shell:open` IPC — no production test hooks
2026-09-14 05:11:39 +00:00
Alison Sabuwala fd22fa6c5a fix: make sidebar drop indicator and insertion agree across nested folder boundaries (#10435) 2026-09-14 11:24:13 +08:00
Kent Wang eb25f7e8ee feat: V13.3 onboarding content (#10476)
* add document and collection merge related onboarding doc

* update onboarding title
2026-09-14 10:50:33 +08:00
Bob QiuandClaude Sonnet 5 ebb3719ee5 test: mitigate sidebar-focus-onboarding flaky timeout with reload fallback (#10489)
* test: add reload fallback for sidebar-focus-onboarding flake

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

* fix: update sidebar-focus-onboarding test strategy to use runIndex and simplify artifact naming

* test: retry the reload fallback once more for sidebar-focus-onboarding

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

* fix: update sidebar-focus-onboarding test strategy to use sharding and restore previous run state

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 10:20:59 +08:00
Bingbing f08d65b45e chore: replace madge circular-reference check with dependency-cruiser (#10468)
## Summary

- Replaces the madge-based `check-cycle-references` with a `dependency-cruiser`-based check, cruised once per npm workspace package.
- Keeps the checker, dependency-cruiser config, and known-cycle baseline together under `scripts/circular-references/`.
- Uses a committed baseline to grandfather existing cycles while failing on new cycles and stale baseline entries.
- Cleans the existing `insomnia-inso` type cycle by using `insomnia-data`'s `AllTypes` instead of importing the database container type.
- CI explicitly uses Bash for correct `tee`/pipeline failure propagation, safely handles skipped checks, and posts a PR report.
- Dropped `madge`/`.madgerc`, added `dependency-cruiser`.
2026-09-10 16:11:43 +08:00
Kent Wang 36ac23d851 feat: Merge document and collection workspace and add settings to hide legacy test (#10460)
add initial settings for legacy test
add initial check for legacy unit test suites
show dropdown
remove spec route and merged with default debug page
showing document as collection
remove document term in UI
fix lint issue
fix ut failures
2026-09-10 07:01:24 +00:00
Kent Wang 8df0574dfd update vault plugin and apply proxy settings (#10487) 2026-09-10 12:01:49 +08:00
Bingbing ea35b9897f fix: prevent environment rename freeze caused by keyboard drag session (#10486)
## Problem

In the environment editor, double-clicking an environment name (sidebar or header) to rename it and pressing Enter could freeze the entire page: nothing responded to clicks or keyboard until pressing Escape. Root cause found empirically (instrumented focus trace + CPU profile + pause stacks) and confirmed against the installed library source.

## Root cause

Committing the rename unmounts the focused input **while the Enter keypress is still in flight**. `FocusScope`'s `restoreFocus` (async rAF) then raced the RAC collection correction and landed DOM focus on a draggable row — the KV editor's trailing blank row — before the same keypress's keyup fired. `@react-aria/dnd`'s keyboard-drag handler (`useDrag.mjs` `onKeyUpCapture`: `if (target === currentTarget && key === 'Enter') startDragging(...)`) read that keyup as a drag release and started a `DragSession`, which:

- `ariaHideOutside`-hides everything on the page except the drag source/drop targets, and
- capture-phase `preventDefault`s every `focusin`/`focusout`/`mousedown`/`keydown`.

Result: the whole app is inert until Escape (the session's only user-facing exit). CPU profile showed the renderer ~92% idle — the page wasn't busy, it was locked.

## Fix

- **`EditableInput`**: drop `restoreFocus` from the `FocusScope`. On commit, focus settles on `document.body`, the collection stays unfocused, and the keyboard drag can never be armed (mechanism removed, not mitigated).
- **`EditableInput`**: `settledRef` guard so Enter/Escape/blur commit exactly once — the unmount blur previously fired `onSubmit` a second time (double mutation + double revalidation per rename). Side effect: **Escape now truly cancels** — previously the unmount blur committed the typed value after Escape.
- **`OneLineEditor`**: the `ensureFocus` rAF loop bails when the CodeMirror wrapper is detached from the DOM, so a stale loop from a remount cannot steal focus into a mid-teardown editor.

## Known behavior change

After committing/canceling a rename, focus settles on the document body instead of returning to the trigger element. Keyboard users need to Tab back into the tree/list. `restoreFocus` could not be kept without re-arming the freeze (the drag is armed precisely by focus landing on a draggable row mid-keypress); a safe follow-up would be restoring collection position only after the keyup completes.
2026-09-10 03:18:59 +00:00
Kent Wang 200fc47e73 fix: Update the vault tag id when paste the vault tag (#10402)
* fix copy paste issue

* fix issues from comment
2026-09-10 02:47:39 +00:00
yaoweiprc 1c75da74e0 feat(sync): allow deleting unsynced remote files from the project dashboard [INS-2026] (#10477)
* feat(sync): allow deleting unsynced remote files from the project dashboard

Unsynced workspace cards now reveal a trash icon on hover that opens a
confirmation dialog before permanently archiving the remote backend project.

Adds archiveBackendProject(backendProjectId) to insomnia-vcs so a project can be
archived without being pulled locally first, exposes it through the global sync
IPC bridge, and reuses it from VCS.archiveProject. The local meta.json cleanup is
now guarded by hasItem, since a never-pulled project has no local meta file.

* test(smoke): disambiguate Delete dropdown locator in cloud-sync test

* test(smoke): cover deleting an unsynced remote file from the project dashboard
2026-09-09 18:08:06 +08:00
Kent Wang 7054669825 apply proxy to plugin if proxy scope is all (#10484) 2026-09-09 08:01:42 +00:00
kwburns-kong f5d4cfbc9f fix: render autocomplete hint rows via DOM APIs instead of innerHTML (#10465)
Builds each hint row with createElement/textContent/title assignment
rather than a templated HTML string, treating hint values as text
content rather than markup.
2026-09-09 14:16:37 +08:00
Curry Yang 511cd126c4 refactor: account data fetching (#10463) 2026-09-07 09:37:34 +00:00
Bingbing 7c334de276 chore: remove KSAI workflow (#10478)
KSAI's reusable workflow at Kong/ksai isn't accessible from this repo, causing every run to fail with "workflow was not found".
2026-09-07 08:22:26 +00:00
Bingbing a7c5ca4799 feat(SSE): add stream summary extraction for SSE responses (#10455)
[INS-3702](https://konghq.atlassian.net/browse/INS-3702)

## Summary
- Extracts a JSONPath from each streaming SSE message and concatenates it into one readable transcript, shown in a new "Summary" tab next to Events — useful for debugging LLM streaming APIs (OpenAI, Anthropic, Gemini) without scrolling through raw chunks.
- Auto-infers the JSONPath from the request URL for known provider endpoints (OpenAI Chat Completions/legacy Completions/Responses, Anthropic Messages, Google Gemini streamGenerateContent), matched by pathname only (not full URL/host), so self-hosted or reverse-proxied endpoints that keep the same path shape still match. Falls back to a manually-editable path otherwise.
- Handles curl's SSE event log being chunk-granular rather than frame-granular (a JSON payload can span multiple raw network reads, or multiple SSE frames can land in one chunk) by reconstructing the raw wire text and re-parsing `data:` frames properly.
- Handles Gemini's default `streamGenerateContent` response (no `?alt=sse`), which is a single top-level JSON array with no `data:` frames and no blank lines between elements, by scanning the array's bracket/brace depth by hand and pulling out whichever elements have fully closed so far — including mid-stream, before the array's closing `]` (or even the last element's own closing `}`) has arrived — so the summary renders progressively instead of only after the full response finishes.
- Summary tab defaults to selected when the URL matches a known provider, otherwise Events stays default. Plain text/Markdown render toggle for the summary output.
- Scoped to `curl` (SSE) responses only — WebSocket, `socketIO`, and `mcp` responses are untouched.
2026-09-07 08:06:42 +00:00
Bingbing 4f916ae8ae fix: prevent environment blank row focus race (#10473)
## Problem

When editing a project environment in Table View with no key/value entries, the trailing blank row could freeze the UI after renaming the environment in the header and immediately clicking the blank `Input Name` field.

The blank row was simultaneously managed by React Aria's `ListBox autoFocus="last"`, an imperative `ListBoxItem.onFocus` handoff, and `OneLineEditor` autofocus/retry logic. In the single-item boundary case these focus owners could race with `FocusScope` restoration and async environment revalidation.

## Fix

- Keep the trailing blank row inside the existing React Aria `ListBox` so row semantics, styling, keyboard navigation, drag-and-drop, and state behavior remain unchanged.
- Remove `ListBox autoFocus="last"` and the blank-row `ListBoxItem` focus handoff.
- Give the blank row's `OneLineEditor` one-shot autofocus on initial editor mount. This works for both empty and non-empty lists and is cleared after the initial autofocus.
- Track editor refs by distinct name/value editor ids.
- Restore focus once to the editor that was active when a blank row was converted into a persisted pair, after the persisted data update has mounted the new editor.

This prevents repeated focus stealing while preserving focus through the blank-row-to-persisted-row transition.
2026-09-07 14:44:54 +08:00
Bingbing 1a5281c60f chore: add KSAI workflow (#10474) 2026-09-07 02:50:04 +00:00
Curry Yang e446fef646 fix(git): enable bidirectional sync for local projects without a remote (#10471) 2026-09-04 03:56:33 +00:00
Bingbing 3b77d58829 fix(ui): hide project environment picker in scratchpad (#10472) 2026-09-03 10:06:26 +00:00
Bingbing 1b9c08d007 feat(ui): split environment picker into project/collection dropdowns (#10446)
## Summary
- Splits the single "Manage Environments" popover into two independent dropdowns — project-level and collection-level — each with a scope tooltip and an inheritance-order hint (folder overrides collection, which overrides project).
- Replaces the hidden "+" menu in the collection environment editor and the project-level full-page environment editor with explicit, always-visible "Add Sub Environment" / "Add Private Sub Environment" buttons.
- Adds an "Add Project Environment" action to the project dropdown (does not auto-select the new environment).
- Adds a keyboard shortcut for the project dropdown (Cmd/Ctrl+Alt+E), alongside the existing collection-environment shortcut (Cmd/Ctrl+Shift+E).
- Fixes smoke tests broken by removing the old single-picker trigger, and adds new coverage for the split dropdowns and create flows.
2026-09-03 08:52:20 +00:00
yaoweiprc 3e97ba7bfe One VCS instance per workspace [INS-2026] (#10458)
* 1

* One VCS instance per workspace

* Remove cloud sync doc.
2026-09-03 16:18:36 +08:00
Bingbing 8ea672ab01 fix(ui): re-render pane templates on project environment switch (#10467)
[INS-2791](https://konghq.atlassian.net/browse/INS-2791)

## Summary
- Switching a request's project environment (activeGlobalEnvironment) left the request pane's template values stale, since its remount `key` only tracked the workspace environment (activeEnvironment). 
- Added the project environment id/modified timestamp to the URL bar's remount key so it also refreshes on project environment switch.
2026-09-02 08:41:27 +00:00
amy-kong-hq 4c114c449f feat: e2e re-run only fails (#10457)
* debug: make case fail to test rerun last fail

* fix: last-run json not found

* fix: revert debug test steps
2026-09-02 08:17:14 +00:00
Bingbing baaaf6ab1a chore: fix playwright port detect (#10462)
## Background

- In the latest vite up gradation, the log is `VITE v7.3.1  ready in 1145 ms` instead of `VITE ready in`
- Playwright SIGKILLs the process by default, which leaves a stale .vite-port file

## Changes

- Update the wait pattern
- Use gracefulShutdown
- Always try to cleanup when receive any exit event
2026-09-02 07:24:13 +00:00
kwburns-kong 20b29355b3 fix: set persist-credentials: false on non-pushing actions/checkout steps (#10447)
actions/checkout steps across CI workflows leaves GITHUB_TOKEN persisted in git config after checkout. None of these steps perform a git push using that persisted credential, disable credential persistence on the actions.
2026-09-01 14:28:44 +00:00
Bingbing d285404f50 fix: use unique id for remote files in command search to avoid the list jammed (#10461)
## Background

- Cloud Sync workspace uses local workspace id as its id, which may duplicate with the workspace id in the local db. (Clone a github repo -> convert to cloud sync -> clone it again)

## Changes

- Use team project id + project id as the unique id
2026-09-01 07:24:20 +00:00
Curry Yang 0c2559df36 fix: initial entry (#10456) 2026-08-31 06:29:00 +00:00
yaoweiprc fdd06c9f4e fix(mock-response-extractor): await patchMockRoute and navigate to updated route (#10397) 2026-08-31 03:23:46 +00:00
George dea84ed772 docs: add a skill file for scripting feature bug fix (#10418)
* docs: add a skill file for scripting feature bug fix

* chore: improvements

* fix: comments
2026-08-27 08:46:14 +00:00
Kent Wang e28f9f84af fix expand issue when no request group meta (#10453) 2026-08-27 08:18:03 +00:00
Bob Qiu 393dcebbf1 fix(test): improve cloud sync tests to handle asynchronous loading and increase timeout (#10440) 2026-08-27 15:16:17 +08:00
kwburns-kong 1f7559cb7a fix(main): compare full origin, not string prefix, for renderer nav guard (#10442)
* fix(main): compare full origin, not string prefix, for renderer nav guard (INS-3622)

Use isTrustedAppOrigin (parsed origin comparison) instead of
url.startsWith(appUrl) for will-navigate and will-redirect on the main
window.

* fix(main): restrict trusted-origin check to http/https schemes (INS-3622)

blob:/data: URLs report an origin derived from embedded text, not
actual creation context, so they could spoof isTrustedAppOrigin.
2026-08-27 06:34:41 +00:00
Bingbing d9bb2b0142 fix(network): send fully rendered request for SSE connections (#10445)
[INS-3637](https://konghq.atlassian.net/browse/INS-3637)

## Summary
- SSE ("Event Stream") sends re-fetched the raw, unrendered request from the database instead of using the already-rendered/de-duplicated/interpolated request the renderer had computed, so headers/authentication/body reaching curl could diverge from what the user configured.
- `openCurlConnection` now takes one fully-rendered request object (`{ workspaceId, renderedRequest, initialPayload? }`) instead of piecemeal fields, drops the redundant DB read, and computes the auth header in-process via `getAuthHeader` instead of a separate IPC round trip.
- Fixed `createConfiguredCurlInstance`'s manual-proxy branch, which resolved protocol/hostname from the raw stored URL instead of the request's actual URL.
- Added `curl.test.ts` and `libcurl-promise.test.ts`; patched shared test infra (`setup-vitest.ts`, `src/__mocks__/electron.ts`) so named imports from `electron` resolve under the mock and `electron.app.on(...)` doesn't throw.

## Test plan
- [x] `npx tsc --noEmit` clean on changed files
- [x] `npx eslint` clean on changed files
- [x] `npx vitest run` — full suite: 162 files / 2244 passed, 15 pre-existing skips
- [x] Manually verify an SSE request (e.g. POST with `Accept: text/event-stream` to a streaming API) sends the expected single Accept header and correct body/auth

[INS-3637]: https://konghq.atlassian.net/browse/INS-3637?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2026-08-26 17:47:48 +08:00
yaoweiprcandClaude Sonnet 5 5101512701 fix(cloud-sync): surface stale/reverted staged changes instead of silently committing them [INS-3520] (#10438)
* fix(cloud-sync): surface stale/reverted staged changes instead of silently committing them

status() diffed the working tree against HEAD only, so a key whose content
returned to HEAD while still staged (or was staged-then-deleted before ever
being committed) was invisible to both the staged and unstaged views —
takeSnapshot() would then commit the stale staged content unnoticed
(INS-3520).

- status() now diffs against the index (HEAD with the stage overlaid via a
  new applyStageToState helper, also reused by takeSnapshot()) so these
  cases surface as actionable unstaged entries, with explicit branches for
  every stage/entry combination instead of a single blobId comparison that
  was tautological for deletions.
- stage() drops an entry instead of storing it when the incoming content is
  a no-op relative to HEAD, keeping the sparse stage map from accumulating
  entries that would otherwise still show as staged and produce empty
  commits.
- Removed the unused key field from status()'s return (and the Status
  type), which was computed but never read anywhere.

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

* Fix type check

* rm doc

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 16:29:58 +08:00
xdm 4b121c89f6 refactor(vcs): move vcs to insomnia-vcs (#10427)
refactor(vcs): move vcs to insomnia-vcs

fix: fix comments
2026-08-26 14:37:16 +08:00
Insomnia 1755d42406 Bump app version to 13.2.0 (#10439) 2026-08-25 09:30:13 +00:00
xdm bf982e7895 refactor: move organization to service layer (#10390) 2026-08-25 09:13:41 +00:00
Bingbing ccefed1d2e chore: support dynamic port for dev (#10308)
* chore: support dynamic port

* fix: handle missing .vite-port and prevent stale file race

- window-utils.ts: wrap .vite-port read in try/catch with fallback to
  default port 3334, preventing crash when file is missing
- esbuild.entrypoints.ts: delete .vite-port at start of dev build so
  wait-on doesn't pick up a stale port from a previous run

* fix: derive smoke-test webServer port from per-worktree .vite-port

Hardcoded url: 'http://localhost:3334' made playwright's webServer
reuse-detection cross-worktree: if another worktree's dev server was
already answering on 3334, this worktree's tests silently reused it
instead of starting their own. Read the worktree's own .vite-port file
(written by vite.config.ts) instead, falling back to plain stdout-regex
readiness when no port file exists yet.
2026-08-25 16:42:14 +08:00
yaoweiprc 3724a9d88a Update localstorage key (#10401) 2026-08-25 06:34:26 +00:00
Kent Wang 01fe9b7c7f fix shortcut creation issue & workspace dropdown context menu issue (#10432)
fix action issue

remove use less codes

modify optimistic way to toggle request folder
2026-08-25 01:30:23 +00:00
Bingbing ca4620789d fix(ui): restore h-fit on cookies modal (#10437)
PR #10097 dropped h-fit from the Modal className as an unrelated
side effect of a class rewrite, leaving the modal stretched to the
overlay's full height with empty space below the content.
2026-08-24 10:20:52 -04:00
Bob Qiu 89df8f6a84 fix(test): impove test stability of git repository relocation tests (#10436)
* fix(test): ensure scoped selection for storage type and improve click reliability in project creation

* fix(test): expand shard matrix for smoke tests and repeat each test for git-local-repos

* fix(test): adjust shard matrix for smoke tests to match total shards

* fix(test): update shard matrix for smoke tests to include additional runs

* fix(test): update smoke test sharding to improve parallel execution and reliability

* fix(test): update smoke test configuration for improved execution and reporting

* fix(test): update smoke test configuration to use sharding for improved execution

* fix(test): refactor git repository relocation tests to use dedicated method for moving repositories
2026-08-24 16:26:52 +08:00
Bob Qiu 3e83fe2768 fix(test): improve stability of git local repo tests (#10433) 2026-08-24 03:45:19 +00:00
Bingbing 71fc333264 fix(git): don't write empty git author identity when opening local git projects (#10430)
Opening an existing local folder as a git project could leave an empty
[user] name/email in the repo's .git/config, which blocks git's fallback
to the machine's global identity and breaks `git commit` outside Insomnia.

- Pass repoPath into GitVCS.init() for openGitRepoAction so the "native"
  credentials provider can actually read user.name/user.email via
  `git config` in that directory instead of always resolving empty.
- setAuthor() now skips writing config when no author name/email can be
  resolved, instead of writing empty user.name/user.email keys.
2026-08-24 03:27:17 +00:00