From 862b856d2ba11946961cfa549e1251b277683c9a Mon Sep 17 00:00:00 2001 From: Nexus Dev Date: Sat, 11 Apr 2026 16:42:42 +0000 Subject: [PATCH] refactor(nexus): rewrite dangling dashboard hrefs to assistant (phase 7) --- ui/src/hooks/useCompanyPageMemory.ts | 2 +- ui/src/lib/company-page-memory.ts | 6 +++--- ui/src/pages/CompanyImport.tsx | 2 +- ui/src/pages/CompanySettings.tsx | 2 +- ui/src/pages/NotFound.tsx | 6 +++--- ui/src/pages/PluginManager.tsx | 2 +- ui/src/pages/PluginPage.tsx | 2 +- ui/src/pages/PluginSettings.tsx | 2 +- ui/src/pages/ProjectDetail.tsx | 2 +- ui/src/pages/SkillBrowser.tsx | 2 +- ui/src/pages/SkillDetail.tsx | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ui/src/hooks/useCompanyPageMemory.ts b/ui/src/hooks/useCompanyPageMemory.ts index 5206df11..a93a9935 100644 --- a/ui/src/hooks/useCompanyPageMemory.ts +++ b/ui/src/hooks/useCompanyPageMemory.ts @@ -28,7 +28,7 @@ function saveCompanyPath(companyId: string, path: string) { /** * Remembers the last visited page per company and navigates to it on company switch. - * Falls back to /dashboard if no page was previously visited for a company. + * Falls back to /assistant if no page was previously visited for a company. */ export function useCompanyPageMemory() { const { companies, selectedCompanyId, selectedCompany, selectionSource } = useCompany(); diff --git a/ui/src/lib/company-page-memory.ts b/ui/src/lib/company-page-memory.ts index 9ee5b01e..f2b95045 100644 --- a/ui/src/lib/company-page-memory.ts +++ b/ui/src/lib/company-page-memory.ts @@ -43,9 +43,9 @@ export function sanitizeRememberedPathForCompany(params: { path: string | null | undefined; companyPrefix: string; }): string { - const relativePath = params.path ? toCompanyRelativePath(params.path) : "/dashboard"; + const relativePath = params.path ? toCompanyRelativePath(params.path) : "/assistant"; if (!isRememberableCompanyPath(relativePath)) { - return "/dashboard"; + return "/assistant"; } const pathname = relativePath.split("?")[0] ?? ""; @@ -57,7 +57,7 @@ export function sanitizeRememberedPathForCompany(params: { identifierMatch && normalizeCompanyPrefix(identifierMatch[1] ?? "") !== normalizeCompanyPrefix(params.companyPrefix) ) { - return "/dashboard"; + return "/assistant"; } } diff --git a/ui/src/pages/CompanyImport.tsx b/ui/src/pages/CompanyImport.tsx index fd18cdb5..e4121f66 100644 --- a/ui/src/pages/CompanyImport.tsx +++ b/ui/src/pages/CompanyImport.tsx @@ -867,7 +867,7 @@ export function CompanyImport() { body: `${result.company.name}: ${result.agents.length} agent${result.agents.length === 1 ? "" : "s"} processed.`, }); // Force a fresh dashboard load so newly imported agents are immediately visible. - window.location.assign(`/${importedCompany.issuePrefix}/dashboard`); + window.location.assign(`/${importedCompany.issuePrefix}/assistant`); }, onError: (err) => { pushToast({ diff --git a/ui/src/pages/CompanySettings.tsx b/ui/src/pages/CompanySettings.tsx index 46603a02..3402403a 100644 --- a/ui/src/pages/CompanySettings.tsx +++ b/ui/src/pages/CompanySettings.tsx @@ -224,7 +224,7 @@ export function CompanySettings() { useEffect(() => { setBreadcrumbs([ - { label: selectedCompany?.name ?? VOCAB.company, href: "/dashboard" }, + { label: selectedCompany?.name ?? VOCAB.company, href: "/assistant" }, { label: "Settings" } ]); }, [setBreadcrumbs, selectedCompany?.name]); diff --git a/ui/src/pages/NotFound.tsx b/ui/src/pages/NotFound.tsx index 217d95e1..7a2e40d6 100644 --- a/ui/src/pages/NotFound.tsx +++ b/ui/src/pages/NotFound.tsx @@ -23,7 +23,7 @@ export function NotFoundPage({ scope = "global", requestedPrefix }: NotFoundPage }, [setBreadcrumbs]); const fallbackCompany = selectedCompany ?? companies[0] ?? null; - const dashboardHref = fallbackCompany ? `/${fallbackCompany.issuePrefix}/dashboard` : "/"; + const assistantHref = fallbackCompany ? `/${fallbackCompany.issuePrefix}/assistant` : "/"; const currentPath = `${location.pathname}${location.search}${location.hash}`; const normalizedPrefix = requestedPrefix?.toUpperCase(); @@ -52,9 +52,9 @@ export function NotFoundPage({ scope = "global", requestedPrefix }: NotFoundPage