Commit Graph
6614 Commits
Author SHA1 Message Date
Bob Qiu f4eb699fe2 refactor(tests): reduce shard count from 8 to 6 for parallel testing 2026-09-30 13:45:03 +08:00
Bob Qiu 9e6ade1e3f refactor(tests): reduce shard count from 16 to 8 for parallel testing 2026-09-30 13:15:39 +08:00
Bob Qiu e02b18c033 refactor(tests): remove unused scripts for collecting and stitching rerun attempts 2026-09-30 12:47:16 +08:00
Bob Qiu ab0355db75 feat(tests): add script to stitch rerun attempts into original shard blobs 2026-09-30 12:32:57 +08:00
Bob Qiu 581462d273 refactor(tests): update timeout values to use LONG_TIMEOUT for consistency 2026-09-30 12:13:47 +08:00
Bob Qiu e80f0077e9 refactor(tests): unify timeout usage by replacing LONG_TIMEOUT with DEFAULT_TIMEOUT 2026-09-30 11:24:10 +08:00
Bob Qiu 90662d0543 refactor(tests): replace hardcoded timeout values with LONG_TIMEOUT constant for consistency 2026-09-30 10:54:48 +08:00
Bob Qiu 1af011baba refactor(decorators): increase default timeout for throwOnDialog to improve error handling 2026-09-30 10:52:59 +08:00
Bob Qiu 54d822b08f refactor(response): set timeout for preview tab visibility to 30 seconds 2026-09-30 10:52:29 +08:00
Bob Qiu 40d1f3b8f7 refactor(decorators): change default timeout for throwOnDialog to improve responsiveness 2026-09-30 10:45:37 +08:00
Bob Qiu efdc625a78 refactor(decorators): increase default timeout for throwOnDialog to improve error handling 2026-09-30 10:10:45 +08:00
Bob Qiu b0fce1da20 refactor(tests): remove retries from sequential test execution for improved clarity 2026-09-30 09:53:27 +08:00
Bob Qiu 296574aca1 Merge branch 'develop' into test/refactor_e2e_tests 2026-09-30 09:43:30 +08:00
Bob Qiu 6e58f24099 refactor(decorators): change default timeout for throwOnDialog to improve responsiveness 2026-09-29 17:40:49 +08:00
Bob Qiu c3b269aa2b refactor(decorators): increase default timeout for throwOnDialog to improve error handling 2026-09-29 17:23:57 +08:00
Bob Qiu cfe5395d55 refactor(tests): update condition for Insomnia Test Result job to avoid running on cancelled workflows 2026-09-29 16:38:19 +08:00
Bob QiuandClaude Sonnet 5 1c686a5725 revert: drop lock-acquire timeout and team-projects fetch timeout
Both were speculative fixes for the "Create project" dialog hang,
based on a lock-contention/slow-network hypothesis later disproven by
CI timing diagnostics (see 36ea5dce6) — the actual bug was
ProjectModal's close effect, now fixed separately.

Keeping them isn't just unnecessary, it's a regression risk: the 15s
lock-acquire timeout would fire against runKonnectOrgMigration
(src/konnect/migrate-konnect-organization.ts), which holds projectLock
for a synchronous loop over every migratable project and can
legitimately run past 15s for accounts with many projects — turning
a previously-fine "wait it out" into a spurious "Timed out waiting for
another project operation to finish" error on project creation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:34:18 +08:00
Bob QiuandClaude Sonnet 5 36ea5dce63 fix(project-modal): close on redirect by comparing location, not navigation.state
CI timing diagnostics (added in 66a777f86) showed project creation
completing in ~13ms with zero lock contention and zero network delay,
disproving the two prior hypotheses (lock contention, slow
team-projects fetch). The real bug: ProjectModal's close effect
watched `useNavigation().state` flipping away from 'idle' to detect
the post-create redirect, but a redirect that resolves fast enough can
settle back to 'idle' within the same render/commit, so the effect
never observes the transient state and the modal never closes — with
no error, since the create itself succeeded. Fixed by comparing the
pathname captured when the modal opened against the current location
instead, which can't be missed regardless of timing.

