Files
insomnia/scripts
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
..