Skip to content

feat: expand onboarding to notification & AI tracks, add integration catalog entry#2163

Open
710leo wants to merge 1 commit into
mainfrom
optimize-ux
Open

feat: expand onboarding to notification & AI tracks, add integration catalog entry#2163
710leo wants to merge 1 commit into
mainfrom
optimize-ux

Conversation

@710leo

@710leo 710leo commented Jul 8, 2026

Copy link
Copy Markdown
Member
image image

Summary by CodeRabbit

  • New Features

    • Added a new AI onboarding track with updated progress tracking and completion visuals.
    • Expanded the onboarding flow with additional steps for notification rules and AI/LLM setup.
    • Added a browse-all link on the landing page to help users discover more integrations.
  • Bug Fixes

    • Improved the onboarding checklist and step layout for clearer progress, spacing, and text display.
  • Documentation

    • Added empty-state guidance for notification rules, including quick actions to get started.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds an AI onboarding track with notification/LLM detection probes and a popover progress bar, introduces a landing page integration catalog with a "browse all" link, and adds an empty-state guide component to the notification rules list page, along with corresponding locale strings and stylesheet updates across five languages.

Changes

Onboarding AI Track and Progress UI

Layer / File(s) Summary
Onboarding track data and detection logic
src/components/OnboardingProgress/tracks.ts, src/components/OnboardingProgress/useOnboardingProgress.ts
Adds an ai track with Sparkles icon and llm step, a notification step to the data track, and extends detection state/probing to check notification-rule and LLM-config completion.
Progress bar rendering and styling
src/components/OnboardingProgress/PopoverContent.tsx, src/components/OnboardingProgress/style.less
Computes a completion percentage and renders a progress bar; restyles popover container, per-step connectors, node visuals, and description text truncation (two-line clamp).
Onboarding locale copy
src/pages/landing/locale/en_US.ts, .../ja_JP.ts, .../ru_RU.ts, .../zh_CN.ts, .../zh_HK.ts
Adds aiTrack label and notification/llm step title/description strings across all landing locale files.

Landing Integration Catalog Browse Link

