Skip to content

Zzh#39

Closed
zhangligei wants to merge 13 commits into
mainfrom
zzh
Closed

Zzh#39
zhangligei wants to merge 13 commits into
mainfrom
zzh

Conversation

@zhangligei

@zhangligei zhangligei commented Nov 18, 2025

Copy link
Copy Markdown
Collaborator

Sourcery 摘要

为 Xyzen 添加全面的中文文档,并增强相关的 UI 组件、导航和教程,以支持新页面和动态视频布局。

增强功能:

  • 在演示中用响应式 StackedVideosLayout 组件替换了单独的视频嵌入,并添加了动态宽高比支持。
  • 更新了网站导航,以包含新部分,例如用户指南、API 参考、架构、路线图、高级功能和常见问题解答。
  • 优化了快速入门和自定义 MCP 服务教程页面,更新了图片、布局并增加了额外说明。
  • 改进了 MDX 组件导出和图片画廊结构,以保持一致性。
  • 更新了 Footer 组件,加入了真实的社交媒体链接并纠正了导航路径处理。
  • 修复了项目中的一些小细节,例如团队成员的大学名称,并在部署说明中添加了缺失的 yarn install 步骤。

文档:

  • 添加了十余个新的中文 MDX 文档页面,包括 API 参考、系统架构、高级功能、常见问题解答、图代理、UI 设计指南等。
  • 修订了快速入门、演示和部署下的现有 MDX 文件,以反映更新的内容和格式。
Original summary in English

Summary by Sourcery

Add comprehensive Chinese documentation for Xyzen and enhance related UI components, navigation, and tutorials to support new pages and dynamic video layouts.

Enhancements:

  • Replace individual video embeds in the demo with a responsive StackedVideosLayout component and add dynamic aspect ratio support.
  • Update site navigation to include new sections such as user guide, API reference, architecture, roadmap, advanced features, and FAQ.
  • Refine quickstart and custom MCP service tutorial pages with updated images, layout, and additional instructions.
  • Improve MDX component exports and image gallery structure for consistency.
  • Update Footer component with real social media links and correct navigation path handling.
  • Fix minor project details such as team member university name and add missing yarn install step in deploy instructions.

Documentation:

  • Add over a dozen new Chinese MDX documentation pages including API reference, system architecture, advanced features, FAQ, graph agent, UI design guidelines, and more.
  • Revise existing MDX files under quickstart, demo, and deploy to reflect updated content and formatting.

✨ feat: add ImageGallery and VideoGallery components with responsive layout
🐛 fix:
📖 docs: update team member and adviser
✨ feat: add ImageGallery and VideoGallery components with responsive layout
🐛 fix:
📖 docs: update team member and adviser
-  创建 25+ 个高质量问答内容
-  覆盖基础问题、集成使用、功能特性、部署架构、开发贡献、许可法律、获取帮助 7 大类别
-  包含详细的代码示例和命令行指导
-  补充 GitHub Issues、Discussions 等社区资源链接
-  增强产品文档的完整性和易用性
-  创建 25+ 个高质量问答内容
-  覆盖基础问题、集成使用、功能特性、部署架构、开发贡献、许可法律、获取帮助 7 大类别
-  包含详细的代码示例和命令行指导
-  补充 GitHub Issues、Discussions 等社区资源链接
-  增强产品文档的完整性和易用性
…架构、开发贡献、许可法律、获取帮助 7 大类别 - 包含详细的代码示例和命令行指导 - 补充 GitHub Issues、Discussions 等社区资源链接 - 增强产品文档的完整性和易用性
@netlify

netlify Bot commented Nov 18, 2025

Copy link
Copy Markdown

Deploy Preview for cloudocs ready!

Name Link
🔨 Latest commit 0624db6
🔍 Latest deploy log https://app.netlify.com/projects/cloudocs/deploys/691ca463fc2b27000867aa39
😎 Deploy Preview https://deploy-preview-39--cloudocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sourcery-ai

sourcery-ai Bot commented Nov 18, 2025

Copy link
Copy Markdown

审阅者指南

本次 PR 大幅扩展了 Xyzen 文档,新增了 MDX 页面,更新了现有指南和导航,增强了视频布局组件以实现响应式宽高比,并实施了多项次要的 UI 和内容修复。

带用户确认的 MCP 工具调用流程图(来自高级功能文档)

