Skip to content

release: prepare v1.3.2 stability fixes - #35

Merged
LangLang03 merged 3 commits into
masterfrom
dev
Sep 25, 2026
Merged

LangLang03 merged 3 commits into
masterfrom
dev

Conversation

@LangLang03

@LangLang03 LangLang03 commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare v1.3.2 with fixes for the Skills store duplicate-key crash, model-list crash after saving, long-conversation UI stalls, exception logging, and status-bar overlap. No issue number was provided for this change.

User-visible behavior

  • The Skills store handles repeated skill slugs without crashing.
  • Saving a model refreshes the list without remounting the navigation root; model cards also have unique sibling keys.
  • Chat scrolling, taps, and streaming avoid repeated long-history copies and context calculations.
  • The app records Java and C++ error events, and HuxerUI keeps page content inside the system safe area.
  • Android version advances to 1.3.2 (code 36); Chinese release notes are in update.md.

Screenshots or recordings

Not captured. Emulator UI verification was skipped at the user's request for this release.

Validation

  • GoogleTest suite passes with Ninja and -j8 (120/120).
  • Fake AI server tests pass (29/29).
  • Android lint passes.
  • Android debug build succeeds.
  • Device or emulator verification explained above; the changed UI paths were not visually checked.

Commands and environment used:

cmake --build build/tests-ninja --parallel 8
ctest --test-dir build/tests-ninja --output-on-failure -j8
(cd tools && python3 -m unittest test_fake_ai_server.py -q)
./platform/android/gradlew -p platform/android :app:lintDebug :app:assembleDebug --max-workers=8
./platform/android/gradlew -p platform/android :app:testDebugUnitTest --max-workers=8 --quiet

Design and safety checklist

  • Domain, application, infrastructure, platform, and presentation responsibilities remain separated.
  • New behavior uses existing services and state; no UI extension chain was added.
  • New or changed behavior has GoogleTest coverage for every UI path. Skill slug deduplication has a focused native test; UI navigation paths were build-checked.
  • No credential, signing key, personal data, generated build output, or incompatible third-party code is included.
  • User-facing text is available in both English and Chinese where applicable.
  • UI changes have been visually checked. Skipped at the user's request for this release.

CLA — required

CLA Signature: @LangLang03

Sourcery 摘要

通过强化列表渲染和 Android 存储处理、提升长对话性能,并添加安全的错误日志记录和系统栏管理,为 v1.3.2 稳定版本发布做准备。

错误修复:

  • 防止因重复的 Skills 条目以及不唯一的模型或技能列表键导致崩溃。
  • 修复文档树选择下外部 Android 工作区目录的解析,并改进相关权限处理。
  • 保存模型后刷新时,防止模型列表导航组件重新挂载。
  • 通过避免重复复制会话记录和计算上下文,保持长对话交互的响应性。

改进:

  • 通过 HuxerUI 集中处理 Android 窗口安全区域,并移除冗余的手动内边距管理。
  • 添加注重隐私的 Java 和 C++ 错误事件日志记录,并支持平台日志和持久化应用日志。
  • 改进 Skills 商店的失败处理和重试行为,以应对服务调用或资源解码抛出异常的情况。

构建:

  • 将 Android 版本更新至 1.3.2,版本号为 36,并添加 JUnit 测试依赖。

文档:

  • 添加仓库开发指南,并记录 v1.3.2 中文版发布说明。

测试:

  • 为重复 Skills slug 处理添加原生测试覆盖,并为安全的本地目录解析、路径遍历拒绝和符号链接保护添加 Android 测试。
Original summary in English

Summary by Sourcery

Prepare the v1.3.2 stability release by hardening list rendering and Android storage handling, improving long-conversation performance, and adding safe error logging and system-bar management.

Bug Fixes:

  • Prevent crashes caused by duplicate Skills entries and non-unique model or skill list keys.
  • Fix external Android workspace directory resolution for document-tree selections and improve related permission handling.
  • Prevent model-list navigation remounts when refreshing after model saves.
  • Keep long-conversation interactions responsive by avoiding repeated transcript copying and context calculations.

Enhancements:

  • Centralize Android window safe-area handling through HuxerUI and remove redundant manual inset management.
  • Add privacy-conscious Java and C++ error-event logging with platform and persistent application logs.
  • Improve Skills store failure handling and retry behavior when service calls or asset decoding throw exceptions.

Build:

  • Advance the Android release to version 1.3.2 with version code 36 and add JUnit test dependencies.

Documentation:

  • Add repository development guidelines and document the v1.3.2 Chinese release notes.

Tests:

  • Add native coverage for duplicate Skills slug handling and Android tests for safe local-directory resolution, traversal rejection, and symlink protection.

@sourcery-ai

sourcery-ai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

审查者指南

此版本增强了 Skills 和模型列表的渲染逻辑,以防止重复键崩溃;缓存长对话中的高开销计算;集中处理 Android 安全区域;新增经过清理的 Java/C++ 错误日志记录和安全的异步外部目录解析;并将 Android 版本更新至 v1.3.2,同时补充文档和测试。

安全外部目录解析的时序图

sequenceDiagram
    participant User
    participant ProjectWorkspaceCoordinator
    participant StoragePermissionService
    participant AndroidStoragePermissionModule
    participant Filesystem

    User->>ProjectWorkspaceCoordinator: OpenExternalProject()
    ProjectWorkspaceCoordinator->>StoragePermissionService: ResolveLocalDirectory(FileReference)
    StoragePermissionService->>AndroidStoragePermissionModule: invoke resolveLocalDirectory
    AndroidStoragePermissionModule->>Filesystem: resolve(volumeRoot, relative)
    Filesystem-->>AndroidStoragePermissionModule: readable writable directory path
    AndroidStoragePermissionModule-->>StoragePermissionService: path or permission-required error
    StoragePermissionService-->>ProjectWorkspaceCoordinator: StorageDirectoryPathResult
    ProjectWorkspaceCoordinator->>ProjectWorkspaceCoordinator: RegisterExternalProject(path, name)
Loading

经过清理的异常日志记录时序图

sequenceDiagram
    participant JavaRuntime
    participant LineCodeLogger
    participant CppRuntime
    participant AppLogger
    participant ErrorLogs

    JavaRuntime->>LineCodeLogger: record(context, event, error)
    LineCodeLogger->>ErrorLogs: write Java event and stack locations
    CppRuntime->>AppLogger: LogAppError(event)
    AppLogger->>ErrorLogs: write C++ event identifier
    AppLogger-->>CppRuntime: recover if persistence fails
Loading

长对话渲染缓存流程图

flowchart TD
    A[Conversation recomposition] --> B[Read session messages and revision]
    B --> C{Presentation cache still valid?}
    C -- No --> D[BuildConversationPresentationMessages]
    D --> E[Update presentation cache]
    C -- Yes --> E
    E --> F{Context snapshot cache still valid?}
    F -- No --> G[SnapshotContext]
    G --> H[Update context cache]
    F -- Yes --> H
    H --> I[Render chat, scrolling, taps, and streaming]
Loading

文件级变更

变更 详细信息 文件
增强 Skills 存储解码和渲染逻辑,以防止重复数据和运行时故障。
  • 按 slug 对 skills 去重,同时保留第一条记录。
  • 为卡片键添加索引限定,使重复 slug 不会发生冲突。
  • 捕获并记录目录、账户和图像解码异常,并显式处理重试/错误状态。
  • 新增专门针对重复 slug 的原生回归测试。
src/infrastructure/skill_hub_codec.cpp
src/presentation/screens/skill_store_screen.cpp
tests/skill_services_tests.cpp
使模型列表刷新由状态驱动,而无需重新挂载导航根节点。
  • 将刷新版本传入列表内容,并根据该状态触发重新加载。
  • 使用稳定的导航组合替代根键变更。
  • 为模型卡片添加索引限定键。
src/presentation/screens/model_list_screen.cpp
src/presentation/screens/model_list_screen.h
src/presentation/screens/model_management_screen.cpp
通过复用不可变的展示数据和上下文数据,减少长对话 UI 的工作量。
  • 修改上下文计算,使其接受 spans,并避免临时 vector 副本。
  • 通过对话和版本/消息身份检查,在重组过程中缓存合并后的对话消息。
  • 缓存上下文快照,同时考虑生成状态、token 设置和推理偏好。
src/domain/context_usage.cpp
src/domain/context_usage.h
src/presentation/components/chat_screen.cpp
使用 HuxerUI 安全区域布局替代自定义 Android 插入区域处理。
  • 将应用窗口切换为 SafeArea 内容模式。
  • 移除 Android 窗口插入区域端口、实现和注册代码,以及抽屉/底部表单中定制的插入区域布局。
  • 使用不透明的状态栏背景,并在框架管理的安全区域下使用固定的底部表单间距。
