Skip to content

feat(arch): add Request delete use-case to the Insomnia facade - #10343

Draft
gatzjames wants to merge 1 commit into
arch-phase-2c-environment-crud-use-casesfrom
arch-phase-2c-request-delete-use-case
Draft

feat(arch): add Request delete use-case to the Insomnia facade#10343
gatzjames wants to merge 1 commit into
arch-phase-2c-environment-crud-use-casesfrom
arch-phase-2c-request-delete-use-case

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

No description provided.

Adds a RequestModule to the Insomnia facade with deleteById(), wired to the
real debug.request.delete.tsx route (RequestRepository.delete() already
cascades via services.helpers.removeRequest, unchanged). The route's
stats.incrementDeletedRequests() call is reordered to fire after the
delete succeeds rather than before, matching the pre-existing
find-then-increment-then-remove ordering that used to guarantee the request
existed before counting it as deleted.

create/update/duplicate are intentionally deferred for this aggregate:
- create needs a discriminated-union create() port method across all 5
  Request variants (HTTP/gRPC/WebSocket/SocketIO/MCP), plus the route's own
  logic is dominated by per-variant defaults and analytics, not a clean
  single use-case.
- update's business logic (path-parameter recomputation on URL change,
  mimeType-driven body/header rewriting) depends on two pure helpers
  (getPathParametersFromUrl, updateMimeType) that currently live in
  insomnia-data/apps-desktop UI code - `application` can't reach either
  without first relocating them into `domain`.
- duplicate needs cascade-with-ID-remapping the repository port doesn't
  expose yet, same gap already noted for Environment's duplicate().

update-meta.tsx and update-payload.tsx mutate separate Meta/Payload models
with no repository port, so they're out of scope for this aggregate too.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-06T12:50:52.600Z
Status: ✅ NO CHANGE

Summary

Metric Base (arch-phase-2c-environment-crud-use-cases) PR Change
Total Circular References 13 13 0 (0.00%)
Click to view all circular references in PR (13)
../apps/desktop/src/common/render.ts -> ../apps/desktop/src/network/network.ts
../apps/desktop/src/network/network.ts -> ../apps/desktop/src/network/concurrency.renderer.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
../packages/insomnia-scripting-environment/src/objects/collection.ts -> ../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts -> ../packages/insomnia-scripting-environment/src/objects/send-request.ts
desktop/src/main/prompt-bridge.ts -> desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/network/network.ts -> desktop/src/common/render.ts
desktop/src/ui/components/settings/import-export.tsx -> desktop/src/ui/components/modals/export-requests-modal.tsx
desktop/src/ui/components/tabs/tab-list.tsx -> desktop/src/ui/components/tabs/tab.tsx
desktop/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> desktop/src/ui/components/templating/external-vault/external-vault-form.tsx
desktop/src/ui/components/viewers/response-viewer.tsx -> desktop/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (13)
../apps/desktop/src/common/render.ts -> ../apps/desktop/src/network/network.ts
../apps/desktop/src/network/network.ts -> ../apps/desktop/src/network/concurrency.renderer.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
../packages/insomnia-scripting-environment/src/objects/collection.ts -> ../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts -> ../packages/insomnia-scripting-environment/src/objects/send-request.ts
desktop/src/main/prompt-bridge.ts -> desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/network/network.ts -> desktop/src/common/render.ts
desktop/src/ui/components/settings/import-export.tsx -> desktop/src/ui/components/modals/export-requests-modal.tsx
desktop/src/ui/components/tabs/tab-list.tsx -> desktop/src/ui/components/tabs/tab.tsx
desktop/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> desktop/src/ui/components/templating/external-vault/external-vault-form.tsx
desktop/src/ui/components/viewers/response-viewer.tsx -> desktop/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the arch-phase-2c-environment-crud-use-cases branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant