From 0a70af4aea5778de99649a02f3d98beac94a6fcc Mon Sep 17 00:00:00 2001
From: morningman
Date: Sat, 8 Aug 2026 08:27:10 +0800
Subject: [PATCH] feat: link Profile Analysis from the Resources nav
Add a "Profile Analysis" entry to the Resources dropdown so the page at
/profile-analysis is reachable from the site navigation. The nav item list
drives both the desktop dropdown and the mobile panel, so no separate
mobile change is needed.
Also state the supported Profile version above the file drop zone. Profiles
produced before Apache Doris 4.1 may fail to parse, so the notice sits in
the uploader section where it is read before a file is picked and stays
visible on both the visualization and AI tabs. It reuses the existing
warning callout style rather than adding a second one.
Co-Authored-By: Claude Opus 5 (1M context)
---
src/components/home-next/NavbarNext.tsx | 1 +
.../profile-analysis/ProfileAnalysis.scss | 3 ++-
src/components/profile-analysis/ProfileUploader.tsx | 5 +++++
.../profile-analysis.components.test.js | 13 +++++++++++++
4 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/components/home-next/NavbarNext.tsx b/src/components/home-next/NavbarNext.tsx
index f54707bccdc92..95160d5a32edc 100644
--- a/src/components/home-next/NavbarNext.tsx
+++ b/src/components/home-next/NavbarNext.tsx
@@ -67,6 +67,7 @@ function buildNavItems(
{ label: 'Blogs', href: '/blog' },
{ label: 'News and Events', href: '/events' },
{ label: 'Course', href: '/course' },
+ { label: 'Profile Analysis', href: '/profile-analysis' },
],
},
{
diff --git a/src/components/profile-analysis/ProfileAnalysis.scss b/src/components/profile-analysis/ProfileAnalysis.scss
index 575c75e3850bf..3a4bf8bcc075a 100644
--- a/src/components/profile-analysis/ProfileAnalysis.scss
+++ b/src/components/profile-analysis/ProfileAnalysis.scss
@@ -421,7 +421,8 @@
}
}
- &__ai-warning {
+ &__ai-warning,
+ &__version-notice {
margin-bottom: 1rem;
padding: 0.9rem 1rem;
border-left: 4px solid var(--ifm-color-warning);
diff --git a/src/components/profile-analysis/ProfileUploader.tsx b/src/components/profile-analysis/ProfileUploader.tsx
index ebd56c0af209b..72302d60f3182 100644
--- a/src/components/profile-analysis/ProfileUploader.tsx
+++ b/src/components/profile-analysis/ProfileUploader.tsx
@@ -89,6 +89,11 @@ export function ProfileUploader({ file, disabled, onFileChange }: ProfileUploade
Profile sections before local visualization or AI upload.
+
+ Use a Profile produced by Apache Doris 4.1 or later. Profiles from earlier versions may fail to
+ parse.
+