chore: Phase 2c - first application use-case, wired to a real consumer - #10339
Draft
gatzjames wants to merge 1 commit into
Draft
chore: Phase 2c - first application use-case, wired to a real consumer#10339gatzjames wants to merge 1 commit into
gatzjames wants to merge 1 commit into
Conversation
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.
✅ Circular References ReportGenerated at: 2026-08-06T11:17:37.358Z 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.