Layer / File(s) Summary
Catalog data and landing page wiring
src/pages/landing/landing.data.ts, src/pages/landing/index.tsx
Adds landingIntegrationCatalog data (url, labelKey) and wires it into the integration panel footer as a browse link with an arrow icon.
Catalog styling and matrix locale strings
src/pages/landing/style.less, src/pages/landing/locale/*
Adds emerald icon theme tokens, integration footer/browse link CSS, an onboarding grid layout tweak, and matrix.integrationBrowseAll strings across all landing locale files.

Notification Rules Empty-State Guide

Layer / File(s) Summary
Empty guide wiring and locale copy
src/pages/notificationRules/pages/List.tsx, src/pages/notificationRules/locale/*
Renders EmptyGuide via EnhancedTable's locale.emptyText when the rule list is empty, with action links to add a rule or configure a channel, backed by empty_guide locale strings in all five languages.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Popover as OnboardingPopoverContent
  participant Hook as useOnboardingProgress
  participant NotifAPI as NotificationRulesAPI
  participant LLMAPI as LLMConfigAPI

  Popover->>Hook: request onboarding progress
  Hook->>NotifAPI: probe notification rules
  Hook->>LLMAPI: probe LLM configs
  NotifAPI-->>Hook: notification done flag
  LLMAPI-->>Hook: llm done flag
  Hook-->>Popover: doneMap (incl. notification, llm)
  Popover->>Popover: compute pct = doneCount/total
  Popover-->>Popover: render progress bar width
Loading

Possibly related PRs

  • n9e/fe#2090: Both PRs modify landing page implementation/data and i18n content, adding related AI/onboarding/integration entries.
  • n9e/fe#2118: Both PRs add a custom empty-state (EmptyGuide-like) rendering to the notification rules list via EnhancedTable when data is empty.
  • n9e/fe#2138: Extends the onboarding progress/tracks implementation (PopoverContent.tsx, tracks.ts, useOnboardingProgress.ts) previously refactored in that PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: new notification and AI onboarding tracks plus an integration catalog entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch optimize-ux

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/landing/locale/zh_CN.ts`:
- Line 9: The zh_CN translation for aiTrack is inconsistent with the other
locales and with aiAssistant in the same file. Update the aiTrack label in the
zh_CN locale object to match the “AI assistant” meaning used by the other
translations, using a consistent term such as “AI 助手” or “智能助手” so the Landing
locale strings stay aligned across the locale map.

In `@src/pages/notificationRules/pages/List.tsx`:
- Around line 133-153: Replace the non-navigable <a> element in List.tsx’s
EmptyGuide actions with the existing react-router-dom <Link> pattern used
elsewhere in this component, so the “Configure a channel first” action is
keyboard-accessible and consistent; update the click/navigation target to use
Link to /notification-channels while keeping the surrounding EmptyGuide and
Button behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a247324e-0e15-451f-b04c-6c3735dc7cda

📥 Commits

Reviewing files that changed from the base of the PR and between 591af87 and 88703e0.

📒 Files selected for processing (18)
  • src/components/OnboardingProgress/PopoverContent.tsx
  • src/components/OnboardingProgress/style.less
  • src/components/OnboardingProgress/tracks.ts
  • src/components/OnboardingProgress/useOnboardingProgress.ts
  • src/pages/landing/index.tsx
  • src/pages/landing/landing.data.ts
  • src/pages/landing/locale/en_US.ts
  • src/pages/landing/locale/ja_JP.ts
  • src/pages/landing/locale/ru_RU.ts
  • src/pages/landing/locale/zh_CN.ts
  • src/pages/landing/locale/zh_HK.ts
  • src/pages/landing/style.less
  • src/pages/notificationRules/locale/en_US.ts
  • src/pages/notificationRules/locale/ja_JP.ts
  • src/pages/notificationRules/locale/ru_RU.ts
  • src/pages/notificationRules/locale/zh_CN.ts
  • src/pages/notificationRules/locale/zh_HK.ts
  • src/pages/notificationRules/pages/List.tsx

progress: '已完成 {{done}}/{{total}}',
hostTrack: '主机监控线',
dataTrack: '数据接入线',
aiTrack: '智能化',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

aiTrack translation inconsistent with other locales and zh_CN AI naming.

aiTrack: '智能化' translates to "intelligentization," while en_US/ja_JP/ru_RU all use "AI assistant" variants. The PR screenshot also shows "AI assistant" as the section title. Additionally, the zh_CN aiAssistant section (line 121) uses "AI 智能助手", making "智能化" inconsistent within the same file. Consider using "AI 助手" or "智能助手" for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/landing/locale/zh_CN.ts` at line 9, The zh_CN translation for
aiTrack is inconsistent with the other locales and with aiAssistant in the same
file. Update the aiTrack label in the zh_CN locale object to match the “AI
assistant” meaning used by the other translations, using a consistent term such
as “AI 助手” or “智能助手” so the Landing locale strings stay aligned across the
locale map.

Comment on lines +133 to +153
// 仅在「确实一条规则都没有」时展示引导;搜索命中为空时回退到默认空态,避免误导
locale={
data.length === 0
? {
emptyText: (
<EmptyGuide
title={t('empty_guide.title')}
description={t('empty_guide.desc')}
actions={
<>
<Button type='primary' onClick={() => history.push(`/${NS}/add`)}>
{t('common:btn.add')}
</Button>
<a onClick={() => history.push('/notification-channels')}>{t('empty_guide.config_channel')}</a>
</>
}
/>
),
}
: undefined
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use <Link> instead of <a> for the "Configure a channel first" action.

The <a> tag on line 146 has no href, making it non-focusable and inaccessible via keyboard. It's also inconsistent with line 123 which uses <Link> from react-router-dom. Using <Link> provides proper navigation, keyboard support, and consistency.

♿ Proposed fix for accessibility and consistency
                       actions={
                         <>
                           <Button type='primary' onClick={() => history.push(`/${NS}/add`)}>
                             {t('common:btn.add')}
                           </Button>
-                          <a onClick={() => history.push('/notification-channels')}>{t('empty_guide.config_channel')}</a>
+                          <Link to='/notification-channels'>{t('empty_guide.config_channel')}</Link>
                         </>
                       }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// 仅在「确实一条规则都没有」时展示引导;搜索命中为空时回退到默认空态,避免误导
locale={
data.length === 0
? {
emptyText: (
<EmptyGuide
title={t('empty_guide.title')}
description={t('empty_guide.desc')}
actions={
<>
<Button type='primary' onClick={() => history.push(`/${NS}/add`)}>
{t('common:btn.add')}
</Button>
<a onClick={() => history.push('/notification-channels')}>{t('empty_guide.config_channel')}</a>
</>
}
/>
),
}
: undefined
}
// 仅在「确实一条规则都没有」时展示引导;搜索命中为空时回退到默认空态,避免误导
locale={
data.length === 0
? {
emptyText: (
<EmptyGuide
title={t('empty_guide.title')}
description={t('empty_guide.desc')}
actions={
<>
<Button type='primary' onClick={() => history.push(`/${NS}/add`)}>
{t('common:btn.add')}
</Button>
<Link to='/notification-channels'>{t('empty_guide.config_channel')}</Link>
</>
}
/>
),
}
: undefined
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/notificationRules/pages/List.tsx` around lines 133 - 153, Replace
the non-navigable <a> element in List.tsx’s EmptyGuide actions with the existing
react-router-dom <Link> pattern used elsewhere in this component, so the
“Configure a channel first” action is keyboard-accessible and consistent; update
the click/navigation target to use Link to /notification-channels while keeping
the surrounding EmptyGuide and Button behavior unchanged.

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