graph TD
    START["用户输入"] --> RECEIVE["Agent 收到请求"]
    RECEIVE --> ANALYZE["LLM 分析是否需要工具"]
    ANALYZE --> DECIDE{"需要工具?"}
    DECIDE -->|否| RESPONSE["直接生成响应"]
    RESPONSE --> END1["返回最终答案"]
    DECIDE -->|是| CONFIRM{"需要确认?"}
    CONFIRM -->|是| CONFIRM_UI["工具确认<br/>用户审批"]
    CONFIRM -->|否| EXECUTE
    CONFIRM_UI --> EXECUTE["MCP 服务器执行"]
    EXECUTE --> RESULT["返回工具结果"]
    RESULT --> SYNTHESIS["Agent 综合结果"]
    SYNTHESIS --> END1
Loading

Graph Agent 工作流流程图:科学论文分析

graph TD
    START["START<br/>用户输入论文"] --> EXTRACT["EXTRACT_TEXT<br/>提取论文文本"]
    EXTRACT --> ANALYZE["ANALYZE_QUERY<br/>分析用户问题"]
    ANALYZE --> ROUTER{"问题复杂度<br/>判断"}
    ROUTER -->|简单问题<br/>complexity < 5| QUICK["QUICK_ANSWER<br/>快速回答"]
    ROUTER -->|复杂问题<br/>complexity ≥ 5| DEEP["DEEP_ANALYSIS<br/>深度分析"]
    QUICK --> SYNTHESIS["SYNTHESIS<br/>综合答案"]
    DEEP --> SYNTHESIS
    SYNTHESIS --> END["END<br/>输出结果"]
Loading

文件级更改

更改 详情 文件
添加全面的新文档部分
  • /xyzen/api 下引入 API 参考
  • /xyzen/architecture 下提供系统架构概述
  • /xyzen/advanced 下详细介绍高级功能
  • /xyzen/faq 下发布常见问题解答
  • /xyzen/deploy/graph_agent 中提供 Graph Agent 指南
  • /xyzen/deploy/primary_deploy 中添加主要部署概述
  • /xyzen/design 中创建 UI 设计规范
  • /xyzen/chat/mcp 中复制自定义 MCP 教程
src/app/(cn)/xyzen/api/page.mdx
src/app/(cn)/xyzen/architecture/page.mdx
src/app/(cn)/xyzen/advanced/page.mdx
src/app/(cn)/xyzen/faq/page.mdx
src/app/(cn)/xyzen/deploy/graph_agent/page.mdx
src/app/(cn)/xyzen/deploy/primary_deploy/page.mdx
src/app/(cn)/xyzen/design/page.mdx
src/app/(cn)/xyzen/chat/mcp/page.mdx
扩展和重组站点导航
  • 将“介绍”重命名为“总览”
  • 添加路线图、架构、用户指南、自定义 MCP、常见问题、高级功能、API、设计等链接
  • 将链接分组在“Xyzen 玄藏”、“用户指南”、“私有化部署”、“Contribution”下
src/app/(cn)/xyzen/navigation.ts
增强 StackedVideosLayout 以实现响应式视频
  • 添加 videoAspectRatio 状态和 onLoadedMetadata 处理程序
  • 计算宽高比并相应调整容器 className
  • 应用内联 aspectRatio 样式或回退高度
  • 确保肖像和横向视频的动态调整大小
src/components/StackedVideosLayout.tsx
更新和重构现有 MDX 内容
  • /xyzen/mcp 中添加自定义 MCP 服务说明
  • 替换快速入门图片,重构 ImageGallery 和侧边栏注释
  • 重构 Demo 页面以使用 StackedVideosLayout
  • 调整概述页面标题,插入徽标,调整标题
  • 在部署文档中包含 yarn install 步骤
src/app/(cn)/xyzen/mcp/page.mdx
src/app/(cn)/xyzen/quickstart/page.mdx
src/app/(cn)/xyzen/demo/page.mdx
src/app/(cn)/xyzen/page.mdx
src/app/(cn)/xyzen/deploy/page.mdx
应用次要的 UI 和内容修复
  • 更新 Footer 中的社交链接 URL
  • 过滤 PageNavigation 中的无效条目
  • 清理 mdx.tsx 中的 MDX 导出格式
  • 更正 teamMembers 中的大学名称
src/components/Footer.tsx
src/components/mdx.tsx
src/app/(cn)/development/about/team/components/teamMembers.ts

提示和命令