src/app.cpp
src/application/ports/window_insets.h
src/infrastructure/android_window_insets.cpp
src/infrastructure/android_window_insets.h
src/presentation/components/chat_overlays.cpp
src/presentation/components/drawer.cpp
platform/android/app/src/main/java/cn/lineai/MainActivity.java
添加跨层异常日志记录,并扩展 Android 外部目录解析功能。
  • 将经过清理的 Java 未捕获异常/平台异常位置和原生事件标识持久化到 error_logs 下。
  • 链接 Android 日志库,并从应用数据目录初始化原生日志记录器。
  • 异步解析文档树 URI,将其解析为已验证的可读/可写文件系统目录,包括可移除卷。
  • 拒绝路径遍历、格式错误的片段和符号链接逃逸;新增路径解析 JVM 测试。
  • 通过存储端口和项目工作区流程传递新的目录解析能力。
CMakeLists.txt
src/infrastructure/app_logger.cpp
src/infrastructure/app_logger.h
src/app/app_root.cpp
platform/android/app/src/main/java/cn/lineai/LineCodeLogger.java
platform/android/app/src/main/java/cn/lineai/MainActivity.java
platform/android/app/src/main/java/cn/lineai/skillhub/LineCodeSkillHubPlatformModule.java
src/application/ports/storage_permission.h
src/infrastructure/android_storage_permission.cpp
platform/android/app/src/main/java/cn/lineai/storage/LineCodeStoragePermissionModule.java
platform/android/app/src/test/java/cn/lineai/storage/LocalDirectoryPathTest.java
src/presentation/project_workspace_presentation.cpp
准备 Android 1.3.2 版本发布,并记录仓库/发布流程。
  • 将 versionCode 更新为 36,将 versionName 更新为 1.3.2。
  • 添加中文发布说明,涵盖稳定性、性能、日志记录、安全区域和版本变更。
  • 记录项目结构、所需工具链、验证命令、测试、代码风格和发布规范。
platform/android/app/build.gradle
update.md
AGENTS.md

提示和命令

与 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 release hardens Skills and model-list rendering against duplicate-key crashes, caches expensive long-conversation computations, centralizes Android safe-area handling, adds sanitized Java/C++ error logging and secure asynchronous external-directory resolution, and updates the Android release to v1.3.2 with documentation and tests.

Sequence diagram for secure external directory resolution

sequenceDiagram
    participant User
    participant ProjectWorkspaceCoordinator
    participant StoragePermissionService
    participant AndroidStoragePermissionModule
    participant Filesystem

    User->>ProjectWorkspaceCoordinator: OpenExternalProject()
    ProjectWorkspaceCoordinator->>StoragePermissionService: ResolveLocalDirectory(FileReference)
    StoragePermissionService->>AndroidStoragePermissionModule: invoke resolveLocalDirectory
    AndroidStoragePermissionModule->>Filesystem: resolve(volumeRoot, relative)
    Filesystem-->>AndroidStoragePermissionModule: readable writable directory path
    AndroidStoragePermissionModule-->>StoragePermissionService: path or permission-required error
    StoragePermissionService-->>ProjectWorkspaceCoordinator: StorageDirectoryPathResult
    ProjectWorkspaceCoordinator->>ProjectWorkspaceCoordinator: RegisterExternalProject(path, name)
Loading

Sequence diagram for sanitized exception logging

sequenceDiagram
    participant JavaRuntime
    participant LineCodeLogger
    participant CppRuntime
    participant AppLogger
    participant ErrorLogs

    JavaRuntime->>LineCodeLogger: record(context, event, error)
    LineCodeLogger->>ErrorLogs: write Java event and stack locations
    CppRuntime->>AppLogger: LogAppError(event)
    AppLogger->>ErrorLogs: write C++ event identifier
    AppLogger-->>CppRuntime: recover if persistence fails
Loading

Flow diagram for cached long-conversation rendering

flowchart TD
    A[Conversation recomposition] --> B[Read session messages and revision]
    B --> C{Presentation cache still valid?}
    C -- No --> D[BuildConversationPresentationMessages]
    D --> E[Update presentation cache]
    C -- Yes --> E
    E --> F{Context snapshot cache still valid?}
    F -- No --> G[SnapshotContext]
    G --> H[Update context cache]
    F -- Yes --> H
    H --> I[Render chat, scrolling, taps, and streaming]
