Skip to content

Refactor third parties frontend to page arborescence#1417

Open
SachaProbo wants to merge 1 commit into
mainfrom
SachaProbo/refactor-third-parties-frontend
Open

Refactor third parties frontend to page arborescence#1417
SachaProbo wants to merge 1 commit into
mainfrom
SachaProbo/refactor-third-parties-frontend

Conversation

@SachaProbo

@SachaProbo SachaProbo commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Mirror the risks refactor (c78a713): colocate routes.ts, split the detail layout query so each child route owns its Loader + Page, rename tabs/*Tab to resource folders with *Page, move dialogs into _components/, and extract ThirdPartyRow with its own fragment.

Remove outlet context data passing and deprecated
loaderFromQueryLoader. Delete the monolithic ThirdPartyGraph hook, colocating each GraphQL operation with its consumer: the create mutation in CreateThirdPartyDialog (now useMutation + useToast) and the third-party list queries in ThirdPartiesCell and ThirdPartiesMultiSelectField (now useQueryLoader + usePreloadedQuery).


Summary by cubic

Refactors the third-parties console to a page-based routing tree with co-located queries and loaders, replacing the tab UI and the ThirdPartyGraph hook. Moves GraphQL operations next to pages/dialogs and standardizes mutations with useMutation + useToast for clearer data flow and better errors.

App: console +2853 -1785

  • Routing: co-located pages/organizations/third-parties/routes.ts; updated root routes.tsx; removed routes/thirdPartyRoutes.ts.
  • Pages/loaders: each page owns its query + *PageLoader (overview, measures, services, contacts, risks, compliance, certifications, list); added ThirdPartyDetailLayoutLoader.
  • Tabs → pages: removed tabs/*Tab; moved dialogs into _components/; added ThirdPartyRow and row components for services, contacts, compliance reports, and risk assessments.
  • GraphQL: deleted hooks/graph/ThirdPartyGraph.ts; inlined list queries in ThirdPartiesCell and ThirdPartiesMultiSelectField using useQueryLoader + usePreloadedQuery; dialogs now use useMutation + useToast with improved error handling.
  • Cleanup: removed outlet context and deprecated loaderFromQueryLoader; updated fragments/types; small updates to detail layout, vetting dialog, certifications/measures pages.

Written for commit 09c81ee. Summary will update on new commits.

Review in cubic

Comment thread apps/console/src/components/table/ThirdPartiesCell.tsx
Comment thread apps/console/src/pages/organizations/third-parties/_components/ThirdPartyRow.tsx Outdated
Comment thread apps/console/src/routes.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 51 files

Note: This PR contains a large number of files. cubic only reviews up to 40 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.

Re-trigger cubic

Comment thread apps/console/src/components/form/ThirdPartiesMultiSelectField.tsx Outdated
Comment thread apps/console/src/pages/organizations/third-parties/_components/ThirdPartyRow.tsx Outdated
@SachaProbo SachaProbo force-pushed the SachaProbo/refactor-third-parties-frontend branch 2 times, most recently from fc4db48 to d543ffe Compare June 26, 2026 12:06
Mirror the risks refactor (c78a713): colocate routes.ts, split the
detail layout query so each child route owns its Loader + Page, rename
tabs/*Tab to resource folders with *Page, move dialogs into
_components/, and extract ThirdPartyRow with its own fragment.

Remove outlet context data passing and deprecated
loaderFromQueryLoader. Delete the monolithic ThirdPartyGraph hook,
colocating each GraphQL operation with its consumer: the create
mutation in CreateThirdPartyDialog (now useMutation + useToast) and
the third-party list queries in ThirdPartiesCell and
ThirdPartiesMultiSelectField (now useQueryLoader + usePreloadedQuery).

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
@SachaProbo SachaProbo force-pushed the SachaProbo/refactor-third-parties-frontend branch from d543ffe to 09c81ee Compare June 26, 2026 12:25
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