与 Sourcery 互动

  • 触发新审查: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub issue: 通过回复 Sourcery 的审查评论,要求它创建一个 issue。您也可以回复审查评论并添加 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。您也可以在拉取请求上评论 @sourcery-ai title,随时(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文的任意位置写入 @sourcery-ai summary,即可随时在您想要的位置生成 PR 摘要。您也可以在拉取请求上评论 @sourcery-ai summary,随时(重新)生成摘要。
  • 生成审阅者指南: 在拉取请求上评论 @sourcery-ai guide,随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求上评论 @sourcery-ai resolve,以解决所有 Sourcery 评论。如果您已经处理了所有评论并且不想再看到它们,这会很有用。
  • 关闭所有 Sourcery 审查: 在拉取请求上评论 @sourcery-ai dismiss,以关闭所有现有的 Sourcery 审查。如果您想重新开始新的审查,这尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义您的体验

访问您的 仪表板 以:

  • 启用或禁用审查功能,例如 Sourcery 生成的拉取请求摘要、审阅者指南等。
  • 更改审查语言。
  • 添加、删除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English

Reviewer's Guide

This PR significantly expands the Xyzen documentation with new MDX pages, updates existing guides and navigation, enhances the video layout component for responsive aspect ratios, and implements several minor UI and content fixes.

Flow diagram for MCP tool invocation with user confirmation (from advanced features documentation)

graph TD
    START["用户输入"] --> RECEIVE["Agent 收到请求"]
    RECEIVE --> ANALYZE["LLM 分析是否需要工具"]
    ANALYZE --> DECIDE{"需要工具?"}
    DECIDE -->|否| RESPONSE["直接生成响应"]
    RESPONSE --> END1["返回最终答案"]
    DECIDE -->|是| CONFIRM{"需要确认?"}
    CONFIRM -->|是| CONFIRM_UI["工具确认<br/>用户审批"]
    CONFIRM -->|否| EXECUTE
    CONFIRM_UI --> EXECUTE["MCP 服务器执行"]
    EXECUTE --> RESULT["返回工具结果"]
    RESULT --> SYNTHESIS["Agent 综合结果"]
    SYNTHESIS --> END1
Loading

Flow diagram for Graph Agent workflow: scientific paper analysis

graph TD
    START["START<br/>用户输入论文"] --> EXTRACT["EXTRACT_TEXT<br/>提取论文文本"]
    EXTRACT --> ANALYZE["ANALYZE_QUERY<br/>分析用户问题"]
    ANALYZE --> ROUTER{"问题复杂度<br/>判断"}
    ROUTER -->|简单问题<br/>complexity < 5| QUICK["QUICK_ANSWER<br/>快速回答"]
    ROUTER -->|复杂问题<br/>complexity ≥ 5| DEEP["DEEP_ANALYSIS<br/>深度分析"]
    QUICK --> SYNTHESIS["SYNTHESIS<br/>综合答案"]
    DEEP --> SYNTHESIS
    SYNTHESIS --> END["END<br/>输出结果"]
Loading

File-Level Changes

Change Details Files
Add comprehensive new documentation sections
  • Introduce API reference under /xyzen/api
  • Provide system architecture overview under /xyzen/architecture
  • Detail advanced features under /xyzen/advanced
  • Publish FAQ under /xyzen/faq
  • Guide on Graph Agent in /xyzen/deploy/graph_agent
  • Add primary deploy overview in /xyzen/deploy/primary_deploy
  • Create UI design spec in /xyzen/design
  • Duplicate custom MCP tutorial in /xyzen/chat/mcp
src/app/(cn)/xyzen/api/page.mdx
src/app/(cn)/xyzen/architecture/page.mdx
src/app/(cn)/xyzen/advanced/page.mdx
src/app/(cn)/xyzen/faq/page.mdx
src/app/(cn)/xyzen/deploy/graph_agent/page.mdx
src/app/(cn)/xyzen/deploy/primary_deploy/page.mdx
src/app/(cn)/xyzen/design/page.mdx
src/app/(cn)/xyzen/chat/mcp/page.mdx
Expand and reorganize site navigation
  • Rename “介绍” to “总览”
  • Add links for roadmap, architecture, user guide, custom MCP, FAQ, advanced, API, design
  • Group links under ‘Xyzen 玄藏’, ‘用户指南’, ‘私有化部署’, ‘Contribution’
src/app/(cn)/xyzen/navigation.ts
Enhance StackedVideosLayout for responsive videos
  • Add videoAspectRatio state and onLoadedMetadata handler
  • Compute aspect ratio and adjust container className accordingly
  • Apply inline aspectRatio style or fallback height
  • Ensure dynamic resizing for portrait vs landscape videos
src/components/StackedVideosLayout.tsx
Update and refactor existing MDX content
  • Add custom MCP service instructions in /xyzen/mcp
  • Replace Quickstart images, restructure ImageGallery and sidebar notes
  • Refactor Demo page to use StackedVideosLayout
  • Adjust overview page title, insert logo, tweak headings
  • Include yarn install step in deploy documentation
src/app/(cn)/xyzen/mcp/page.mdx
src/app/(cn)/xyzen/quickstart/page.mdx
src/app/(cn)/xyzen/demo/page.mdx
src/app/(cn)/xyzen/page.mdx
src/app/(cn)/xyzen/deploy/page.mdx
Apply minor UI and content fixes
  • Update social link URLs in Footer
  • Filter invalid entries in PageNavigation
  • Clean up MDX export formatting in mdx.tsx
  • Correct university name in teamMembers
src/components/Footer.tsx
src/components/mdx.tsx
src/app/(cn)/development/about/team/components/teamMembers.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

你好 - 我已审阅了你的更改 - 以下是一些反馈:

阻塞性问题

  • 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。(链接)
  • 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。(链接)
  • 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。(链接)

一般性评论

  • “自定义 MCP 服务”指南在 xyzen/mcp/page.mdxchat/mcp/page.mdx 中都原样出现——考虑合并到单一来源以避免重复和维护偏差。
  • 你更新的 navigation.ts 变得相当长——将相关链接分组到下拉菜单中,或折叠不常用的部分,以保持侧边栏简洁和易于维护。
  • 在 StackedVideosLayout 中,在加载时计算和应用宽高比可能会导致布局偏移;考虑提供一个合理的默认宽高比或占位符大小以避免内容跳动。
AI 代理提示
请处理此代码审查中的评论:

## 总体评论
- “自定义 MCP 服务”指南在 `xyzen/mcp/page.mdx``chat/mcp/page.mdx` 中都原样出现——考虑合并到单一来源以避免重复和维护偏差。
- 你更新的 navigation.ts 变得相当长——将相关链接分组到下拉菜单中,或折叠不常用的部分,以保持侧边栏简洁和易于维护。
- 在 StackedVideosLayout 中,在加载时计算和应用宽高比可能会导致布局偏移;考虑提供一个合理的默认宽高比或占位符大小以避免内容跳动。

## 单独评论

### 评论 1
<location> `src/app/(cn)/xyzen/design/page.mdx:9` </location>
<code_context>
+Xyzen 使用 [@sciol/ui](https://www.npmjs.com/package/@sciol/ui) 
+作为主要的前端组件库。
+该组件库基于 shadcn 和 vercel 构建,提供了一套高度可定制且易于使用的 UI 组件。
+<img src="/xyzen/sciol_ui.pnghttps://storage.sciol.ac.cn/library/docs/Xyzen/sciol_ui.png" alt="UI 组件库示例" />
\ No newline at end of file
</code_context>

<issue_to_address>
**问题 (bug_risk):** 图像 src 属性包含一个拼接路径。

src 应该只引用一个有效的图像 URL,以避免显示问题。
</issue_to_address>

### 评论 2
<location> `src/app/(cn)/xyzen/api/page.mdx:731-732` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**安全 (curl-auth-header):** 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。

*来源: gitleaks*
</issue_to_address>

### 评论 3
<location> `src/app/(cn)/xyzen/api/page.mdx:743-744` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**安全 (curl-auth-header):** 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。

*来源: gitleaks*
</issue_to_address>

### 评论 4
<location> `src/app/(cn)/xyzen/api/page.mdx:756-757` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**安全 (curl-auth-header):** 在 curl 命令头中发现了一个潜在的授权令牌,这可能会危及 curl 访问的资源。

*来源: gitleaks*
</issue_to_address>

### 评论 5
<location> `src/components/StackedVideosLayout.tsx:58-63` </location>
<code_context>
  if (videoAspectRatio) {

    if (videoAspectRatio < 1) {
      containerClassName += ' max-w-sm mx-auto'
    }
  }

</code_context>

<issue_to_address>
**建议 (code-quality):** 合并嵌套的 if 条件 ([`merge-nested-ifs`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/TypeScript/Default-Rules/merge-nested-ifs))

```suggestion
  if (videoAspectRatio && videoAspectRatio < 1) {
        containerClassName += ' max-w-sm mx-auto'
  }

```

<br/><details><summary>解释</summary>阅读深度嵌套的条件代码令人困惑,因为你必须跟踪哪些条件与哪些级别相关。因此,我们努力在可能的情况下减少嵌套,并且当两个 `if` 条件可以使用 `and` 组合时,这是一个简单的胜利。
</details>
</issue_to_address>

Sourcery 对开源免费 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我更有用!请点击每个评论上的 👍 或 👎,我将利用反馈改进你的评论。
Original comment in English

Hey there - I've reviewed your changes - here's some feedback:

Blocking issues:

  • Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. (link)
  • Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. (link)
  • Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. (link)

General comments:

  • The “自定义 MCP 服务” guide appears verbatim in both xyzen/mcp/page.mdx and chat/mcp/page.mdx—consider consolidating into a single source to avoid duplication and maintenance drift.
  • Your updated navigation.ts is getting quite long—group related links into dropdowns or collapse less-used sections to keep the sidebar concise and maintainable.
  • In StackedVideosLayout, computing and applying the aspect ratio at load time could cause layout shifts; consider providing a sensible default aspect-ratio or placeholder sizing to avoid content jumping.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The “自定义 MCP 服务” guide appears verbatim in both `xyzen/mcp/page.mdx` and `chat/mcp/page.mdx`—consider consolidating into a single source to avoid duplication and maintenance drift.
- Your updated navigation.ts is getting quite long—group related links into dropdowns or collapse less-used sections to keep the sidebar concise and maintainable.
- In StackedVideosLayout, computing and applying the aspect ratio at load time could cause layout shifts; consider providing a sensible default aspect-ratio or placeholder sizing to avoid content jumping.

## Individual Comments

### Comment 1
<location> `src/app/(cn)/xyzen/design/page.mdx:9` </location>
<code_context>
+Xyzen 使用 [@sciol/ui](https://www.npmjs.com/package/@sciol/ui) 
+作为主要的前端组件库。
+该组件库基于 shadcn 和 vercel 构建,提供了一套高度可定制且易于使用的 UI 组件。
+<img src="/xyzen/sciol_ui.pnghttps://storage.sciol.ac.cn/library/docs/Xyzen/sciol_ui.png" alt="UI 组件库示例" />
\ No newline at end of file
</code_context>

<issue_to_address>
**issue (bug_risk):** Image src attribute contains a concatenated path.

The src should reference only one valid image URL to avoid display issues.
</issue_to_address>

### Comment 2
<location> `src/app/(cn)/xyzen/api/page.mdx:731-732` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**security (curl-auth-header):** Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

*Source: gitleaks*
</issue_to_address>

### Comment 3
<location> `src/app/(cn)/xyzen/api/page.mdx:743-744` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**security (curl-auth-header):** Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

*Source: gitleaks*
</issue_to_address>

### Comment 4
<location> `src/app/(cn)/xyzen/api/page.mdx:756-757` </location>
<code_context>
YOUR_TOKEN
</code_context>

<issue_to_address>
**security (curl-auth-header):** Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

*Source: gitleaks*
</issue_to_address>

### Comment 5
<location> `src/components/StackedVideosLayout.tsx:58-63` </location>
<code_context>
  if (videoAspectRatio) {

    if (videoAspectRatio < 1) {
      containerClassName += ' max-w-sm mx-auto'
    }
  }

</code_context>

<issue_to_address>
**suggestion (code-quality):** Merge nested if conditions ([`merge-nested-ifs`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/TypeScript/Default-Rules/merge-nested-ifs))

```suggestion
  if (videoAspectRatio && videoAspectRatio < 1) {
        containerClassName += ' max-w-sm mx-auto'
  }

```

<br/><details><summary>Explanation</summary>Reading deeply nested conditional code is confusing, since you have to keep track of which
conditions relate to which levels. We therefore strive to reduce nesting where
possible, and the situation where two `if` conditions can be combined using
`and` is an easy win.
</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/app/(cn)/xyzen/api/page.mdx Outdated
Comment thread src/app/(cn)/xyzen/api/page.mdx Outdated
Comment thread src/app/(cn)/xyzen/api/page.mdx Outdated
Comment thread src/components/StackedVideosLayout.tsx
…架构、开发贡献、许可法律、获取帮助 7 大类别 - 包含详细的代码示例和命令行指导 - 补充 GitHub Issues、Discussions 等社区资源链接 - 增强产品文档的完整性和易用性
…架构、开发贡献、许可法律、获取帮助 7 大类别 - 包含详细的代码示例和命令行指导 - 补充 GitHub Issues、Discussions 等社区资源链接 - 增强产品文档的完整性和易用性
…架构、开发贡献、许可法律、获取帮助 7 大类别 - 包含详细的代码示例和命令行指导 - 补充 GitHub Issues、Discussions 等社区资源链接 - 增强产品文档的完整性和易用性
@zhangligei zhangligei closed this Nov 18, 2025
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