Skip to content

Introduce adaptive OSSLibrariesLicensePage with LicenseDetailView - #4

Merged
composable-tu merged 6 commits into
mainfrom
tablet
Aug 16, 2026
Merged

composable-tu merged 6 commits into
mainfrom
tablet

Conversation

@composable-tu

@composable-tu composable-tu commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary by Sourcery

引入一个自适应的统一许可证页面,将列表视图和详情视图结合在一起,并将许可证详情重构为可复用的内容组件。

New Features:

  • 添加 OSSLibrariesLicensePage,这是一个自适应容器页面,在手机和大屏布局中使用单一的 HdsNavigation 展示许可证列表和详情。
  • LicenseDetailView 暴露为独立组件,以便在导航目的地中复用。

Enhancements:

  • 将原先的详情页重构为 LicenseDetailView,通过传入的 uniqueId 从 LibsHolder 读取数据,而不是使用路由参数。
  • 更新路由名称常量,使其指向新的自适应许可证页面,同时保留专门的详情目的地路由。
  • 调整日志标签和导航标题栏行为,以支持在不同屏幕尺寸上的分屏和堆叠导航模式。

Build:

  • 将 osslibraries_ui HAR 版本提升到 0.0.8,并刷新开发工具版本,包括 Deveco CLI、pnpm 和 Vite 配置。

Documentation:

  • 更新 README、中文 README、技能文档以及 osslibraries_ui README,以描述新的自适应许可证页面、更新后的路由导入以及导航流程。
  • 扩展 osslibraries_ui 的变更日志,加入 v0.0.8 关于大屏支持和页面 API 变更的说明。
Original summary in English

Summary by Sourcery

Introduce a single adaptive license page that combines list and detail views and refactor the license detail into a reusable content component.

New Features:

  • Add OSSLibrariesLicensePage, an adaptive container page that shows the license list and detail using a single HdsNavigation for phone and large-screen layouts.
  • Expose LicenseDetailView as a standalone component for reuse in navigation destinations.

Enhancements:

  • Refactor the former detail page into LicenseDetailView that reads data from LibsHolder via a passed uniqueId instead of router params.
  • Update route name constants to point to the new adaptive license page while keeping a dedicated detail destination route.
  • Adjust logging tags and navigation title bar behavior to support split and stack navigation modes on different screen sizes.

Build:

  • Bump osslibraries_ui HAR version to 0.0.8 and refresh dev tooling versions, including Deveco CLI, pnpm, and Vite configuration.

Documentation:

  • Update README, Chinese README, skill docs, and osslibraries_ui README to describe the new adaptive license page, revised route imports, and navigation flow.
  • Extend the osslibraries_ui changelog with v0.0.8 notes about large-screen support and the page API change.

- 移除独立的 OSSLibrariesLicenseListPage 和 OSSLibrariesLicenseDetailPage 页面
- 新增 OSSLibrariesLicensePage 自适应页面,支持手机和大屏设备
- 新增 LicenseDetailView 组件用于详情内容展示
- 更新路由配置和页面导入路径
- 修改 README 文档中的页面引用说明
- 添加对平板和电视设备的支持
- 重构导航逻辑,使用 NavDestination 实现分栏布局
- 添加 navigationMode 状态管理分栏模式
- 设置导航栏宽度为 37.5% 以适配分栏布局
- 监听导航模式变化并更新界面状态
- 根据分栏模式动态调整详情页标题栏显示逻辑
- 在分栏模式下隐藏返回按钮并使用库名作为主标题
- 添加 detailTitleOf 方法处理分栏模式下的标题显示
- 适配大屏设备,如平板、折叠屏、智慧屏
- 列表页与详情页合并为单个自适应容器页 OSSLibrariesLicensePage
- 替换 OSSLibrariesLicenseListPage / OSSLibrariesLicenseDetailPage
- 升级 deveco-cli 从 1.2.2 到 1.3.0
- 升级 vite 为 @voidzero-dev/vite-plus-core@0.2.8
- 升级 pnpm 版本从 11.20.0 到 11.22.0
- 更新多个依赖包版本包括 hono、content-type、ws 等
- 将 HAR_VERSION 从 0.0.7 更新到 0.0.8
- 更新 entry 中依赖的 osslibraries_ui 版本号
@sourcery-ai sourcery-ai Bot changed the title Tablet @sourcery-ai Introduce adaptive OSSLibrariesLicensePage with LicenseDetailView Aug 16, 2026
@sourcery-ai

