fix(web): calculate using the filtered breadcrumbs length#884
Merged
shuqinzhao merged 2 commits intorelease/v0.3.0from Apr 14, 2026
Merged
fix(web): calculate using the filtered breadcrumbs length#884shuqinzhao merged 2 commits intorelease/v0.3.0from
shuqinzhao merged 2 commits intorelease/v0.3.0from
Conversation
Contributor
评审者指南(在小型 PR 上折叠)评审者指南调整面包屑渲染逻辑,使最后一项的检测基于过滤后的(非 group 类型)面包屑列表,而不是原始数组,从而在存在 group 类型面包屑时避免错误的“最后一项”行为。 使用过滤后最后一项检测的面包屑渲染时序图sequenceDiagram
actor User
participant AppHeader
participant formatBreadcrumbNames
participant Tooltip
User->>AppHeader: render
AppHeader->>formatBreadcrumbNames: call with breadcrumbs
formatBreadcrumbNames->>formatBreadcrumbNames: filtered = breadcrumbs.filter(type != group)
formatBreadcrumbNames->>formatBreadcrumbNames: iterate filtered with index
formatBreadcrumbNames->>Tooltip: create title with label
Tooltip-->>formatBreadcrumbNames: Tooltip element
formatBreadcrumbNames-->>AppHeader: breadcrumb items with isLast = (index == filtered.length - 1)
AppHeader-->>User: breadcrumbs rendered with correct last item behavior
文件级改动
技巧与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts breadcrumb rendering logic so last-item detection uses the filtered (non-group) breadcrumb list rather than the original array, preventing incorrect last-item behavior when group-type breadcrumbs are present. Sequence diagram for breadcrumb rendering with filtered last-item detectionsequenceDiagram
actor User
participant AppHeader
participant formatBreadcrumbNames
participant Tooltip
User->>AppHeader: render
AppHeader->>formatBreadcrumbNames: call with breadcrumbs
formatBreadcrumbNames->>formatBreadcrumbNames: filtered = breadcrumbs.filter(type != group)
formatBreadcrumbNames->>formatBreadcrumbNames: iterate filtered with index
formatBreadcrumbNames->>Tooltip: create title with label
Tooltip-->>formatBreadcrumbNames: Tooltip element
formatBreadcrumbNames-->>AppHeader: breadcrumb items with isLast = (index == filtered.length - 1)
AppHeader-->>User: breadcrumbs rendered with correct last item behavior
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
嗨——我已经审查了你的更改,看起来非常棒!
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进后续的审查。
Original comment in English
Hey - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: