Skip to content

feat: link Profile Analysis from the Resources nav - #4048

Merged
morningman merged 1 commit into
apache:masterfrom
morningman:online-profile
Aug 8, 2026
Merged

feat: link Profile Analysis from the Resources nav#4048
morningman merged 1 commit into
apache:masterfrom
morningman:online-profile

Conversation

@morningman

Copy link
Copy Markdown
Contributor

Purpose

Bring the Profile Analysis page online.

/profile-analysis shipped in #4043 but nothing on the site links to it, so the page is only reachable by typing the URL. This adds the missing navigation entry, plus a version notice the page needs before users start feeding it Profiles.

Changes

1. Resources nav entrysrc/components/home-next/NavbarNext.tsx

Adds Profile Analysis to the Resources dropdown. buildNavItems drives both the desktop dropdown and the mobile panel, so the single entry covers both. The href omits the locale prefix, matching the neighbouring /blog, /events, and /course entries — Docusaurus Link resolves it against the localized baseUrl.

2. Supported-version noticesrc/components/profile-analysis/ProfileUploader.tsx

Use a Profile produced by Apache Doris 4.1 or later. Profiles from earlier versions may fail to parse.

Placed in the "Choose a Query Profile" section directly above the drop zone, so it is read before a file is picked and stays visible on both the Visualize Execution and AI-assisted analysis tabs.

The callout reuses the existing __ai-warning rule in ProfileAnalysis.scss — the selector is widened to &__ai-warning, &__version-notice rather than duplicating the block. No new colors; it keeps using the existing Infima warning tokens.

Notes

The page text is hard-coded English throughout (the privacy notice, the tab labels, the uploader help text), so the notice is English too. Localizing it would mean routing the whole component through <Translate>, which is out of scope here.

Testing

Extended profile-analysis.components.test.js with a case covering the notice text, its DOM position relative to the drop zone, and the style rule. Full file passes:

$ node --test src/components/profile-analysis/profile-analysis.components.test.js
ℹ tests 15
ℹ pass 15
ℹ fail 0

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@morningman
morningman merged commit 6dd6524 into apache:master Aug 8, 2026
3 checks passed
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