sourcery-ai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

将开源许可证 UI 重构为自适应的单页面容器,内嵌可复用的详情视图组件;更新导出与文档到新路由;同时为平板适配版本提升工具链与 HAR 版本。

自适应许可证页面从列表到详情的导航时序图

sequenceDiagram
  actor User
  participant OSSLibrariesLicensePage
  participant LibsLoader
  participant LibsHolder
  participant NavPathStack
  participant HdsNavigation
  participant LicenseDetailView

  User->>OSSLibrariesLicensePage: open OSSLibrariesLicensePage
  OSSLibrariesLicensePage->>OSSLibrariesLicensePage: aboutToAppear()
  OSSLibrariesLicensePage->>LibsLoader: fromRawfile(context)
  LibsLoader-->>OSSLibrariesLicensePage: libs
  OSSLibrariesLicensePage->>LibsHolder: set(libs)
  OSSLibrariesLicensePage->>HdsNavigation: build() with NavBar and DetailDestination

  User->>OSSLibrariesLicensePage: tap LicenseItem
  OSSLibrariesLicensePage->>OSSLibrariesLicensePage: navigateToDetail(uniqueId)
  alt pathStack has detail
    OSSLibrariesLicensePage->>NavPathStack: replacePathByName(UI_DETAIL_PAGE_ROUTE, params)
  else no detail yet
    OSSLibrariesLicensePage->>NavPathStack: pushPathByName(UI_DETAIL_PAGE_ROUTE, params)
  end

  HdsNavigation->>OSSLibrariesLicensePage: DetailDestination(name, pageInfos)
  OSSLibrariesLicensePage->>LicenseDetailView: construct with uniqueId
  LicenseDetailView->>LicenseDetailView: aboutToAppear()
  LicenseDetailView->>LibsHolder: get()
  LibsHolder-->>LicenseDetailView: libs
  LicenseDetailView->>LicenseDetailView: findLibrary(uniqueId) and render details
Loading

File-Level Changes

Change Details Files
将许可证详情页抽取为可复用、与导航无关的组件,并简化其数据访问和日志记录。
  • 将详情结构体重命名为 LicenseDetailView,并移除 @entry 路由元数据,使其可以嵌入到 HdsNavDestination 中。
  • 引入一个 @prop uniqueId,用于通过 LibsHolder 查找 Library,而不是从路由参数中读取。
  • 移除 HdsNavigation 包装层和标题栏配置,使组件只负责渲染内容,并将“外壳(chrome)”交给父级处理。
  • 保留当前网站、SCM 链接和许可证内容的列表布局,但将日志标签从旧页面名调整为新的视图名。
osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage.ets
osslibraries_ui/src/main/ets/components/LicenseDetailView.ets
引入一个自适应容器页面,用于承载许可证列表和详情视图,通过 HdsNavigation 支持手机(堆栈)和大屏(分栏)布局。
  • 创建 OSSLibrariesLicensePage,作为带有 NavPathStack 的 @entry 页面,并由 HdsNavigation 管理。
  • 通过 LibsLoader.fromRawfile 加载 Libs,存入 LibsHolder,并跟踪加载/错误状态以驱动导航栏内容。
  • 实现一个 NavBar 构建器:在加载中显示加载动画,在错误时显示错误信息,在数据就绪时显示 LicenseItem 列表,并仅在存在数据时导航到详情。
  • 实现一个使用 HdsNavDestination 的 DetailDestination 构建器,使用来自 LicenseDetailParams 的 uniqueId 渲染 LicenseDetailView,并根据 NavigationMode 配置标题和返回按钮行为。
  • 添加辅助方法,从 LibsHolder 计算分栏和堆栈模式下的详情标题和库名称,并通过 push/replacePathByName 和 UI_DETAIL_PAGE_ROUTE 连接导航。
osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage.ets
osslibraries_ui/src/main/ets/constants/RouteNames.ets
将公共导出、路由注册及示例应用用法与新的自适应许可证页面和详情视图组件对齐。
  • 更新 UI HAR 入口,导出 LicenseDetailView 和 OSSLibrariesLicensePage,替代已移除的列表/详情页面。
  • 修改示例入口 Index.ets,仅导入 OSSLibrariesLicensePage,依赖新的统一路由。
  • 更新 RouteNames.ets,使 UI_LIST_PAGE_ROUTE 指向 OSSLibrariesLicensePage,并在文档注释中澄清容器和详情路由的语义。
osslibraries_ui/Index.ets
entry/src/main/ets/pages/Index.ets
osslibraries_ui/src/main/ets/constants/RouteNames.ets
刷新文档,说明新的自适应许可证页面、路由变更以及详情视图语义,同时面向英文和中文读者,并在变更日志中记录平板支持。
  • 更新 SKILL.md、README.md、README_zh.md 和 osslibraries_ui/README.md,将引用从独立的列表/详情页面改为 OSSLibrariesLicensePage,并描述自适应行为和导航变化。
  • 更新 SKILL.md 中导出类型表,加入 OSSLibrariesLicensePage 和 LicenseDetailView,并明确 LicenseDetailParams 是详情路由参数。
  • 修订故障排查文档,提到单页面导入的要求,以及不要将其加入 main_pages.json。
  • 在变更日志中添加 v0.0.8 条目,说明大屏适配以及将列表与详情整合到 OSSLibrariesLicensePage 的 API 变更。
skills/osslibraries-usage/SKILL.md
README.md
README_zh.md
osslibraries_ui/README.md
osslibraries_ui/changelog.md
为新版本更新版本号及工具链依赖。
  • 在 UI 构建配置中将 HAR_VERSION 从 0.0.7 提升到 0.0.8,以体现平板适配版本。
  • 更新 package.json 中的 devDependencies,包括将 @deveco/deveco-cli 升级到 ^1.3.0,将 vite 切换为特定 npm alias,并提升 pnpm 的要求版本。
  • 重新生成锁文件和 msgpack 资源,并调整 oh-package/main_pages 配置以支持新的页面结构。
osslibraries_ui/BuildProfile.ets
package.json
pnpm-lock.yaml
entry/oh-package-lock.json5
entry/src/main/module.json5
entry/src/main/resources/rawfile/osslibraries.msgpack
entry_wear/src/main/resources/rawfile/osslibraries.msgpack
osslibraries_ui/oh-package.json5
osslibraries_ui/src/main/resources/base/profile/main_pages.json

Tips and commands

Interacting with Sourcery

  • 触发新的评审: 在 Pull Request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的评审评论。
  • 从评审评论生成 GitHub issue: 在评审评论下回复,要求 Sourcery 从该评论创建 issue。你也可以回复 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 Pull Request 标题: 在 Pull Request 标题中任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 Pull Request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 Pull Request 摘要: 在 Pull Request 正文任意位置写上 @sourcery-ai summary,即可在该位置生成 PR 摘要。你也可以在 Pull Request 中评论 @sourcery-ai summary 来(重新)生成摘要。
  • 生成 reviewer's guide: 在 Pull Request 中评论 @sourcery-ai guide,即可随时(重新)生成 reviewer's guide。
  • 一次性解决所有 Sourcery 评论: 在 Pull Request 中评论 @sourcery-ai resolve,即可标记所有 Sourcery 评论为已解决。如果你已经处理完所有评论且不想再看到它们,这会很有帮助。
  • 一次性忽略所有 Sourcery 评审: 在 Pull Request 中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 评审。如果你想从头开始一次新的评审,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新评审!