Removes the now-unnecessary temporary timing diagnostics. Keeps the
lock-acquire timeout and bounded team-projects fetch timeout as
reasonable defensive improvements, even though neither was the actual
cause of the CI hangs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:30:30 +08:00
Bob QiuandClaude Sonnet 5 66a777f863 debug(project): add temporary timing diagnostics for create-project hang
Two prior fixes (lock acquire timeout, bounded team-projects fetch
timeout) targeted the wrong bottleneck — the mock API's team-projects
endpoint responds instantly with no artificial delay, so the CI hang is
coming from somewhere else. Add console.log timing around lock
wait/hold time, NeDB project creation, and the team-projects
fetch/sync so the next CI failure's console-log attachment shows
exactly which step is slow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:13:58 +08:00
Bingbing ab658aa7e4 fix(key-value-editor): stop ListBox typeahead from swallowing typed spaces (#10563)
Background: in the environment variables table view and the generic key-value editor, a space typed within 1s of the previous printable character is swallowed (typing "My key" produces "Mykey"); users had to insert spaces via arrow keys afterwards. Raw JSON editing is unaffected.

The react-aria ListBox typeahead (useTypeSelect) intercepts space keydowns in the capture phase while its search buffer is non-empty. Disable typeahead via disallowTypeAhead on the ListBoxes that embed inline editors (environment key-value editor and the generic key-value editor), remove the now-obsolete space<->NBSP keydown workaround, and add a module augmentation for the prop that is missing from ListBoxProps typings in all published react-aria-components versions.

Add smoke tests typing at human speed (120ms per keystroke) in the environment table, headers, and query params views; zero-delay bursts do not reproduce the bug.
2026-09-29 07:34:49 +00:00
Bob Qiu 136e993f68 refactor(projects): add timeout parameter to fetchTeamProjects for improved performance 2026-09-29 15:25:40 +08:00
Bob Qiu 7d72040670 refactor(tests): add step to restore Insomnia binary for accurate coverage reporting 2026-09-29 15:10:58 +08:00
Bob Qiu 6f689ddf97 refactor(lock): implement timeout for lock acquisition to prevent indefinite blocking 2026-09-29 14:59:14 +08:00
Bob Qiu 67dea147a2 refactor(build): update build command to include react-router and disable minification 2026-09-29 14:02:02 +08:00
Bob Qiu 3d0f3d9ce4 Merge branch 'develop' into test/refactor_e2e_tests 2026-09-29 13:32:23 +08:00
Bob Qiu f50a186f15 refactor(tests): streamline coverage report merging and remove unnecessary push conditionals 2026-09-29 12:00:51 +08:00
Bob Qiu 2c892aa41f refactor(tests): enhance sequential test handling and improve failure reporting in E2E workflow 2026-09-29 11:44:18 +08:00
Bingbing 6b356c69be fix(toast): stop toast animations from swallowing clicks (#10553)
## Background

Toast add/remove animations run through the View Transition API. While such a transition is active, Chromium retargets hit-testing for the whole viewport to `<html>` - including the moment a newer transition skips the running one - so a click can arrive with `document.documentElement` as its target. react-aria's `useInteractOutside` reads such an event as a click outside an open modal and closes it.

Reproduction: open Settings → General → Software Updates and click **Check** repeatedly. Every click fires toasts, every toast mutation starts a view transition, and a click landing in one of those windows closed the Settings modal itself.

## Changes

- `packages/insomnia/src/ui/css/styles.css`: disable pointer events on the `::view-transition` overlay and exclude the root element from the transition, so clicks keep reaching real elements while a toast animates. Both rules are required: the overlay rule alone still leaves the captured root's contents unhittable ([spec rationale](https://drafts.csswg.org/css-view-transitions-1/#view-transition-stacking-layer)), and excluding the root alone still leaves the overlay swallowing the clicks. The same pair is documented for this scenario in [Keeping the page interactive while a View Transition is running](https://www.bram.us/2025/01/29/view-transitions-page-interactivity/) and [csswg-drafts#11596](https://github.com/w3c/csswg-drafts/issues/11596).
- `packages/insomnia/src/ui/components/toast-notification.tsx`: drop `pointerdown`/`click` events that were retargeted to `<html>` while a view transition is active. Those clicks cannot be attributed to their real target (hit-testing was suppressed by the browser) and were being misread as clicks outside an open modal. Events that land on real elements are untouched. Registration is guarded with `typeof window !== 'undefined'` because this module is also evaluated in Node (dev server, prerender).
- `packages/insomnia/src/ui/components/toast-notification.tsx`: remove the stale `[view-transition-name:toast]` utility, which the inline per-toast `view-transition-name` has always overridden.
- `packages/insomnia/src/ui/css/styles.css`: remove the `::view-transition-new(toast)` / `::view-transition-old(toast)` slide rules and their keyframes. They selected a group named `toast`, which never existed because toasts need unique names (a duplicate `view-transition-name` aborts the whole transition), so they never applied.
- `packages/insomnia/src/ui/components/check-for-updates-button.tsx`: the button was fully disabled in development mode, which made this bug impossible to reproduce manually. It now shows a toast instead ("Updates are disabled in development mode"). Production behaviour is unchanged.

## Notes

- Measured with real (CDP/`sendInputEvent`) input against the real components in Electron 43.2.0 / Chromium 150.0.7871.129: without the change a click during a toast animation hits `<html>` and closes the modal; with it the button keeps receiving clicks (25/17/12 clicks handled for 60/90/130ms click intervals) and the modal stays open.
- No regressions measured: clicks while no transition runs (20/20 handled), mask click dismissal, Escape dismissal, popover outside-click dismissal (also while a transition runs), and clicking a toast.
- Residual: hit-testing still returns `<html>` for the fraction of a click that lands inside a transition window (~10% of samples under rage clicking) - that is compositor behaviour and cannot be opted out. Such clicks are now dropped instead of dismissing the modal, which means that one click does nothing.
- `:root { view-transition-name: none }` applies to every view transition in the app; the rule is commented in place so it is revisited if transitions other than toasts are introduced.

Related: https://github.com/Kong/insomnia/pull/10553
2026-09-29 03:41:29 +00:00
Bob Qiu 62d1ff7229 refactor(tests): disable retries for sequential test runs in E2E workflow 2026-09-29 11:18:17 +08:00
Bob Qiu 33dfd83617 refactor(tests): add coverage upload step and enhance coverage report handling in E2E tests 2026-09-29 11:12:13 +08:00
Bob Qiu e05a676116 refactor(tests): remove unused dependencies from package-lock.json 2026-09-29 11:08:50 +08:00
Bob Qiu b9a21bd9a3 refactor(tests): clean up package.json by removing unused fields and dependencies 2026-09-29 11:07:10 +08:00
Bob Qiu bdc253fa7d refactor(tests): enhance blob report handling in E2E tests workflow 2026-09-29 10:54:28 +08:00
Bob Qiu 4b2dfa16e8 refactor(tests): simplify coverage handling in E2E tests workflow 2026-09-29 10:50:09 +08:00
Bob Qiu a69ccb346e refactor(tests): update comments and clarify timeout handling in E2E tests 2026-09-29 10:38:21 +08:00
Bob Qiu 2532318c3c refactor(tests): remove unnecessary blank line in .gitignore 2026-09-29 10:15:03 +08:00
Bob Qiu c61b0cc2d4 refactor(tests): simplify .gitignore by removing specific paths for test reports 2026-09-29 10:13:21 +08:00
Bob Qiu 1176b7ccb8 refactor(tests): streamline coverage and report merging in E2E tests workflow 2026-09-29 10:10:18 +08:00
Bob Qiu 00024c492f refactor(tests): implement coverage collection and reporting for E2E tests 2026-09-28 18:18:44 +08:00
Bob Qiu 71c431ef1a refactor(tests): rename artifact upload from 'playwright-report-sequential' to 'playwright-report' for consistency 2026-09-28 17:35:43 +08:00
Bob Qiu 1e92758665 refactor(tests): rename 'Initial Test' to 'Parallel Test' for clarity in workflow 2026-09-28 17:30:12 +08:00
Bob Qiu dad338c441 Merge branch 'develop' into test/refactor_e2e_tests 2026-09-28 17:26:16 +08:00
Bob Qiu c1207b5a74 refactor(tests): add edge case CSV files and corresponding tests for improved data handling 2026-09-28 17:24:11 +08:00
Bob Qiu 15e08e72ae refactor(tests): rename sequential-test job for clarity and remove unused blob report upload 2026-09-28 16:19:59 +08:00
Bob Qiu 6141e5a2e9 refactor(tests): update DEFAULT_TIMEOUT value for consistency in test execution 2026-09-28 15:53:36 +08:00
Bob Qiu 2921891a16 refactor(tests): rename test jobs for clarity and enhance blob report handling 2026-09-28 15:50:22 +08:00
Bob Qiu cae12694e7 refactor(tests): remove sequential tags from test cases and enhance test result collection 2026-09-28 15:24:52 +08:00
Bingbing 7de40fe4a7 fix: de-flake import deep-link cURL auto-scan smoke test (#10555)
## Background

The `value-bearing curl param` smoke test failed intermittently on CI
(run 35832135624, shard 3/6, both retries) while passing on isolated
reruns and in dev mode.

Repro: `npm run test:smoke:build -- --project=Smoke --grep "value-bearing curl param" --repeat-each=20 --workers=4`
→ ~25% first-attempt failure rate.

## Root cause

A value-bearing deep link auto-scans, and the scan result replaces the
pre-scan form within milliseconds of the modal opening. The assertion
`getByText('http://insomnia.rest/')` could only match the transient
pre-scan state — the raw cURL in the textarea's initial text content —
so the test raced against scan completion and lost whenever the scan
landed before the first assertion poll (fast in build mode on CI).

The stable post-scan state never contained the URL text at all: the
scan-results table renders
`{importerSign} resources to be imported from {oriFileName}:`, and the
cURL scan source sets no `oriFileName`, producing the dangling-colon
label "cURL resources to be imported from :".

## Changes

- `import-modal/shared.tsx` — omit the `from {oriFileName}` clause when
  a scan result has no source name (cURL deep-link scan). Sources with a
  real name (uri, file, clipboard, mcp) keep the existing wording.
- `import-deep-link.test.ts` — assert the stable post-scan state
  ("cURL resources to be imported:" and "1 Request") instead of the
  transient pre-scan form; renamed the test accordingly.

## Verification

- Fixed test: 20/20 passed under the same build-mode + parallel-load
  conditions that produced 5/20 flaky before the fix.
- `import deep links` suite: 3/3 passed in build mode.
2026-09-28 07:16:13 +00:00
Bob Qiu b4d08b139b refactor(tests): enhance script handling and organization in request flows
- Updated script handling in EventStreamRequestFlow, GraphQLRequestFlow, and HttpRequestFlow to use the new scripts API.
- Introduced ScriptTabComponent for better management of pre-request and after-response scripts in both requests and folders.
- Refactored FolderFlow to utilize the new script management methods.
- Improved test cases to align with the new script handling, ensuring proper functionality of inherited OAuth2 tokens and synchronous behavior of replaceIn utility.
- Added new tests to verify folder-level script execution and synchronous behavior of environment variable replacements.
2026-09-28 14:54:16 +08:00
Bingbing dc02796812 fix(INS-3906): parse quoted CSV fields in collection runner data (#10557)
## Background

Collection Runner → Upload Data parses CSV by splitting rows on commas, so a quoted field containing a comma (valid per RFC 4180, e.g. `"ORD,YVR"`) is split into two columns and every following column in that row shifts, producing wrong variable values for the rest of the iteration.

Repro: upload a CSV whose rows contain quoted comma fields (e.g. `origin,destination` rows with `"ORD,YVR"`) — the Data Preview table splits `"ORD,YVR"` into two columns and the runner sends wrong values.

## Changes

- Replace the naive `split(',')` CSV parsing with papaparse in both places that share the same copied implementation: app `upload-runner-data-modal.tsx` and inso `getListFromFileOrUrl`
- Handles quoted commas, escaped quotes (`""`) and newlines inside quoted fields; delimiter pinned to `,` to preserve previous behavior; `skipEmptyLines` stops a trailing newline from producing a bogus empty iteration row
- Existing semantics preserved: first row is variable names, missing trailing cells default to `''`, error messages unchanged, fewer than two rows still rejected
- Unit tests added for both code paths

## Issue

INS-3906
2026-09-28 14:24:00 +08:00