Skip to content

feat(flashai): deeplinks and redirects to /flashai/<item> - #2199

Merged
jsers merged 8 commits into
mainfrom
feat-flash-ai-fullpage-0720
Jul 22, 2026
Merged

feat(flashai): deeplinks and redirects to /flashai/<item>#2199
jsers merged 8 commits into
mainfrom
feat-flash-ai-fullpage-0720

Conversation

@Fiona2016

@Fiona2016 Fiona2016 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Point AI config / onboarding / AiChatNG deeplinks at /flashai/<item> paths.
  • Soft-redirect legacy /ai-config/* list routes into FlashAI host.
  • Menu: keep FlashAI leaf selectable when aiStatus arrives late; i18n for intelligent section / knowledge-base.

Review

  • Pre-PR pass on origin/main...HEAD (6 commits, ~10 files): redirects and menu leaf filter look scoped; no unrelated churn.

Verification

  • Paired with srm-fe + n9e-plus-fe on the same branch; Jenkins #5396 SUCCESS on 9888.

Notes / Risks

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added Knowledge Base navigation labels in supported languages.
    • Added an “Intelligence” section label to the side menu.
  • Bug Fixes
    • Updated AI configuration links and routes to use the FlashAI destinations for ENT.
    • Legacy LLM configuration and Skills pages now soft-redirect to FlashAI (ENT only).
    • Improved side-menu behavior so top-level leaf items are selectable and active state matches the current route.

Fiona2016 and others added 6 commits July 20, 2026 03:05
SideMenu 过滤器此前把每个顶层项都当分组,children 过滤后为空即整项丢弃,
导致顶层叶子项(如 FlashAI,children 为空数组)被误删。渲染器 MenuList 本就
支持将无 children 的项渲染为可点击的 MenuItem,这里补上过滤器的叶子分支:
无 children 时按自身 key 权限决定保留。

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Re-run menu build when getMenuList changes and include top-level leaves in path matching.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a655c803-4e5c-473e-b3d7-755f40d45ed6

📥 Commits

Reviewing files that changed from the base of the PR and between a391732 and 90c7d41.

📒 Files selected for processing (4)
  • src/components/AiChatNG/MessageBlocks.tsx
  • src/components/OnboardingProgress/tracks.ts
  • src/components/SideMenu/index.tsx
  • src/pages/aiConfig/entry.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/AiChatNG/MessageBlocks.tsx
  • src/components/SideMenu/index.tsx
  • src/pages/aiConfig/entry.tsx

📝 Walkthrough

Walkthrough

AI configuration routes conditionally redirect to FlashAI pages for ENT deployments. Side-menu filtering and route selection now support top-level leaf entries, with localized knowledge-base and intelligent-section labels added across supported locales.

Changes

FlashAI navigation

Layer / File(s) Summary
Legacy route redirects
src/pages/aiConfig/entry.tsx
Legacy LLM configuration and skills routes redirect to FlashAI destinations for ENT deployments while retaining legacy components otherwise.
Side-menu leaf and localization support
src/components/SideMenu/index.tsx, src/components/SideMenu/locale/*, src/components/SideMenu/types.ts
Top-level leaf entries are retained and included in route selection matching; AI knowledge-base and intelligent-section labels are added across locales.
AI entry-point destinations
src/components/AiChatNG/MessageBlocks.tsx, src/components/OnboardingProgress/tracks.ts
Chat error links use deployment-specific LLM configuration paths, and the AI onboarding track is marked as open-source only.

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

Possibly related PRs

  • n9e/fe#2163: Updates the related onboarding tracks and AI step routing.

Suggested reviewers: 710leo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 change: FlashAI deeplinks and redirects to /flashai paths.
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 feat-flash-ai-fullpage-0720

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: 1

🤖 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/components/SideMenu/index.tsx`:
- Around line 230-232: Refactor the menu derivation in the useEffect around
getMenuList to avoid stale derived state, preferably computing menus
synchronously with useMemo from all required inputs, including perms,
hideDeprecatedMenus/menuList, i18n.language, embeddedProductMenu, and
getMenuList. If retaining the effect, add every referenced asynchronous value to
its dependency array and ensure updates are reflected in the side menu.
🪄 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: cd2f8a2f-e475-4004-aea4-17de0d1139d1

📥 Commits

Reviewing files that changed from the base of the PR and between d466664 and a391732.

📒 Files selected for processing (10)
  • src/components/AiChatNG/MessageBlocks.tsx
  • src/components/OnboardingProgress/tracks.ts
  • src/components/SideMenu/index.tsx
  • src/components/SideMenu/locale/en_US.ts
  • src/components/SideMenu/locale/ja_JP.ts
  • src/components/SideMenu/locale/ru_RU.ts
  • src/components/SideMenu/locale/zh_CN.ts
  • src/components/SideMenu/locale/zh_HK.ts
  • src/components/SideMenu/types.ts
  • src/pages/aiConfig/entry.tsx

Comment thread src/components/SideMenu/index.tsx Outdated
Comment on lines +230 to +232
// getMenuList must stay in deps: ENT builds recreate it when async inputs
// (e.g. aiStatus) arrive; without it the FlashAI entry can be missed forever.
}, [i18n.language, embeddedProductMenu, getMenuList]);

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 | 🟠 Major | ⚡ Quick win

Add missing dependencies or refactor to useMemo to prevent stale menus.

The useEffect block relies on variables from the component scope (like perms and implicitly hideDeprecatedMenus via menuList) that are missing from the dependency array. If these values are loaded or updated asynchronously from commonState after the component mounts, the side menu will not update to reflect the changes.

To prevent stale state, either add perms and menuList (or its dependencies) to the dependency array, or better yet, eliminate the derived state entirely by computing menus synchronously during render via useMemo.

🤖 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/components/SideMenu/index.tsx` around lines 230 - 232, Refactor the menu
derivation in the useEffect around getMenuList to avoid stale derived state,
preferably computing menus synchronously with useMemo from all required inputs,
including perms, hideDeprecatedMenus/menuList, i18n.language,
embeddedProductMenu, and getMenuList. If retaining the effect, add every
referenced asynchronous value to its dependency array and ensure updates are
reflected in the side menu.

@jsers
jsers merged commit 6cafca8 into main Jul 22, 2026
1 check 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.

2 participants