Commit Graph
10 Commits
Author SHA1 Message Date
Bingbing 54befeb9d6 refactor: break main-process circular imports (git-service/plugin-window/templating-worker-database) 2026-09-15 14:13:58 +08:00
Bingbing 7e8a74b656 refactor: break 8 route<->component circular dependencies via extracted loader hooks
Break the route<->component cycles without touching createFetcherSubmitHook or
use-request.ts, and without generated +types:

- The data-access hooks that descendants import are moved out of route entry files
  into neutral modules that own both the interface and the hook, so route files are
  no longer shared-hook modules:
  * ui/hooks/use-project-loader-data.ts (ProjectLoaderData + useProjectLoaderData)
  * ui/hooks/use-mock-route.ts (MockRouteLoaderData + useMockRouteLoaderData; patcher kept)
  Each route's clientLoader conforms to the interface via 'satisfies', so the type
  has a single source and cannot drift; consumers import the named hook.
- cycle route.update -> content-type-dropdown -> use-request -> route.update is cut
  at the route->component edge by moving the pure updateMimeType/newBodyGraphQL
  helpers to ui/utils/request-mime-type.ts (use-request/createFetcherSubmitHook untouched).
- grpc: GrpcMessage/GrpcRequestState moved to ui/utils/grpc.ts.
- useWorkspaceLoaderData is left in place (route.workspace is not in any cycle).
2026-09-15 13:22:17 +08:00
Bingbing 6e75e85cb9 refactor: move RequestRow type to common/runner-feedback to break runner route cycles 2026-09-14 17:18:47 +08:00
Bingbing 35571b45fb refactor: move shared tab types and context-menu enum into insomnia-tab-context to break tab cycles 2026-09-14 17:18:47 +08:00
Bingbing 0cac52ca56 refactor: extract useRootLoaderData and RootLoaderData out of root.tsx into ui/hooks/use-root-loader-data 2026-09-14 17:18:23 +08:00
Bingbing d56e636883 Merge branch 'develop' into chore/cycle-reference-send-request
# Conflicts:
#	packages/insomnia/src/main/templating-worker-database.ts
#	packages/insomnia/src/plugins/context/network.ts
#	scripts/circular-references/known-violations.json
2026-09-14 15:47:51 +08:00
Bingbing f08d65b45e chore: replace madge circular-reference check with dependency-cruiser (#10468)
## Summary

- Replaces the madge-based `check-cycle-references` with a `dependency-cruiser`-based check, cruised once per npm workspace package.
- Keeps the checker, dependency-cruiser config, and known-cycle baseline together under `scripts/circular-references/`.
- Uses a committed baseline to grandfather existing cycles while failing on new cycles and stale baseline entries.
- Cleans the existing `insomnia-inso` type cycle by using `insomnia-data`'s `AllTypes` instead of importing the database container type.
- CI explicitly uses Bash for correct `tee`/pipeline failure propagation, safely handles skipped checks, and posts a PR report.
- Dropped `madge`/`.madgerc`, added `dependency-cruiser`.
2026-09-10 16:11:43 +08:00
Bingbing b4cee7cd50 refactor: decouple scripting environment imports 2026-09-08 15:51:43 +08:00
Bingbing 713d9881f8 update baseline 2026-09-07 18:13:13 +08:00
Bingbing 5ebb279261 fix: address circular reference review comments 2026-09-03 15:35:28 +08:00