Loading

File-Level Changes

Change Details Files
Harden Skills store decoding and rendering against duplicate data and runtime failures.
  • Deduplicate skills by slug while preserving the first entry.
  • Add index-qualified card keys so repeated slugs cannot collide.
  • Catch and record catalog, account, and image-decoding exceptions, with explicit retry/error state handling.
  • Add a focused native duplicate-slug regression test.
src/infrastructure/skill_hub_codec.cpp
src/presentation/screens/skill_store_screen.cpp
tests/skill_services_tests.cpp
Make model-list refreshes state-driven without remounting the navigation root.
  • Pass a refresh revision into list content and trigger reloads from that state.
  • Replace root-key changes with stable navigation composition.
  • Add index-qualified model card keys.
src/presentation/screens/model_list_screen.cpp
src/presentation/screens/model_list_screen.h
src/presentation/screens/model_management_screen.cpp
Reduce long-conversation UI work by reusing immutable presentation and context data.
  • Change context calculations to accept spans and avoid temporary vector copies.
  • Cache merged conversation messages across recompositions using conversation and revision/message identity checks.
  • Cache context snapshots while accounting for generation state, token settings, and reasoning preferences.
src/domain/context_usage.cpp
src/domain/context_usage.h
src/presentation/components/chat_screen.cpp
Replace custom Android inset handling with HuxerUI safe-area layout.
  • Switch the application window to SafeArea content mode.
  • Remove the Android window-insets port, implementation, registration, and bespoke drawer/sheet inset layouts.
  • Use an opaque status-bar backdrop and fixed sheet spacing under the framework-managed safe area.
src/app.cpp
src/application/ports/window_insets.h
src/infrastructure/android_window_insets.cpp
src/infrastructure/android_window_insets.h
src/presentation/components/chat_overlays.cpp
src/presentation/components/drawer.cpp
platform/android/app/src/main/java/cn/lineai/MainActivity.java
Add cross-layer exception logging and expand Android external-directory resolution.
  • Persist sanitized Java uncaught/platform exception locations and native event identifiers under error_logs.
  • Link Android's log library and initialize the native logger from application data directories.
  • Resolve document-tree URIs asynchronously to verified readable/writable filesystem directories, including removable volumes.
  • Reject traversal, malformed segments, and symlink escapes; add JVM tests for path resolution.
  • Propagate the new directory-resolution capability through the storage port and project workspace flow.
CMakeLists.txt
src/infrastructure/app_logger.cpp
src/infrastructure/app_logger.h
src/app/app_root.cpp
platform/android/app/src/main/java/cn/lineai/LineCodeLogger.java
platform/android/app/src/main/java/cn/lineai/MainActivity.java
platform/android/app/src/main/java/cn/lineai/skillhub/LineCodeSkillHubPlatformModule.java
src/application/ports/storage_permission.h
src/infrastructure/android_storage_permission.cpp
platform/android/app/src/main/java/cn/lineai/storage/LineCodeStoragePermissionModule.java
platform/android/app/src/test/java/cn/lineai/storage/LocalDirectoryPathTest.java
src/presentation/project_workspace_presentation.cpp
Prepare the Android 1.3.2 release and document repository/release procedures.
  • Bump versionCode to 36 and versionName to 1.3.2.
  • Add Chinese release notes covering stability, performance, logging, safe-area, and version changes.
  • Document project structure, required toolchain, validation commands, testing, style, and release conventions.
platform/android/app/build.gradle
update.md
AGENTS.md

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.

嘿——我已经审阅了你的更改,整体看起来很棒!

Sourcery 评估

需要人工审阅。 Android 存储树桥接层可以将解析后的目录持久化到外部项目配置中,而不正确的 URI 到文件系统映射可能会导致后续项目操作指向错误的用户目录;即使回滚,也不会移除已经写入的注册信息或日志。其余的 UI、缓存和诊断更改通常会表现为可逆的运行时错误。


Sourcery 对开源项目免费——如果你喜欢我们的审阅,请考虑分享给他人 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. The Android storage-tree bridge can persist a resolved directory into the external-project configuration, and an incorrect URI-to-filesystem mapping could make later project operations target the wrong user directory; reverting would not remove registrations or logs already written. The remaining UI, caching, and diagnostic changes would normally be reversible runtime bugs.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@LangLang03
LangLang03 merged commit b564332 into master Sep 25, 2026
5 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