feat(arch): unblock and add Request update use-case to the Insomnia facade - #10344
Draft
gatzjames wants to merge 1 commit into
Draft
feat(arch): unblock and add Request update use-case to the Insomnia facade#10344gatzjames wants to merge 1 commit into
gatzjames wants to merge 1 commit into
Conversation
…acade Resolves the two architectural blockers flagged for Request's update route: - Ports getPathParametersFromUrl (previously insomnia-data's models.request helper) into domain/src/request/path-parameters.ts - a pure regex-based URL parser with no dependencies. - Ports the UI-only ContentTypeDropdown's updateMimeType into domain/src/request/request-body-for-mime-type.ts as getRequestBodyForMimeTypeChange, including its own minimal, default-options port of insomnia-data's deconstructQueryStringToParams (the general version stays in insomnia-data/common-src/querystring.ts unchanged - it's used by several other UI call sites unrelated to this use-case, so only the specific default-args behavior needed here was ported, not moved). With both helpers now in `domain`, application/src/request/update-request. use-case.ts recomposes the route's original branching: recompute pathParameters when a Request or WebSocketRequest's url changes, rewrite body/headers when a Request's mimeType changes, otherwise apply the patch as-is. debug.request.$requestId.update.tsx now delegates the actual merge to RequestModule.updateById(), while keeping its own pre-fetch to preserve two side-effect-only behaviors that don't belong in the use-case: skipping the requestRenamed analytics event when mimeType also changed (matching the route's prior early-return), and comparing old vs. new name for that event. Also adds a missing "test" script to domain/package.json - domain had zero test files before this change, so its absence was never noticed, but without it these new domain unit tests (and any future ones) would silently never run under `npm test`.
✅ Circular References ReportGenerated at: 2026-08-06T12:49:55.758Z Summary
Click to view all circular references in PR (13)Click to view all circular references in base branch (13)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.