Customizing Your Experience

打开你的 dashboard 以:

  • 启用或禁用评审功能,例如 Sourcery 生成的 Pull Request 摘要、reviewer's guide 等。
  • 更改评审语言。
  • 添加、移除或编辑自定义评审指令。
  • 调整其他评审设置。

Getting Help

Original review guide in English

Reviewer's Guide

Refactors the OSS license UI into an adaptive single-page container with a reusable detail view, updates exports and documentation to the new route, and bumps tooling versions and HAR version for the tablet-ready release.

Sequence diagram for adaptive license page navigation from list to detail

sequenceDiagram
  actor User
  participant OSSLibrariesLicensePage
  participant LibsLoader
  participant LibsHolder
  participant NavPathStack
  participant HdsNavigation
  participant LicenseDetailView

  User->>OSSLibrariesLicensePage: open OSSLibrariesLicensePage
  OSSLibrariesLicensePage->>OSSLibrariesLicensePage: aboutToAppear()
  OSSLibrariesLicensePage->>LibsLoader: fromRawfile(context)
  LibsLoader-->>OSSLibrariesLicensePage: libs
  OSSLibrariesLicensePage->>LibsHolder: set(libs)
  OSSLibrariesLicensePage->>HdsNavigation: build() with NavBar and DetailDestination

  User->>OSSLibrariesLicensePage: tap LicenseItem
  OSSLibrariesLicensePage->>OSSLibrariesLicensePage: navigateToDetail(uniqueId)
  alt pathStack has detail
    OSSLibrariesLicensePage->>NavPathStack: replacePathByName(UI_DETAIL_PAGE_ROUTE, params)
  else no detail yet
    OSSLibrariesLicensePage->>NavPathStack: pushPathByName(UI_DETAIL_PAGE_ROUTE, params)
  end

  HdsNavigation->>OSSLibrariesLicensePage: DetailDestination(name, pageInfos)
  OSSLibrariesLicensePage->>LicenseDetailView: construct with uniqueId
  LicenseDetailView->>LicenseDetailView: aboutToAppear()
  LicenseDetailView->>LibsHolder: get()
  LibsHolder-->>LicenseDetailView: libs
  LicenseDetailView->>LicenseDetailView: findLibrary(uniqueId) and render details
Loading

File-Level Changes

Change Details Files
Extract the license detail page into a reusable, navigation-agnostic component and simplify its data access and logging.
  • Rename the detail struct to LicenseDetailView and remove @entry routing metadata so it can be embedded in HdsNavDestination.
  • Introduce a @prop uniqueId used to look up the Library via LibsHolder instead of reading router params.
  • Remove HdsNavigation wrapper and title bar configuration so the component only renders content and delegates chrome to the parent.
  • Keep the existing list layout for website, SCM link, and license content, but adjust logging tags from the old page name to the new view name.
osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage.ets
osslibraries_ui/src/main/ets/components/LicenseDetailView.ets
Introduce an adaptive container page that hosts the license list and detail view, supporting phone (stack) and large-screen (split) layouts via HdsNavigation.
  • Create OSSLibrariesLicensePage as an @entry page with a NavPathStack managed by HdsNavigation.
  • Load Libs via LibsLoader.fromRawfile, store them in LibsHolder, and track loading/error state for the nav bar content.
  • Implement a NavBar builder that shows a loading spinner, an error message, or a List of LicenseItem entries, navigating to detail only when data exists.
  • Implement a DetailDestination builder using HdsNavDestination that renders LicenseDetailView with uniqueId from LicenseDetailParams and configures title and back button behavior based on NavigationMode.
  • Add helper methods to compute detail titles and library names from LibsHolder for split and stack modes, and wire navigation via push/replacePathByName with UI_DETAIL_PAGE_ROUTE.
osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage.ets
osslibraries_ui/src/main/ets/constants/RouteNames.ets
Align public exports, route registration, and example app usage with the new adaptive license page and detail view component.
  • Update the UI HAR entrypoint to export LicenseDetailView and OSSLibrariesLicensePage instead of the removed list/detail pages.
  • Change the sample entry Index.ets to import only OSSLibrariesLicensePage, relying on the new unified route.
  • Update RouteNames.ets so UI_LIST_PAGE_ROUTE points to OSSLibrariesLicensePage and clarify documentation comments about the container and detail route semantics.
osslibraries_ui/Index.ets
entry/src/main/ets/pages/Index.ets
osslibraries_ui/src/main/ets/constants/RouteNames.ets
Refresh documentation to describe the new adaptive license page, routing changes, and detail view semantics for both English and Chinese audiences, and record the tablet support in the changelog.
  • Adjust SKILL.md, README.md, README_zh.md, and osslibraries_ui/README.md to reference OSSLibrariesLicensePage instead of separate list/detail pages and to describe the adaptive behavior and navigation changes.
  • Update the exported types table in SKILL.md to include OSSLibrariesLicensePage and LicenseDetailView and to clarify LicenseDetailParams as a detail route parameter.
  • Revise troubleshooting docs to mention the single page import requirement and not adding it to main_pages.json.
  • Add a v0.0.8 changelog entry noting large-screen adaptation and the API change consolidating the list and detail into OSSLibrariesLicensePage.
skills/osslibraries-usage/SKILL.md
README.md
README_zh.md
osslibraries_ui/README.md
osslibraries_ui/changelog.md
Update versioning and tooling dependencies for the new release.
  • Bump HAR_VERSION from 0.0.7 to 0.0.8 in the UI build profile to reflect the tablet-ready release.
  • Update devDependencies in package.json, including @deveco/deveco-cli to ^1.3.0, switching vite to a specific npm alias, and bumping the pnpm required version.
  • Regenerate lockfiles and msgpack resources and adjust oh-package/main_pages configuration to support the new page structure.
osslibraries_ui/BuildProfile.ets
package.json
pnpm-lock.yaml
entry/oh-package-lock.json5
entry/src/main/module.json5
entry/src/main/resources/rawfile/osslibraries.msgpack
entry_wear/src/main/resources/rawfile/osslibraries.msgpack
osslibraries_ui/oh-package.json5
osslibraries_ui/src/main/resources/base/profile/main_pages.json

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
Contributor

Choose a reason for hiding this comment

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

Hey - 我发现了 1 个问题,并留下了一些整体反馈:

  • navigateToDetail 中,当 pathStack.size() > 0 时总是替换现有路径,可能会在无意中丢弃其他目的地;可以考虑在决定使用 pushPathByName 还是 replacePathByName 之前,先检查栈顶路径是否已经是详情路由。
  • HdsNavigationHdsNavDestination 当前都对 background_secondary 和 MINI 标题模式进行了硬编码;如果你预期不同宿主应用的主题或标题栏行为会有所差异,建议将这些值参数化,或复用一个共享的辅助方法,以避免后续出现重复代码。
面向 AI Agents 的提示
Please address the comments from this code review:

## Overall Comments
- In `navigateToDetail`, always replacing the existing path when `pathStack.size() > 0` may unintentionally discard other destinations; consider checking whether the top path is already a detail route before deciding between `pushPathByName` and `replacePathByName`.
- Both `HdsNavigation` and `HdsNavDestination` currently hard-code `background_secondary` and MINI title modes; if you expect theming or title-bar behavior to vary per host app, consider parameterizing these values or reusing a shared helper to avoid later duplication.

## Individual Comments

### Comment 1
<location path="skills/osslibraries-usage/SKILL.md" line_range="268" />
<code_context>
-| `LicenseDetailParams`           | Detail page route params interface, field `uniqueId: string` |
+| `LicenseDetailParams`           | Detail route params interface, field `uniqueId: string`      |

 Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE`); host apps should import and reuse these constants instead of string literals.

</code_context>
<issue_to_address>
**suggestion:** Consider clarifying how the `UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE` constants relate to the new single `OSSLibrariesLicensePage`.

Since the routes are now served by a single adaptive `OSSLibrariesLicensePage`, this line referencing separate `UI_LIST_PAGE_ROUTE` and `UI_DETAIL_PAGE_ROUTE` could be clearer. Please indicate whether both constants now resolve to the same page or if one is deprecated, so integrators understand how to use them correctly.

Suggested implementation:

```
| `OSSLibrariesLicensePage`       | Adaptive license page used for both list and detail routes   |

