Skip to content

chore: Phase 2c - first application use-case, wired to a real consumer - #10339

Draft
gatzjames wants to merge 1 commit into
arch-phase-2c-request-repositoryfrom
arch-phase-2c-rename-workspace-use-case
Draft

chore: Phase 2c - first application use-case, wired to a real consumer#10339
gatzjames wants to merge 1 commit into
arch-phase-2c-request-repositoryfrom
arch-phase-2c-rename-workspace-use-case

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

No description provided.

Proves the full vertical slice end-to-end: application use-case ->
domain repository port -> infrastructure NeDB adapter -> a real
apps/desktop route, replacing a call to insomnia-data's services layer
directly. First time anything in apps/desktop or apps/cli actually
consumes the new domain/application/infrastructure layers - every prior
Phase 2c PR built these in isolation.

- application/src/workspace/rename-workspace.use-case.ts - renameWorkspace(),
  single-aggregate (WorkspaceRepository only). Unit-tested against a
  hand-written in-memory fake repository, per the plan's testing strategy
  for this layer (no real database needed).
- apps/desktop/src/common/application-bootstrap.ts - constructs the
  concrete nedbWorkspaceRepository and exposes a ready-to-call
  renameWorkspace binding. Location is provisional - where each app's
  bootstrap/wiring code should live is still an open decision (plan
  Open Decision 7.9); this exists so there's exactly one place doing
  this wiring today, not scattered through routes.
- organization.$organizationId.project.$projectId.workspace.update.tsx -
  replaced its `services.workspace.update(workspace, patch)` call with
  `renameWorkspace(workspace._id, patch.name)`. Traced through
  insomnia-data's initModel() field-pruning first to confirm this route's
  actual patch shape (fileName/mockServerType/mockServerUrl all get
  pruned since Workspace's own init()/optionalKeys don't declare them)
  reduces to exactly a name-only write for this route - so the swap is
  behavior-preserving, not just type-compatible. Every other branch
  (apiSpec for design-scope, mockServer for mock-server-scope,
  workspaceMeta for git-tracked projects) is untouched, since none of
  those have repositories yet.

Verified: lint, type-check, check-boundaries, and the full test suite
all pass clean across every workspace (application now has 1 test file /
2 tests). Also ran the actual desktop app via the project's existing
Playwright/Electron smoke-test harness (packages/insomnia-smoke-test) -
dashboard-interactions.test.ts's "Can create, rename and delete new
project, collection and document" passed, exercising the real rename
flow through this new code path end-to-end, not just against fakes/NeDB
in isolation.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-06T11:17:37.358Z
Status: ✅ NO CHANGE

Summary

Metric Base (arch-phase-2c-request-repository) 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-request-repository 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