```

```
 Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE`); host apps should import and reuse these constants instead of string literals. Both route constants currently resolve to the same adaptive `OSSLibrariesLicensePage` component: `UI_LIST_PAGE_ROUTE` is intended for the main license list entry point, while `UI_DETAIL_PAGE_ROUTE` is used for deep-linking into a specific library's detail. The routing layer renders the same page in both cases, and `UI_DETAIL_PAGE_ROUTE` remains supported for backward compatibility with existing integrations.

```
</issue_to_address>

Sourcery 对开源项目免费——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据这些反馈改进后续评审。
Original comment in English

Hey - I've found 1 issue, and left some high level feedback:

  • In navigateToDetail, always replacing the existing path when pathStack.size() > 0 may unintentionally discard other destinations; consider checking whether the top path is already a detail route before deciding between pushPathByName and replacePathByName.
  • Both HdsNavigation and HdsNavDestination currently hard-code background_secondary and MINI title modes; if you expect theming or title-bar behavior to vary per host app, consider parameterizing these values or reusing a shared helper to avoid later duplication.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `navigateToDetail`, always replacing the existing path when `pathStack.size() > 0` may unintentionally discard other destinations; consider checking whether the top path is already a detail route before deciding between `pushPathByName` and `replacePathByName`.
- Both `HdsNavigation` and `HdsNavDestination` currently hard-code `background_secondary` and MINI title modes; if you expect theming or title-bar behavior to vary per host app, consider parameterizing these values or reusing a shared helper to avoid later duplication.

## Individual Comments

### Comment 1
<location path="skills/osslibraries-usage/SKILL.md" line_range="268" />
<code_context>
-| `LicenseDetailParams`           | Detail page route params interface, field `uniqueId: string` |
+| `LicenseDetailParams`           | Detail route params interface, field `uniqueId: string`      |

 Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE`); host apps should import and reuse these constants instead of string literals.

</code_context>
<issue_to_address>
**suggestion:** Consider clarifying how the `UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE` constants relate to the new single `OSSLibrariesLicensePage`.

Since the routes are now served by a single adaptive `OSSLibrariesLicensePage`, this line referencing separate `UI_LIST_PAGE_ROUTE` and `UI_DETAIL_PAGE_ROUTE` could be clearer. Please indicate whether both constants now resolve to the same page or if one is deprecated, so integrators understand how to use them correctly.

Suggested implementation:

```
| `OSSLibrariesLicensePage`       | Adaptive license page used for both list and detail routes   |

```

```
 Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETAIL_PAGE_ROUTE`); host apps should import and reuse these constants instead of string literals. Both route constants currently resolve to the same adaptive `OSSLibrariesLicensePage` component: `UI_LIST_PAGE_ROUTE` is intended for the main license list entry point, while `UI_DETAIL_PAGE_ROUTE` is used for deep-linking into a specific library's detail. The routing layer renders the same page in both cases, and `UI_DETAIL_PAGE_ROUTE` remains supported for backward compatibility with existing integrations.

```
</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 skills/osslibraries-usage/SKILL.md Outdated
- 修复了 navigateToDetail 方法中的页面覆盖逻辑,使其更加安全
- 添加了对页面栈中详情页状态的准确判断
- 更新了 SKILL.md 中关于路由名称使用的详细说明
- 发布 v0.0.9 版本
- 将修复类型从 bug fix 调整为代码重构优化
- 提升 navigateToDetail 函数的安全性和稳定性
- 改进覆盖逻辑的实现方式以增强健壮性
@composable-tu
composable-tu merged commit 945d75b into main Aug 16, 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