Skip to content
Jarvis Hub
Back to About

Open-source contributions

Bug fixes, features and documentation merged into projects I use and contribute to.

149 merged PRs across 12 repositories

Contributed repositories

149 merged PRs

  • fix(h5): report actual Audio playback position

    Files
    2
    Additions
    +22
    Deletions
    −1
    Commits
    2
    Comments
    4
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19707

    这个 PR 做了什么?

    Audio timeupdate 把 duration 同时用于 currentTime,120 秒音频播放到 12 秒时仍上报 120。

    读取实际 currentTime,并补组件进度回归。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    Summary by CodeRabbit

    • Bug 修复
      • 修正音频播放进度事件中的当前播放时间,使其正确反映音频的实际播放位置。
      • 补充测试,验证播放时间和音频时长的事件数据正确。

    验证结果

    Stencil spec 全套 127 项测试、35 个快照通过。

    View discussion on GitHub
  • docs(service): correct realtime image capability guidance

    Files
    2
    Additions
    +2
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    This pull request includes changes prepared by Codex using gpt-6.1-sol on behalf of @Jarvis636431.

    Summary

    The realtime guide still says image attachments are unavailable, contradicting its image-input instructions and the current availability response. Update the English and Simplified Chinese introductions to direct clients to the selected model's accepts_images, supported_image_types and max_images_per_input capabilities.

    Related issue

    None; this is a focused correction to existing documentation.

    Validation

    Verified the guidance against Service availability and provider capability handling. Documentation source and bundled Service documentation tests passed (22 tests), and the changed Markdown passed formatting checks. No runtime behavior changes.

    make docs-build stopped during dependency installation because the committed SheetJS tarball lockfile entry lacks integrity metadata (ERR_PNPM_MISSING_TARBALL_INTEGRITY); the site build and link checks did not run. The local Node version is also 22, below the required 24.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(harness): preserve short inputs during context recovery

    Files
    2
    Additions
    +26
    Deletions
    −4
    Commits
    2
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    This pull request includes changes prepared by Codex using gpt-6.2-sol on behalf of @Jarvis636431.

    This pull request includes changes prepared by a13n-harness-ui using gpt-6.2-sol on behalf of @Wh1isper.

    Summary

    A run that overflows both its primary request and compaction can resume without its original task. With a 2,048-character recovery budget, a long retained-history path can leave enough room for a complete short input while the 64-character excerpt threshold still causes Harness to skip it.

    Keep a complete nonempty fragment whenever it fits. Empty fragments do not consume the prompt budget or displace a later user correction. Truncated excerpts still require at least 64 characters, and the recovery prompt still fits the configured budget.

    Related issue

    Refs #1305

    Validation

    The new regression case fails before the fix. It drives both overflow attempts with a scripted model and verifies that the resumed request contains the original task and the complete history path within the minimum budget. The existing path-omission case also retains the task. All 241 tests across context recovery, explicit and background compaction, and output-limit recovery passed locally.

    The follow-up regression test verifies that an empty task does not displace a user correction. It fails before the follow-up fix; all 49 context recovery tests pass with it.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated. The fix follows the existing recovery budget and preservation contract.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented. No API or state format changes.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • feat(h5): 支持 getRecorderManager 网页录音

    Files
    3
    Additions
    +436
    Deletions
    −11
    Commits
    2
    Comments
    4
    Review comments
    3
    Merged by
    Single-Dancer
    PR description

    Closes #19667

    这个 PR 做了什么?

    使用 getUserMedia 和 MediaRecorder 实现录音管理器。支持录音事件、时长限制、暂停恢复和录音结束后释放麦克风。默认使用浏览器格式,显式请求不支持的格式会触发 onError。首版暂不支持 MP3 分帧或小程序系统中断事件。

    4 个 Jest 用例通过。Chrome 157 模拟麦克风验证了暂停恢复、麦克风释放和录音 Blob URL 通过 Taro.uploadFile 上传。

    这个 PR 是什么类型?

    • 新功能 (Feature)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    Summary by CodeRabbit

    • 新功能
      • H5 支持录音管理,可开始、暂停、恢复和停止录音,并获取录音时长、文件大小及临时文件地址。
      • 新增对录音格式、时长、麦克风权限及浏览器能力的校验;录音失败时提供错误回调。
    • 文档
      • 补充 H5 平台支持说明及录音权限、格式和临时文件地址的使用说明。
    • 测试
      • 覆盖录音控制、异常处理及停止录音后的资源释放等场景。
    View discussion on GitHub
  • feat(h5): 支持图片和视频混合预览

    Files
    7
    Additions
    +480
    Deletions
    −9
    Commits
    5
    Comments
    7
    Review comments
    15
    Merged by
    Single-Dancer
    PR description

    Closes #19665

    这个 PR 做了什么?

    复用 H5 Swiper。支持混合媒体、初始索引、封面、关闭和路由清理。长按菜单及小程序 referrerPolicy 暂未接入。previewMedia 和 previewImage 的 7 项 Jest 测试通过。

    这个 PR 是什么类型?

    • 新功能 (Feature)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    Summary by CodeRabbit

    • 新功能
      • H5 现支持预览图片和视频,可指定初始项目,并通过键盘或触摸切换;视频使用浏览器原生控件。
      • 预览期间背景内容不可交互,焦点限制在预览区域;关闭或路由变化时退出预览并恢复焦点。
      • 切换项目时暂停非当前视频,关闭预览时清理视频资源;来源为空或初始索引无效时会返回错误且不显示预览。
    • 问题修复
      • 修复 Swiper 从非第一页切换到第一页时,切换事件未正确报告当前页的问题。
    • 文档
      • 补充 H5 视频预览的支持说明及功能限制。

    浏览器回归验证

    Chrome 157 实测从初始视频页切回图片页,视频随切换暂停。修复了 Swiper 从非零初始页切回第 0 页时漏发 change 的问题,并添加组件回归测试。Stencil spec 和 H5 完整测试通过。

    View discussion on GitHub
  • docs: distinguish contributor Node from the CLI minimum

    Files
    1
    Additions
    +7
    Deletions
    −4
    Commits
    3
    Comments
    8
    Review comments
    0
    Merged by
    cixzhang
    PR description

    Reader impact

    The README tells contributors that Node 22 is enough to set up the workspace. A contributor following that guide can pick a runtime different from the one the repository develops and tests with.

    Source of truth

    Correction

    Point contributors to the workspace pin and state the CLI runtime minimum separately.

    Evidence

    Both links resolve to files in the repository. The workspace pin reports Node 24.22.1 and the CLI manifest reports >=22.13.0.

    Scope

    Components: repository README

    • This PR changes documentation only.
    • Runtime, API, visual, and policy changes were removed or split.
    • Public text and artifacts contain no internal Meta context.

    Testing

    • Compared the README with .nvmrc, the CI setup action, and the CLI package manifest.
    • Ran Prettier and git diff --check.
    View discussion on GitHub
  • fix(useInfiniteScroll): support column-reverse scroll origins

    Files
    4
    Additions
    +242
    Deletions
    −2
    Commits
    3
    Comments
    1
    Review comments
    0
    Merged by
    crazylxr
    PR description

    🤔 This is a ...

    • Bug fix
    • Site / documentation update
    • Test Case

    🔗 Related issue link

    Fixes #2948

    💡 Background and solution

    In a flex container with flex-direction: column-reverse, scrolling towards the list end produces a negative scrollTop. useInfiniteScroll treats that value as a normal positive offset, so automatic loading does not trigger correctly and restoring the position after prepending uses the wrong sign.

    Detect flex/inline-flex column-reverse containers, normalize the scroll distance for the existing threshold and movement checks, and restore the signed offset after prepending. Loading continues to follow list order: bottom appends at the list end (visual top in a reversed column), while top prepends at the list start (visual bottom). Document this in English and Chinese. No new option, dependency or change to normal-layout list ordering.

    Validation

    • Added 12 regression cases: 6 fail on unchanged master and all pass with this fix. Covers normal/reversed/block layouts, thresholds, movement direction, initial/restored positions, pending/no-more guards, resizing and layout changes.
    • Focused suites: 52 tests passed.
    • Full workspace tests, normal and REACT_MODE=strict: 96 files / 478 tests passed in each mode (Node 24.21.0).
    • Both packages' TypeScript checks passed; full workspace build passed (Node 24.3.0 / pnpm 10.12.4).
    • Real-browser comparison using bundled hook source reproduced missing loads on master and verified loading with the fix. Prepending three 50px rows restores reverse scrollTop from -20 to -170 with 0px anchor displacement, with browser scroll anchoring disabled. Normal-layout controls passed. Other browser engines and mobile devices were not tested.
    • Source coverage: 100% statements/functions/lines, 94.20% branches. Existing uncovered branches remain. Coverage emits the existing Vitest/coverage-provider version mismatch warning.
    • New test Biome check, source formatting and git diff --check passed. The source's existing exhaustive-dependencies lint error for isNoMore remains; that memo was not changed. Build emits existing toolchain warnings.

    AI assistance was used for implementation and validation.

    📝 Changelog

    LanguageChangelog
    🇺🇸 EnglishFix automatic loading and scroll-position restoration in useInfiniteScroll for column-reverse flex containers.
    🇨🇳 Chinese修复 useInfiniteScroll 在 column-reverse 弹性布局中的自动加载判断和滚动位置恢复。

    ☑️ Self Check before Merge

    • Doc is updated/provided or not needed
    • Demo is updated/provided or not needed
    • TypeScript definition is updated/provided or not needed
    • Changelog is provided or not needed
    View discussion on GitHub
  • test(harness): cover model switch context recovery

    Files
    1
    Additions
    +74
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    Before this change, the harness lacked regression coverage for deterministic context recovery after switching from a 128k model to an 8k model when both the main request and compaction overflow. This adds a test-only scenario covering that path and asserting that user intent and tool references survive without replaying tools.

    Production behavior is unchanged; this PR only strengthens the recovery contract exercised by the harness.

    Related issue

    Refs #1305

    Validation

    The targeted context-recovery file passed all 47 tests. The complete harness suite also passed in shards: 5,864 non-skipped tests passed and 135 were skipped.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • test(template): cover backend-only App packaging

    Files
    2
    Additions
    +20
    Deletions
    −2
    Commits
    1
    Comments
    4
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    • add a backend-only template CI matrix entry using surface=backend-only, without Node.js or pnpm setup
    • document the workspace API-key curl example immediately after the make dev and App activation instructions
    • retain the upstream Service 0.2.1 flow and remove implementation overlap with #1696

    Validation

    • template contract tests: 15 passed
    • generated backend-only project: make verify passed, including 2 installed-wheel tests
    • rebuilt the backend-only wheel from its sdist and ran make test-wheel: 2 tests passed

    Related to #1647

    View discussion on GitHub
  • docs(template): fix App authoring guide link

    Files
    2
    Additions
    +2
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    • fix the escaped Markdown link to the App authoring guide in the generated README
    • extend the generation contract to verify that the guide renders as a clickable link

    Related to #1646

    Validation

    • Confirmed both generation scenarios fail the new assertion before the README fix
    • uv run --python 3.13 --no-project --with-requirements requirements-dev.txt pytest tests -q (12 passed)
    View discussion on GitHub
  • docs(template): fix Service development guide link

    Files
    2
    Additions
    +3
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    • fix the escaped Markdown link to the Service local development guide in the generated App plugin README
    • add template generation coverage so the guide renders as a clickable link

    Related to #1646

    Validation

    • uv run --python 3.13 --no-project --with-requirements requirements-dev.txt pytest tests -q (12 passed)
    View discussion on GitHub
  • feat(h5): 支持创建 Web Audio 上下文

    Files
    3
    Additions
    +73
    Deletions
    −37
    Commits
    4
    Comments
    7
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    Closes #19663

    这个 PR 做了什么?

    接入浏览器原生 AudioContext,并对齐影响 H5 使用的公开类型。定向 Jest 测试覆盖每次新建上下文和不支持时的同步错误。

    这个 PR 是什么类型?

    • 新功能 (Feature)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    Summary by CodeRabbit

    • 新功能
      • H5 现支持创建浏览器原生 Web Audio 上下文;若浏览器不支持 AudioContext,调用时会同步报错。
      • 更新 Web Audio API 的类型定义与参数要求,包括音频缓冲区复制、上下文属性及多项音频处理方法。
    • 文档
      • 补充 H5 使用说明:播放音频时,可能需要在用户交互后调用 resume()。

    浏览器回归验证

    Chrome 157 验证了用户手势后恢复上下文、振荡器和增益节点连接、WAV 解码的 Promise 与成功回调,以及关闭上下文。

    View discussion on GitHub
  • docs(envd): document VM startup timeout in Chinese

    Files
    1
    Additions
    +4
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    The Simplified Chinese Envd configuration reference omitted the VM startup timeout controls documented in the canonical English page. This adds A13N_ENVD_VM_STARTUP_TIMEOUT_MS and vm_startup_timeout_ms, including the default and positive-value requirement, the Device-wide admission budget, cold-cache configuration examples, client readiness timeout guidance, cleanup behavior, and the unchanged native Session admission and Session lifetime semantics.

    This is a documentation-only synchronization with no runtime behavior or compatibility changes.

    Related issue

    None; this is a routine documentation synchronization.

    Validation

    Ran make docs-build: localization tests, the production build, link checks across 1,049 pages, and export tests all passed.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • docs(harness-ui): sync Chinese Sidekick and startup guidance

    Files
    2
    Additions
    +2
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    The Simplified Chinese Harness UI guide still directed Sidekick configuration to Settings → General and omitted the startup behavior for freshly loaded valid configuration. This updates the path to Settings → Agents → Sidekick and explains that startup uses the installed version's defaults without rejecting the configuration because an older accepted snapshot differs, while historical Run captures remain unchanged.

    This is a documentation-only synchronization with no runtime behavior or compatibility changes.

    Related issue

    None; this is a routine documentation synchronization.

    Validation

    Ran make docs-build: localization tests, the production build, link checks across 1,049 pages, and export tests all passed.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • docs(harness-ui): correct Simplified Chinese connector and chat guidance

    Files
    2
    Additions
    +6
    Deletions
    −4
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    The Simplified Chinese Harness UI documentation still described the previous GitHub Connector setup flow, omitted chat-search keyboard behavior, and said Open on host preserved unsaved buffers. Update the translation to match current behavior: saving completes setup and closes the dialog, connection tests start from the account menu, chat-search shortcuts and focus handling are documented, and host files open in a read-only preview.

    No runtime behavior or compatibility boundaries change.

    Related issue

    None; this is a focused documentation correction.

    Validation

    make docs-build passed, including localization tests, static page generation, link checks, and export tests. Both changed Markdown files passed mdformat --check --number. No runtime tests are needed for these documentation-only corrections.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(autoindex): reject wrong endpoints before catalog retries

    Files
    11
    Additions
    +189
    Deletions
    −23
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-team
    PR description

    Fixes #2942. Written by OpenAI Codex and submitted by @Jarvis636431.

    What changed

    The startup GET accepted any response except 401 or 403, even HTML from another service. The indexing and feedback paths then treated the wrong service as a candidate for catalog retries.

    Before a folder run or feedback autofill starts catalog I/O, the existing authenticated root request has a five-second deadline and checks XERJ's cluster UUID marker. The advertised Elasticsearch or OpenSearch version is independent of that marker. The endpoint diagnostic names the selected URL and points to --url. The preflight runs before the folder walk and before opening the journal. Server root response

    Both commands keep explicit --url selection. Feedback now uses the shared warning when XERJ_URL is set and --url is absent. It still renders the draft when catalog autofill is unavailable. --no-autofill skips the probe and its warning.

    Verified on macOS arm64 with Rust 1.97.1

    • I ran the checksum-verified rc.101 release against a disposable service on loopback port 9200. The service returned HTML for GET / and HTTP 503 for catalog requests. Both commands retried the catalog request and were still running at the four-second harness deadline.
    • The same fixture against the candidate made one GET / per command. autoindex exited 1 after 22 ms with the endpoint diagnostic. feedback --dry-run exited 0 after 18 ms and printed the draft. With explicit --url the environment warning was suppressed, and --no-autofill made zero requests. A dry run pointed explicitly at a real XERJ node advertising OpenSearch 2.11.0 completed successfully.
    • A loopback server that accepted the request and sent no response produced a timeout after 5.023 s, with one GET and no local state directory.
    • Five focused tests passed, covering wrong-service refusal, feedback argument precedence, redaction, map preview and auth recovery. The wrong-service regression covers both HTML and Elasticsearch-shaped JSON, checks that the two call paths each make one GET and checks that no index state directory is created.
    • cargo +1.97.1 test --locked --profile ci-test -p xerj-autoindex --no-fail-fast reported 2,029 unit tests passed, 15 failed and 2 ignored. The homepage field-report surface test also failed. I rebuilt the unmodified base separately and reproduced the same 16 failures there, with 2,027 unit tests passed. Two representative journal recovery failures passed on the candidate when TMPDIR used a physical path.
    • cargo +1.97.1 fmt --all -- --check, git diff --check and cargo +1.97.1 build --locked --release -j 32 -p xerj-autoindex passed.
    • The repository ES-YAML suite finished with 1,448 passed, 0 failed and 10 skipped across 234 files. The runner and the isolated node both exited 0.

    Scope

    The branch is independent of other PRs. The client uses the existing root wire response and applies the existing catalog retry policy after a successful probe. Local transport verification used loopback endpoints. Hosted CI will cover other platforms.

    View discussion on GitHub
  • fix(h5): 支持同步查询视频画中画状态

    Files
    3
    Additions
    +28
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19661

    这个 PR 做了什么?

    读取当前文档的 pictureInPictureElement,按公开类型同步返回布尔值。Chrome 157 原型已验证进入、退出状态,H5 window Jest 套件通过。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    Summary by CodeRabbit

    • 新功能
      • H5 现可查询标准画中画模式的状态:画中画窗口处于活动状态时返回 true,否则返回 false。
    • 文档
      • 补充了该查询能力的 H5 支持说明。
    View discussion on GitHub
  • test(console): enforce translated interface copy

    Files
    15
    Additions
    +683
    Deletions
    −32
    Commits
    3
    Comments
    3
    Review comments
    2
    Merged by
    Wh1isper
    PR description

    Summary

    Console source checks previously did not reject hard-coded interface copy, so visible messages could bypass the locale catalogs. Add source coverage for JSX text, display attributes, choice labels, notifications, and directly created errors, together with literal and locally resolved catalog-key validation. Exact file-and-text exceptions preserve commands, paths, product names, and external diagnostics without excluding directories.

    The new coverage exposed untranslated validation errors and missing Auto and Device catalog entries. Pass the existing application translator into the affected validation helpers, add the English and Simplified Chinese messages, and document the localization workflow and focused test command. Runtime i18n ownership and architecture remain unchanged.

    Related issue

    Part of #1259

    Validation

    After the final rebase, the focused i18n suite passed all 20 tests and Console TypeScript checking passed. Before that test-only rebase, the full Console suite passed with --maxWorkers=2 (213 files, 1,435 tests).

    The unrestricted local run repeatedly exposed two menu-option timing failures in the browser and environment tests; both passed in isolation and in the full two-worker run. Formatting and git diff --check also passed.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(vite-runner): await mini modifyBuildAssets hook

    Files
    2
    Additions
    +40
    Deletions
    −16
    Commits
    2
    Comments
    5
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    Closes #19657

    这个 PR 做了什么?

    Vite 小程序构建等待 modifyBuildAssets 的返回值。异步更新会写入本次产物,钩子的拒绝会使构建失败。现有同步新增资源行为也有测试覆盖。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台?

    • 所有小程序(Vite 小程序 runner)

    验证

    • 真实 Rollup 回归用例覆盖同步新增资源、异步更新产物和拒绝传播。
    • Vite runner 的 5 个套件、96 个测试通过。改动文件 ESLint 和包构建通过。

    Summary by CodeRabbit

    • 修复
      • 构建过程会等待资源处理完成,确保异步资源更新在构建结束前生效,并使最终生成的构建产物包含这些更新。
      • 资源处理失败时,构建会正确返回错误,不会将失败的资源处理结果当作成功构建。
    View discussion on GitHub
  • feat(h5): support creating and revoking buffer URLs

    Files
    3
    Additions
    +77
    Deletions
    −4
    Commits
    3
    Comments
    5
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    Closes #19659

    这个 PR 做了什么?

    H5 的 Taro.createBufferURL 从 ArrayBuffer 或 TypedArray 同步生成 Blob URL。传入子视图时,Blob 只包含视图范围内的字节。Taro.revokeBufferURL 释放生成的地址。公开类型的 H5 支持标记随实现更新。

    这个 PR 是什么类型?

    • 新功能 (Feature)

    这个 PR 涉及以下平台?

    • Web 端(H5)

    验证

    • 单元测试覆盖完整 ArrayBuffer、非零偏移的 TypedArray 视图,以及同步释放。
    • H5 全包测试、改动文件 ESLint 和生产构建通过。
    • Chrome 使用实际实现读取二进制地址,并确认释放后新的读取失败。

    Summary by CodeRabbit

    • 新功能
      • H5 端现已支持从 ArrayBuffer、typed array 及其视图创建 Blob URL,并释放不再需要的 URL。创建视图的 URL 时,仅包含该视图对应的字节内容。
    View discussion on GitHub
  • test(console): validate localized catalog messages

    Files
    3
    Additions
    +116
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    Console's catalog tests previously compared key sets, so empty translations, incompatible placeholders, and missing locale-required plural forms could pass unnoticed. The tests now validate logical messages against the English source while allowing each language to supply only the plural categories it requires. Positive and negative fixtures exercise the checker itself.

    The new validation exposed missing English and Simplified Chinese _other messages for {{count}} skills; both catalogs now include them. Runtime i18n ownership and external-text fallback remain unchanged.

    Related issue

    Part of #1259

    Validation

    Verified the focused Console i18n test file (9 tests), Console TypeScript checking, Prettier for the changed files, and git diff --check.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • test(console): cover language switching integration

    Files
    2
    Additions
    +163
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    The existing language preference tests covered visible labels and persistence, but not locale-aware formatting or the stability of active work during a language switch. This change adds integration coverage using the real Console catalogs and components for dates, compact numbers, and plural messages.

    The tests also verify that switching languages preserves the same Composer textarea and its pending draft without remounting adjacent work or replaying a submission. A production App test checks that the document's lang attribute follows the active translation in both directions. No runtime behavior is changed.

    Related issue

    Part of #1259

    Validation

    • pnpm --dir frontend --filter a13n-console test src/app.test.tsx src/features/settings/preferences.test.tsx (2 files, 8 tests)
    • pnpm --dir frontend --filter a13n-console run check
    • Prettier on both changed files
    • git diff --check

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • feat(h5): support compressImage for JPEG and static PNG

    Files
    4
    Additions
    +244
    Deletions
    −2
    Commits
    2
    Comments
    5
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    Closes #19648

    在 H5 实现 Taro.compressImage,把选图、图片处理和上传接起来。按文件内容识别 JPEG 和静态 PNG,使用 Canvas 缩放并按原格式编码,返回可以直接交给 Taro.uploadFile 的 Blob URL。

    JPEG 质量接受 0–100,默认 80。只传一边时按原比例计算另一边,两边都传时采用指定宽高。PNG 重新编码时保留透明度。请求失败、格式不支持或编码失败时通过现有失败处理结算。

    • 新功能 (Feature)
    • Web 端(H5)

    验证

    • H5 全包 Jest 测试通过,共 39 个套件、452 个用例。新增用例覆盖单边与双边尺寸、质量边界、PNG 和 APNG、HTTP 失败、编码失败及临时 URL 清理。
    • H5 源码和测试通过 ESLint,H5 生产构建通过。
    • Chrome 157 验证无后缀 Blob URL、相对路径、CORS 允许与拒绝、EXIF 方向、透明 PNG,以及压缩结果通过现有 uploadFile 完成 multipart 上传。移动 Safari 尚未验证。

    Summary by CodeRabbit

    • 新功能
      • H5 现已支持压缩 JPEG 和静态 PNG 图片,可指定压缩宽高;未指定的尺寸将按原图比例计算。
      • JPEG 图片可设置压缩质量,压缩结果保持原图片格式。
      • 图片格式不受支持、参数无效或处理失败时,将通过失败回调返回错误。
      • 压缩成功后可通过 Blob URL 获取图片;使用完毕后可释放该 URL。
    View discussion on GitHub
  • fix(h5): expose response headers as objects for file transfers

    Files
    4
    Additions
    +67
    Deletions
    −2
    Commits
    3
    Comments
    5
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    Closes #19638

    上传和下载的 onHeadersReceived 现在都返回按名称索引的响应头对象,与公开类型一致。转换保留值中的冒号,空响应头返回空对象。

    已有 H5 代码如果手动解析回调中的字符串,可以直接改为读取对象字段。回归用例覆盖两个 API 的普通和空响应头,以及取消监听。

    • 错误修复 (Bugfix)
    • Web 端(H5)

    H5 全包 Jest 测试、改动文件 ESLint 和 H5 生产构建通过。

    Summary by CodeRabbit

    • Bug 修复
      • 修正下载和上传请求的响应头回调:原始响应头会解析为键值对象,监听器可直接读取响应头字段。
      • 支持值中包含冒号的响应头,并忽略格式无效的行;空响应头和特殊名称的响应头也能作为普通对象传递。
      • 移除响应头监听器后,后续请求状态变更不会重复调用该监听器。
    View discussion on GitHub
  • fix(h5): settle pull-down refresh without a current component

    Files
    4
    Additions
    +136
    Deletions
    −20
    Commits
    2
    Comments
    4
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19642

    H5 下拉刷新请求由当前页面中已挂载的组件接收。没有组件接收时,开始和停止都通过现有失败处理结算。组件可以同步接收请求,再异步完成停止操作。

    回归用例覆盖无接收者、其他页面的监听者、当前页面异步完成和多个监听者只接收一次。

    • 错误修复 (Bugfix)
    • Web 端(H5)

    H5 全包 444 个 Jest 用例、React 组件包 88 个用例、Stencil 组件测试 125 个用例以及 H5 生产构建通过。H5 和 React 改动通过 ESLint。Stencil 文件按仓库配置忽略,强制检查结果与上游一致。

    Summary by CodeRabbit

    • 问题修复
      • 修复下拉刷新请求可能被其他页面组件错误处理的问题。现在,只有当前页面中有效的下拉刷新组件会处理开始或停止请求;没有组件可处理时,请求将返回失败结果。成功、失败及完成回调按请求结果执行。
    View discussion on GitHub
  • fix(h5): report finite download progress when length is unknown

    Files
    2
    Additions
    +34
    Deletions
    −2
    Commits
    1
    Comments
    3
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19644

    下载总长度未知或为零时,onProgressUpdate 返回 progress: 0,同时继续提供 XHR 上报的字节数。总长度可用时仍计算百分比。

    回归用例覆盖未知总长度的零字节与非零字节、总长度为零和已知总长度。

    • 错误修复 (Bugfix)
    • Web 端(H5)

    H5 全包 Jest 测试、改动文件 ESLint 和 H5 生产构建通过。

    Summary by CodeRabbit

    • Bug Fixes
      • 修正下载进度显示:仅在总大小可计算且大于零时计算百分比;否则显示为 0。
    View discussion on GitHub
  • fix(h5): reject HTTP errors in getVideoInfo

    Files
    2
    Additions
    +24
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19640

    视频元数据加载后的独立请求如果返回 HTTP 错误,getVideoInfo 现在走已有失败路径。错误信息包含状态码,读取响应体之前就会失败。

    回归用例覆盖 404、503 和失败及完成回调。现有用例同时覆盖正常响应、fetch 拒绝及视频元素加载失败。

    • 错误修复 (Bugfix)
    • Web 端(H5)

    H5 全包 Jest 测试、改动文件 ESLint 和 H5 生产构建通过。

    Summary by CodeRabbit

    • 问题修复
      • 获取视频信息时,遇到 HTTP 错误状态会返回包含状态码的失败结果,不再尝试读取响应内容。
      • 成功响应仍会正常读取并返回视频信息。
    View discussion on GitHub
  • feat(h5): support getSelectedTextRange

    Files
    3
    Additions
    +63
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19646

    在 H5 实现 Taro.getSelectedTextRange。读取聚焦的文本输入框或多行输入框的 selectionStart 和 selectionEnd,沿用现有的回调和 Promise 约定。没有可用选区的控件会进入失败处理。

    • 新功能 (Feature)
    • Web 端(H5)

    验证

    • H5 全包 Jest 测试通过,共 39 个套件、443 个用例。新增用例覆盖文本选区、位置为 0 的光标、失焦和数字输入框。
    • H5 源码和测试通过 ESLint,H5 生产构建通过。
    • 用 Chrome 157 验证实际输入框、textarea 和数字输入框的行为。

    Summary by CodeRabbit

    • 新功能
      • H5 现可获取当前聚焦的文本输入框或多行文本框中的选区范围。
      • 当输入框未聚焦或不支持读取文本选区时,会返回失败结果并触发相应回调。
    View discussion on GitHub
  • fix(h5): settle upload and download setup failures

    Files
    4
    Additions
    +101
    Deletions
    −37
    Commits
    1
    Comments
    2
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    Closes #19636

    XHR 初始化失败时,downloadFile 和 uploadFile 现在用原始错误信息拒绝 Promise,并各通知一次 fail 和 complete。初始化失败的任务仍提供任务方法,调用 abort() 不会重复通知。

    回归用例覆盖两种传输、有无回调以及初始化失败后调用任务方法。

    • 错误修复 (Bugfix)
    • Web 端(H5)

    H5 全包 Jest 测试、改动文件 ESLint 和 H5 生产构建通过。

    Summary by CodeRabbit

    • Bug 修复
      • 修复下载和上传任务初始化失败时的处理:即使任务创建过程中发生同步错误,也会触发失败和完成回调,并以错误拒绝 Promise。
      • 任务失败后仍可安全调用任务操作和事件监听方法。
    View discussion on GitHub
  • fix(h5): clean up media query observer listeners

    Files
    2
    Additions
    +168
    Deletions
    −4
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 MediaQueryObserver 在首次同步回调之后才注册监听器,使回调内的 disconnect() 无效;重复 observe() 又会覆盖旧监听器引用,导致最终 disconnect() 只能清理最后一次观察。

    本次在首次回调之前完成监听器注册,新观察替换旧观察时先移除旧监听器,停止后清空内部引用。首次回调中再次 observe() 或 disconnect() 的结果不会被外层调用覆盖;同时保留现代与旧版浏览器监听接口的兼容分支。

    同一实例重复 observe() 采用替换当前观察的语义,独立实例之间互不影响。首次状态通知仍是同步的;媒体查询描述符的解析规则保持不变。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他

    Closes #19627

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 16 个测试,覆盖现代与旧版监听接口:正常通知/停止、首次回调停止、重复观察、重复观察后停止、首次回调重入、嵌套首次回调停止、停止后重启、独立实例隔离。
    • 修复前单文件:8 failed / 8 passed;修复后:16 passed。
    • Node.js v22.14.0 下,H5 包 test:ci --watchman=false:38 suites / 422 tests 全部通过(含 coverage)。
    • Chromium 真实 MediaQueryList:10/10 检查通过,包括现代接口和旧版接口适配;通过手动派发 change 事件验证生命周期,非完整应用端到端测试。
    • 两个改动文件 eslint --no-ignore、git diff --check 通过。
    • 全工作区 pnpm build:通过(退出码 0)。

    以上为本地验证结果,GitHub CI 以本 PR 的实际流水线为准。

    Summary by CodeRabbit

    • Bug 修复
      • 修复媒体查询观察器在回调中断开或切换观察目标时,监听状态可能异常的问题。
      • 断开观察后可重新开始观察;重复断开不会继续触发状态通知。
    View discussion on GitHub
  • fix(h5): preserve descendant semantics in selector queries

    Files
    2
    Additions
    +51
    Deletions
    −4
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 select / selectAll 将 >>> 转为直接子节点选择器 >,导致包装层里的后代节点被遗漏;同时只替换第一个 >>>,使多段选择器或并集查询抛出 SyntaxError。

    本次将所有 >>> 转为普通后代组合符(空格)。例如 .outer >>> .target 现在能找到嵌套节点,.outer >>> .middle >>> .target 可以正常执行;普通 > 保持直接子节点语义。没有引入 Shadow DOM 穿透能力。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他

    Closes #19625

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 16 个回归用例,覆盖 select / selectAll、有无空格、多段 >>>、逗号并集、普通后代选择器、直接子节点选择器和无匹配结果;同时检查节点回调与 exec 回调。
    • 修复前单文件:10 failed / 12 passed;修复后:22 passed。
    • Node.js v22.14.0 下,H5 包 test:ci --watchman=false:37 suites / 422 tests 全部通过(含 coverage)。
    • Chromium 最小 DOM 验证:16/16 通过,使用本次源码和真实 DOM 查询;非完整应用端到端测试。
    • 两个改动文件 eslint --no-ignore、git diff --check 通过。
    • 全工作区 pnpm build:通过(退出码 0)。

    以上为本地验证结果,GitHub CI 以本 PR 的实际流水线为准。

    Summary by CodeRabbit

    • 问题修复
      • 修复后代选择器穿透问题:select 和 selectAll 可正确处理多个 >>>,并将其按普通后代选择器匹配。
      • 改进选择器匹配表现,涵盖多级后代、逗号分隔、普通后代和直接子级等情况。
    View discussion on GitHub
  • fix(h5): prefer scrollTop in pageScrollTo

    Files
    2
    Additions
    +16
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19621

    这个 PR 做了什么?

    同时传入数值 scrollTop 和 selector 时,按现有提示优先使用 scrollTop。数值 0 也参与此判断。仅通过选择器定位时计算 offsetTop。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台?

    • Web 端(H5)

    验证

    • 在页面容器和 Window 两种滚动模式中覆盖 scrollTop: 0 与正数,共 4 个回归用例,原实现均失败,修复后均通过。
    • H5 全包 Jest 测试 36 个套件、367 个用例通过。改动文件 ESLint、Git 空白检查及 H5 生产构建通过。
    • 构建仍有已有的 previewImage / Swiper 类型告警及 Sass 弃用告警。验证使用 Jest/JSDOM。

    Summary by CodeRabbit

    • 修复
      • 修正页面滚动定位行为:同时提供数字型滚动位置和选择器时,优先使用滚动位置,包括值为 0 的情况。
      • 同时提供数字型滚动位置和选择器时会发出警告;滚动位置为非数字且未提供选择器时,滚动目标位置为 0。
    View discussion on GitHub
  • fix(h5): report missing page scroll targets

    Files
    2
    Additions
    +94
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19619

    这个 PR 做了什么?

    在当前页面容器内解析 pageScrollTo 的选择器,避免命中保留在 DOM 中的前一页。目标缺失时通过现有失败路径结算,并保留原滚动位置。有效目标的零偏移和 offsetTop 仍可使用。

    文档里也有在当前页面找不到目标时返回失败的先例。 抖音 pageScrollTo 文档

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台?

    • Web 端(H5)

    验证

    • 14 个用例覆盖目标缺失、失效选择器、当前页面查找、同名节点、零偏移、页面根元素以及 Window 滚动的查找回退。原实现 9 个失败、5 个通过,修复后全部通过。
    • H5 全包 Jest 测试 36 个套件、377 个用例通过。改动文件 ESLint、Git 空白检查及 H5 生产构建通过。
    • 构建仍有已有的 previewImage / Swiper 类型告警及 Sass 弃用告警。验证使用 Jest/JSDOM。

    Summary by CodeRabbit

    • 问题修复
      • 使用选择器滚动时,优先在当前滚动容器内查找目标;滚动容器自身也可作为目标。
      • 页面存在多个匹配项时,优先使用当前页面内的目标;未注册页面时仍可查找文档中的目标。
      • 找不到目标或选择器无效时,滚动操作会失败,不会按偏移量继续滚动。
    View discussion on GitHub
  • fix(h5): settle interrupted page scrolls

    Files
    2
    Additions
    +117
    Deletions
    −17
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19617

    这个 PR 做了什么?

    按 Window 或页面容器记录正在运行的滚动。同一目标上的新调用取消前一个动画,并通过现有 MethodHandler.fail 结算被替代的调用。新的零时长滚动也会取消旧动画,不同容器可各自完成滚动。

    失败或完成回调存在时沿用现有回调与 Promise 约定。只使用 Promise 时,被中断的调用以 pageScrollTo:fail interrupted by another scroll 拒绝。取消回调同步发起新滚动时,最后发起的调用生效。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台?

    • Web 端(H5)

    验证

    • 9 个回归用例在原实现上均失败,修复后均通过。覆盖即时与动画滚动、回调次数、Promise 拒绝、取消回调内发起新滚动,以及独立的页面容器。
    • H5 全包 Jest 测试 36 个套件、372 个用例通过。改动文件 ESLint、Git 空白检查及 H5 生产构建通过。
    • 构建仍有已有的 previewImage / Swiper 类型告警及 Sass 弃用告警。验证使用 Jest/JSDOM。

    Summary by CodeRabbit

    • Bug 修复
      • 同一页面目标启动新的滚动时,旧滚动会以中断错误结束;配置回调时,失败和完成回调各触发一次,不触发成功回调。未配置失败回调时,Promise 会被拒绝。
      • 非窗口滚动模式下,不同页面容器的滚动动画可独立完成。
    View discussion on GitHub
  • fix(h5): report viewport dimensions in onWindowResize

    Files
    2
    Additions
    +34
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19615

    这个 PR 做了什么?

    H5 的窗口尺寸回调此前读取显示器分辨率。现在用文档根元素的视口宽高,与 H5 的 getWindowInfo() 一致。保留现有回调字段结构,避免影响依赖平铺字段的调用方。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台?

    • Web 端(H5)

    验证

    • 回归用例模拟屏幕尺寸固定、视口连续变化,覆盖与 getWindowInfo() 一致及取消订阅。原实现失败,修复后通过。
    • H5 全包 Jest 测试 37 个套件、364 个用例通过。改动文件 ESLint、Git 空白检查及 H5 生产构建通过。
    • 构建仍有已有的 previewImage / Swiper 类型告警及 Sass 弃用告警。验证使用 Jest/JSDOM。

    Summary by CodeRabbit

    • 修复
      • 窗口尺寸变化回调现在根据视口尺寸提供宽度和高度,与窗口信息保持一致。
      • 注销尺寸变化监听器后,不再继续触发回调。
    View discussion on GitHub
  • fix(h5): isolate each chooseLocation call and settle it only once

    Files
    2
    Additions
    +198
    Deletions
    −21
    Commits
    4
    Comments
    6
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    Closes #19610

    这个变动的性质是?

    • 错误修复(bugfix)
    • 新增特性(feature)
    • 代码重构(refactor)
    • 文档更新(docs)
    • 其他

    需求背景

    H5 chooseLocation 原先共享模块级 container,并在结束后延迟 300ms 清理。在这个窗口内按浏览器返回可能重复触发回调;再次调用则会复用旧节点,被上一次清理一并删除,使新调用无法完成。

    每次调用独立创建 iframe 后,还需要隔离选点消息。例如 A 选择 (1,2)、B 选择 (3,4),A 应返回自己的坐标,而不能被 B 的消息覆盖;旧 iframe 延迟到达的消息也不能写入新调用。

    解决方案

    • 每次调用创建自己的 container 和 iframe,清理仅作用于本次调用。
    • 一次性结算并立即移除交互和 window 监听器,清理待执行的显示定时器。
    • 仅接收 event.source === frame.contentWindow 的选点消息,保持严格来源校验,不接受 source: null 回退。

    并发调用现在各自拥有独立选择器;对外 API、DOM 结构、class 名和 iframe URL 参数保持不变。

    验证

    packages/taro-h5/__tests__/location/chooseLocation.test.ts 覆盖重复返回、完成后 popstate、300ms 内重开、监听器清理、旧 iframe 迟到消息,并补充:

    • 有效坐标消息的 source 为 null 时被忽略,完成操作返回失败,回调仅结算一次。
    • A→B、B→A 两种消息顺序下,双方分别完成并返回自己的坐标;验证双方 Promise 和 success/fail/complete 回调。
    • teardown 关闭所有 chooser,避免并发用例遗留监听器。

    2026-11-10,本地 Node v22.14.0 实测:

    • chooseLocation 单文件:35 tests 通过。
    • packages/taro-h5 全量 Jest:36 suites / 378 tests 通过。
    • 反向验证:临时移除来源校验,空来源及正反序并发共 3 个用例均失败;恢复原源码后全量通过。
    • 本次测试文件 eslint --no-ignore、git diff --check 通过。
    • 本次仅修改测试,未重跑全工作区构建。GitHub CI 以最新提交的实际流水线结果为准。

    Summary by CodeRabbit

    • Bug 修复
      • 修复位置选择器在返回、完成选择或取消后可能重复触发回调的问题,确保一次操作只完成一次。
      • 修复前一个选择器尚未关闭时重新打开,导致新选择器无法正常操作的情况。
      • 并发打开位置选择器时,各自只处理对应窗口的消息;忽略空来源消息及旧窗口迟到的消息,避免位置数据串用。
      • 选择器关闭或移除后会清理相关监听和待执行操作,避免残留操作影响后续选择。
    View discussion on GitHub
  • fix(h5): stop leaking transitionend listeners and breaking animation steps

    Files
    2
    Additions
    +173
    Deletions
    −33
    Commits
    2
    Comments
    5
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    修复 H5 Taro.createAnimation 的两个问题,根因都在 packages/taro-h5/src/api/ui/animation/index.ts 的 Animation 构造函数里那个 per-instance 的 transitionend 监听器。

    问题 1:动画会被无关元素的 transitionend 永久卡住(功能问题)

    原实现把属性名缓存在监听器闭包里:

    let animAttr = 'animation'
    document.body.addEventListener(TRANSITION_END, (e) => {
      const target = e.target as HTMLElement
      if (target.getAttribute(animAttr) === null) {
        animAttr = 'data-animation'
      }
      const animData = target.getAttribute(animAttr)
      if (animData === null) return
      ...
    })
    

    transitionend 会冒泡到 document.body,页面上任意一个不带 animation 属性的元素结束 transition,都会把 animAttr 永久改写成 data-animation。此后该实例读错属性,animData 恒为 null 直接 return,动画只播第一帧就静默停住,且不报错。

    问题 2:document.body 上的监听器无限累积(内存问题)

    每个 new Animation() 都挂一个新的匿名监听器,全文件没有任何 removeEventListener,也没有销毁入口。createAnimation 一般在渲染函数或事件回调里反复调用,监听器数量线性增长,且闭包捕获了 this,导致实例与其动画数据被 document.body 永久持有、无法 GC。

    改动方式

    改成全局只注册一次的共享监听器:

    • 把「动画标识 → 关键帧总数」的映射从实例字段 this.animationMap 提到模块级 animationStepsMap。动画标识形如 taro-h5-poly-fill/${id}/create-animation__${n},已经包含各实例唯一的 id,所以合并到一张表不会互相覆盖
    • 监听器内不再按 this.id 过滤,改为直接查表;查不到即非 Taro 动画,提前返回
    • 属性名改为按每次事件的目标元素判断,不再缓存成状态,从根上消除问题 1
    • 构造函数里用 isTransitionEndListened 守卫,保持「首次使用时才注册」的惰性行为
    • 补上 animPath 为空时的保护,避免形如 foo 这种无 __ 的属性值走到 split 抛错

    没有新增或改变任何公开 API,createAnimation / Animation 的对外行为保持不变;原来注释里「动画 map ----- 永久保留」的语义也保留(表内容仍然常驻,只是挪到了模块级)。

    测试

    扩充 packages/taro-h5/__tests__/ui/animation.test.ts(原本只有一个 test unit 冒烟用例),新增 6 个:

    • 多次调用 createAnimation 不应累积 transitionend 监听器(50 次调用)
    • transitionend 应逐帧推进动画,并在最后一帧后停止
    • 多个 Animation 实例的动画互不干扰,各自推进(验证共享监听器按标识正确路由)
    • 使用 data-animation 的环境下应同时写回 animation 属性
    • 无关元素的 transitionend 不应影响后续动画的推进
    • 非 Taro 动画的元素不应被改写

    修复前:监听器用例实测为 50(期望 ≤ 1),无关元素用例实测动画停在 __0(期望 __0--1),共 2 个失败;修复后 7/7 通过。

    本地已跑 packages/taro-h5 全量单测:36 suites / 369 tests 全部通过(Node 22),src/api/ui/animation 行覆盖率由 33.87% 提升到 62.5%。全工作区 pnpm build 退出码 0;ESLint 对改动文件无告警。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: fix #19608
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    Closes #19608

    Summary by CodeRabbit

    • Bug 修复
      • 修复动画事件监听可能重复注册的问题。
      • 修复动画帧推进与结束行为,确保多个动画实例互不干扰。
      • 使用 data-animation 时同步更新动画属性;无关元素触发事件时不再导致异常或属性改写。
    View discussion on GitHub
  • fix(h5): report a meaningful errMsg when previewImage fails to load an image

    Files
    2
    Additions
    +105
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    ZakaryCode
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    修复 H5 Taro.previewImage 在图片加载失败时 fail 回调拿到 { errMsg: undefined } 的问题。

    packages/taro-h5/src/api/media/image/previewImage.ts 的 loadImage 原本这样上报失败:

    image.addEventListener('error', (err) => {
      loadFail({ errMsg: err.message })
    })
    

    浏览器在 <img> 加载失败时派发的是普通 Event 而非 ErrorEvent,Event 上没有 message 字段,所以 err.message 恒为 undefined。同时这里直接调用了用户传入的原始 fail,绕过了本文件其它分支统一使用的 MethodHandler,导致 errMsg 缺少 previewImage:fail 前缀,与 Taro 其它 API 的错误约定不一致。

    改动:

    • 用出错的 url 描述失败原因,并补齐 previewImage:fail 前缀,使调用方能明确知道是哪张图片失败
    • 监听器改为 { once: true },同一个 <img> 重复派发 error 时不会重复触发 fail
    • 补充注释说明此处为何不走 MethodHandler:该失败发生在预览框已打开、handle.success() 已执行之后,若再走 handler 会导致 complete 被触发两次

    此路径刻意保持「先 success 打开预览,单张图片后续失败再单独 fail」的既有语义,不改变轮播的加载时序(原注释 等待图片加载完后返回,会导致轮播被卡住 所描述的行为保持不变)。

    测试

    新增 packages/taro-h5/__tests__/media/previewImage.test.ts(该 API 此前没有测试覆盖),4 个用例:

    • 加载成功时回调 previewImage:ok 并挂载预览容器(回归保护)
    • 加载失败时 errMsg 为字符串、带 previewImage:fail 前缀、且包含失败的 url
    • 同一张图片重复派发 error 时只回调一次 fail
    • 多张图片中某一张失败时,上报的是它自己的 url

    修复前这 4 个用例中有 3 个失败(errMsg 为 undefined、fail 被调用 2 次),修复后全部通过。 本地已跑 packages/taro-h5 全量单测:36 suites / 363 tests 全部通过(Node 22);全工作区 pnpm build 退出码 0;ESLint 对改动文件无告警。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: fix #19606
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    Closes #19606

    Summary by CodeRabbit

    • Bug 修复
      • 图片加载失败时,错误信息现在包含失败图片的 URL。
      • 同一图片重复触发加载失败事件时,只报告一次失败。
      • 加载成功时仍会挂载预览容器并触发成功和完成回调。
    View discussion on GitHub
  • fix(router): correct framework param type of createRouter/createMultiRouter

    Files
    2
    Additions
    +13
    Deletions
    −2
    Commits
    3
    Comments
    2
    Review comments
    0
    Merged by
    ZakaryCode
    PR description

    Closes #18651

    问题

    createRouter(packages/taro-router/src/router/spa.ts)和 createMultiRouter(mpa.ts)把第 4 个参数声明为 framework?: string,但编译产物注入的是框架运行时对象,不是字符串。

    taro-loader/src/h5.ts:150 和 taro-vite-runner/src/h5/entry.ts:168 把 loaderMeta.importFrameworkName 作为标识符插值进生成代码:

    `${routerCreator}(history, inst, config, ${importFrameworkName})`
    

    配合各框架的 importFrameworkStatement,实际传入的是:

    框架importFrameworkNameimport实参
    React'React'import * as React from 'react'react 命名空间对象
    Vue 3'h'import { h, createApp } from 'vue'createElement
    Solid''—省略,即 undefined

    framework 在两个文件里只被转发给 createPullDownComponent hook(spa.ts:204、mpa.ts:85),而该 hook 的实现确实需要对象:taro-framework-react/src/runtime/connect.ts:57 以 R: typeof React 接收后调用 isClassComponent(R, el) 与 R.forwardRef(...);taro-framework-vue3/src/runtime/connect.ts:24 以 h: typeof createElement 接收后直接构造 VNode。Solid 在 connect.ts:54 标注了暂不支持该 hook,与它传 undefined 自洽。

    所以运行时行为是正确的,只有类型声明是错的。按字面把 loader 改成传字符串会破坏 H5 下拉刷新。

    这个声明在 @tarojs/router 的已发布 .d.ts 中对用户可见:

    export declare function createRouter(history: History, app: AppInstance, config: SpaRouterConfig, framework?: string): () => void;
    

    即任何手写 TypeScript、按 Taro 自身代码生成的方式调用 createRouter 的人都会被编译器拦下,而类型允许的字符串形态又会在运行时破坏下拉刷新。git blame 显示该声明自 8cac7f10701(2022-02-25)起即如此。

    改动

    spa.ts 与 mpa.ts 的 framework?: string 改为 framework?: any,并补上 JSDoc 说明它实际是什么、以及为什么不收窄:React 命名空间、Vue 3 的 createElement、undefined 之间没有公共窄类型,而 @tarojs/router 既不能依赖 react / vue 的类型,也不消费这个值。

    运行时逻辑零改动。any 严格比 string 更宽松,不会破坏任何既有调用方。

    验证

    由于这是纯类型修复,且 packages/taro-router/jest.config.ts 中 ts-jest 设置了 diagnostics: false(jest 不做类型检查,__tests__/router-test.tsx 整个套件也是 describe.skip),无法用「修复前失败的 jest 用例」来证明,改用 tsc --noEmit 对已构建的 .d.ts 做类型断言。

    断言内容为「把编译产物实际注入的值赋给 Parameters<typeof createRouter>[3]」:

    修复前(framework?: string)

    error TS2322: Type 'typeof React' is not assignable to type 'string'.
    error TS2322: Type 'typeof React' is not assignable to type 'string'.   // createMultiRouter
    error TS2322: Type '{ <K extends keyof HTMLElementTagNameMap>(...): VNode<...>; ... }' is not assignable to type 'string'.   // Vue 3 的 h
    

    修复后(framework?: any):React 侧与 Vue 3 侧均无输出,通过。省略该参数(Solid 的情形)同样通过。

    其他检查:

    • packages/taro-router 全量测试:2 套件通过、2 套件跳过(13 用例通过、7 跳过),跳过项是仓库既有的 describe.skip / xit,与本次改动无关。
    • ESLint --no-ignore 通过。
    • 全工作区 pnpm build 退出码 0;确认重新生成的 .d.ts 中签名仍为单行(JSDoc 置于函数级而非参数级)。
    • 环境:Node 22.14.0、pnpm 10.0.0。未修改测试配置或依赖。

    备注

    createPullDownComponent 的 hook 声明(packages/shared/src/runtime-hooks.ts:208)还有两个独立的类型问题:el 与 framework 为隐式 any(这正是上述错误声明在仓库内部从未被编译器发现的原因),且返回类型写作 void 而 React / Vue 3 的实现都返回了组件(因 createPageConfig(component: any) 吸收而未暴露)。这两点超出本 issue 范围,未包含在此 PR 中。

    Summary by CodeRabbit

    • 改进
      • 路由配置中的框架参数现支持字符串以外的值,并会传递给下拉刷新组件相关扩展点。跨框架集成时,调用方可传入各框架所需的参数类型。
    View discussion on GitHub
  • fix(shared): correct return type of createPullDownComponent hook

    Files
    1
    Additions
    +16
    Deletions
    −2
    Commits
    2
    Comments
    2
    Review comments
    0
    Merged by
    ZakaryCode
    PR description

    这个 PR 做了什么?

    修正 @tarojs/shared 中 createPullDownComponent hook 的返回类型:void → any,并补上参数标注与 JSDoc。

    Closes #19602

    packages/shared/src/runtime-hooks.ts:

    -  /** H5 下拉刷新 wrapper */
    -  createPullDownComponent: (el, path: string, framework, customWrapper?: any, stampId?: string) => void
    +  /**
    +   * H5 下拉刷新 wrapper
    +   * ...(JSDoc 说明调用方、返回值与 framework 的实际内容)
    +   */
    +  createPullDownComponent: (el: any, path: string, framework: any, customWrapper?: any, stampId?: string) => any
    

    为什么 void 是错的

    两个框架实现都返回包裹后的页面组件,调用方也在消费它:

    位置行为
    taro-framework-react/src/runtime/connect.ts:62return R.forwardRef(...)
    taro-framework-vue3/src/runtime/connect.ts:40return { render () { ... } }
    taro-router/src/router/spa.ts:204、mpa.ts:85把 hooks.call(...) 的结果作为页面组件传给 createPageConfig

    仓库内部一直没报错,是因为 TS 允许在 void 位置 return 值(tap 侧不报),而 hooks.call(...) 的 ReturnType<T[K]> | undefined(即 void | undefined)紧接着被 createPageConfig(component: any) 吸收(taro-runtime/src/dsl/common.ts:93),两端都不暴露。

    但这个声明随 @tarojs/shared 的 .d.ts 发布,外部调用方(自定义框架适配层、自定义下拉刷新封装)拿到的是 void | undefined,不断言就无法使用返回的组件。

    关于参数标注(请注意,这部分不改变类型检查结果)

    el 与 framework 原先没有标注。由于 tsconfig.root.json 中 noImplicitAny: false,它们在产物 .d.ts 里本来就已经是 any,显式标注前后 .d.ts 的这两个参数字节一致。所以这部分纯粹是让源码自解释 + 加 JSDoc 记录 framework 实际收到的是什么(React 为 react 命名空间对象、Vue 3 为 h、Solid 下为 undefined),避免再次出现 #18651 那种「看签名以为该传字符串」的误解。如果维护者希望 PR 最小化,我可以只保留返回类型一处改动。

    为什么返回类型用 any 而不是更窄的类型

    各框架返回的组件类型互不兼容(React 的 ForwardRefExoticComponent vs Vue 的组件选项对象),而 @tarojs/shared 不能依赖任何具体框架。同接口内 getDOMNode、modifyRecursiveComponentConfig 等也都用 any,与现有风格一致。

    范围说明

    同接口里其他 => void 的 hook(modifyHydrateData、modifySetAttrPayload、modifyRmAttrPayload、modifyPageObject、batchedEventUpdates、mergePageInstance 等)都是原地改写入参、调用方丢弃返回值,声明是正确的,本 PR 未改动。createPullDownComponent 是唯一「声明 void、实现有返回值、调用方还会消费」的一个。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix) issue: fix #19602
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    这是纯类型修复,无法用 jest / vitest 举证(@tarojs/shared 的 vitest 与 @tarojs/router 的 jest 都不做类型检查,后者 ts-jest 还显式设了 diagnostics: false)。改用「单独重建 .d.ts + tsc --noEmit 断言」做前后对照:

    1. pnpm --filter @tarojs/shared build 重建产物,断言脚本直接针对发布用的 dist/index.d.ts
    2. 修复前 3 处错误,修复后 tsc --noEmit 退出码 0:
    scout.ts(12,43): error TS2339: Property 'displayName' does not exist on type 'never'.
    scout.ts(15,7):  error TS2322: Type 'void | undefined' is not assignable to type 'ComponentType<{}>'.
    scout.ts(19,7):  error TS2322: Type 'FunctionComponent<{}>' is not assignable to type 'void'.
    
    1. 产物 .d.ts 前后 diff 只有本 hook 一处,签名变化即 => void → => any

    回归(Node 22.14.0 / pnpm 10.0.0):

    • packages/shared vitest:3 文件 / 26 用例全通过
    • packages/taro-framework-vue3 vitest:2 文件 / 15 通过、1 跳过(既有 skip)
    • packages/taro-router jest --ci -i --coverage:2 套件通过、2 跳过(13 用例通过、7 跳过,均为仓库既有 describe.skip/xit)
    • eslint --no-ignore 通过
    • 全工作区 pnpm build 退出码 0

    运行时逻辑零改动;any 比 void 宽松,不影响任何既有 tap/call 调用方。

    Summary by CodeRabbit

    • 修复
      • 调整了 H5 下拉刷新的返回值声明,使其能够兼容不同框架的组件类型。
    View discussion on GitHub
  • fix(h5): call WeChat JS-SDK once in processOpenApi

    Files
    2
    Additions
    +174
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    ZakaryCode
    PR description

    Closes #19599

    这个 PR 做了什么

    packages/taro-h5/src/utils/index.ts 的 processOpenApi 把 targetApi(opts) 写在了注册 fail/success/complete 包装回调的 forEach 循环内部,导致底层微信 JS-SDK 方法被调用 3 次,而且前两次调用时回调集合还不完整(第 1 次只有 fail,第 2 次是 fail + success)。

    本 PR 把 targetApi(opts) 移到 forEach 之外,先注册完三个包装回调,再调用 SDK 一次。源码改动是 1 行位置调整。

    受影响的公开 API:Taro.scanCode(wx.scanQRCode)、Taro.openLocation、Taro.getLocation、Taro.startLocationUpdate、Taro.stopLocationUpdate。

    保持不变的行为

    • defaultOptions 合并、formatOptions、formatResult。
    • 微信分支内 resolve/reject 与调用方 options[k] 的触发顺序。
    • 无 window.wx[name] 时的 standardMethod 降级路径,以及两者都没有时的 weixinCorpSupport 提示。

    测试

    新增 packages/taro-h5/__tests__/base/open-api.test.ts,8 个用例。测试直接导入上述 5 个真实 API,只用桩替代 window.wx 这一层边界,并在桩被调用的瞬间快照回调注册情况 —— processOpenApi 复用同一个 opts 对象并在注册过程中调用 SDK,调用结束后再读取就无法区分「注册完再调用」和「边注册边调用」。

    覆盖:单次调用与结果转换、首次调用时三个回调均已注册、defaultOptions 合并、失败路径(fail/complete 各一次 + Promise reject)、SDK 不触发任何回调的情况,以及非微信环境走 standardMethod 的对照用例。

    • 修复前(官方 main 1c0e11a1aca):7 失败 / 1 通过,唯一通过的是 standardMethod 对照用例。
    • 修复后:8 个全部通过。
    • packages/taro-h5 全量测试(项目原 Jest 配置 + --ci -i --coverage --silent):35 个文件、359 个用例通过。
    • 全工作区 pnpm build 退出码 0。
    • 环境:Node 22.14.0、pnpm 10.0.0。未修改测试配置或依赖。

    未覆盖的范围

    真机微信中 SDK 对重复调用的实际表现(例如是否重复弹出扫码界面、是否自行去重)无法从桩测试推断,我没有做真机验证。

    Summary by CodeRabbit

    • Bug Fixes
      • 修复微信 JSSDK 开放接口可能因回调注册而被重复调用的问题,确保接口只调用一次。
      • 补充了对接口调用结果、失败处理及定位降级行为的测试验证。
    View discussion on GitHub
  • feat(harness-ui): support English and Chinese in chat usage details

    Files
    8
    Additions
    +571
    Deletions
    −104
    Commits
    2
    Comments
    2
    Review comments
    1
    Merged by
    Wh1isper
    PR description

    Summary

    With Simplified Chinese selected, the composer status bar and the panels it opens stayed in English: the Context and Cost triggers, their accessible names and titles, the context meter and capacity explanation, and the whole cumulative usage detail — scope choices, token and request breakdowns, agent/source attribution, provider receipts and the accounting notes. A viewer reading Chinese saw translated chat surroundings next to an English usage panel.

    This localizes both surfaces at the display boundary. conversations/composer-status.tsx and conversations/usage-details.tsx now translate when rendering, and observed counts use i18next number formatting for the resolved language, including the compact context value that previously formatted with a fixed en locale. Known speed and reasoning-mode descriptors reuse the existing model-control-messages allowlist instead of a second mapping.

    Backend-owned values stay verbatim: model names, currency codes and recorded amounts, agent instance identifiers, and unknown usage sources, which still render inside a translated {{scope}} · {{source}} message. The only known sources translated are agent and files.media_understanding. The bounded bucket of remaining models previously carried the generated English name Other models through the model list; it now carries its own identity (a null name) so the row can be labeled at display time without affecting group matching.

    Both catalogs gain the new messages with English plural categories for responses, requests, receipts and omitted currency entries, and src/i18n/catalog.test.ts now guards literal translation calls in both files.

    Related issue

    Part of #1248

    Validation

    • pnpm --dir frontend --filter a13n-harness-ui-webui run typecheck and pnpm --dir frontend run format:check pass.
    • pnpm --dir frontend --filter a13n-harness-ui-webui test src/i18n src/conversations — 756 passed on the current main base. The five *protocol*.test.ts files fail locally because this sandbox cannot start the test App (Failed to initialize cache at ~/.cache/uv), unrelated to this change; CI covers them.
    • New src/conversations/usage-language.test.tsx switches language through the real display-language control with an expanded token breakdown and a selected usage scope, and switches at runtime with the context metric open: the meter element, selected scope and expansion survive the switch, counts and plural messages follow the language, model names and unknown sources stay verbatim, and no usage request is replayed.
    • No browser session was run; the change is text, accessible names and number formatting within existing layout.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(h5): keep request cancellable while reading response bodies

    Files
    2
    Additions
    +196
    Deletions
    −9
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    修复 H5 request 收到响应头后无法取消响应体下载、timeout 提前失效,以及 JSON 响应体的取消/读取错误被转换成成功结果的问题。

    将计时器和 AbortController 的清理延后到响应体读取结束、调用成功回调之前;失败路径继续清理。JSON 响应改为先读取文本,再单独捕获 JSON.parse 错误,保留非法/空 JSON 返回 null 的行为,让取消和流读取失败正常 reject。

    新增 24 个回归用例,覆盖默认/显式 JSON、text、arraybuffer 的响应体取消、超时、外部 signal、正常完成、回调和资源清理,以及读取错误、非法/空 JSON、204、响应头前取消/超时。现有外部 signal 的控制方式和 JSONP 路径保持不变。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    Closes #19597

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • H5 全量测试:34 个测试文件、351 个用例通过(构建后使用 Node 22.18.0 复核)。使用仓库 Jest 配置及 test:ci 对应参数,另加 --watchman=false;本地通过 NODE_PATH 指向已安装的 node_modules/.pnpm/node_modules 解析 Babel 插件,未修改测试配置或依赖。
    • Chromium 131 + 本地 HTTP 服务:立即发送响应头与部分 JSON,延迟 1.5 秒结束 body。18 个检查在原实现上 11 失败/7 通过,修复后 18 通过;覆盖三种取消方式、正常结果、非法 JSON 和断流。服务端确认取消连接提前关闭,300ms timeout 在约 301–302ms 拒绝。
    • 修改文件 ESLint、git diff --check 通过。
    • 全工作区 pnpm build 通过(Node 22.18.0 / pnpm 10.0.0,退出码 0);保留未修改文件的类型/组件等告警。

    浏览器验证直接打包真实 request/Link/runtime/shared 源码,使用原生 Fetch;未覆盖 Safari、Firefox 或 XHR Fetch polyfill。

    Summary by CodeRabbit

    • 修复
      • 请求响应体读取期间发生超时或取消时,请求会正确失败,并触发失败与完成回调。
      • JSON 解析失败时返回 null;响应体读取错误则正常向外传播。
      • 204 响应不读取响应体,并返回 null。
      • 请求处理完成或失败后会清理计时器和取消状态。
    View discussion on GitHub
  • feat(harness-ui): support English and Chinese in the chat transcript

    Files
    18
    Additions
    +922
    Deletions
    −150
    Commits
    7
    Comments
    4
    Review comments
    5
    Merged by
    Wh1isper
    PR description

    Summary

    A viewer who selects 简体中文 still read the conversation itself in English: the transcript chrome around model output stayed hardcoded, so Thought, Activity, System updates, Work log, failure notices, copy feedback, Markdown controls and live-update status remained English even after the navigation and setup surfaces were localized. This change localizes the transcript and the live message stream, continuing the per-surface work under #1248.

    Translated chrome now covers reasoning and activity disclosures with their recorded durations, the grouped System updates · N header and its per-source Process/Subagent titles, Work log entry points and the execution reader, turn loading/retry and incomplete-history notices, model reconnection status, failure notices and their retry action, message and code copy controls with their clipboard feedback, Markdown code, table, diagram and image controls, and the live-update connection popover, and the expanded diagram and attachment viewer shared with native file previews.

    Three boundaries kept the diff honest about what the frontend owns:

    • Model and user content, backend-authored part kinds, notification bodies, run and subagent messages, code, language identifiers, diagram source and unknown transport states stay verbatim, including when they match an interface message. live-connection.tsx translates only the four known stream states, and generated handoff/compaction, execution, subagent and recovery states travel as values whose error code, failed phase, reason and outcome pass through unchanged.
    • Neither the reducer nor row construction bakes interface text into data. stream.ts reports contextState, execution, childState and recoveryOutcome instead of English labels such as In progress, Execution cancelled or Subagent · name, savedRows/liveRows carry an optional activity name plus an omitted flag, and every label, fallback and server-omission line is produced at render time, so a language change re-renders without rebuilding blocks or rows.
    • Durations, system-update counts and reconnection counts use interpolation and each language's plural categories (System update count, Retry count) instead of English-only 1 retry / N retries string building.

    message-text.tsx promotes the image and KaTeX span renderers to module-level components so react-markdown keeps stable component identities while tokens stream in, and markdown-block.tsx stores a diagram failure as a boolean rather than a pre-rendered English sentence.

    Related issue

    Part of #1248

    Validation

    New src/conversations/transcript-language.test.tsx covers saved rows, live output, plural reconnection counts, known and unknown live-update states, and Markdown controls, asserting that the open Thought disclosure, element identity, streamed text and backend part kinds survive the switch. Replayed stream events drive the context, execution and subagent cases through FocusDisplay into LiveOutput, checking that diagnostics and backend messages stay verbatim, and the expanded viewer keeps its open and zoom state, image element and source across a switch. The catalog surface list gained the ten localized files, and stream.test.ts now asserts the reported states.

    pnpm --dir frontend --filter a13n-harness-ui-webui test src/i18n src/conversations src/app.test.tsx
    pnpm --dir frontend --filter a13n-harness-ui-webui exec tsc --noEmit
    pnpm --dir frontend run format:check
    

    Tests: 791 passed. The five failing files are *protocol*.test.ts, which start a real App fixture and fail locally with Failed to initialize cache at ~/.cache/uv in this sandbox; they are unrelated to this change and run in CI.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.

    Remaining under #1248: tool-call details and presentation, usage details, the work inspector and child output, configuration panels, and the native panels.

    View discussion on GitHub
  • docs(feedback): report MCP stdio protocol fix session

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI agent (JoyCode), operated and submitted by @Jarvis636431.

    One new file, 13 lines, nothing else in the diff: the agent field report AGENTS.md asks for, covering the session that produced #2901 (fix for #2898).

    It names two host-specific test failures that read as regressions on first contact — the debug-profile local_def stack overflow and loopback_proxy's undocumented need for a 127.0.0.2 alias — both reproduced on clean upstream/main on this host. Neither is filed as an issue.

    Verified: every number in the file comes from a command run in that session (cargo test --locked --profile ci-test -p xerj-mcp --no-fail-fast -> 195 passed / 1 failed; ES-YAML gate -> 1453 passed / 0 failed / 10 skipped; ci-test build of xerj-server + es-yaml-runner -> 5m22s). git check-ignore -v confirms the last matching .gitignore pattern is the !user-feedback/**/*.md re-include.

    Not tested / assumed: no retrieval, indexing or benchmark was run this session, so the report says "I ran no queries" rather than offering an estimate.

    View discussion on GitHub
  • feat(harness-ui): support English and Chinese in the chat composer

    Files
    18
    Additions
    +1,264
    Deletions
    −140
    Commits
    5
    Comments
    8
    Review comments
    4
    Merged by
    Wh1isper
    PR description

    Summary

    The chat composer previously stayed in English after a viewer selected Simplified Chinese. It now switches input guidance, attachment controls and previews, submission and Stop feedback, Goal/Coordinator controls, and clear-context confirmation between English and Simplified Chinese.

    Language changes preserve the editor, selection, undo history, attachment thumbnails, and pending or uncertain submission/Stop state without replaying requests. Rejoining a replacement shared draft initializes its editor in the current language. Restored uncertain submissions, browser draft-storage errors, and disabled-Send reasons also follow the selected language without changing submission locks or retrying requests.

    Known application feedback is translated at render time; filenames, file content, identifiers, and unknown diagnostics retain their original values. Catalog tests inspect literal feedback at its source as well as existing translation entries. The workbench contract and frontend README describe this incremental localization scope.

    Related issue

    Continues #1248.

    Validation

    172 tests passed across 10 focused files covering composer/editor behavior, drafts, New Chat recovery, Stop, and i18n. New regression coverage reproduced the stale editor language and untranslated reload-recovery feedback before the fixes, then passed afterward. It also verifies that language changes preserve unsent input and submission locks without repeating network or storage writes. TypeScript checks passed.

    Browser interaction and DOM checks with a disposable fixture confirmed that replacement editors retain Chinese placeholders, accessible names, and input guidance at desktop and 390px widths. Screenshot capture timed out; no screenshots were retained for these checks. No live backend or provider was used.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • feat(harness-ui): localize sharing link management

    Files
    9
    Additions
    +408
    Deletions
    −65
    Commits
    3
    Comments
    5
    Review comments
    3
    Merged by
    Wh1isper
    PR description

    Summary

    A Simplified Chinese viewer who opens Share on a chat still sees an English dialog: scope, permission and expiry controls, the issued-link notice, copy feedback and grant management all render fixed English text, and a failed share request falls back to the English retry and network strings in the shared error notice.

    This localizes that workflow. The Share entry and dialog, chat/Project scope, permission and lifetime choices, the created-link result and its copy guidance, link management, permission saving and revocation now come from the catalogs, and ErrorNotice translates its retry action and generic network diagnostic. Grant creation and expiry dates use i18n.resolvedLanguage and the link count uses i18next number formatting, so Created Nov 2, 8:00 PM becomes 创建于 11月2日 20:00. Authored Project names, share identifiers, keys and raw server diagnostics stay verbatim.

    Two behavior details were worth keeping stable. Copy failure now stores a boolean instead of a prebuilt English sentence, so an existing failure notice re-renders in the new language. The prompt-permission warning is stored as one complete string per scope rather than appending a project-only fragment to a shared sentence, because concatenated clauses do not survive translation.

    Switching language preserves the open dialog, selected scope, permission and lifetime, the issued link and its text selection, copy feedback, expanded management, unsaved permission edits and in-flight create, update and revoke operations, and it never issues or retries a request.

    Related issue

    Continues #1248.

    Validation

    • pnpm --dir frontend --filter a13n-harness-ui-webui test src/sharing.test.tsx src/i18n src/shell/connection.test.tsx — 5 files, 20 tests passing, including four new language-switch cases covering option retention, copy failure with unsaved permission edits and input selection, pending PATCH/DELETE without replay, and error retry keeping the original diagnostic.
    • Full package suite: 1444 passing. Nine protocol test files fail locally because the sandbox cannot initialize the uv cache when spawning the Python test App; they are unrelated to this change and run in CI.
    • tsc --noEmit, Prettier and mdformat --number pass on the changed files.
    • Browser review of the share dialog in both languages, light and dark themes, and a 390px viewport: dates and counts localize, the created-link state and management list stay intact, and there is no horizontal overflow.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • feat(harness-ui): support English and Chinese in workbench navigation

    Files
    21
    Additions
    +833
    Deletions
    −189
    Commits
    2
    Comments
    6
    Review comments
    5
    Merged by
    Wh1isper
    PR description

    Summary

    Workbench navigation previously stayed in English after a viewer selected Simplified Chinese. Navigation, Project and Recent chat lists, Drafts, chat search, and Archived chats now support English and Simplified Chinese, including menus, status labels, counts, accessibility text, and deletion confirmation.

    Language changes preserve the selected chat, expanded Projects and workers, loaded history, search text and Project filter, keyboard ordering, sidebar width, and pending archive restoration. Authored titles and excerpts remain verbatim even when they match interface messages; only missing content uses translated fallbacks. A chat titled Coordinator retains that authored title while its link also identifies the role as 协调者 in Chinese. Role-label deduplication uses the current display language.

    Project configuration, sharing, and collaboration destination workflows remain separate localization work. The README and workbench contract document the scope alongside the existing localized workflows.

    Related issue

    Continues #1248.

    Validation

    117 tests passed across nine focused files after integrating the current main branch. Coverage includes catalogs and language preferences, navigation/search state, keyboard ordering, worker expansion, sidebar resizing, archive restoration, and Agent/Model controls. The regression reproduces the missing Coordinator role in Chinese and verifies the corrected accessible name while preserving the authored title, link identity, selected worker, expansion state, and request counts. TypeScript checks passed. Rendered browser checks were not repeated for this screen-reader-label correction.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • feat(cli): add opt-in Gemini CLI search hints

    Files
    9
    Additions
    +776
    Deletions
    −71
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    An AI agent (OpenAI Codex) wrote this change; @Jarvis636431 ran it and opened the PR.

    Refs #2642. The Claude Code half shipped in #2869; this adds the Gemini CLI half behind xerj init --hooks --host gemini. Ordinary init still installs nothing. --host accepts claude (the default) or gemini, may be given once, and requires --hooks.

    xerj init --hooks --host gemini --dry-run
    xerj init --hooks --host gemini
    xerj init --hooks --host gemini --remove
    

    In a folder you have already autoindexed, grep_search/search_file_content, glob or the third read_file in a session can now add one line to the tool result:

    <hook_context>This folder has an indexed XERJ corpus: try `xerj search --prefix gemini-e2e --url 'http://127.0.0.1:…' "<words>"` … </hook_context>
    

    The two hosts are independent. Installing or removing one never reads or rewrites the other's settings, backups or counters, quotas and session hashes are per host, and one project can run both at once.

    Three host differences, and why they are not preferences

    Delivery is AfterTool, not BeforeTool. Gemini's BeforeTool has no field that reaches the model, so a hint installed there would be computed and thrown away. Only AfterTool returns hookSpecificOutput.additionalContext, which the host appends to the tool result inside <hook_context>…</hook_context>. Read out of the pinned Gemini CLI 0.66.0 bundle (executeToolWithHooks, bundle/chunk-RZ3ZVTZB.js:344483-344510), then confirmed against the running host. Claude keeps PreToolUse.

    timeout is 2000, not 2. Gemini counts milliseconds where Claude counts seconds. The HTTP budget inside the hook is unchanged and identical for both hosts; only the host-side cap is expressed in the host's own unit.

    The matcher is anchored. Gemini applies a matcher as an unanchored regex, so a bare grep_search would also fire on mcp_<server>_grep_search. The installed matcher is ^(grep_search|search_file_content|glob|read_file)$, asserted with positive and negative samples.

    Two host preconditions are reported rather than worked around: Gemini reads project settings, and therefore this hook, only in a directory it trusts; and hooksConfig.enabled: false switches all hooks off (bundle/gemini-22EOGL6O.js:8676), so setup refuses instead of installing a group the host would silently ignore.

    Implementation

    search_hints.rs gains a Host enum owning the per-host settings path, state directory, event name, matcher, timeout, installed --host flag and tool-name normalisation. Install, remove and runtime paths take it as a parameter, which is what makes per-host quotas, counters and backups structural rather than conventional. init.rs gains the --host flag, its validation and its usage/AGENTS text.

    Verified

    Every number below comes from a command run on this branch; full commands and receipts are in tools/search-hints/VERIFICATION.md.

    • Red before green. gemini_search_hints_require_explicit_host_and_hooks failed with "Gemini search hints must accept an explicit host" before the implementation, and passes after.
    • Mutation checks, each reverted immediately: timeout 2000 → 2 failed at left: Number(2), right: 2000; unanchoring the matcher failed at assertion failed: !matcher.is_match(name); AfterTool → BeforeTool failed all three new hook tests.
    • Complete crate run: 2041 passed, 0 failed, 5 existing ignored, 3 existing macOS filters, across 12 summary groups. Focused Gemini run: 4 passed, 0 failed.
    • Both smoke modes: 52 installed hook invocations each, every one exit 0 with empty stderr, both private nodes exit 0. The harness now drives the Gemini lifecycle on the same node, including the anchored matcher's negative samples, removal restoring foreign settings byte-for-byte, the hooksConfig refusal, and both hosts hinting in one project.
    • Actual host, end to end: the real release binary ran xerj autoindex and xerj init --hooks --host gemini in a throwaway project, then the pinned Gemini CLI 0.66.0 ran against a loopback stub model with no credentials and no external traffic. The request the host sent to the model carried the tool result followed by the real XERJ hint inside <hook_context>. Gemini exited 0.
    • ES-YAML conformance on that executable: 1453 passed, 0 failed, 10 skipped, 233 files, runner exit 0, 74 catch-lenient cases retained — the same totals recorded for #2869.
    • cargo fmt --all -- --check, cargo clippy --locked -p xerj-autoindex --all-targets -- -D warnings -A dead_code (the allowance is for existing content::resolve_reporting), the scoped release build, python3 .github/scripts/workflow-timeout-guard.py, py_compile and git diff --check all clean.

    One honest wrinkle: Gemini HTML-escapes the hint's angle brackets, so the delivered placeholder reads &lt;words&gt;. The hint text is identical for both hosts and was deliberately not specialised to hide this.

    Assumed / not tested

    Gemini CLI versions other than 0.66.0, interactive Gemini sessions, a real Gemini model or account, Gemini on Linux or Windows, Gemini extensions or ~/.gemini user-scope hooks, and spontaneous hint uptake by a real model. The stub model cannot choose to follow a hint, so the controlled before/after uptake sample still exists for Claude Code only. Windows and remote nodes remain unsupported for both hosts. Hostile same-user races, NFS stalls, forced power loss, remote nodes and huge catalogs remain untested as before. No model, ANN, performance, relevance or adoption claim is made.

    A first sandboxed test run reported 255 failures that were all PermissionDenied on loopback bind; the numbers above come from reruns with loopback permission, with no test or source change in between.

    Pre-existing CI note

    #2869 landed with one red cargo-audit job: zip 7.2.0 hits RUSTSEC-2026-0429 and needs >= 9.0.0. That advisory is unrelated to this diff and this PR does not touch Cargo.toml or the lockfile, so the same job is expected to be red here until the dependency is bumped separately.

    View discussion on GitHub
  • docs(feedback): agent field report for the Gemini hook host session

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    An AI agent (OpenAI Codex) wrote this report; @Jarvis636431 ran the session and opened the PR.

    One new file under user-feedback/16-agent-field-reports/, 13 lines, nothing else in the diff, as required by AGENTS.md and .github/AI_CONTRIBUTIONS.md.

    The session drove xerj autoindex, xerj def, xerj search and xerj init --hooks from a test harness while implementing #2642 (PR #2879). The report names two frictions worth acting on: nothing in the code or docs said the hook delivery event is host-specific, which cost an hour of reading another host's bundle to discover that its pre-tool event cannot reach the model; and a sandbox that forbids loopback bind turns the xerj-autoindex suite into 255 failures whose only symptom is PermissionDenied, with nothing naming the port as the cause.

    Every number in it comes from a command run in that session. No throughput or relevance measurement was attempted.

    View discussion on GitHub
  • feat(cli): add opt-in Claude Code search hints

    Files
    15
    Additions
    +1,454
    Deletions
    −14
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the Claude Code search reminder requested in #2642. xerj init --hooks merges a uniquely owned PreToolUse group into .claude/settings.json, with private backups; --hooks --remove removes that group and retains unrelated hooks, settings and session memory. Ordinary init keeps its configuration path; its generated AGENTS section mentions the opt-in.

    The command returns only additionalContext, with no permission decision or rewritten input. Grep/Glob or the third Read may suggest a search when a reachable loopback node's bounded catalog read names this exact root and an unambiguous nonempty run. Suggestions carry both prefix and shell-quoted node URL. A persistent, locked quota spaces hints by at least ten matching calls; a bounded FIFO retains 64 session hashes. Offline, malformed, partial, busy or unauthorized states silently abstain. No tool input or raw session ID is stored/sent. HTTP redirects/proxies are disabled and runtime auth is not persisted.

    Refs #2642: Claude Code first; Gemini, Windows and remote-node hints remain deferred. There is no interception of shell grep/rg or automatic search/indexing.

    Verified

    Reproduction, actual results, failure controls and contribution audit; usage/recovery/limits.

    • macOS arm64 / Rust 1.97.1: complete autoindex 2037 passed, 0 failed, 5 existing ignored and 3 documented macOS filename filters; focused hook selection 11 passed. Complete rerank 59 passed, including all four egress-inventory checks.
    • Scoped autoindex release build, optimized ci-test node/runner build, fmt/check, Clippy with the existing resolve_reporting dead-code allowance, Python compilation, whitespace and workflow-timeout guard passed.
    • Same-snapshot ES-YAML: 1453 passed, 0 failed, 10 skipped, 233 files, unchanged 74 catch-lenient cases. Private node/runner exited 0.
    • Both insecure and API-key-authenticated private-node smokes passed 26 installed hook invocations each, including exact scope/URL, rate persistence, restart, map/definition lookup, foreign/memory-hook preservation, malformed input, edited-group refusal/recovery and removal. Only temporary synthetic data was used.
    • Actual Claude Code 2.1.278 controlled sample: 0 then 1 XERJ search calls with the hook disabled/enabled. The prompt explicitly requests following a delivered hint: this tests delivery/uptake, not spontaneous adoption or retrieval quality. Normalized receipt.

    Observed the init flag test fail before implementation; disabling the quota makes its regression fail. The HTTP test caught acceptance of a 302 body, then passed after explicit status rejection. Injected settings-publication failure preserves exact old settings/config and permits retry. No existing test/skip policy was weakened.

    Ancestry and limits

    Independent implementation on 9422d0f53, following merged #2849. Normally merged latest upstream 50ea0bb58 (#2845): changelog merged cleanly, upstream HTTP function/tests/CI preserved. The entire engine tree/lockfile is byte-identical to the validated implementation; its 12 new upstream plain-Node tests and timeout guard pass. No unmerged prerequisite, dependency/schema/workflow diff or upstream rollback.

    One ambient full-suite run hit an existing partial-clone fixture's DirectoryNotEmpty; it passed alone and in the complete Git-config-isolated rerun. Cause is not established. The first disk-full mutation attempt and interrupted earlier shipping-server fat-LTO build are not passing receipts; release validation is scoped to the changed crate, live nodes use ci-test.

    Config/settings are individually atomic, not a multi-file crash transaction; recovery is documented. Catalog presence does not verify current files or manually deleted indices; reads over 200 runs abstain. Linux/Windows, hostile same-user races, forced power loss, NFS stalls, other host/plugin compositions and broad relevance/performance were not tested. Hosted merge-ref CI remains separate.

    View discussion on GitHub
  • fix(runtime): 修正 contains 的节点包含关系判断

    Files
    2
    Additions
    +155
    Deletions
    −10
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    runtime contains 只遍历子节点并比较 uid/id,导致自身包含返回 false、非空树 contains(null) 抛错,以及不同树中 id 相同的节点被误判为后代。带复制 id 的深克隆节点也会被误判为属于源树。

    按照 Node.contains 的 DOM 标准,沿候选节点的 parentNode 链向上比较对象身份:包含自身和实际后代,null 和无关节点返回 false;避免依赖可变 id 或递归遍历整棵子树。

    Closes #19594

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(启用 Taro runtime contains 的路径)

    验证

    • 新增 17 个回归用例,原实现 10 个失败、7 个通过;修复后全部通过。
    • 覆盖 element/text/comment/fragment/document 自身、空/非空树传入 null、多层后代和反向关系、兄弟与不同树、重复/空/修改 id、id 与生成 uid 碰撞、深克隆、子树移除及跨父节点移动、fragment 内容转移、深层树。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:23 个测试文件通过,323 个用例通过、1 个跳过。测试环境 Node.js v26.8.1 / pnpm 10.0.0。
    • 修改源码及新测试文件 ESLint(--no-ignore)、git diff --check 通过。
    • 全工作区 pnpm build(包含 runtime):Node.js v22.18.0 / pnpm 10.0.0,退出码 0;有未修改代码的类型、组件等构建告警。

    测试使用真实 runtime,未进行框架应用、小程序开发者工具或真机验证。分支独立基于上游 main 0984ff41c6b,不包含仍在评审的监听器派发修复。

    Summary by CodeRabbit

    • Bug Fixes
      • 修正节点包含关系的判断:contains 现在会沿节点的父级链查找目标节点,并在目标为当前节点或其后代时返回包含;目标为空或不属于该节点树时返回不包含。
      • 判断不再依赖节点 ID 或 UID,节点移动、克隆及不同类型节点的包含关系结果更加准确。
    View discussion on GitHub
  • feat(harness-ui): support English and Chinese in Agent and Model settings

    Files
    16
    Additions
    +730
    Deletions
    −119
    Commits
    1
    Comments
    4
    Review comments
    4
    Merged by
    Wh1isper
    PR description

    Summary

    Agent & Model settings previously remained in English after a viewer selected Simplified Chinese. The panel now localizes model and agent selection, search, Thinking, Speed, and Reasoning mode, including inherited defaults, known control descriptions, and unavailable-selection guidance.

    Language changes preserve the open settings page, search text and selection, editor state, parameter overrides, and unresolved submission state without applying selections or replaying requests. Known control descriptors and exact budget/effort summaries are translated at render time; resource names, unknown labels, diagnostics, and selection values retain their original meaning. The workbench contract and README document this incremental scope.

    Related issue

    Continues #1248.

    Validation

    The author confirmed completing their own checks. Additionally, 45 tests passed across 8 focused files covering catalog completeness, descriptor translation, desktop/mobile language switching, search and editor state, inherited versus explicit controls, and locked choices during an unknown submission. TypeScript, generated API contract, and formatting checks passed. Rendered browser checks were not repeated during this handoff.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(runtime): 修复派发期间监听器变更导致重复调用或抛错

    Files
    2
    Additions
    +183
    Deletions
    −2
    Commits
    3
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    runtime DOM 的 dispatchEvent 直接倒序遍历可变监听器数组。回调取消其他监听器会改变下标,使当前回调重复执行;once 回调先解绑再移除其他监听器时,还可能读取 undefined._stop 并抛错。例如注册 first/second/third,third 取消 first,原实现得到 third/third/second。

    派发开始时保存注册快照,调用前按包装器身份检查注册是否仍存在。保留原有倒序调用,跳过尚未调用就被移除的注册;新增注册留到下轮,嵌套派发读取最新列表。移除后重新注册同一用户回调不会复活本轮旧注册。

    Closes #19592

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro runtime DOM 事件实现的路径)

    验证

    • 新增 12 个回归用例:原实现 8 失败、4 通过;修复后全部通过。直接使用真实 runtime 源码,没有 mock 派发实现。
    • 覆盖取消自身及其他注册、跳过未执行的已移除注册、移除后重新注册、重复回调的独立注册、新增订阅、同步重入、once、停止传播、this/事件参数、返回值及异常传播。
    • 事件专项测试:3 文件、60 用例通过。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:22 文件通过,307 用例通过、1 跳过。Node.js 26.8.1 下通过,并在 Node.js 22.14.0 下重跑通过;pnpm 10.0.0。
    • runtime 包构建通过,退出码 0。
    • 修改文件 ESLint(--no-ignore)、git diff --check 和提交钩子通过。

    范围与限制

    分支基于官方 main 10002ad884e,仅修改派发实现并新增测试,不改变监听器注册顺序或公共 API。与已合并 #19583 的 once 身份/解绑修复、#19586 的 H5 CallbackManager 快照分发属于不同实现。

    每次派发增加一次数组复制,并对快照中的注册查询当前数组。未运行全工作区构建、开发者工具、真机或完整 React/Vue 小程序应用验证。

    Summary by CodeRabbit

    • Bug 修复
      • 修正事件分发期间监听器变更的处理:分发开始后新增的监听器不会在本轮触发;轮到已移除监听器时会跳过。嵌套分发则会按更新后的监听器列表执行。
    View discussion on GitHub
  • feat(harness-ui): support English and Simplified Chinese onboarding

    Files
    32
    Additions
    +1,983
    Deletions
    −303
    Commits
    3
    Comments
    5
    Review comments
    5
    Merged by
    Wh1isper
    PR description

    Summary

    Harness UI users can now log in and complete first-use setup in English or Simplified Chinese. Previously these workflows were English-only. A System / English / 简体中文 control is available during login, connection startup and guided setup, and remains available in General settings.

    The localized flow includes model selection and credentials, provider-account connection, shell review, execution-environment choices, setup readiness, and saving configuration before opening the first chat. Viewer-local preferences follow ordered browser-language matching in System mode and remain usable when storage is unavailable. Switching updates document language and MCP Apps Host context while retaining unsaved inputs, editor selections and setup identity, without replaying authentication, model preparation or tool results.

    This introduces application-owned i18next catalogs and focused catalog/preference/interaction checks. Shared UI receives translated strings from Harness UI. Configuration source, secrets, identifiers, provider-supplied labels and raw diagnostics retain their original values. The interaction contract and frontend language-ownership statement describe the delivered scope.

    This is the first onboarding slice: conversation, broader management and native-panel localization, and application-wide untranslated-source detection remain follow-up work. There are no backend/API or persisted configuration-schema changes.

    Related issue

    Refs #1248. Keep the issue open for the remaining workflows and source-coverage checks.

    Validation

    • Focused Vitest regressions passed for login/authentication lifetime, onboarding, model editing, provider accounts, credentials, subscriptions, resource choices and MCP Apps. New interaction tests complete setup in Chinese with exactly one configuration publication and chat creation, preserve instructions/selection and an unsaved provider key across language changes, and verify preference persistence, System resolution and unavailable storage.
    • Catalog checks cover missing/empty entries, interpolation, locale-required plurals and dynamic login-state keys, with positive/negative fixtures. A real language-control/MCP bridge test verifies locale updates without reconnecting or replaying results.
    • TypeScript checking, changed-file formatting, Markdown formatting and the production Vite build passed. The build emitted Vite configuration, PostCSS and large-chunk warnings.
    • Visually inspected the actual onboarding components using disposable HTTP fixtures in Chrome: Chinese model selection on desktop/light and model/workspace steps at a 390px viewport/dark, including reachable footer actions. This is component-layout validation; live model-provider authentication and sandbox installation were not exercised.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(runtime): 兼容新版 Vue v-model 的根节点检查

    Files
    10
    Additions
    +250
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Vue 3.5.31 起,文本框 v-model 的 beforeUpdate 调用 el.getRootNode(),随后使用 Document / ShadowRoot 做 instanceof 检查。Taro 模拟节点缺少该方法,小程序构建也没有提供这两个构造器,导致模型回填时报错。

    为 TaroNode 实现沿父链查找实际根节点的 getRootNode,覆盖连接到 document、脱离文档的子树以及重挂载;不将 ownerDocument 当作所有节点的根。导出现有 TaroDocument,并提供仅用于类型检查的 ShadowRoot 构造器。小程序 Vite、Webpack 和 Webpack 预编译注入表同步提供这两个引用,避免 detached root 进入 ShadowRoot 分支后再次 ReferenceError。

    Closes #19581

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro 模拟 DOM 的 Vue3 路径)

    验证

    • 新增 25 个用例:runtime 根节点与构造器 11 个、Vue v-model 集成 13 个、Vite 实际构建与无原生 DOM 全局的执行验证 1 个。
    • runtime 新用例在原实现下全部失败;修复后通过。覆盖 connected/detached、移除和重新挂载、text/comment、fragment 及 composed 参数。
    • Vue 集成使用真实 createApp / vModelText,覆盖 input/textarea、模型回填、分别使用 trim/number/lazy、composing、detached 容器,以及 trim.lazy / number.lazy 的 change 回传。
    • 仓库锁定 Vue 3.5.13:Vue 插件完整测试 2 个文件、15 个用例通过、1 个原有跳过。另在临时目录分别安装 Vue 3.5.31 和 3.5.43,通过临时配置运行同一集成测试,两版均为 13/13 通过。去掉 getRootNode 后,3.5.43 下 11 个失败、2 个通过。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:21 个文件,294 个用例通过、1 个跳过。
    • pnpm --filter @tarojs/vite-runner run test:ci --maxWorkers=2:4 个文件,93 个用例通过。
    • Webpack 流程测试 framework.spec.ts:React/Vue 的 web/mini 共 4 个用例、8 个快照通过;该套件使用既有框架 fixtures/mocks。
    • 临时集成脚本从实际 Webpack provider 配置取得新增的两项注入,并从实际 esbuild 预编译拆分产物检查其导出;两次真实 Webpack 构建均能在没有原生 Document/ShadowRoot 的 VM 中执行 Vue 3.5.43 beforeUpdate,connected/detached 节点均正确回填。这是新增构造器的专项验证,不是完整应用或 Module Federation 流程验证。
    • 全工作区 pnpm build 通过,退出码 0;有未修改文件的 TypeScript、组件、循环依赖等既有构建告警。清理了构建生成的两处无关 definition 文件变更。
    • 修改源码及新增测试 ESLint(--no-ignore)、提交钩子和差异空白检查(保留原文件 CRLF)通过。

    Node.js 22.18.0 / pnpm 10.0.0。独立基于上游 main 0493b5251da。未修改依赖或锁文件;新版 Vue 安装和辅助验证配置均位于临时目录。

    范围与限制

    本次修复根节点和构造器检查兼容,不实现 shadow DOM、attachShadow 或新的焦点管理。未验证抖音原生 DOM、Harmony、小程序开发者工具或真机,也未回移至 Taro 3.x。

    额外观察到 Vue 3.5.43 的 trim.number.lazy 组合在 change 事件中会受现有监听器执行顺序与数值/字符串转换影响,出现 value.trim is not a function;该组合修饰符问题不属于本次 getRootNode 修复范围,未在本 PR 扩展处理。

    Summary by CodeRabbit

    • 新功能
      • 支持通过 getRootNode() 获取节点所在树的根节点,适用于已连接和脱离文档的节点。
      • 小程序运行环境增加对 Document 和 ShadowRoot 全局类型的兼容支持。
    • 测试
      • 补充 Vue 3 小程序 input、textarea 的 v-model 行为验证,覆盖修饰符、组合输入及节点更新等场景。
    View discussion on GitHub
  • feat(cli): add opt-in Claude Code session handoff hooks

    Files
    12
    Additions
    +2,169
    Deletions
    −1
    Commits
    3
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the opt-in Claude Code session handoff requested by #2645. xerj init --memory installs project-local SessionEnd/SessionStart hooks. SessionEnd queues a unique delivery for a detached redacting importer, lexical autoindex and project-memory upsert; SessionStart returns bounded, quoted, cited historical excerpts with an offline cache. Ordinary init and explicit imports keep their existing behavior. There is no LLM summarizer or decision classifier.

    Review follow-up

    • A failed item no longer ends the drain before its siblings. The worker snapshots up to eight directory entries, records each outcome and continues after import/finalization errors. Missing/over-16-MiB transcripts, session/queue identity mismatches and malformed queue JSON are retained in private rejected/ with original bytes and a reason file before pending removal. Other failures, including offline nodes and potentially incomplete transcripts, stay retryable. Failed quarantine publication retains pending bytes. Corrected terminal input requires a fresh SessionEnd; oversized input uses explicit manual import.
    • Memory excerpt creation and brief display both filter Unicode Cc/Cf/Zl/Zp categories using the existing regex dependency, including bidi overrides/isolates, zero-width format marks and supplementary tag characters. Display also sanitizes old cached/remote entries. Full archives/search exports retain the existing importer's source contract.
    • Added the missing CLI-client egress classification and documented loopback data flow in RERANK.md and the air-gapped inventory. No node-side connection was added, so node DATA_EGRESS is unchanged.
    • Added the --remove without --memory assertion, corrected removal dry-run wording, eliminated the non-Unix unused-mut warning, documented binary-path upgrades and tested hook reconfiguration after moving the executable. The estimate-before-index traversal is retained under AGENTS.md, with shared timeout and unmeasured large-history cost documented.

    Scope and ancestry

    Refs #2645, Claude Code first; Codex lifecycle integration remains deferred, so this does not close the broader issue. Builds on merged #2406 and leaves #2413's Codex importer unchanged. Separate from #2642's PreToolUse proposal: no interception or tool-call rewriting.

    Based directly on upstream 720b9990; fetched upstream/main and the PR head again on November 2 before committing. No stacked prerequisite, upstream rollback, dependency/lockfile, node API, schema or workflow change. Original commits are preserved; the review fixes are a normal follow-up commit.

    Setup merges only uniquely owned hooks and refuses edited/foreign/duplicated groups. Removal keeps data and respects active-worker leases. This version supports loopback endpoints on macOS/Linux only; keys are runtime-only. Node indexing, memory upsert and receipt publication remain separate steps, reconciled on retry rather than claimed cross-system atomic.

    Verified locally on the final source

    macOS arm64 / Rust 1.97.1; source-built rc.100, not a claim about the published release. Detailed commands, earlier receipts, audit and limits are in VERIFICATION.md; setup/recovery/retention are in README.md.

    • Watched all three initial review regressions fail before production edits: queue sibling not attempted, Unicode format marks retained, and incorrect removal preview. They pass after the fix. An isolated extraction of the exact init parser/test also passed unmodified and failed when only the --remove guard was deleted.
    • Complete autoindex crate: 2023 passed, 0 failed, 5 existing ignored, 3 documented existing macOS filesystem filters. Final focused session suite: 16 passed, 0 failed. Complete default-feature rerank crate: 59 passed, 0 failed, including all four egress-inventory checks. Existing assertions/exclusions were not weakened.
    • Scoped shipping release build, fmt/check, Python syntax, whitespace and workflow timeout guard passed. Autoindex all-target Clippy passed with the explicit existing content::resolve_reporting dead-code allowance.
    • Both committed synthetic-node smoke commands passed with insecure and API-key-authenticated nodes, using executable SHA-256 f860ba006cd1cedfb41589c609c912de213ba6416d400ad9184ba4ad5d5f6d11. Four terminal bad deliveries were isolated while healthy work completed. Unicode memory/cache checks, moved-binary hooks, redaction/citations, duplicate/changed events, two then three searchable records with one memory entry, offline cache, malformed-tail refusal, node restart/retry, removal retention and explicit owned-data cleanup passed. Hook invocations exited 0 without stderr; private nodes stopped with exit 0.
    • Same-snapshot ES-YAML: 1453 passed, 0 failed, 10 skipped, 233 files, retaining 74 existing catch-lenient cases. Runner and private node exited 0.

    The initial sandbox crate attempt hit loopback/process restrictions; it is not a passing receipt. The first YAML wrapper hit its 240-second cap and stopped its node normally; it is not counted as a completed gate. The completed run above retains the existing runner, tests and catch-lenient policy. Hosted CI must validate the pushed merge ref separately.

    Limits and contribution review

    Audited against docs/CONTRIBUTION_REVIEW.md: ancestry/effective diff, existing workflows, item-level failure isolation, pending/rejected authority, quarantine-publication refusal/recovery, Unicode boundaries, ownership and operational recovery are covered. Original queue bytes and reason files are separate writes; no cross-file crash-transaction guarantee or retention purge is claimed. Node API/ES semantics, index migrations, clustering, optional accelerators, model execution identity, telemetry and feature algorithms are unchanged.

    Not locally verified: actual Claude Code host delivery/shutdown, Linux/Windows execution, forced worker SIGKILL, hostile same-user races, large histories, every transcript variant, authenticated automatic key discovery or neural nodes. Auth smoke uses an explicit runtime key. Existing importer redaction does not remove every secret/name. Windows, remote endpoints and Codex lifecycle hooks remain unsupported. No performance or broad relevance claim.

    Field reports: original #2851 and review follow-up #2867.

    View discussion on GitHub
  • docs(feedback): report session queue recovery verification

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the single-file field report required by AGENTS.md after verifying the #2849 review candidate on temporary synthetic session data. It records the observed queue failure before the fix, successful insecure/authenticated hook flows afterward, moved-executable recovery and the actual-host/large-history limits.

    Verified: 13 lines, one added file, existing explicit .gitignore re-include, correct Git identity, and no other files in the effective diff. Counts come from executed local tests and smoke runs; this is an integration report, not a retrieval-quality or performance evaluation. Engine, website and conformance execution are not required for this report-only diff.

    View discussion on GitHub
  • docs(feedback): report session handoff experience

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the required single-file field report after the synthetic session-handoff runs for #2849 (Refs #2645). Independently based on 720b9990; no implementation dependency or merge order. Exactly one new 13-line file.

    Verified: the committed smoke harness passed against insecure and authenticated private nodes, covering installed hook commands, redaction, 2 then 3 records with one memory ID, unchanged replay, changed input, offline cache, malformed-tail atomicity, restart retry and removal/cleanup. The report's Markdown re-include and diff whitespace check pass.

    Not verified: actual Claude Code host lifecycle behavior, other platforms or broad retrieval quality. This report-only branch does not rerun engine gates; the implementation PR records its own checks.

    View discussion on GitHub
  • fix(h5): 处理上传前 Blob 转换的错误与超时

    Files
    3
    Additions
    +207
    Deletions
    −12
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 uploadFile 发送上传 POST 前,会先通过 GET XMLHttpRequest 读取 Blob。转换函数只处理 load,读取错误或中止后 Promise 不结算,uploadFile 的 fail/complete 和 Promise 因而一直等待;上传超时计时器此时尚未启动。

    为转换请求补齐 error/abort/timeout 结算与有限超时,所有终态和同步初始化/发送异常统一释放处理器。保留非 200 HTTP 状态信息,上传入口向转换请求传递现有 timeout 配置(未提供时默认 60000ms)。转换和上传分别使用该超时值,不新增跨两个阶段的总超时策略,也不改变 uploadTask.abort 的既有行为。

    Closes #19587

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 16 个回归用例,原实现 15 个失败、1 个通过;修复后全部通过。
    • 覆盖转换 error/abort/timeout、默认/配置超时、成功返回 Blob、403/404/500 状态、open/send 同步异常、终态清理与晚到事件。
    • 公开 uploadFile 路径使用真实转换函数,验证失败 Promise、fail/complete 只通知一次、失败前不发送 POST、abort 后不重复通知,以及正常转换后成功上传。
    • Blob 与既有上传测试:2 个套件、26 个用例通过。
    • pnpm --filter @tarojs/taro-h5 run test:ci --watchman=false:30 个套件、259 个用例通过,退出码 0。
    • pnpm --filter @tarojs/taro-h5 run build:通过,退出码 0;存在未修改的 previewImage/Swiper 类型及 Sass 弃用告警。
    • 全工作区 pnpm build:通过,退出码 0;存在未修改文件的 TypeScript、组件及循环依赖等构建告警。
    • 修改源码及新测试 ESLint(--no-ignore)、差异空白检查(保留原文件 CRLF)通过。

    Node.js 22.18.0 / pnpm 10.0.0。分支独立基于上游 main 0493b5251da,不包含滚动和 CallbackManager 修复。测试使用 JSDOM 与受控 XHR 事件,未进行真实网络、真实浏览器或真机验证。不宣称解决 vconsole 代理兼容性 #18187。未修改依赖及锁文件。

    Summary by CodeRabbit

    • 问题修复
      • 文件上传前将对象 URL 转换为 Blob 时,现会遵循网络请求超时设置;转换超时、失败或中止时会正确结束处理,避免重复触发回调或继续发送上传请求。
      • 转换成功后,上传流程会继续使用转换后的 Blob,并正常返回上传结果。
    View discussion on GitHub
  • fix(h5): 修复回调取消订阅导致事件漏通知

    Files
    2
    Additions
    +184
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 CallbackManager 分发时直接遍历 callbacks 原数组,回调取消自身会通过 splice 移动后续元素,使紧邻的订阅者漏收本次事件。

    改为遍历分发开始时的快照,明确本轮仍通知该快照中的回调,期间新增、移除或清空监听影响后续触发;嵌套触发读取最新订阅。保留对象 callback/ctx、重复注册及异常传播行为。

    Closes #19585

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 13 个回归用例,原实现 8 个失败、5 个通过;修复后全部通过。
    • 覆盖取消自身/前序/后续监听、清空监听、新增监听、下次触发、对象上下文与参数、同步重入、重复注册、未知移除、异常传播。
    • 通过公开 on/offNetworkStatusChange API 与真实 EventTarget 分发验证自身取消及新增订阅,未 mock CallbackManager 实现。
    • pnpm --filter @tarojs/taro-h5 run test:ci --watchman=false:30 个套件、256 个用例通过,退出码 0。
    • pnpm --filter @tarojs/taro-h5 run build:通过,退出码 0;存在未修改的 previewImage/Swiper 类型及 Sass 弃用告警。
    • 修改文件 ESLint(--no-ignore)、git diff --check 通过。

    Node.js 22.18.0 / pnpm 10.0.0。分支独立基于上游 main 0493b5251da,不包含 pageScrollTo 修复。测试基于 JSDOM 与受控 connection,未做真实浏览器网络切换或真机验证。未修改依赖及锁文件。

    Summary by CodeRabbit

    • 问题修复
      • 修复回调通知过程中订阅变更导致的通知结果不一致问题。通知开始后,本轮将按既定回调列表执行;期间新增或移除的订阅从下一轮通知起生效。
    • 测试
      • 补充回调及网络状态订阅相关测试,覆盖通知期间增删订阅、嵌套通知和异常等情况。
    View discussion on GitHub
  • fix(knowledge): keep trace requests current when switching documents

    Files
    2
    Additions
    +266
    Deletions
    −15
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Switching documents while a trace request is pending drops the new document's request behind the shared in-flight gate. The old response can then update the new document's trace, badge, and summary. Completed documents with grace polling disabled may never recover.

    Invalidate the active spans request on document or attempt changes and immediately fetch the new selection. Scope response handling, errors, loading/failure bookkeeping, and deferred row selection to the current request. Use a document generation as well as the ID so A → B → A rejects the first A response. Historical-attempt status and processing-settings reads also ignore responses from an earlier document visit or after unmounting.

    Type of Change

    • 🐛 Bug fix
    • 🧪 Test

    Related Issue

    Fixes #4906

    Testing

    Passed from frontend/:

    node --import tsx --test src/components/knowledge-processing-timeline*.test.ts src/utils/knowledgeTrace*.test.ts src/utils/knowledgeProcessing*.test.ts src/utils/traceAxis*.test.ts
    node --import tsx --test src/utils/knowledgeProcessingStatus.test.mjs
    npm run type-check
    npm run build
    
    • 36 targeted tests pass, including 12 new tests mounting the actual compiled component setup with Vue's headless renderer and deferred API responses.
    • Covers immediate document fetching without polling, stale success/failure/empty responses, stale finalizers, A → B → A, attempt switching, processing settings, historical-attempt statuses, unmount, current-request failures, and polling overlap control.
    • Six selected regression cases fail against the unchanged base component 40192ace2 and pass with the fix.
    • git diff --check upstream/main...HEAD passes.
    • Build reports chunks exceeding 500 kB. No frontend lint script is configured. Validation is scoped to the frontend change; full-repository checks and browser/live-backend end-to-end tests were not run. No API, dependency, or schema changes.

    Checklist

    • Diff whitespace check passes
    • Changed source follows surrounding formatting
    • Targeted tests, frontend type checking, and production build pass
    • Self-reviewed; regression coverage added
    • Validation scope and limitations documented

    Screenshots / Recordings

    No layout changes. Request ordering and emitted trace-badge/summary behavior are verified through the component tests above.

    View discussion on GitHub
  • fix(h5): 支持音频事件无参取消全部监听

    Files
    3
    Additions
    +219
    Deletions
    −24
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 InnerAudioContext 的 offXxx 把省略的 callback 替换为新的空函数,导致已注册的回调无法移除。十类音频事件均可复现,offError/offStop 还会绕过 CallbackManager 的无参清空路径。

    为原生 Audio 事件登记用户回调:不传 callback 时移除该事件的全部用户监听,传 callback 时保留指定移除行为。DOM 事件继续使用原生 EventTarget,保留事件参数、this、重复注册去重及分发期间移除的行为。offError/offStop 直接把可选参数交给原有 CallbackManager。

    首次播放处理单独注册,不受 offPlay() 清空用户监听影响,startTime 仍在第一次 play 时应用。destroy 同时解绑登记的 DOM 回调和内部 play 监听,清理新增的登记引用。

    Closes #19590

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    接口语义依据

    快手官方 InnerAudioContext 文档与腾讯云音频官方文档明确规定,省略 callback 移除该事件的全部监听;抖音 offError 文档也明确区分有参和无参行为。Taro 现有类型允许 callback 省略。

    验证

    • 新增 35 个回归用例,基线实现 24 个失败、11 个通过;修复后全部通过。
    • 覆盖全部十个 offXxx:无参/undefined、重复清空、指定/未知回调、清空后重新订阅;补充事件与实例隔离、首次播放 startTime、DOM 回调 this/参数/去重、分发期间取消,以及 destroy 后保留原 Audio 引用时不再触发旧监听。
    • 经公开 createInnerAudioContext 创建实例,测试使用真实 JSDOM HTMLAudioElement/EventTarget;仅替换 pause,未 mock add/removeEventListener 或 CallbackManager。既有销毁测试的 Audio 桩补充 removeEventListener 方法。
    • 音频测试:2 个套件、36 个用例通过。
    • pnpm --filter @tarojs/taro-h5 run test:ci --watchman=false:30 个套件、278 个用例通过,退出码 0。
    • pnpm --filter @tarojs/taro-h5 run build:通过,退出码 0;存在未修改的 previewImage/Swiper 类型及 Sass 弃用告警。
    • 全工作区 pnpm build:通过,退出码 0;存在未修改文件的类型、组件及循环依赖等构建告警。
    • 修改源码和测试 ESLint(--no-ignore)、git diff --check 和提交钩子通过。

    Node.js 22.18.0 / pnpm 10.0.0。分支独立基于上游 main 0493b5251da,不包含 Vue v-model 等其他修复。未修改依赖或锁文件,构建生成的无关 definition 变更已清理。

    验证使用受控原生事件,没有真实音频播放、浏览器或真机验证。不改变共享 CallbackManager 的分发语义,也不宣称完整解决历史 #14447 的全部场景。

    Summary by CodeRabbit

    • Bug 修复
      • 音频事件现在支持移除指定回调,或一次性移除该事件的全部回调;销毁音频上下文时会清理已注册的监听,减少残留回调触发。
      • 首次播放时的 startTime 定位不再依赖用户注册的播放监听,添加或移除用户监听不会影响该定位行为。
    View discussion on GitHub
  • fix(h5): 修复 pageScrollTo 动画越过目标位置

    Files
    2
    Additions
    +91
    Deletions
    −10
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 pageScrollTo 的动画帧上限与缓动函数的归一化区间不一致,最后几帧会使用超过 1 的进度值。从 0 滚到 200,duration=300 时最终写入约 200.429;duration=34 时最终写入 1000。

    按向上取整的帧数计算进度,在终帧精确写入目标位置,使中间位置保持在起点和目标之间。覆盖元素及 Window 滚动,保留 selector/offsetTop 定位。连续调用时的取消结算和同时传入 scrollTop/selector 的优先级不在本次范围。

    Closes #16609

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 20 个回归用例,原实现 12 个失败、8 个通过;修复后全部通过。
    • 覆盖 0/1/17/18/34/51/300ms、向上及向下滚动、精确终点、中间位置不越界、成功/完成回调只调用一次、selector 偏移及已在目标处。
    • pnpm --filter @tarojs/taro-h5 run test:ci --watchman=false:30 个套件、263 个用例通过,退出码 0。
    • pnpm --filter @tarojs/taro-h5 run build:通过,退出码 0;存在未修改的 previewImage/Swiper 类型及 Sass 弃用告警。沙箱构建生成产物后残留空闲进程,清理后在正常权限下重跑通过。
    • 修改源码及新测试 ESLint(--no-ignore)、差异空白检查(保留原文件 CRLF)通过。

    Node.js 22.18.0 / pnpm 10.0.0。分支独立基于上游 main 0493b5251da,仅包含滚动源码和回归测试。测试使用真实源码、JSDOM 与可控计时器,未运行完整浏览器应用或真机验证;未修改依赖及锁文件。

    Summary by CodeRabbit

    • Bug Fixes
      • 修复页面滚动在不同持续时间下无法准确到达目标位置的问题;滚动结束时会精确停在目标位置,向上滚动可到达页面顶部,已到达目标时则保持当前位置。
      • 修复滚动至选择器目标并应用偏移量后的定位表现。
    • Tests
      • 补充页面滚动行为测试,覆盖不同滚动模式、目标位置及回调结果。
    View discussion on GitHub
  • fix(runtime): 修复 once 监听器的取消与解绑时机

    Files
    2
    Additions
    +143
    Deletions
    −12
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    runtime DOM 的 once 监听器额外包装原回调,导致 removeEventListener(type, callback) 无法取消注册;回调返回后才解绑,也使同步重入和回调抛错后再次派发时重复执行。

    复用现有监听器包装逻辑,让 oldHandler 直接指向原回调;once 在调用用户代码前通过现有 removeEventListener 路径移除当前包装器。保留每次注册的独立包装、普通监听器和 regionchange 的 begin/end 独立生命周期。

    Closes #19582

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro runtime DOM 事件实现的路径)

    验证

    • 新增 12 个回归用例,原实现 6 个失败、6 个通过;修复后全部通过。
    • 覆盖原回调取消、同步重入、抛错后解绑、this/事件参数、普通与 once 共用回调、其他监听器及事件类型保留、重复注册、回调内重新注册、事件名大小写、regionchange 取消及 begin/end 独立生命周期,以及 once:false 对照。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:20 个文件通过,285 个用例通过、1 个跳过。Node.js 26.8.1 / pnpm 10.0.0。
    • pnpm --filter @tarojs/runtime run build:Node.js 22.14.0 / pnpm 10.0.0,退出码 0。沙箱内首次构建生成产物后未退出,结束空闲进程并在放宽沙箱限制后重跑通过。
    • 修改源码及新增测试 ESLint(--no-ignore)、git diff --check 通过。

    分支独立基于官方 main 的 603489c8e73,仅包含 runtime 源码和新增测试两个文件。测试直接调用真实 runtime;未运行全工作区构建、小程序开发者工具或真机验证。

    与 #19506 的 shared Events.once、#19529 的未注册监听器移除修复属于不同问题。

    Summary by CodeRabbit

    • Bug 修复
      • 修复一次性事件监听器的生命周期处理:回调执行前即移除监听器,避免同步重入或回调报错时重复触发。
      • 改进使用原始回调移除监听器时的处理,并保持事件参数、接收者及事件别名行为一致。
    View discussion on GitHub
  • fix(autoindex): report exact code size-limit skips

    Files
    7
    Additions
    +426
    Deletions
    −9
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    A source file one byte over the fixed 2 MiB code-extraction cap currently reports the same rounded 2.0 MiB as the cap and asserts that it is too large to be hand-written. --max-file-mb 6 cannot change this limit, but help does not explain that distinction.

    Report exact limit/file byte counts, remove the authorship inference, and explain the independent fixed cap in the refusal and CLI help. For the synthetic boundary case the reason now names 2097153 bytes against 2097152 bytes, says no records were produced and identifies which flags cannot raise the cap. Parsing, admission, skipped status and exit codes are preserved.

    Relationship to issues and PRs

    • Refs #2745: this is a diagnostic/help follow-up. It does not add large-file indexing, configurable limits or chunking, so it deliberately does not close the issue.
    • Follow-up to already merged #2666 (original diagnostic work for #2483): that PR already replaced the generic parse-failure outcome with an explicit size refusal on current main. This PR does not reimplement that fix or claim the old released behavior persists on main.
    • Rebased directly onto f855d39d; preserves the Vue/Svelte support/tests from merged #2735. No unmerged prerequisite PR, duplicate prerequisite commits or merge-order dependency.
    • The separate oversized indexed-JSON/semantic issue mentioned in #2745 is outside scope.

    Verified

    Repository-visible commands, results, limitations and contribution-review audit: tools/code-size-limit/VERIFICATION.md. The committed smoke script reproduces the private-node workflow with synthetic Perl only.

    • ES-YAML on the final composed tree: 1,453 passed, 0 failed, 10 skipped, 233 files; 74 cases use the unchanged catch-lenient policy. Private node exited 0.
    • Three new regressions fail before the fix on e5675dec, then pass: inclusive byte boundary, scan classification under a larger whole-file allowance, and help.
    • Crate suite: 1,976 passed, 0 failed, 5 existing ignored, 3 documented macOS filesystem filters. Local mock ports required network permission; the first sandboxed attempt failed at binding.
    • Scoped release build, cargo fmt --all plus check, scoped Clippy with an existing dead_code allowance; no lockfile/dependency edits.
    • Real CLI/HTTP first run, unchanged rerun and graceful restart: 3 files / 6 MiB, 2 indexed, 1 explicitly skipped, 6 live records, 4 retrievable definitions. Both indexing invocations return completed-with-junk exit 3; both nodes exit 0. This is a correctness fixture, not a throughput benchmark.

    Not verified / deferred

    Windows/Linux, all language grammars, neural mode, reporter's private source, metadata-read failures, concurrent changes, interrupted/pending-state recovery and old-plan upgrades were not exercised. No stored diagnostic migration is added; a previously committed plan can retain its old reason. No performance improvement is claimed. The 2 MiB cap remains fixed.

    View discussion on GitHub
  • docs(feedback): report code size-boundary experience

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the required field report after running the private synthetic Perl boundary workflow for #2789 (Refs #2745). Exactly one new report file, 13 lines, independently based on f855d39d; no implementation commits or merge-order dependency.

    Verified: the committed smoke script in #2789 indexed two of three files, preserved the oversized-file skip, retrieved four definitions, retained six records through an unchanged rerun and graceful restart, and stopped both private nodes with exit 0. The file passes the existing Markdown re-include rule and git diff --check.

    Not measured: retrieval quality on real code or cross-platform behavior. No engine gates were rerun for this report-only branch; the separate implementation PR records its own final checks.

    View discussion on GitHub
  • feat(embed): add browser-local chat history

    Files
    14
    Additions
    +802
    Deletions
    −23
    Commits
    4
    Comments
    1
    Review comments
    3
    Merged by
    lyingbug
    PR description

    Description

    Starting a new embedded conversation overwrites the only stored session handle, preventing visitors from returning to earlier chats. Add a history drawer with the latest 30 non-empty conversations, signed-session switching, local clearing, titles, and timestamps. Histories are separated by channel, agent, and anonymous visitor. Messages and API tokens are not stored by this history feature.

    Validate a saved handle through the existing signed message API before changing the active chat. Network/server failures preserve both current state and the saved entry; definitive 403/404/410 failures remove only the invalid entry. Navigation is serialized, and late responses after channel changes or unmount cannot activate a chat. Legacy current-session records migrate when their messages load.

    Clearing local history creates a replacement conversation first and retains all existing state if that creation fails. It removes browser handles without deleting server messages. Blank conversations are omitted; blocked/full storage keeps this page's history usable in memory. The drawer supports keyboard closing, and both standalone embed and main-app locales are translated in six languages.

    Type of Change

    • New feature
    • Bug fix
    • Documentation update
    • Test

    Related Issue

    Closes #4393

    Testing

    • Final frontend suite (node --import tsx --test): 2,020 passed, 1 skipped, 0 failed. Run with local loopback ports enabled for the existing MCP proxy tests.
    • History-focused suite: 21 passed. Covers signed switching, scoped storage, size bounds, malformed/full storage, legacy migration, retries after timeout/401/429/503, definite invalidation, cross-tab clearing with queued storage events, and clears during bootstrap or pending switch/denial responses.
    • npm run type-check: passed.
    • npm run build: passed, with the existing large-chunk warning.
    • git diff --check upstream/main...HEAD: passed.

    Cross-tab clearing uses a durable revision marker and storage events. An already open cleared conversation remains usable, but its handle is not automatically restored to history; starting a new conversation resumes recording. Bootstrap only replaces handles rejected with 403/404/410. Temporary failures keep the handle and offer a translated retry button.

    Earlier Chrome checks (before this follow-up) exercised the embed page against a synthetic local API: new chat, history selection, and reload restoration. This follow-up was validated with Vue behavior fixtures and compilation/build checks; no new browser or live backend/model integration run is claimed. No Go code, API, database schema, or dependencies changed.

    Checklist

    • git diff --check upstream/main...HEAD passes
    • Targeted tests and full frontend tests pass
    • Frontend type checking and production build pass
    • Self-reviewed the change
    • Added regression tests and updated documentation
    • Validation scope and limitations documented

    There is no frontend lint script. No Go code changed, so Go lint/tests and full-repository integration checks were not run. This adds browser-local history without changing existing API contracts.

    Screenshots / Recordings

    Screenshots are not attached. Earlier synthetic-backend browser checks covered opening the history drawer, creating another conversation, selecting an older conversation, and restoring it after reload. The final cross-tab and retry changes are covered by behavior tests; they have not been rechecked against a live backend in a browser.

    View discussion on GitHub
  • fix(vite): 缓存完整的资源模块代码

    Files
    2
    Additions
    +80
    Deletions
    −8
    Commits
    3
    Comments
    3
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    同一资源带不同查询参数导入时,Vite assets 插件清理查询参数后命中同一缓存。首次 load 返回完整 JS 模块,但缓存保存的是裸 URL;后续 load 丢失导出包装,导致内联资源报语法错误、外部资源报默认导出不存在。

    将缓存内容改为最终 ESM/CommonJS 模块代码,让缓存命中与首次加载返回一致。保留现有资源键、内联阈值、输出形式和 buildStart 重置行为。

    Closes #19574

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)
    • 所有小程序

    以上指使用 Vite 的构建,共用该 assets 插件。

    验证

    • 新增 26 个用例。修复前 assets 测试文件 24 个失败、55 个通过(包含既有 53 个用例);修复后 vite-runner 全量 pnpm --filter @tarojs/vite-runner run test:ci --maxWorkers=2:3 个文件、92 个用例全部通过。
    • 覆盖 png/woff/mp4、内联/外部资源、ESM/CommonJS、重复 id/查询参数/hash 的缓存命中,以及命中缓存后不会重复 emitFile。
    • 验证 buildStart 清理缓存后重新读取修改的内容并获取新资源引用,?raw/?url 请求仍交由 Vite 处理。
    • 6 个真实 Vite library build 用例,检查同资源两个查询变体可构建、外部资源只输出一次且内容正确、输出模块没有遗留资源占位符。
    • pnpm --filter @tarojs/vite-runner run build:Node.js 22.14.0 / pnpm 10.0.0 下通过。
    • 使用构建后的 CommonJS 插件额外执行 6 次真实 Vite 构建(不 mock 插件或适配 mrmime),覆盖三类资源的内联/外部输出,均通过。
    • 修改文件 ESLint、git diff --check 通过。测试环境 Node.js 26.8.1 / pnpm 10.0.0。

    临时构建目录使用 realpathSync,避免 macOS /var 与 /private/var 路径别名影响资源路径。未运行完整 Taro 应用、浏览器 dev/HMR 或各小程序平台构建矩阵。未修改依赖或锁文件。

    分支独立基于官方 main 84290e331b8;与 #19559 的数字阈值修复独立。

    Summary by CodeRabbit

    • Bug 修复
      • 修复文件资源缓存命中时模块内容与首次加载不一致的问题。通过不同查询参数或片段请求同一资源时,现可获得一致的内容。
      • 修复资源变更后的缓存读取问题,确保缓存更新后能读取最新内容,并正确处理内联资源或独立资源文件。
      • 修复缓存后的资源请求处理,确保通过 ?raw 或 ?url 获取资源时仍能正常工作。
    View discussion on GitHub
  • fix(runtime): 同步空 fragment 替换后的渲染与删除通知

    Files
    2
    Additions
    +164
    Deletions
    −0
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    用空 fragment 替换子节点时,逻辑树会删除旧节点,但 insertBefore 没有插入任何内容,随后的删除又跳过更新,导致页面渲染数据仍保留旧节点,也缺少 MutationObserver 删除通知。

    在插入前识别空 fragment,并委托现有 removeChild 路径处理,使删除正常排入渲染更新、记录通知并清理事件索引。非空 fragment 和普通节点替换沿用现有路径。

    Closes #19576

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro runtime DOM 的路径)

    验证

    • 新增 10 个回归用例,原实现 6 个失败、4 个通过;修复后全部通过。
    • 覆盖唯一节点、首/中/尾位置、注释节点过滤、返回值、父子及兄弟关系、fragment 保持为空、MutationObserver 删除通知、子树事件索引清理,以及非空 fragment、普通节点和无效旧节点对照。
    • 挂载测试使用真实 runtime 根节点和更新队列,通过模拟页面 setData 保存并校验最终渲染数据,确认旧节点从渲染数据中移除。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:20 个测试文件通过,283 个用例通过、1 个跳过。测试环境为 Node.js v26.8.1 / pnpm 10.0.0。
    • 修改源码及新测试文件 ESLint(--no-ignore)、git diff --check 通过。
    • 全工作区 pnpm build(包含 runtime):Node.js v22.18.0 / pnpm 10.0.0,退出码 0;存在未修改文件的类型、组件等构建告警。

    分支独立基于上游 main 的 c4e9c548864,不包含独立的 Vite 资源缓存修复。未进行小程序开发者工具或真机验证。

    Summary by CodeRabbit

    • Bug 修复
      • 修复使用空文档片段替换子节点时的处理问题:现在会正确移除原节点,并保持页面节点关系与更新状态一致。
    View discussion on GitHub
  • fix(judge): score CJK evidence inside continuous text

    Files
    6
    Additions
    +647
    Deletions
    −24
    Commits
    6
    Comments
    7
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    The lexical judge previously tokenized 该段内容存在雷同需要核查 as one word, so query 雷同 received no token-overlap evidence and could be removed by a positive judge.min_p. Emit CJK characters and adjacent pairs while preserving non-CJK lowercase word runs, deterministic scoring, original _score, ordinals, totals and the local-model path. Pairs stop at punctuation, non-CJK runs and the title/body boundary. No reindexing, dependency or stored-format change.

    Refs #2580: judge portion only. First-stage analyzers and candidate recall are unchanged; the judge cannot recover candidates outside its input page. No broad relevance or cross-language calibration claim is made.

    Main integration after #2697

    Head 73934a2dedd69c6be044a1b17b4fe5914bd9d5e7 merges upstream 6a7b390ac into prior PR head 25c61738d, preserving the maintainer-authored merge and #2639. The sole conflict was the CHANGELOG insertion point after #2697; both the CJK entry and the 32 MiB batch-response entry are retained. The implementation, HTTP regression, smoke harness and rerank docs are byte-identical to the previous PR head. The effective diff remains the original six files, with no stacked dependency, workflow change or upstream rollback. Pushed normally without rewriting history.

    All checks below were rerun on this composition. The latest verification section records executable snapshot 71735dfe2699509fd66c6febc2e5e84b9b7414e795854d0c8a9a7add56dc9907. Hosted CI for this newly pushed head is separate from local results.

    Verified on the composed tree

    macOS arm64 / Rust 1.97.1 / source-built rc.100:

    • Default rerank: 59 passed, 0 failed; judge-local: 61 passed, 0 failed. No filters or ignores; all egress-inventory tests now pass.
    • HTTP judge: 15 passed, 0 failed, no filters or ignores.
    • Scoped release build, formatting, strict Clippy in both feature configurations, Python syntax, whitespace and workflow-timeout checks passed.
    • Isolated ci-test node/runner build passed with the existing autoindex resolve_reporting dead-code warning.
    • Same-snapshot ES-YAML: 1,453 passed, 0 failed, 10 skipped across 233 files, retaining 74 existing catch-lenient cases. The runner and temporary nodes exited 0.
    • The same snapshot passed CJK HTTP/MCP ordering, threshold/count, original-score, flush and graceful-restart checks. Fixed-fixture lexical scores remained exact 0.5900621118012421, partial 0.24340586742297435, unrelated 0.0. These are not calibrated relevance probabilities or a quality benchmark.

    Reproduction, snapshot identity, prior failing-before-fix evidence and audit. The original regression run observed both new CJK score tests fail with all-zero results on the old implementation; the non-CJK golden fixture preserves its original score bits. Original exclusions are documented separately from today's unfiltered runs.

    Review and limits

    Audited against docs/CONTRIBUTION_REVIEW.md. Upstream workflows and API/storage changes are preserved; existing tests and assertions remain intact. Reference approach and MIT license check for Tantivy's codepoint n-gram tokenizer are documented by file/line; no implementation was copied. No durable-state, migration, optional-accelerator, provider execution, distributed-write or deployment change.

    Not verified: the original six-file Windows corpus, first-stage CJK recall, broad repository relevance, cross-language thresholds, dictionary segmentation, half-width kana/jamo normalization, Linux/Windows execution or trained-model quality. Feature tests use a tiny synthetic model fixture. Hosted CI on the pushed head is separate from local results. The existing session field report is #2620.

    View discussion on GitHub
  • fix(h5): 修复页面滚动监听器的容器归属

    Files
    4
    Additions
    +323
    Deletions
    −13
    Commits
    1
    Comments
    2
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 bindPageScroll 的监听器共享可变的 pageDOM:绑定 B 后,A 的滚动回调和触底判断会读取 B 的容器。同一路径更换容器时,又从新容器移除旧监听器,导致旧容器上的回调继续执行。

    按现有页面路径保存监听器及其目标;重新绑定时从旧目标解绑,让回调和触底计算捕获自身容器。保留现有按路径替换绑定、触底阈值和复位规则。

    补充 router 的 test/test:ci 脚本,让工作区测试入口能执行新增测试。

    Closes #19572

    历史 #11504 有相关症状,但这里仅修复当前容器归属和重新绑定的问题,不宣称覆盖历史 issue 的所有原因,也不新增页面隐藏/卸载的清理策略。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 13 个回归用例,原实现 10 个失败、3 个通过,修复后全部通过。
    • 覆盖页面容器隔离、触底判断及复位、同路径的新旧页面实例、重复绑定、Window/元素互换、默认阈值和无回调页面。
    • 使用真实 PageHandler / MultiPageHandler、DOM 容器及事件验证 SPA show/hide/返回、SPA 容器重建、MPA 加载时容器替换;未 mock 滚动或页面处理器实现。
    • Window 用例在测试内校准 Jest VM 的 window instanceof Window 判断,并在测试结束时恢复;生产代码沿用原有判断方式。
    • 全工作区 pnpm build(包含 router):Node.js v22.18.0 / pnpm 10.0.0,退出码 0;有未修改文件的类型、组件等构建告警。
    • 构建完成后顺序运行 pnpm --filter @tarojs/router run test:ci --watchman=false:2 个测试套件通过、2 个原有套件跳过;13 个用例通过、7 个原有用例跳过(Node.js v26.8.1 / pnpm 10.0.0)。首次与构建同时执行时曾因依赖产物正在清理导致旧测试套件加载失败,完成构建后重跑通过。
    • 修改源码及新测试文件 ESLint(--no-ignore)、git diff --check 通过。

    测试基于 jsdom,未进行完整浏览器应用导航或真机验证。分支独立基于上游 main 的 13b8ba72cfe,不包含 dataset 或深克隆修复。

    Summary by CodeRabbit

    • 修复
      • 修复页面切换或重新绑定后,滚动事件可能仍关联旧容器的问题。滚动位置和触底回调现仅作用于当前页面的滚动容器。
      • 修复切换窗口与页面容器等滚动目标时,滚动数据可能相互影响的问题。
    View discussion on GitHub
  • feat(autoindex): export offline HTML and Markdown data maps

    Files
    15
    Additions
    +1,464
    Deletions
    −4
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    xerj autoindex map previously exposed its inventory only as terminal text or JSON. Add --html <FILE> and --md <FILE> to write a self-contained offline report, with optional --redact-paths. Fixes #2643.

    Reports contain dataset/format counts, bounded symbol-name frequencies, incoming graph hubs resolved to selected files, catalog exclusions and five suggested lexical searches. They label catalog/enrichment limits and unavailable reads. A newer no-graph run does not resurrect old graph metadata; hydration cannot use another prefix's same-ID file. Ordinary map/JSON output and catalog filters retain their paths.

    HTML embeds its CSS and has no scripts, fonts or CDN requests. Variable HTML/GFM text is escaped. Redaction removes file paths and skip reasons; dataset/index/format/brain/symbol names remain visible and need review before sharing. Reports exclude full document bodies and configured credentials/endpoints. Search suggestions are unexecuted, not guaranteed answers. Outputs are staged beside their destination and published without overwriting an existing file or symlink; ambiguous format/JSON/paging combinations are refused.

    Validation

    macOS arm64 / Rust 1.97.1 / source-built rc.100. Detailed commands, source references, baseline exclusions and the original executable identity are in tools/map-report/VERIFICATION.md.

    • Observed the new CLI test fail on the original parser (unknown argument: --html), then pass. All seven report tests cover argument refusal, escaping/redaction, read-only metadata requests, graph/prefix scope, optional errors, no-clobber publication and output races.
    • Complete implementation run: 1,947 passed, 0 failed, 5 existing ignored, 3 explicit filters. All three filtered cases were reproduced on clean upstream; no existing test or skip was weakened.
    • Scoped release build, formatting, Python syntax, whitespace and workflow-timeout checks passed. Clippy uses only the existing command-line dead-code allowance for content::resolve_reporting.
    • Fresh private-node ES-YAML: 1,453 passed, 0 failed, 10 skipped across 233 files, retaining 74 existing catch-lenient cases. The same executable passed graph/no-graph fixture runs, HTML/Markdown, raw/redacted metadata, dataset scope, no-clobber refusals, empty-catalog refusal and unchanged ordinary map/JSON. The fixture produced 12 records per run; these are not performance or quality measurements.
    • Desktop/mobile and offline rendering passed, with no page-level horizontal overflow, scripts or external resource entries.
    • Submission normalizes only the Markdown terminal newline; the seven report tests and scoped release build were repeated after that output-format correction. The verification record distinguishes the original complete-run receipt from submission follow-ups and hosted CI.

    Review and limits

    Audited against docs/CONTRIBUTION_REVIEW.md. This is an independent autoindex client/export change, with no dependency on #2635. Latest upstream changes are retained. No engine, storage, API, MCP schema, dependency, workflow, journal or catalog-format change. Durable corpus transitions, schema migration, distributed writes, models and optional accelerators are not applicable.

    Not verified: Linux/Windows execution, large-node latency/memory, comprehensive global file-degree ranking, broad query relevance, or anonymity of metadata names. Graph lists are top incoming nodes, not an exhaustive sum over every file record. Required session feedback #2702 was submitted separately and has merged.

    Examples: Markdown report, downloadable HTML report, and usage/privacy/reproduction guide.

    View discussion on GitHub
  • docs(feedback): offline map export verification

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the single-file field report required by AGENTS.md after exercising the local #2643 candidate on a temporary lexical node and a synthetic Rust/Markdown/CSV corpus. Records offline rendering, redaction limits, bounded graph semantics and unchanged ordinary map output.

    Verified: the diff adds only this report, is under the 25-line ceiling, and the existing .gitignore re-include applies. All counts are from executed fixture runs or browser checks. This report explicitly concerns an unreleased local candidate, not the published rc.100 binary; no performance or broad relevance claim is made. Engine and website gates do not apply to this report-only PR.

    View discussion on GitHub
  • fix(console): carry rounded duration seconds into minutes

    Files
    2
    Additions
    +31
    Deletions
    −2
    Commits
    1
    Comments
    3
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    Conversation and Debug duration labels can show 1m 60s when an elapsed time such as 119.5 seconds rounds up. Round the total seconds before splitting minutes and seconds, so these values display as 2m 0s.

    Keep the existing compact style, sub-minute formatting, and unknown-value handling. Execution timing and API contracts are unchanged.

    Related issue

    No separate issue.

    Validation

    The new boundary tests reproduced three carry failures before the fix. All 67 focused formatter, timeline, transcript, and Debug tests pass after it, along with Console TypeScript and formatting checks.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • test(console): cover language selection and preference persistence

    Files
    1
    Additions
    +124
    Deletions
    −0
    Commits
    1
    Comments
    4
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    Console's existing i18n tests exercise translation APIs and preference helpers, but do not interact with the actual Language settings control. Add focused interaction tests using the real selector, application i18n configuration, and English/Simplified Chinese resources.

    Cover immediate text updates in both directions, restoration of both explicit choices after remounting, returning to System without persisting a resolved locale, and switching when browser storage cannot be read or written. System mode is also checked after remounting with a different browser language.

    This adds regression coverage for existing behavior; production code and contracts are unchanged.

    Related issue

    Refs #1259. This covers the language-control integration boundary only; the broader localization checklist remains open.

    Validation

    The new five interaction cases and the existing i18n/preference tests pass together (17 tests). Console TypeScript checks and formatting pass. The tests use real user interactions and translation resources, with isolated i18n instances and browser storage cleanup.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(harness): fit retained history references within recovery budgets

    Files
    2
    Additions
    +67
    Deletions
    −4
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    Context recovery can raise AssertionError at the supported 2,048-character budget when legacy history and a long retained-history path make the fixed prompt exceed its cap. Account for all fixed notices before including the complete reference, and explicitly omit the reference when it cannot fit.

    References that fit remain intact, including at the exact budget boundary. Paths are never truncated, and the aggregate budget assertion remains in place. This enforces the existing recovery contract without changing public configuration or defaults.

    Related issue

    Closes #1343

    Validation

    The upstream reconstruction function fails the two new over-budget cases and the new Harness recovery-flow test. With the fix, all 100 context-recovery and recovery-budget tests pass, including a legacy continuation that overflows both primary execution and compaction, then resumes successfully with checkpointed recovery state. Retained-history storage is stubbed in that flow; existing tests cover actual local file preservation.

    The 100 tests also pass after preparing all Harness runtime dependencies and its test group from uv.lock. The repository's SQLAlchemy warning filter and xdist marker emitted configuration warnings because those unrelated packages were not installed in the package-scoped environment. Ruff lint and formatting checks pass for both changed files.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • docs(service): clarify bundled Console serving

    Files
    1
    Additions
    +1
    Deletions
    −1
    Commits
    1
    Comments
    5
    Review comments
    0
    Merged by
    Wh1isper
    PR description

    Summary

    The Service overview says that Service hosts no browser assets, contradicting the Console runtime contract and implementation. Clarify that API-serving roles serve the bundled Console when its build is present, link to the owning contract, and retain the worker-only boundary.

    This corrects specification prose without changing runtime behavior or compatibility.

    Related issue

    Closes #1334

    Validation

    Checked the wording against the Console runtime contract, serving implementation, and existing role/build test cases. Verified the overview's relative links and heading anchors. The selected specification Markdown check passed using validation tools pinned from uv.lock in an isolated environment. Runtime tests were not run because only specification prose changes.

    Checklist

    • Tests cover the changed behavior, or the reason they are unnecessary is explained.
    • Affected specifications, documentation, and automation are updated.
    • Shared rules have clear owners, and added complexity serves a concrete current need under the code quality principles.
    • Breaking or compatibility-impacting changes are identified and documented.
    • AI-generated changes were reviewed and understood by the human author.
    • The PR title and labels describe the change accurately for generated release notes.
    View discussion on GitHub
  • fix(autoindex): discover separately exported TS/JS factories

    Files
    4
    Additions
    +525
    Deletions
    −3
    Commits
    2
    Comments
    0
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    const store = createStore(...); export { store }; previously had no const definition record. Collect this module's separate value exports and admit matching top-level factory bindings, so CLI/MCP definition lookup returns the original declaration name, line and code. Default identifier exports and local export aliases are included.

    Refs #2579, partial related scope only. Its inline export const useUserStore = create<UserState>()(...) example already works on the tested upstream, including through real autoindex and CLI/MCP lookup. This PR does not diagnose the original private-monorepo incident, add arbitrary private-constant discovery, or claim to close the issue.

    Private constants, function locals, mutable bindings, remote re-exports and TypeScript type-only exports retain their scope. Export aliases do not become invented declarations. Existing unchanged files need re-extraction; rebuilding into a new prefix/state directory preserves the old corpus. No automatic cross-version journal migration is claimed.

    Verified

    macOS arm64, Rust 1.97.1, source-built xerj v1.0.0-rc.100.

    • Watched the new scope test fail on the old implementation with typescript: missing namedStore; the original inline-export control passed. The candidate passes the inline, separate-export and type-only/export-isolation regressions, including exact declaration records and locations.
    • Final complete autoindex crate run: 1,927 passed, 0 failed, 5 existing ignored, 3 explicit baseline filters, with --test-threads=2. All three filtered tests fail on unmodified upstream 906400870 too; no existing assertion or committed skip was changed. The composed default-thread run also hit an unchanged PDF pipe-close timeout test; the final low-concurrency run includes it and passes. This is not a PDF fix.
    • Scoped release build, formatting, Python compilation, whitespace and workflow-timeout checks passed. Scoped Clippy passes with only the existing command-line dead_code allowance; strict Clippy without it refuses the unchanged content::resolve_reporting.
    • Real private-node smoke: 3 synthetic TS/TSX/JS files, 826 bytes, 12 records; all 9 checked definitions have matching CLI/MCP hits and declaration citations after first indexing, unchanged rerun and graceful restart. The inline Zustand-style factory and separately exported factories are separate controls. Temporary node uses lexical mode and a 99% disk flood watermark to admit the tiny fixture on this shared laptop; no existing node, model or personal corpus is used.
    • Fresh private-node ES-YAML: 1,449 passed, 0 failed, 10 skipped across 231 files; unchanged 75 catch-lenient cases. Runner and node exit 0. The same final executable snapshot serves this gate and the subsequent repeated lifecycle smoke checks. An earlier pre-rebase attempt hit a 300-second harness timeout; the final 900-second cap completed normally.

    Reproduction, baseline exclusions, executable identity and review boundary. Required single-file field report is separate: #2620.

    Ancestry and review

    Independent branch initially based on 906400870, rebased onto 7d3ca96b1. No prerequisite or duplicated unmerged commits; the upstream corpus/session-import changes are preserved. Tree-sitter grammar evidence and MIT licensing are cited beside the implementation and in the verification record; no upstream implementation was copied.

    Audited against docs/CONTRIBUTION_REVIEW.md. Existing scope tests are preserved, new definitions retain the ordinary locator/count path, and the real-node harness checks an unchanged run and durable restart. No query scoring, wire endpoint, mapping, journal format, dependency, workflow or feature-gate changes. Distributed writes, optional accelerators, model execution, telemetry migrations and installation/deployment changes are not applicable. No performance or retrieval-quality improvement is claimed.

    Not verified: the original private repository, production-journal upgrades, Linux/Windows execution, destructured/wrapped initializers, or alias-name lookup as a separate declaration. Hosted merge-ref CI remains separate from local verification.

    View discussion on GitHub
  • docs(feedback): TS/JS factory definition verification

    Files
    1
    Additions
    +16
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Add the single-file field report required by AGENTS.md after running a private source-built rc.100 node against three synthetic TS/TSX/JS files. Records the already-working inline-export control, the separately exported factory gap related to #2579, CLI/MCP parity and the disk-watermark friction.

    Verified: 16 lines; the existing .gitignore re-include applies; the diff adds only this report. Runtime receipt: 12 records from 826 bytes, nine checked definitions, unchanged rerun and graceful restart. Elapsed times are fixture observations, not performance claims. No personal source, model or existing node/index was used.

    No engine, site or workflow changes in this PR; engine validation belongs to the separate fix/2579-ts-js-factory-definitions branch.

    View discussion on GitHub
  • feat(cli): import Codex rollout text for autoindex

    Files
    8
    Additions
    +875
    Deletions
    −95
    Commits
    2
    Comments
    0
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    xerj sessions import previously accepted only Claude Code transcripts. Add --format codex for one explicitly selected, archived rollout JSONL file, sharing the bounded reader, native PII redactor, sanitized staging and no-clobber publication path. Review the exported records, then use ordinary autoindex and search to retrieve the original decision.

    Relationship to issues and PRs

    • Refs #1793, extending the first format delivered by merged #2406. This does not close #1793: there is no automatic discovery, Cursor adapter, inferred file/commit association or active-history reconstruction.
    • Independent branch from upstream 23016aa6d41123956860309a5aae3d3526b4415e, which already contains #2406. No duplicated prerequisite commits or special merge order. No dependency on the still-open benchmark PR #2384.
    • Existing Claude Code export fields, admission rules and recovery helpers remain in use; the normal JSONL autoindex extractor is unchanged.

    Format and privacy contract

    Read timestamped session_meta / response_item rollout envelopes, exporting only user/assistant message text. Skip duplicate event_msg text, system/developer messages, reasoning, tools/results, encrypted content and arbitrary metadata. PII processing applies to body, basename, cwd and branch before staging writes. User-role text can itself contain injected context; the existing five-pattern plugin is not a universal secret filter.

    Provider message IDs can be absent or repeated, so exported event IDs use the thread UUID, physical line and SHA-256 of the original line bytes. Preserve source basename/line/byte offset, timestamp and explicit message phase; leave parent/branch status unknown and file references empty. Physical order includes historical messages before rollback/compaction; it is not the current context. Reject external history_base, repeated session metadata and unsupported shapes rather than silently publishing partial inherited history.

    The adapter supports a documented internal-format subset, not exec --json, prompt-only history, compressed files, app-server JSON-RPC or every client release. All fixtures are synthetic; no personal transcript was accessed.

    Format evidence was retrieved before implementation from Apache-2.0 OpenAI Codex commit 970111f6cb62cc02fe36a82ea7d71b37a2889c97: rollout writer, tagged history payloads, session metadata, message/content definitions. Pinned file/line citations and the full field/refusal contract are in tools/session-import/README.md. No upstream implementation was copied.

    Verified locally

    macOS arm64, Rust 1.97.1, source-built xerj v1.0.0-rc.99:

    Implementation commit ea74d998. Final scoped rebuild and the executable snapshot used for smoke/conformance have identical SHA-256 88e8be55b5fce5c5a515ebfc3306905a57ac852714431cb9a18e1223d160c4e8.

    • The new CLI regression failed before implementation because only --format claude-code was accepted; it now passes.
    • Autoindex crate: 1,844 passed, 0 failed, 5 existing ignored, 3 explicit macOS filesystem filters. These filters and their original baseline reproductions are documented, not committed test skips.
    • Session module: 16 passed (11 existing/shared, 5 Codex). Main binary: 119 passed. CLI integration: 4 passed.
    • Scoped release build, formatting, listed Clippy targets, Python compilation, whitespace and workflow-timeout checks passed. Autoindex Clippy uses only the existing dead_code command-line allowance; server targets use -D warnings.
    • Both release-binary smoke flows passed: import/redaction, overwrite refusal, private-node first index and unchanged rerun, original-source decision lookup and graceful restart, with 2 records per format. Codex locates original line 9; Claude Code retains line 3 and its explicit file reference.
    • Fresh private-node ES-YAML: 1,444 passed, 0 failed, 10 skipped across 229 files; unchanged 75 catch-lenient cases, runner/node exit 0.
    • Private-copy mutations bypassing PII redaction failed the 2 intended Codex privacy tests; removing the external-history guard failed the refusal test by incorrectly publishing an export. Restored source passed all 16 tests.

    Exact commands, exclusions, lifecycle results and review boundary: tools/session-import/CODEX_VERIFICATION.md.

    Review and untested scope

    Audited against docs/CONTRIBUTION_REVIEW.md: new format/parser, shared offline publication path, synthetic tests and documentation only. No dependency, lockfile, endpoint, workflow, model or normal JSONL extraction change. Existing outputs are never overwritten, invalid input publishes nothing, and corrected input can recover using the never-published output path. Snapshot refresh requires a new export folder and index prefix/state; no previous export or product index is migrated or rewritten.

    Distributed state, accelerators and provider/model execution are not applicable. Not tested: real personal/live-client transcripts, Linux/Windows execution, external history reconstruction, automatic discovery, incremental refresh, general secret removal or generated answers. No speed/quality improvement is claimed. Website generation gates were not run because no landing files change. Hosted merge-ref CI is separate from local verification.

    View discussion on GitHub
  • fix(map): clarify autoindex and managed corpus namespaces

    Files
    10
    Additions
    +399
    Deletions
    −9
    Commits
    4
    Comments
    0
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    An empty autoindex catalog map could be read as evidence that a managed reference-code corpus is absent. Clarify that these are separate discovery surfaces in CLI diagnostics, MCP empty results, help and the tool description. Use the client's configured corpus list/code workflow when looking for a managed corpus; do not invent a matching corpus or start indexing automatically.

    Relationship and behavior

    • Fixes #2412's catalog/managed-corpus discovery confusion. Its secondary observation about broad-query ranking is not changed or evaluated here.
    • Independent branch from upstream 9cf3f29c. No prerequisite or merge-order dependency on the data-directory diagnostics in #2414, Codex importer #2413, or batch benchmark #2384. No duplicated commits. The two diagnostics branches compose cleanly with git merge-tree --write-tree.
    • Empty MCP success keeps matched:0 / indexes:[], adding namespace_hint. A missing catalog remains HTTP-404-derived isError:true, with the engine body retained. CLI empty/missing results keep exit 1 and stderr diagnostics, including with --json. Positive maps retain their existing data shape.
    • Existing 401/403 and transport/server refusals remain errors. The shared hint does not probe a corpus registry, infer name equivalence, select a fallback index, add network calls or write any state.

    The published xerj_map description was regenerated from the actual binary's 22-tool tools/list, not hand-edited. Only that description changes in the generated JSON; tool names and input schemas remain intact.

    Verified locally

    macOS arm64 / Rust 1.97.1, source-built xerj v1.0.0-rc.99. Exact commands, negative controls and exclusions are in tools/catalog-map/VERIFICATION.md.

    • Old map implementation: 4 expected empty/missing scope failures; 6 positive/401/403 controls passed. Candidate: 10/10 CLI/MCP cases passed, including CLI JSON stdout and read-only route checks.
    • Autoindex: 1,839 passed, 0 failed, 5 existing ignored, 3 explicit macOS filesystem filters. The unchanged baseline/platform cases are documented.
    • MCP: 167 passed, 0 failed, 1 explicit local filter, including 148 library tests, the new empty/positive and HTTP classification regressions and published-schema drift. Uses RUST_MIN_STACK=16777216 for local-def tests.
    • The filtered proxy integration also failed when run alone on unmodified 9cf3f29c with the same diagnostic against 127.0.0.2:9. Its cause is not diagnosed/fixed here. No committed test, assertion or CI skip was changed.
    • Scoped release build, formatting, scoped Clippy, Python compilation, whitespace and workflow-timeout guard passed. Autoindex Clippy has only the documented existing dead-code command-line allowance; MCP also passed strict -D warnings without that allowance.
    • Live schema generation/check passed (22 tools). All 14 site checks passed, including factcheck fixtures and landing-constants guard; non-gating warnings remain in untouched content/HTML.
    • Separate fresh-node ES-YAML: 1,447 passed, 0 failed, 10 skipped across 230 files, unchanged 75 catch-lenient cases; runner and node exit 0.

    The same private executable snapshot served transport, schema and conformance checks: SHA-256 e4aa924e5cc5d1f3cfde3dc4fb490054245106e139e51d6e4b1d11dd3c4b758f. This is a local source-build receipt, not a published-release verification.

    Audit and untested scope

    Audited against docs/CONTRIBUTION_REVIEW.md: preserve catalog filtering, pagination, positive data and error classifications. The existing search_present helper uses the same request/retry path and distinguishes 404 from other failures. The hint is explanatory metadata, not dataset evidence. No mapping, journal, durable format, ownership, index mutation or recovery transition changes, so write-failure atomicity, legacy migrations, distributed writes, accelerators and model execution are not applicable. No performance or retrieval-quality improvement is claimed.

    Not tested: Linux/Windows execution, real managed-corpus availability, production client registries or ranking/identity-discovery changes. The known proxy fixture failure remains unresolved; hosted merge-ref CI is separate.

    View discussion on GitHub
  • bench: evaluate batch retrieval on a pinned rust-vulns pack

    Files
    10
    Additions
    +51,636
    Deletions
    −3
    Commits
    5
    Comments
    0
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    The batch adapter has shipped, but its real-pack evaluation was still missing. Add a reproducible, pinned rust-vulns comparison of one 50-item call versus 50 sequential one-item calls to the same adapter, over both CLI and a persistent MCP session.

    Relationship to the issue and prior PRs

    • Refs #1801: covers its rust-vulns retrieval evaluation: per-item correctness, retrieval abstention, task latency and payload BPE tokens. Does not close the broader answer/abstain proposal.
    • Builds on merged #2333, which introduced the CLI/MCP adapter. This is an independent branch based on current upstream main 7e155473, with no duplicated prerequisite commits or unmerged stacked dependency. It changes no engine or adapter source.
    • #2334 was the implementation's synthetic-fixture field report, not a real-pack benchmark. This PR supplies reproducible real-pack receipts; this session's required field report is the separate single-file PR #2385.
    • Related #1788: the benchmark explicitly selects the keyword id or aliases field. It does not implement automatic alias discovery or field-aware ranking.
    • Related #1786 / #1789: checks retrieval abstentions and index/ID citations; it does not implement generated answers, confidence calibration, escalation or a general version-pinned answer contract.
    • Per-release card automation (#1802) remains separate work.

    Workload and method

    Pin pack-rust-vulns-2026-10-24 by its release-asset SHA-256, validate all manifest shard hashes/counts, and index all 2,051 records in a private temporary node with explicit mappings. The fixed 50 items comprise 15 canonical IDs, 15 CVE/GHSA aliases, 10 absent near-miss IDs, 8 hand-authored title-informed text lookups, one duplicate input/key and one invalid item.

    Use size 3, no token budget, concurrency one, one discarded warmup per arm, five measured repeats with alternating arm order, and warm caches. CLI includes a process startup per call; MCP uses one initialized session. The baseline calls the same batch adapter with one-item envelopes, holding query and output semantics fixed. Tool-call counts are not HTTP request counts.

    Tokens are actual tiktoken==0.12.0 / cl100k_base counts on exact CLI stdin/stdout or MCP tools/call JSON lines, including MCP envelopes. These exclude schemas, system prompts, history, reasoning and billed model usage; they are not the adapter's UAX #29 word budget or total agent-task cost.

    Protocol and reproduction · fixed cases · raw per-call/per-item receipts

    Verified

    Measured on macOS arm64, Apple M4 / 16 GiB, XERJ_NUM_CPUS=4; release binary xerj v1.0.0-rc.99, built with Rust 1.97.1 from engine commit 7e1554734c5b26f7c4f85ee7b5ba838148fe1089. Final receipts come from clean harness commit f016e078d61bd3a2b94ea140ef3515ef1a266705. The binary is copied from the hashed bytes into private scratch and that same executable serves every call.

    ArmMedian task ms (min–max)Input BPE / trialOutput BPE / trial
    CLI batch26.487 (26.209–27.632)1,07187,676
    CLI single487.739 (480.636–491.249)1,75787,872
    Persistent MCP batch15.410 (15.340–16.186)1,101100,591
    Persistent MCP single29.515 (28.871–29.931)3,306102,257

    All four arms and all five repeats passed 49/49 valid retrieval items plus the independent invalid-item check: 31 exact lookups including the duplicate, 8 labelled text hit@3, 10 intended misses. Abstentions were 10/49 valid items (20.41%), with zero false abstentions among the 39 labelled answerable items. Ranked evidence, citations and outcomes agreed across modes, transports, warmups and repeats. Graceful stop/restart retained 2,051 records; both node and MCP exited normally.

    CLI's observed median ratio is 18.41x including startup; persistent MCP's is 1.92x. Output payload BPE fell only 0.22% / 1.63%: stored advisory bodies dominate. This does not support a large output-token-savings claim.

    Commands/checks actually run:

    • cd engine && cargo +1.97.1 build --locked --offline --release -j 32 -p xerj-server passed.
    • The README evaluation command with --repeats 5 passed on the final harness. Earlier exploratory/smoke runs are excluded from the committed receipts.
    • python3 tools/benchmarks/batch-retrieval/test_run.py: 11 passed. Covers wrong/extra IDs, citation identity, errors versus misses, positions, parity, byte accounting/duplicate preservation, archive pinning and executable snapshots.
    • A targeted mutation accepting wrong IDs produced exactly the two intended test failures; unmodified production code passes all 11 tests.
    • Real CLI negative controls: wrong archive exited 1 before output/node creation; an existing output directory exited 2 with its sentinel unchanged. A fresh output path then completed normally.
    • python3 .github/scripts/workflow-timeout-guard.py, actionlint for the new workflow, Python compilation, effective-diff whitespace checks, corpus/receipt digest and count checks passed. New Markdown is covered by the existing explicit re-include rule.

    Review, limitations and not run

    Audited against docs/CONTRIBUTION_REVIEW.md: effective ancestry/diff is isolated to the harness, fixed public workload/receipts, documentation and a path-scoped stdlib-test workflow. Existing workflows are preserved. Preflight snapshots the pack and executable, verifies labels before indexing, refuses existing output, checks bulk errors/counts, isolates children and writes the final report by rename. No existing node or index is contacted or deleted.

    The eight text labels are title-informed known-item lookups, not exhaustive relevance judgments, generated-answer accuracy or general QA. The measurements are one shared developer laptop, warm caches, one fixed batch size and concurrency; no statistical or cross-platform performance generalization is assumed.

    No Rust source, product mapping migration, durable format, optional accelerator, model execution or clustering behavior changes; those audit sections are not applicable beyond the isolated test-node lifecycle. Rust test/Clippy/fmt, ES-YAML, site generation gates, real model evaluation and cold-cache/parallel/network-latency scenarios were not run for this tooling-only PR. Linux real-node and Windows execution are untested locally; the new Ubuntu CI job runs offline stdlib harness tests. Hosted CI/merge-ref status is not claimed by local checks.

    Maintainer independent verification (2026-10-28)

    An agent integrated current main and ran the pinned benchmark on Linux with a scoped rc.100-based release build. The committed results/2026-10-28-linux-x86_64.json and README record the exact binary/source identity and all receipts. All four arms pass 49/49 valid retrieval items in every one of five repeats; the expected invalid item stays separate, ranked evidence matches, and 2,051 records survive restart. All 11 harness tests pass; wrong-archive and existing-output CLI controls refuse before publication. Original macOS receipt summaries recompute exactly. This shared-host verification does not establish a version/platform speedup; hosted checks on the updated head are pending.

    View discussion on GitHub
  • fix(runtime): 建立深克隆子树的父节点引用

    Files
    2
    Additions
    +158
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    runtime cloneNode(true) 仅填充克隆节点的 childNodes,子孙节点的 parentNode 仍为 null,导致克隆子节点无法正常移除/移动,挂载后子孙文本变更也无法找到根节点发送渲染更新。

    递归克隆每个子节点后,将其 parentNode 指向对应的克隆父节点。克隆根节点保持脱离父节点,不通过 appendChild 构造克隆树。

    Closes #19570

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(启用 Taro runtime cloneNode 的路径)

    验证

    • 新增 11 个用例,原实现 4 个失败、7 个通过;修复后全部通过。
    • 覆盖子孙父引用和相邻节点、浅克隆/文本、移除与跨父节点移动、独立属性/dataset/style、事件监听器归属、源树 MutationObserver,以及挂载后更新克隆子孙文本。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:17 个文件通过,208 个用例通过、1 个跳过。
    • 修改文件 ESLint、git diff --check 通过。
    • 全工作区 pnpm build(含 runtime):Node.js v22.18.0 / pnpm 10.0.0,退出码 0;有未修改代码的类型、组件等构建告警。

    测试使用真实 runtime,挂载验证通过根节点、更新队列与模拟页面 setData 完成;未运行小程序开发者工具或真机。测试环境 Node.js v26.8.1 / pnpm 10.0.0。分支基于官方 main 的 13b8ba72cfe,不包含独立的 dataset 删除修复。

    Summary by CodeRabbit

    • 修复
      • 修复深度克隆节点时子节点的父节点引用不正确的问题。克隆后的节点树现在能正确维护父子关系,后代节点的更新和移动也会作用于克隆节点,而不会影响原节点。
    View discussion on GitHub
  • fix(runtime): 删除 data-* 属性时同步清理 dataset

    Files
    4
    Additions
    +336
    Deletions
    −0
    Commits
    5
    Comments
    2
    Review comments
    5
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    删除 data-* 属性后,runtime 的 props 已移除该属性,但 dataset 仍保留旧值,后续事件回调中的 target.dataset / currentTarget.dataset 也会继续读到已删除的数据。

    在 removeAttribute 实际删除属性后,使用与 setAttribute 相同的键名转换同步删除对应的 dataset 键。平台 hook 中断删除、属性不存在时沿用原有行为。

    Closes #19568

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro runtime DOM 的路径)

    验证

    • 新增 10 个回归用例;原实现 7 个失败、3 个通过,修复后全部通过。
    • 覆盖简单及多段连字符键、其他 dataset 键保留、重复删除与重新设置、缺失属性、普通属性、平台 hook 中断、MutationObserver,以及真实 runtime 事件包装与派发后的 target/currentTarget dataset。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:runtime 全量测试通过(17 个测试文件,含既有跳过用例)。测试环境为 Node.js v26.8.1 / pnpm 10.0.0。
    • pnpm --filter @tarojs/runtime run build:Node.js v22.18.0 下通过。
    • 全工作区 pnpm build:Node.js v22.18.0 / pnpm 10.0.0 下通过,退出码 0;存在未修改文件的 TypeScript、组件等构建告警。沙箱内构建曾停滞,放宽沙箱限制后完成验证。
    • 修改文件 ESLint、git diff --check 通过。

    未进行小程序开发者工具或真机验证。分支基于官方 main 的 864d0bc1c91。

    Summary by CodeRabbit

    • Bug Fixes
      • 移除 data-* 属性后,关联的 dataset 键会根据仍映射到该键的属性同步更新;若没有对应属性,则删除该键,避免键值错误或丢失。
      • 克隆元素时保留数据集属性顺序,确保多个属性映射到同一键时,数据集值与原元素一致。
    View discussion on GitHub
  • fix(runtime): preserve insertAdjacentHTML node order

    Files
    2
    Additions
    +125
    Deletions
    −6
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    修复 Taro runtime insertAdjacentHTML 的节点插入顺序:afterbegin 插入多个节点时会反转顺序;afterend 会把内容追加到父容器末尾,越过目标后方已有的兄弟节点。

    在循环前保存原始 firstChild 和 nextSibling,通过现有 insertBefore 路径按解析顺序插入。没有锚点时沿用尾部追加行为。

    Closes #19566

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有小程序(使用 Taro runtime DOM 的路径)

    验证

    • 新增 28 个回归用例,原实现 10 个失败、18 个通过;修复后全部通过。
    • 覆盖四种插入位置、多元素及文本/元素混合、空/非空目标、末尾插入、空 HTML、脱离父节点的既有行为,以及父子和相邻节点关系。
    • 挂载用例使用真实 runtime 根节点和更新队列,通过模拟页面 setData 检查最终渲染数据的节点顺序。
    • pnpm --filter @tarojs/runtime run test:ci --maxWorkers=2:17 个测试文件通过,225 个用例通过、1 个跳过。首次默认并发运行时环境加载用例超过默认 5 秒,降低并发重跑通过,未修改测试超时或相关源码。
    • 修改文件 ESLint 和 git diff --check 通过。
    • 全工作区 pnpm build(包含 runtime 构建):Node.js v22.14.0 / pnpm 10.0.0,退出码 0。未修改文件中仍有类型、组件及外部依赖解析等构建告警。

    未进行 Vue 应用、小程序开发者工具或真机测试;没有调整解析器、特性开关或依赖。

    Summary by CodeRabbit

    • 问题修复
      • 修正 HTML 片段插入位置:使用 afterbegin 时,内容会插入到原有首个子节点之前;使用 afterend 时,会插入到目标节点的下一个兄弟节点之前。
    View discussion on GitHub
  • fix(frontend): tolerate malformed EPUB paths and clean up failed previews

    Files
    2
    Additions
    +113
    Deletions
    −28
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    An EPUB image reference such as missing%.gif currently throws URI malformed, hiding otherwise readable chapter text and images. Fall back to the original ZIP path when percent decoding fails: literal percent filenames can resolve, and missing images keep the existing empty-source behavior. Valid encoded filenames continue to decode normally.

    If rendering fails after creating image Blob URLs, revoke those URLs before rethrowing the original error. On successful renders, the caller retains URL cleanup ownership as before.

    Type of Change

    • 🐛 Bug fix

    Related Issue

    Fixes #4322

    Testing

    • cd frontend && node --import tsx --test src/utils/epubPreview.test.ts — 7 passed.
    • cd frontend && npm run type-check — passed.
    • Four added tests fail against the unchanged c40b33ec production module and pass with the fix.
    • In-memory ZIP fixtures exercise HTML/SVG missing image references, malformed percent/UTF-8 escapes, literal percent filenames, and normally encoded filenames; existing inline-image and Blob reuse tests still pass.
    • Injected failure after two successful image URL allocations verifies both URLs are revoked, their subsequent fetches reject, and the original error is preserved.
    • git diff --check c40b33ec...fix/epub-preview-path-cleanup — passed.
    • Full-repository Go checks were not run: this change only touches the frontend EPUB helper and its tests. No new dependencies or API changes.

    Checklist

    • Changed source follows the surrounding formatting
    • Targeted regression tests pass
    • Frontend type-check passes
    • Self-reviewed the code and verified the diff is limited to two EPUB preview files
    • Added regression coverage

    Before / After

    For a chapter containing readable text, a working image, and missing%.gif, rendering previously rejected with URI malformed. It now returns the chapter text and working image, leaving the missing image empty. Validation uses generated ZIP fixtures and the existing XML test adapter; a full browser session was not run.

    View discussion on GitHub
  • feat(mcp): support document-scoped knowledge search

    Files
    4
    Additions
    +444
    Deletions
    −18
    Commits
    3
    Comments
    1
    Review comments
    2
    Merged by
    lyingbug
    PR description

    Description

    External MCP clients can locate a document with list_documents but cannot restrict search_knowledge to that document. Same-topic files from other dates or versions can therefore occupy the result limit.

    Add optional knowledge_ids to the built-in Go MCP tool. Validate every document against the endpoint's authorized knowledge bases and the optional knowledge_base_ids selection, then group document targets by knowledge base and pass their IDs into the existing retrieval filter before candidate truncation. Shared knowledge bases retain their owner tenant and document/tenant consistency checks. Omitted filtering preserves whole-KB search; empty, malformed, unavailable, unauthorized, or conflicting document selections return an error without issuing a retrieval call. Whitespace is trimmed and duplicate IDs are removed.

    Document the parameter and an example call. No database migration, new dependency, or changes to ask, the standalone Python MCP server, or retrieval algorithms.

    Type of Change

    • ✨ New feature
    • 📚 Documentation update
    • 🧪 Test

    Related Issue

    Closes #4384

    Testing

    Passed:

    go test ./internal/mcpserver -count=1 -timeout=180s
    go test ./internal/mcpserver -race -count=1 -timeout=180s
    go vet ./internal/mcpserver
    golangci-lint run --timeout=5m ./internal/mcpserver
    git diff --check
    node website-docs/scripts/check-links.mjs
    

    Lint used v2.12.2 and reported 0 issues. Link checking covered 76 documents and 350 internal links, with 0 broken links.

    Regression tests failed against unchanged main: explicit document selection returned a higher-ranked document outside the requested set in all three modes, and invalid selections were ignored. The fixed tests exercise the real MCP HTTP transport, endpoint guard, handler, shared search tool, and result formatting, with fixture services replacing storage and embeddings. Candidate count is set to one to verify that document filtering reaches retrieval before truncation. Coverage includes hybrid/semantic/keyword modes, grouped multi-document and cross-tenant shared-KB selection, endpoint restrictions, revoked shares, tenant mismatch, partial/empty scope conflicts, malformed arguments, schema discovery, and unchanged whole-KB/grep behavior. This is a contract test, not a live database/vector-engine integration run.

    cd website-docs && npm run check:docs passed link checking but could not run the Mermaid check: the local dependency tree lacks jsdom (ERR_MODULE_NOT_FOUND). No Mermaid diagrams were changed. Full-repository checks and live model/database tests were not run.

    Checklist

    • Changed Go files are formatted
    • MCP package tests and race checks pass
    • MCP package lint and vet pass
    • Self-reviewed
    • Added regression coverage
    • Updated documentation
    • Validation limitations documented
    • No breaking changes to existing calls
    View discussion on GitHub
  • fix(docparser): 限制 CSV 转换膨胀并支持取消

    Files
    9
    Additions
    +405
    Deletions
    −107
    Commits
    2
    Comments
    2
    Review comments
    1
    Merged by
    lyingbug
    PR description

    问题与修复

    合法的不规则 CSV 可以通过「大量窄行 + 一行宽行」使 Markdown 按全局最大列数补齐,令小输入产生很大的输出。旧实现还同时保留所有记录与逐行补齐切片,且忽略了传入的 context。

    • 为 CSV Markdown 输出设置 64 MiB 上限,与现有解析结果 ZIP 单个 Markdown 条目上限保持一致;该上限独立于原始上传文件大小。
    • 第一遍逐行读取并精确计算转义、分隔行和所有补齐单元格的最终大小,使用避免整数溢出的预算检查;超限时在生成表格前拒绝,返回 ErrCSVMarkdownTooLarge。
    • 第二遍直接写入预分配的 builder,移除 ReadAll 和逐行补齐切片;正常输入的 Markdown 格式保持不变,继续保留 #4435 支持的不规则行中的所有字段。
    • 读取、计数和输出过程检查 context,取消时不返回部分结果。
    • 知识库和临时文档将超限作为永久解析失败处理,记录失败状态,避免无效重试;保存临时文档失败状态出错时仍返回错误。
    • 补充大小边界、转义、多行、BOM、整数溢出、宽行位于首尾、取消以及服务失败状态回归测试,并更新中文文档。

    64 MiB 限制的是生成的 Markdown 大小,并非整个进程的峰值内存;标准库 CSV 解析器仍会构造单条记录。

    验证

    以下检查已通过:

    go test ./internal/infrastructure/docparser -count=1
    go test ./internal/application/service -run 'TestTemporaryDocumentCSVExpansionFailure|TestConvertFailureSpanMatchesTaskOutcome' -count=1
    uv run --no-project --python 3.12 -- go test ./internal/application/service -count=1
    git diff --check
    

    使用 Go 1.26.2、golangci-lint v2.12.2,对上述两个包执行基于 2e8b3aa729cc05d5787a00803d834bfa078c33d3 的增量 lint,结果为 0 issues,格式检查通过。

    同一份 3,001 字节的不规则 CSV,输出仍为 3,012,005 字节,累计分配从基线的 36,483,170 B/op 降至 3,255,807 B/op,约减少 91%(累计分配,非峰值内存)。约 30 KB、预计输出约 300 MB 的样本现已由实际 SimpleFormatReader 拒绝。

    Python 测试环境说明

    已使用本机 uv 管理的 Python 3.12.13 重跑 TestSkillPythonVerifier 整组测试及 service 包全量测试,均通过。确认 Go 测试通过 PATH 找到的是该 uv 环境的 python3。

    此前直接使用 macOS 系统 Python 3.9.6 时,TestSkillPythonVerifier/a_pyproject.toml_dependency_the_venv_does_not_carry 失败(预期错误,实际为 nil);未修改的基线也可复现。原因是 Python 3.9 不含 Python 3.11 起内置的 tomllib,现有 load_pyproject 导入失败后跳过 pyproject.toml 的依赖检查。切换到 uv Python 3.12 后,这项失败已消除。本 PR 未修改 Python 验证器。

    相关变更

    #4451 涉及 CSV 分隔符识别,修改区域可能重叠,合并时需要协调;这里保留现有分隔符行为。

    Fixes #4484

    View discussion on GitHub
  • fix(h5): validate canvas export targets

    Files
    2
    Additions
    +118
    Deletions
    −4
    Commits
    2
    Comments
    2
    Review comments
    6
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 canvasToTempFilePath 找不到目标画布时仍返回 { errMsg: 'canvasToTempFilePath:ok', tempFilePath: undefined },导致调用方收到无效的成功结果。

    显式校验目标画布存在后再导出,并将 DOM 查找放入既有异常处理范围,使缺失目标、查找/选择器异常和导出异常统一通过 MethodHandler.fail 返回。新增正常 PNG/JPEG 导出及 quality 参数测试,确认成功路径保持原有行为。

    Refs #15601。该 issue 同时涉及节点查找根因和 Harmony Hybrid;本 PR 仅修复 H5 缺失目标误报成功及异常结算,不宣称完整解决该 issue,也不自动关闭它。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 9 个回归测试;原实现 5 个失败、4 个通过,修复后全部通过。
    • 覆盖 canvas/容器缺失、fail/complete 回调、DOM 查找和选择器异常、导出 SecurityError,以及 PNG/JPEG 和 quality 正常导出。
    • Canvas 相关测试:2 个套件 / 13 个测试通过。
    • pnpm --filter @tarojs/taro-h5 test:ci --watchman=false:28 个套件 / 218 个测试通过。
    • 修改文件 ESLint、git diff --check 和 H5 包构建通过。
    • 环境:Node.js 22.18.0 / pnpm 10.0.0。构建存在未修改的 previewImage/Swiper 类型告警及 Sass legacy API 弃用告警。
    • 未运行全仓库构建、真实浏览器/真机或 Harmony 验证;没有修改依赖或锁文件。

    该分支直接基于上游 main 的 cc60d276a81,不包含独立的存储修复。

    Summary by CodeRabbit

    • 修复
      • 找不到指定画布、DOM 查询异常或画布导出失败时,会正确返回错误,避免生成无效的临时文件路径。
      • 画布导出成功时仍支持 PNG 和 JPG 格式。
    View discussion on GitHub
  • fix(cli): 修复创建页面时配置属性识别

    Files
    2
    Additions
    +328
    Deletions
    −9
    Commits
    6
    Comments
    2
    Review comments
    10
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    修复 taro create 自动更新 app.config 时对属性键的识别:"pages" 等带引号的键不会被更新,且 pages 前存在 ...baseConfig 时会读取不存在的 key.name 并抛错。

    统一查找非计算的 ObjectProperty,支持 Identifier/StringLiteral 键,安全跳过 spread、方法及计算属性。该逻辑用于主包 pages、subPackages 及分包内 root/pages,分包定位只匹配 root 属性;不支持的非字面量配置返回现有 Fail 状态。分包 root 尾部斜杠的处理保持原有行为。

    新增 51 个回归用例,覆盖普通对象与 defineAppConfig、带引号的键、spread、重复页面、非字面量配置,以及调用真实 Page.updateAppConfig 写入 JS/TS 文件。测试仅 mock 原生模板生成模块。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: Fixes #19560
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    验证

    • pnpm --filter @tarojs/cli run test:ci --watchman=false:13 个测试套件通过、1 个跳过;210 个用例通过、7 个跳过(包含新增的 51 个用例)。
    • pnpm --filter @tarojs/cli run build:通过。
    • 改动文件 ESLint、git diff --check:通过。

    验证环境为 macOS arm64、Node.js v26.8.1、pnpm 10.0.0。配置更新的文件读写已验证,未执行完整模板下载/生成流程。

    Summary by CodeRabbit

    • 问题修复
      • 创建页面时,可在有效的应用配置或子包配置中追加页面,已有页面不会重复添加。
      • 子包页面更新会依据有效的 root 配置匹配目标子包,并验证页面配置。
      • 重复配置项按最后一个有效属性处理;遇到无法安全解析或格式无效的配置时,不会修改原配置。
      • JavaScript 和 TypeScript 配置文件均支持页面更新;重复执行不会重复修改配置。
    View discussion on GitHub
  • fix(docparser): escape standalone image filenames in Markdown

    Files
    2
    Additions
    +77
    Deletions
    −8
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Uploading a standalone image named diagram).png or diagram(.png generates a Markdown destination that cannot be matched to its own image bytes, so ImageResolver.ResolveAndStore never saves the image. The OCR original-image fallback has the same issue.

    Use one reference generator for both paths: URL-escape the filename as one path segment, escape Markdown alt-text delimiters and line breaks, and keep the generated destination identical to ImageRef.OriginalRef. Recognize an existing escaped reference when applying the fallback again. The original filename and image bytes are preserved.

    For example, diagram).png now uses images/diagram%29.png, allowing the resolver to save it and replace that destination with the storage URL.

    Type of Change

    • Bug fix
    • Test

    Related Issue

    Fixes #4474

    Testing

    • Regression tests fail on the base implementation for unmatched parentheses, bracket syntax, and fallback duplication of encoded filenames.
    • go test ./internal/infrastructure/docparser -count=1 passes.
    • go vet ./internal/infrastructure/docparser passes.
    • golangci-lint v2.12.2 fmt --diff reports no formatting changes for either changed file.
    • GOTOOLCHAIN=go1.26.2 golangci-lint run --new-from-rev=2e8b3aa729cc05d5787a00803d834bfa078c33d3 ./internal/infrastructure/docparser/... passes with CI-pinned v2.12.2.
    • Added lines comply with the configured 120-column limit; git diff --check passes.
    • Regression coverage exercises SimpleFormatReader and the OCR fallback through ImageResolver.ResolveAndStore, verifying saved bytes, URL replacement, preserved metadata/OCR text, and fallback idempotence. Cases include unmatched parentheses, brackets, backslashes, spaces, literal percent escapes, URL punctuation, Unicode, quotes, and line breaks.
    • No full application/browser test or full-repository test run is claimed; this change is scoped to the Go parser package.

    Checklist

    • Changed source files are formatted.
    • Targeted package tests and vet pass.
    • Added regression tests and reviewed the change.
    • No API, database schema, or dependency changes.
    • Diff-scoped lint passes for the changed package with the CI-pinned linter and Go 1.26.2.
    View discussion on GitHub
  • fix(h5): handle asynchronous storage failures

    Files
    2
    Additions
    +118
    Deletions
    −4
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 异步存储 API 在浏览器拒绝存储访问、写入配额不足或序列化失败时会同步抛错,导致调用方拿不到 Promise,fail/complete 也不执行。

    捕获 setStorage、removeStorage、clearStorage 和 getStorageInfo 内部的存储操作异常,交给已有 MethodHandler.fail 结算。保持同步 API 的异常行为,以及提供 fail/complete 时的现有 Promise 语义。success 回调位于捕获范围之外,避免把用户回调异常误报成存储失败。

    Closes #19562

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 新增 23 个回归测试;原实现 18 个失败、5 个通过,修复后全部通过。
    • 覆盖四个 API 的访问受限、Promise 与 fail/complete 组合、写入配额、循环引用序列化、同步 API 保持抛错,以及 success 回调异常不被吞掉。
    • 存储相关测试:2 个套件 / 52 个测试通过。
    • pnpm --filter @tarojs/taro-h5 test:ci --watchman=false:28 个套件 / 232 个测试通过。
    • 修改文件 ESLint、git diff --check 和 H5 包构建通过。
    • 环境:Node.js 22.18.0 / pnpm 10.0.0。构建存在未修改的 previewImage/Swiper 类型告警及 Sass legacy API 弃用告警。
    • 未运行全仓库构建或真实浏览器/真机矩阵验证;没有修改依赖或锁文件。

    Summary by CodeRabbit

    • 问题修复
      • 浏览器存储操作失败时,相关存储接口现在会将错误返回给失败处理,而不是让异常直接中断操作。
      • 错误信息会优先采用异常提供的内容;若没有,则返回异常的字符串形式。
      • 存储操作成功时仍按原有方式处理;成功回调抛出异常时,不会触发失败回调。
    View discussion on GitHub
  • fix(server): report effective data directory provenance at startup

    Files
    10
    Additions
    +577
    Deletions
    −15
    Commits
    4
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    A bare/default-directory launch can look like lost indices or a reset owner account when an earlier launch selected another config. The old banner showed only the requested path spelling; config-source logging ran before tracing was initialized. Report the actual final directory, provenance and creation status in the banner and structured startup logs before admin/TLS state.

    Relationship and scope

    • Refs #2409: covers startup observability and explicit-path recovery. Automatic comparison of other known directories and console empty-state changes remain separate suggestions; this PR does not claim them complete.
    • Independent from upstream 9cf3f29c, with no dependency on #2412's catalog discovery work, #2413's Codex importer or #2384's batch benchmark. No stacked or duplicated prerequisite commits. The two diagnostics branches compose without conflicts (git merge-tree --write-tree).
    • Preserve path selection, flag/config/env precedence, auto-port relocation, existing/symlink/nested directories and existing index/account files. No previous directory is scanned, selected, moved or deleted.

    Configuration and explicit key presence use the same file bytes, so a selected file omitting server.data_dir correctly reports the default. Leaf create_dir distinguishes creation by this process from an already existing/concurrently supplied directory. Display canonicalization is best effort and cannot become a new startup dependency. Control characters are escaped. The only dependency change is a direct reference to the already locked workspace TOML version.

    Verified locally

    macOS arm64 / Rust 1.97.1; commands and receipts in tools/startup-diagnostics/VERIFICATION.md.

    • Real CLI regression failed before the fix because Data source was absent.
    • 123 main tests and 1 startup integration test passed. Covers selected config, XERJ_CONFIG, flag override, omitted-key default and restart, plus helper checks for nested/symlink paths, file refusal/recovery and escaping.
    • Scoped release build, formatting, scoped strict Clippy, Python compilation, whitespace and workflow-timeout guard passed.
    • Private-copy creation-status mutation failed exactly 2 helper regressions; the unmodified copy passed all 4. Production source was not mutated.
    • Private release-node lifecycle passed: directory creation, one durable document, graceful exit, existing-directory restart and the same document. Banner and JSON tracing both report the selected config and effective path.
    • Separate fresh-node ES-YAML: 1,447 passed, 0 failed, 10 skipped across 230 files, unchanged 75 catch-lenient cases; runner and node exit 0.

    Audit and untested scope

    Audited against docs/CONTRIBUTION_REVIEW.md. Existing-file refusal preserves bytes and new-path recovery works; observability introduces no mapping, journal, storage format, auth-policy or directory migration. This is not a performance change. Distributed writes, model execution and optional accelerators are not applicable.

    Not run: every other server integration target/workspace crate, Linux/Windows execution, real production directories or owner-account state, other-directory comparison and console changes. No landing files change, so website generators were not run. Hosted merge-ref CI is separate from local receipts.

    View discussion on GitHub
  • feat(cli): prepare Claude Code session text for autoindex

    Files
    11
    Additions
    +1,245
    Deletions
    −0
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Prepare one explicitly selected Claude Code JSONL transcript for ordinary autoindex/search, using the existing native PII plugin before writing any exported record.

    xerj sessions import --format claude-code --input archived.jsonl --output exports/records.jsonl
    # Review the prepared file, then:
    xerj autoindex exports --prefix session-history
    xerj search --prefix session-history "why did we drop polling"
    

    Issue and PR relationships

    • Refs #1793, as a scoped first-format preparation step. Does not close it: direct autoindex transcript detection, multi-client support, incremental sync and commit/graph association remain separate work.
    • Independent of open #2384 (the batch-retrieval evaluation for #1801). No stacked or duplicated prerequisite commits; neither the batch adapter nor its benchmark is changed.
    • Reuses xerj-wasm's existing native PII redactor; no processor/REST/MCP tool changes and no new third-party package versions. uuid and xerj-wasm become direct autoindex dependencies.
    • The guide cites the fixed, MIT-licensed Anthropic SDK reference retrieved before implementation. No code copied.

    Behavior and boundaries

    The new offline CLI exports text-bearing user/assistant events with a uniform schema, validated session/message/parent UUIDs, source basename/physical line/byte offset, explicit metadata and file paths from Read/Write/Edit/MultiEdit requests. It preserves branch/summary flags in file order; it does not reconstruct an active conversation or infer successful edits/commits.

    Selected text and metadata pass through the existing email/IP/card/SSN/phone patterns before serialization to private staging. Tool results, raw tool inputs except file paths, thinking and arbitrary metadata are excluded. This is not universal secret/name removal; review the export before indexing. UUIDs/enums are separately validated so regex redaction cannot corrupt identity relationships.

    The command reads only the explicit file, contacts no node/model, and leaves the original unchanged. Input/output, lines, collected text and message-count admission are bounded. Malformed tails, unsupported turn shapes, mixed sessions, repeated UUIDs, detected source changes and non-file input refuse the export. Unix FIFOs are opened nonblocking and rejected rather than waiting for a writer.

    Only sanitized records reach hidden staging. Sync precedes no-clobber publication; existing output, including a concurrent winner or symlink, is never replaced. Tempfile fallback/extra-hard-link and reporting-I/O limitations are documented without a cross-platform transactional-durability claim. Ordinary JSONL extraction, index mappings and existing autoindex workflows are unchanged.

    Guide and reproducible synthetic example · verification record and exact commands

    Verified locally

    macOS arm64, Rust 1.97.1, source-built release candidate reporting xerj v1.0.0-rc.99:

    • Scoped release build: cargo +1.97.1 build --locked --offline --release -j 32 -p xerj-autoindex -p xerj-server -p es-yaml-runner passed.
    • Autoindex suite: 1,839 passed, 0 failed, 5 existing ignored, 3 explicitly filtered; final invocation is serial with TMPDIR=/private/tmp. All 11 new session tests pass. The three filters are listed below and in the verification record; no tests or assertions were weakened.
    • Main-program tests: 119 passed. New CLI integration tests: 3 passed, including exact JSON summary counters, malformed-tail refusal, source preservation, payload-free diagnostics and overwrite refusal.
    • Release synthetic workflow: python3 tools/session-import/smoke.py --binary engine/target/release/xerj passed. Export/index/search retained 2 redacted turns and the original decision location session.jsonl:3 / file reference src/watch.rs. Raw email, tool/thinking/metadata sentinels were absent from stored source. Unchanged indexing kept 2 documents, and graceful restart preserved both. Private nodes exited 0.
    • Separate fresh-node ES-YAML gate: 1,444 passed, 0 failed, 10 skipped, exit 0, across 229 files. The unchanged policy reported 75 catch-lenient cases. No YAML, runner or policy edits.
    • Mutation controls compiled isolated source copies: bypassing PII redaction fails exactly the two privacy regressions; replacing no-clobber publication with overwrite fails the concurrent-winner preservation regression. Production source was not mutated during builds.
    • cargo fmt --all / check, effective-diff whitespace checks, Python compilation, workflow timeout guard and strict changed-server-target Clippy passed. Autoindex Clippy passed with -D warnings -A dead_code for the pre-existing baseline warning described below. New Markdown has an existing explicit re-include.

    Baseline limitations, composition and audit

    The unfiltered serial suite had three failures on this case-insensitive macOS filesystem. Each was reproduced individually on unmodified upstream b8c41cb6 before applying the command-line filters:

    • content::tests::lossy_display_collisions_keep_distinct_alias_identities and inventory_delta_tests::a_non_utf8_excluded_name_is_matched_on_disk_via_path_id: fixture creation returns OS error 92 (Illegal byte sequence).
    • corpus_data_skip_tests::corpus_index_summary_splits_indexed_extensions_from_ignored_data: rows.csv / ROWS.CSV collide, so the observed csv count is 1 rather than the expected 2.

    Standalone strict autoindex Clippy also fails on the unmodified baseline's unused content.rs:143 resolve_reporting function; no repository lint allowance was added. Initial sandbox-only loopback restrictions and parallel/path interference are distinguished from the final serial host invocation in the verification record.

    The implementation is based on b8c41cb6; local verification covers the exact implementation in 2f46093b, with summary assertions/receipts added in 87b6fc49. While finishing, upstream advanced to d6ef7fbb through #2394 (MCP cancellation) and #2326 (alias write routing), plus CLA/report changes. git merge-tree --write-tree d6ef7fbb 87b6fc49 completed with no conflicts; the only shared changed file is the nonconflicting changelog. The tested head is preserved rather than relabeling old receipts as tests of those new engine changes. Hosted merge-ref CI must validate that composition; its status is not claimed by local results.

    Audited against docs/CONTRIBUTION_REVIEW.md: ancestry/effective diff, exact counters and schema, allowlisted provenance, failure publication, concurrent output ownership, changed-input detection, unsupported inputs, unchanged reruns and the existing node restart workflow are covered. No existing workflow, product-state migration, optional accelerator, clustering path, provider or new egress is modified. The new export is an immutable schema-1 snapshot; refreshed sources use an explicit new destination/prefix/state directory, not silent overwrite.

    All fixtures are synthetic. Live Claude-version compatibility, Linux/Windows real-node execution, universal secret removal, active-chain reconstruction, automatic discovery, incremental refresh and automatic commit/graph links are not claimed tested or implemented. The example is lexical retrieval with --no-semantic, not a generated-answer or semantic-quality evaluation. Site generation gates were not run because no landing/generated website files changed.

    View discussion on GitHub
  • docs(feedback): real-pack batch retrieval evaluation

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    Single-file field report required by AGENTS.md after running the real rust-vulns retrieval evaluation in #2384. Describes the private node, explicit mappings, observed outcomes and the small output-token reduction; no generated-answer or billed-model-cost claim.

    Relationships: #2384 contains the harness, fixed workload, raw five-repeat receipts and full verification. It follows merged implementation #2333 and refs #1801 without closing the broader proposal. This report has no unmerged dependency and is independently based on upstream main; #2334 was the earlier synthetic implementation-fixture report, while this one records the new real-pack evaluation.

    Verified: 13 lines, existing Markdown re-include applies, diff is exactly this one added file, whitespace check passed. Numbers come from the committed receipts in #2384. No runtime, workflow or schema changes; engine/build/conformance gates do not apply to this report-only PR.

    View discussion on GitHub
  • feat(mcp): add ordered batch retrieval to CLI and MCP

    Files
    14
    Additions
    +1,365
    Deletions
    −17
    Commits
    2
    Comments
    3
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Agents looking up several IDs or questions currently need one tool call per item. Add xerj_batch_search and xerj batch-search --input <file|->, sharing a bounded, read-only adapter over the existing _msearch endpoint.

    Refs #1801. This PR implements batch retrieval and deliberately leaves the broader issue open: generated answers, calibrated confidence/abstention, automatic alias-aware ID discovery, and the requested rust-vulns accuracy/latency/token comparison are not claimed here.

    Resulting behavior

    • Accept 1–50 items under one index/prefix and return exactly one ordered result per input position. Optional correlation keys may repeat; duplicate inputs are never collapsed.
    • Each result is hits with citations and raw evidence, abstain only for a complete empty search, or an independent error. Failed, timed-out, partial, malformed and correspondence-mismatched responses never become false misses. Transport failures preserve the full shared error once.
    • Plain text uses the existing mapping-aware query and code-path demotion. Structured items accept an ES query clause. Exact identifiers use a caller-selected, indexed flat keyword field; unreadable, missing or conflicting mappings fail that item rather than guessing or falling back to tokenized matching.
    • A valid batch uses one _msearch request and at most one mapping read. Bound input to 1 MiB, optional keys to 256 UTF-8 bytes, per-item size to 1–50, and the HTTP response to 32 MiB. These are admission limits, not a process-memory benchmark.
    • Optional whole-response max_tokens uses the existing UAX #29 word counter, not BPE. Binding budgets remove raw bodies and then extra hits while retaining every outcome and at least one citation per matched item; hits_omitted accounts for removed hits. If the minimum cannot fit, return an actionable error, never truncated JSON or a budget-induced abstention. Nonbinding output is unchanged.
    • CLI stdout is JSON only. Exit 0 includes successful empty searches; 3 preserves partial results with item errors; 2 is invalid CLI/envelope input; 1 is a batch-wide execution/budget error. Authentication and loopback admin-key discovery follow xerj mcp.

    Usage and limits: docs/recipes/batch-search.md. Published MCP schema is generated from live tools/list; help/count guards cover 22 tools with a Hub key and 19 without one.

    Verified

    All commands below were run locally with Rust 1.97.1 on macOS arm64. Written by an AI coding agent (OpenAI Codex), operated by @Jarvis636431.

    • Initial feature tests failed before implementation with unknown tool: xerj_batch_search.
    • Final MCP/Hub suites: 452 passed, 0 failed, 3 pre-existing ignored using RUST_MIN_STACK=16777216 cargo +1.97.1 test --locked --offline -p xerj-mcp -p xerj-hub -- --test-threads=1.
    • Final main-program/CLI tests: 118 passed, 0 failed using RUST_MIN_STACK=16777216 cargo +1.97.1 test --locked --offline -p xerj-server --test batch_search_cli --bin xerj.
    • Six batch integration tests cover exact IDs versus near matches on an actual in-process node, mixed errors/misses/duplicates, positional mapping, auth and NDJSON transport, response-count mismatches, partial/malformed responses, the 50-item boundary, and budgets that remove raw bodies/extra hits without losing outcomes or the first citation.
    • Scoped shipping build passed: cargo +1.97.1 build --locked --offline --release -j 32 -p xerj-mcp -p xerj-server -p es-yaml-runner.
    • Strict changed-target Clippy passed: cargo +1.97.1 clippy --locked --offline --no-deps -p xerj-mcp -p xerj-hub --all-targets -- -D warnings, and cargo +1.97.1 clippy --locked --offline --no-deps -p xerj-server --bin xerj --test batch_search_cli -- -D warnings.
    • cargo +1.97.1 fmt --all -- --check, effective-diff whitespace checks and the workflow timeout guard passed.
    • Regenerated landing/docs/agents/schemas/mcp-tools.json with scripts/mcp-schema-check.sh --write. Live --check against the release xerj-mcp and Rust schema-drift tests passed.
    • The gates in .github/workflows/seo.yml, plus the fact-check fixture gate and landing constants guard, passed on the composed tree.
    • Release CLI and standalone MCP against a fresh isolated node agreed on hits/abstain/hits; the exact ID excluded near matches. Adding an invalid item returned CLI exit 3 while retaining the successful sibling. A 50-item batch with max_tokens=32 refused with exit 1 and no partial JSON; the stored count was unchanged. Graceful stop/restart preserved the test documents; the node stopped normally with exit 0.
    • Release es-yaml-runner --url <isolated-node> --dir engine/tests/es-compat-yaml/yaml: 1444 passed, 0 failed, 10 skipped, exit 0, across 229 files. The existing policy reported 75 catch-lenient cases; no runner, YAML or policy files were changed.

    Verification limits and audit

    • The default-stack debug local_def integration test overflowed on this host. Reproduced the same failure in an isolated, unmodified upstream 57b8a505 worktree using the same Rust/Cargo target configuration. Final suites use the explicitly recorded 16 MiB test thread stack; no test was skipped or changed to accommodate that failure.
    • A parallel rerun hit the unmodified Hub test a_process_has_a_stable_start_token_that_differs_between_processes: macOS returned the same second-resolution start timestamp for parent and child despite its 50 ms delay. The complete final suite above ran serially; no assertion was weakened.
    • Broader server --all-targets Clippy is blocked on macOS by unused Read/AsRawFd imports in unmodified tests/sigpipe.rs (used only by its Linux-only test). The changed targets pass strict Clippy. The pre-existing dependency warning for xerj-autoindex/src/content.rs:44 is not suppressed or changed.
    • Independent contribution rebased onto upstream 6c0c498758c421a01f8bbe56fa7dd880ce2dc21e. The sole textual rebase conflict was the changelog insertion; both entries were retained. No prerequisite PR or duplicated contribution commits. Effective diff is 12 files.
    • Audited against docs/CONTRIBUTION_REVIEW.md: ordered machine contracts, exact-field validation, failure isolation, bounded input/response admission, budget accounting, old CLI paths, and generated-schema composition are covered. No dependency, workflow, engine endpoint, index mapping or persisted format changes. Durable-state migrations, write/publication atomicity, optional accelerators, clustering and model execution are not applicable to this read-only adapter.
    • _msearch returns stored evidence, not _search's extracted _passage fields. Rerank/judge, per-item scopes, nested exact fields, generated answers and calibrated confidence are outside this version. No performance, BPE-token savings or rust-vulns quality claim; Linux/Windows and external MCP clients were not locally tested. Hosted CI still needs to validate the merge ref.

    Reference retrieved before implementation: Qdrant src/actix/api/query_api.rs:112–155 converts individual inputs before invoking the batch executor. Apache-2.0 licence checked; approach only, no code copied. Independent per-item errors follow XERJ's existing _msearch implementation.

    View discussion on GitHub
  • docs(feedback): batch-search candidate field report

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Single-file agent field report required by AGENTS.md after running XERJ. Records release-candidate CLI/MCP behavior over an isolated synthetic advisory fixture while implementing #2333; no real-pack quality, latency or token-savings claim.

    Written by OpenAI Codex, operated by @Jarvis636431. Only the field report is included; no runtime or tooling changes.

    View discussion on GitHub
  • fix(mcp): avoid false deduplication of rendered code passages

    Files
    4
    Additions
    +180
    Deletions
    −69
    Commits
    2
    Comments
    3
    Review comments
    0
    Merged by
    xerj-org
    PR description

    A nonbinding max_tokens on xerj_code_search could remove the second of two adjacent definitions. With the real shared renderer, repo/src/lib.rs:10 / pub fn alpha() {} followed by line 11 / pub fn beta() {} became just alpha, even at a 10,000-word-token budget.

    The text adapter estimated source coverage by adding every rendered body line to the citation line. Separators and annotations inflated that range, its inclusive endpoint was too wide, and a citation may point inside a displayed window rather than at its start. A range inferred from the display cannot establish that a later passage is redundant.

    Deduplicate rendered text only when both the displayed locator and nonempty displayed body match an already-shown block, ignoring empty separator lines and score metadata. Distinct or partially overlapping snippets stay eligible for the existing greedy budget; locator-only blocks still claim no displayed passage. Preserve the hard token cap and no-op byte identity. Update the accounting wording, budget descriptions and generated live MCP schema to state this narrower rule.

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    Verified

    • Before the production fix, cargo test --locked --offline -p xerj-mcp --lib code_text_ -- --nocapture had 2 failures: adjacent definitions from the real renderer and different snippets at the same citation. The other 4 selected tests passed.
    • TMPDIR=/private/tmp cargo test --locked --offline -p xerj-mcp: 134 passed, 0 failed on the final tree. Includes real-renderer regressions for Windows paths, tight/nonbinding budgets, annotations/file heads, different snippets at one citation, partial overlap, exact duplicate control and locator-only behavior.
    • cargo build --locked --offline --release -j 32 -p xerj-mcp passed.
    • cargo clippy --locked --offline --no-deps -p xerj-mcp --all-targets -- -D warnings passed. The unmodified dependency xerj-autoindex/src/content.rs:44 emits its existing unused resolve_reporting warning; it was not changed or suppressed.
    • cargo fmt --all, cargo fmt --all -- --check, and effective-diff whitespace checks passed.
    • Regenerated landing/docs/agents/schemas/mcp-tools.json from the release executable using scripts/mcp-schema-check.sh --write; its live --check and Rust schema-drift tests passed. On this macOS host, a temporary Python subprocess timeout wrapper supplied the script's unavailable GNU timeout command; no repository script changed.
    • Release xerj-mcp against the final isolated candidate node: actual xerj_code_search retained alpha at line 10 and beta at line 11, and the response with max_tokens=10000 was byte-identical to the response without a budget. Node shut down normally, exit 0.
    • cargo build --locked --offline --profile ci-test -j 8 -p xerj-server -p es-yaml-runner passed. On that latest-main candidate, es-yaml-runner --url <isolated-node> --dir engine/tests/es-compat-yaml/yaml: 1441 passed, 0 failed, 10 skipped, exit 0, across 228 files (75 catch-lenient cases under the existing suite policy).
    • The gating checks in .github/workflows/seo.yml, plus python3 scripts/seo/factcheck.py --fixture-check and bash .github/scripts/landing-constants-guard.sh, passed.

    Composition and limits

    Independent branch based on upstream main 8c05ed5c8700cec7619a01b73f14f4cf1eb477a7. After main advanced during validation, fast-forwarded the branch and reapplied this fix; the only conflict was the changelog insertion, and both entries were retained. Final validation above belongs to that composed tree. The effective diff is four files. Neither #2255 (JSON hit identities) nor #2269 (matched-line citations) is a prerequisite; both touch some of the same MCP files, so their eventual composition needs CI review.

    Audited against docs/CONTRIBUTION_REVIEW.md. This is read-only response processing; JSON span deduplication, retrieval/ranking, shared rendering, durable state, mappings, workflows and dependency versions are unchanged. Text deduplication is deliberately more conservative: partial overlaps can consume additional budget and fall back to locators. The former synthetic overlap test repeated identical bodies at incompatible source lines; it now models a genuine duplicate locator/body, with separate real-renderer regressions proving distinct and partial overlaps survive.

    Reference retrieved before implementation: ripgrep crates/printer/src/standard.rs:1041–1054 derives line positions from source match ranges before rendering. License checked (Unlicense); approach only, no code copied. Here the adapter only has rendered text, so it requires exact displayed evidence instead of inventing a source range.

    No performance claim or x86 hardware claim; local verification is on Apple Silicon. GitHub's merge-ref checks remain authoritative before merge; local checks are not a claim that hosted CI is green.

    View discussion on GitHub
  • fix(mcp): preserve distinct records in JSON token budgets

    Files
    4
    Additions
    +240
    Deletions
    −11
    Commits
    4
    Comments
    3
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    What this changes, and why

    Adding max_tokens to a successful JSON MCP search could delete independent hits even when the budget was much larger than the response. Two JSONL rows at b0 and b100 shared records.jsonl and passage ordinal 0, and two corpora could both contain src/lib.rs:10. The budgeter treated both pairs as duplicate file-line spans.

    Qualify JSON spans by the source index, path, content ID when available, and record locator. Keep whole-file code and code:: symbol records in the same file line space so real overlap deduplication still works. Plain-string xerj_search now requests ax_file and ax_locator in its default source projection; explicit caller projections remain unchanged. Locator-only results retain those provenance fields. The greedy budget allocation and final hard budget guard remain unchanged.

    This changes the JSON budget adapter only. It does not implement batch queries (#1801), modify the code-text range estimator, or change map response caps. No new dependency, tool schema, workflow, engine endpoint or persisted format.

    Ancestry and reference

    Original implementation 1b775638f was based on upstream main 5ad85724e14602259f264de3e33fd0a9b5d106f0. Following the maintainer request, merged upstream main 2805dbc1621d88a6901ea3b1752b33436da6adcc. The only textual conflict was CHANGELOG.md; both Fixed entries were retained. No Rust source/test conflict required edits. The effective PR diff remains the same four files, with upstream Hub metadata, schema and corpus-resume changes preserved. No prerequisite PR.

    Reference code retrieved before implementation: Tantivy src/lib.rs:333-347, DocAddress pairs a segment scope with a segment-local document ID (MIT; approach only, no code copied). In-tree behavior: xerj-autoindex search.rs record_locator/hit_location and #1944 distinguish record-relative passage ordinals from file lines. Existing token-budget overlap, locator-only and never-exceed tests are retained.

    Verified on original fix 1b775638f

    • Fail before production edits: the new json_budget_ unit selection had 2 failures (independent row locators, independent indices) and 1 passing same-file/symbol overlap control.

    • Fail before production edits: the new HTTP/dispatch regression expected 2 hits but saw 1 on plain-string xerj_search with max_tokens=10000. Its fixture models source projection, so omitting the identity fields is detectable. Initial environment/fixture failures (sandbox denied loopback; wrong Axum route syntax) were corrected before observing this defect failure.

    • After implementation, TMPDIR=/private/tmp cargo test --locked --offline -p xerj-mcp: 133 passed, 0 failed. Includes all four JSON search tools, string and DSL xerj_search, budget/no-budget request parity, exact nonbinding response parity, same-record overlap and code/symbol overlap controls, legacy ordinal overlap, token-budget sweeps, schema drift and existing real-node tests.

    • cargo build --locked --offline --release -j 32 -p xerj-mcp: passed.

    • cargo clippy --locked --offline --no-deps -p xerj-mcp --all-targets -- -D warnings: passed for the changed crate.

    • The same strict Clippy command without --no-deps fails in unmodified upstream xerj-autoindex/src/content.rs:44: resolve_reporting is unused. That dependency was not changed or suppressed.

    • cargo fmt --all, cargo fmt --all -- --check and git diff --check: passed during implementation; final diff whitespace checks also passed.

    • Scoped optimized node/runner build: cargo build --locked --offline --profile ci-test -j 8 -p xerj-server -p es-yaml-runner passed.

    • The release xerj-mcp executable against a fresh isolated node retained both independent hits in four combinations: JSONL-shaped rows and cross-index same-path files, each with plain-string and DSL queries, both without a budget and with max_tokens=10000. The returned hits match across budget/no-budget calls.

    • Current ES-YAML suite on that candidate node: 1441 passed, 0 failed, 10 skipped, exit 0 (228 files; 75 catch-lenient cases under the existing policy). The node stopped normally, exit 0.

    Maintainer follow-up: compose with main 2805dbc16

    • Complete MCP crate suite rerun on the merged tree: 133 passed, 0 failed, including upstream Hub/schema tests and the JSON identity regression.
    • Strict no-deps Clippy for the changed MCP crate, cargo fmt --all -- --check, and git diff --check passed again.
    • Scoped shipping release build rerun on the merged tree: cargo build --locked --offline --release -j 32 -p xerj-mcp passed.
    • The sole conflict was the changelog insertion; both entries are present. The effective diff against main remains four files.
    • The ES-YAML and live release-MCP results above belong to original fix 1b775638f. They were not rerun after this changelog conflict resolution/upstream merge. CI must validate the final merge ref before merge; no claim that final CI is green.
    • Existing CI advisory-audit failure: ctutils 0.4.2, RUSTSEC-2026-0385 (published 2026-10-23). The fetched upstream/main Cargo.lock also pins 0.4.2. This PR has no Cargo.lock diff. Job log: https://github.com/xerj-org/xerj/actions/runs/39914873477/job/120311594092 .

    Latest main sync: 8c05ed5c8

    Merged upstream main 8c05ed5c8700cec7619a01b73f14f4cf1eb477a7 in b452d284d. The only conflict was the changelog insertion; both this PR's entry and upstream's AVX2 compatibility entry are retained. This PR entry now follows the upstream entry, reducing collisions with future top-of-section additions. The MCP Rust sources and HTTP regression test are byte-identical to the previous PR head 4357c8e1c. The effective diff against main remains the same four files, with no prerequisite on #2272.

    On this final composed tree, reran TMPDIR=/private/tmp cargo test --locked --offline -p xerj-mcp: 133 passed, 0 failed. Also passed strict MCP-only Clippy (--no-deps, --all-targets, -D warnings), scoped release build (-j 32 -p xerj-mcp), cargo fmt --all -- --check, and effective-diff whitespace checks. Upstream's recorded benchmark output is retained verbatim, including its existing whitespace.

    No new ES-YAML or live-node smoke run for this changelog-only conflict resolution. Earlier results above remain scoped to the original fix; GitHub CI must validate the updated merge ref. No claim that hosted CI is green.

    Review and limits

    Audited against docs/CONTRIBUTION_REVIEW.md: the change only post-processes read-only search responses. Existing source filtering is caller-owned. Older responses without ax_file/ax_locator keep the established path/line fallback, now qualified by index; filtered-out provenance cannot be reconstructed. Source fields added to default output and locator stubs consume budget under the same existing counter/guard; this makes no model-token or performance claim.

    Not applicable: durable-state migrations, publication/write atomicity, auth/execution identity, recovery commands, operational recipes, optional accelerators, feature gates, clustering and performance benchmarking. No behavior in those areas changes.

    Not verified: other operating systems, external MCP clients, naturally occurring legacy corpora without locator metadata, BPE token counts, or neural inference/retrieval quality. Semantic/vector HTTP fixtures exercise the adapter, not an embedding model.

    No Co-Authored-By trailers.

    View discussion on GitHub
  • [Bugfix] Scale KV offload benchmark RAM reserve on smaller Macs

    Files
    2
    Additions
    +30
    Deletions
    −2
    Commits
    2
    Comments
    1
    Review comments
    1
    Merged by
    ricky-chaoju
    PR description

    The KV offload serving benchmark reserves a fixed 40 GiB for other applications. On a 24 GiB Mac, preflight_memory therefore warns even at --memory-fraction 0.1: its estimated 1.8 GiB budget is compared with 24 - 40 = -16 GiB. Following the advice to lower the fraction cannot clear the warning.

    Scale the default diagnostic reserve proportionally below the existing 128 GiB reference workload, keeping 40 GiB on machines with at least 128 GiB: 40 * min(1, RAM / 128). A 24 GiB Mac now reserves 7.5 GiB. Add --ram-headroom-gib for an explicit override, reject negative/non-finite values, and record the option in benchmark metadata. This changes only the warning policy, not server allocation.

    Check a distinct --baseline-memory-fraction as well. Warnings report the estimated budget, remaining RAM and reserve, and describe swapping/OOM as a possibility rather than a certainty. The existing approximate RAM * 0.75 * fraction estimate is retained; this diagnostic does not measure other applications or certify that a workload will fit.

    Validation

    • python -m pytest tests/test_kv_offload_benchmark.py -q: 16 passed. Covers 16/24/32/64/128/256 GiB machines, high fractions, explicit reserves including the equality boundary, baseline overrides, duplicate warnings, and invalid CLI values. Before the fix, the initial regression suite reported 11 failures and 4 passes.
    • ruff check ., ruff format --check ., mypy vllm_metal, and git diff --check: passed.
    • python tools/benchmark/kv_offload_benchmark.py --help: passed, documents the new option.
    • Actual 24 GiB M4 Pro function-level check: fractions 0.5 and 0.8 return no warnings; fraction 1.0 warns that the estimated 6.0 GiB remaining is below the 7.5 GiB reserve.

    No model or kernel changes.

    Duplicate check: searched open PRs for headroom and kv_offload_benchmark; no matching PR was found.

    Additional model and serving validation

    Ran on an Apple M4 Pro with 24 GiB RAM, macOS 26.2, Python 3.12.13, vLLM 0.31.0+cpu, MLX 0.32.1 and mlx-lm 0.32.0, on commit a16485a with the MLX backend. Rebuilt native artifacts with python -m vllm_metal.metal.build before serving.

    Model: mlx-community/Qwen3-0.6B-4bit, pinned revision 73e3e38d981303bc594367cd910ea6eb48349da8.

    • python -m pytest tests/test_kv_offload_benchmark.py tests/test_reshape_and_cache.py -q: 23 passed.
    • A fresh vllm serve process handled /v1/chat/completions with temperature=0, max_tokens=32, thinking disabled, and prompt What is 2 plus 2? Answer briefly. It returned 2 plus 2 equals 4. (23 prompt tokens, 9 completion tokens) and shut down normally.
    • The modified benchmark completed both fresh server arms with the default diagnostic reserve, without the old fixed-40-GiB warning:
    VLLM_METAL_BACKEND=mlx python tools/benchmark/kv_offload_benchmark.py \
      --model mlx-community/Qwen3-0.6B-4bit \
      --revision 73e3e38d981303bc594367cd910ea6eb48349da8 \
      --memory-fraction 0.5 --offload-size-gib 0.125 \
      --max-model-len 512 --prefix-len 128 --suffix-len 32 \
      --num-prompts 8 --repeats 1 --concurrency 1 \
      --workload no_reuse --no-disk-tier \
      --serve-arg=--host --serve-arg=127.0.0.1 \
      --serve-arg=--max-num-seqs --serve-arg=1 \
      --serve-arg=--max-num-batched-tokens --serve-arg=128 \
      --serve-arg=--generation-config --serve-arg=vllm \
      --keep-logs --out /private/tmp/vllm-metal-validation/kv-offload-small.json
    
    ArmCompletedFailedInput tokensOutput tokens
    Offload off801280512
    Offload on, 128 MiB host pool801280512

    The benchmark exited with code 0; failures=[] and controls_ok=true. Both servers shut down normally. This is end-to-end serving smoke coverage of the no_reuse workload and host-pool configuration, not disk-tier restore coverage or a performance claim; the machine was under desktop load and only one repetition was used.

    An initial attempt with a 1 GiB host pool and 1024-token context failed at offload-server startup: the enabled commit probe reduced KV capacity below that required for the context under current memory pressure. Reducing the pool to 128 MiB and context to 512 completed both arms. The commit probe stayed enabled. This also illustrates why the preflight estimate must not promise that a workload fits.

    View discussion on GitHub
  • fix(vite): 修复资源内联的数字阈值判断

    Files
    2
    Additions
    +149
    Deletions
    −1
    Commits
    4
    Comments
    6
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Vite 资源插件把任意非零数字 limit 当作始终内联,导致超过配置字节数的图片、字体和媒体仍变成 data URL。将无条件内联限定为 limit === true,数字继续按已有的 source.length < limit 比较,保留布尔配置及模块输出形式。

    用户未配置资源选项、配置空对象或只配置 name 时,H5 和 mini 编译器会先合并默认阈值:图片 2KB,字体和媒体 10KB;资源插件按合并后的阈值处理,小于阈值的资源仍会内联。测试中直接传给插件的 limit: undefined 用于覆盖未经过配置合并的输入,不代表用户省略配置的正常构建流程。

    补充 41 条资源插件测试:23 条直接选项用例覆盖布尔值、undefined、0、数字阈值边界和 CommonJS 输出;18 条用例调用 H5/mini 的真实 processConfig,覆盖三种省略 limit 的配置形态,并检查三类资源在默认阈值前、等于阈值和超过阈值时的行为(54 个默认配置资源场景)。

    本 PR 保留现有严格小于的边界,未调整资源缓存逻辑或统一两个编译器的全部选项语义。

    Closes #19558

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 使用 Vite 的构建(H5 与小程序共用资源插件)

    验证

    • pnpm --filter @tarojs/vite-runner run test:ci:3 个测试文件、54 个用例全部通过。
    • 默认配置测试调用实际配置合并方法和资源插件,使用真实临时资源文件;未初始化完整 app/page 编译流程。
    • pnpm --filter @tarojs/vite-runner run build:通过。
    • 使用构建后的 CommonJS 插件运行真实 Vite 构建:对 32 字节 png/woff/mp4,limit=10 和 32 时各输出 3 个独立资源;limit=33 时全部内联,输出模块中无未处理的资源占位符。
    • 修改文件 ESLint、git diff --check 通过。
    • 未运行完整 Taro 应用的各小程序平台构建矩阵。

    Summary by CodeRabbit

    • 修复
      • 调整资源内联阈值判断:数值阈值为 0 时,空资源可以内联;资源大小等于数值阈值时也会内联。
      • 未达到内联条件的资源仍作为外部文件输出。
    View discussion on GitHub
  • docs(field-report): MCP budget identity validation

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    Add the single-file report required by AGENTS.md after running XERJ for #2255. It describes the isolated fixture and real-node validation of MCP JSON budget identity, including the projection gap. No user corpus was indexed and no retrieval-quality or performance claim is made.

    Verified: the report has 13 lines; the existing .gitignore re-include covers it; the effective diff adds only this report. All counts come from observed commands. Engine/build/conformance checks are not applicable to this report-only PR; the code fix and its validation are in #2255.

    View discussion on GitHub
  • fix(components): 修复 Picker 重开时的关闭定时器竞争

    Files
    2
    Additions
    +120
    Deletions
    −13
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 Picker 在关闭后的 350ms 内重开时,旧定时器会隐藏重新打开的选择器,且关闭动画类名仍然保留。现在记录并清理关闭定时器:重开时取消旧回调并复位动画,重复关闭时以最后一次关闭为准,组件卸载时取消待执行回调。

    新增 Stencil 组件测试,通过实际点击事件验证快速重开、正常动画结束、重复关闭、卸载清理和禁用状态。

    Closes #19556

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 原实现运行新增测试:3 条失败、2 条通过;修复后 5 条全部通过。
    • pnpm --filter @tarojs/components exec stencil test --spec --runInBand --no-watchman:72 个单元测试文件、124 个用例、35 个快照通过。此次仅运行 spec,未运行 e2e。
    • pnpm --filter @tarojs/components run build:ci:退出码 0;组件库原有构建警告仍存在。
    • 修改文件 ESLint 无错误,原渲染逻辑仍有 4 条 JSX key 警告;git diff --check 通过。
    • 使用 Stencil 模拟 DOM 与受控时钟验证,未进行真机或独立浏览器交互测试。

    Summary by CodeRabbit

    • Bug 修复
      • 修复选择器关闭动画期间重新打开或重复关闭时可能出现的状态异常。
      • 选择器卸载或被禁用时,会正确清理待处理的关闭操作,避免弹层意外显示或状态未重置。
    View discussion on GitHub
  • fix(h5): 释放 chooseMedia 加载失败的临时资源

    Files
    2
    Additions
    +63
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 chooseMedia 在图片解码、视频解码或视频文件读取失败时,会丢弃失败文件,却保留此前创建的 blob URL。现在统一捕获单文件加载失败并释放对应 URL,再沿用既有的失败文件丢弃策略;成功返回的图片 URL 保持可用。

    新增和扩展回归测试,覆盖混合成功失败、重复选择与重复错误、视频解码/读取错误,以及成功后迟到的错误不释放已返回的 URL。

    Closes #19554

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • 原实现运行用例:4 条资源释放断言失败;修复后 chooseMedia 6 条用例全部通过。
    • pnpm --filter @tarojs/taro-h5 run test:ci --watchman=false:27 个测试文件、209 个用例全部通过。
    • pnpm --filter @tarojs/taro-h5 run build:在完整执行环境下退出码为 0;构建仍存在未修改文件的既有类型与 Sass 等警告。
    • 修改文件 ESLint 和 git diff --check 通过。
    • 使用 Jest/jsdom 和受控媒体事件验证,未进行真实浏览器内存测量。

    Summary by CodeRabbit

    • Bug 修复
      • 修复媒体文件加载失败时临时资源未及时释放的问题,涵盖视频解码失败和文件读取失败等情况。
      • 避免同一加载错误导致重复释放资源;媒体加载成功时,资源仍保持可用。
    View discussion on GitHub
  • perf(wiki): coalesce graph label updates and skip hidden SVG layout

    Files
    2
    Additions
    +266
    Deletions
    −15
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Wheel zoom synchronously recalculates every label and contour, while collision-rejected SVG text remains in layout at opacity zero. Defer label/contour refreshes to one animation frame, skip them for translation-only pans, and remove rejected node labels and group captions from layout with display: none.

    Only visible labels receive changed font/position attributes. Initial text widths are measured before hiding, with SVG reads and writes kept separate. Hover, selection, node movement, group focus, arrow thresholds and animated navigation still refresh labels; rerender/unmount cancels pending frame work. Labels now appear/disappear without the old opacity fade. No graph limits, backend APIs or dependencies change.

    Type of Change

    • 🐛 Bug fix
    • ⚡ Performance improvement
    • 🧪 Test

    Related Issue

    Fixes #4635

    Testing

    Passed from frontend/:

    node --import tsx --test src/views/knowledge/wiki/*.test.ts
    npm run type-check
    npm run build
    git diff --check upstream/main...HEAD
    
    • 44 tests pass, including 10 new viewport-controller regressions executing the component's actual controller against a deterministic frame clock. Eight of these ten fail against unchanged upstream 62a6d86b0; the two controls pass.
    • Coverage includes cursor-anchored burst zoom, collision-hidden labels, pan-only updates, hover/selection, contour invalidation after movement, arrow thresholds, keyboard-accessible group captions, unchanged geometry, animated focus, and disposal.
    • Browser comparison uses the actual Vite app with synthetic API responses: 500 nodes, 4,035 edges, 527 text elements, 1800×950 headless Chromium on this Mac. After layout settles, run the same 72 real wheel events (three cycles of 12 in / 12 out, 40 ms apart). Initial/final root transforms match across versions, and the same 495 node labels are suppressed at initial zoom.
    CDP metric over the wheel sequenceBeforeAfter
    Main-thread task duration3,168 ms1,002 ms
    Script duration343 ms332 ms
    Style recalculation433 ms195 ms
    Layout144 ms107 ms

    This is one local paired synthetic-browser measurement, not a production benchmark or a guarantee across hardware. Build succeeds with the existing large-chunk advisory. Full frontend/repository suites, Docker CI and a live backend/model deployment were not run locally.

    Checklist

    • Diff whitespace check passes
    • Targeted Wiki tests, frontend type-check and build pass
    • Self-reviewed; regression coverage added
    • Validation scope and limitations documented
    • No dependency, schema or public API changes

    Screenshots / Recordings

    Actual graph rendered with the synthetic browser fixture (500 nodes / 4,035 edges). The performance comparison is above; graph layout and label-selection rules are retained.

    Graph with synthetic browser fixture after the rendering fix
    View discussion on GitHub
  • fix(knowledge): keep document toolbar actions inside the pane

    Files
    2
    Additions
    +15
    Deletions
    −2
    Commits
    2
    Comments
    4
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Long folder breadcrumbs squeeze the document toolbar's controls outside the pane, clipping the Add document button and view toggle even at desktop widths.

    Allow the breadcrumb and trailing controls to wrap based on their content. Keep the controls right-aligned and bounded to the pane; allow them to wrap internally when the pane itself is too narrow, including the 548 px pane mentioned in the issue. Action controls keep their intrinsic widths. Existing narrow-pane search behavior is retained. This is a CSS-only change with no API, dependency or data changes.

    Type of Change

    • 🐛 Bug fix

    Related Issue

    Fixes #4644

    Testing

    Passed from frontend/:

    node --import tsx --test src/views/knowledge/KnowledgeBase.test.ts src/views/knowledge/folderTree.test.ts
    npm run type-check
    npm run build
    git diff --check upstream/main...HEAD
    
    • 40 existing component/folder tests pass.
    • Browser checks exercise the actual Vite page with synthetic API responses and the folder tree expanded: Chinese and English, viewport widths 900 / 1000 / 1100 / 1180 / 1366 / 1440 / 1600 / 1920 px, and root / 3-crumb / 9-crumb paths (48 combinations). All measured toolbar controls remain within the document pane after the change.
    • At a 1440 px Chinese viewport with a 3-crumb path and an 888 px pane, the unchanged page overflows by about 110 px; the fixed page has no right overflow. The 548 px pane at a 1100 px viewport is also covered.
    • Build succeeds with the existing large-chunk advisory. There is no frontend lint script. Full frontend/repository suites and a live backend upload were not run locally; this change is limited to layout.

    Checklist

    • Diff whitespace check passes
    • Existing component/folder tests, frontend type-check and build pass
    • Browser layout verified across widths, locales and breadcrumb lengths
    • Self-reviewed
    • Validation scope and limitations documented
    • No dependency, schema or public API changes

    Screenshots / Recordings

    Actual page at 1440 × 900, Chinese UI, expanded folder tree and a three-crumb long path, rendered with synthetic API data. The screenshot is included under the existing documentation screenshots directory for review.

    Document toolbar wrapping with long breadcrumbs

    View discussion on GitHub
  • feat(mcp): expose local definition lookup

    Files
    15
    Additions
    +737
    Deletions
    −54
    Commits
    4
    Comments
    2
    Review comments
    0
    Merged by
    xerj-team
    PR description

    Written by AI coding agents (OpenAI Codex for review and documentation), run by @Jarvis636431, who has reviewed and confirmed the implementation's validation.

    What this changes, and why

    MCP callers can use xerj_search with a prefix after #2137, but calling xerj_def still returns "unknown tool". xerj_hub_def requires a named Hub pack and does not expose the local CLI workflow.

    Add xerj_def for local autoindexed data. Extract and reuse the existing CLI definition query and response-finalization helpers in engine/crates/xerj-autoindex/src/def.rs, preserving mapping guards, lexical kind/visibility ranking, the bounded candidate window, and location deduplication. The adapter accepts symbol/capability phrases, prefix or index scope, kind/language filters, k and a token budget. It validates arguments before HTTP, preserves search HTTP errors, refuses malformed success responses, and treats no matches as a successful empty hit list.

    Return the ES envelope with declarations and locators; totals remain engine matches before deduplication. Add HTTP-fixture and real-node regressions, a CLI/MCP parity check in CI, the generated tool schema, and consistent references in the English/Chinese README, agent guide and website. The registry now has 21 tools, or 18 without Hub tools.

    Closes #2080; the prefix portion was already merged in #2137.

    Ancestry and scope

    Based on upstream main 6c5f08f5. Original implementation: df61f3b5; merge of upstream: c91ffc4b; documentation follow-up: 17f9dc8f. The merge changed no implementation or test code. This is independent of unmerged prerequisite work and preserves upstream history. No new dependency, persistent schema, mutation path, or ES endpoint is introduced.

    Known documentation overlap: open PRs #1909 and #1925 also edit landing/llms.txt. This branch changes only the tool inventory and local-definition contract there; those PRs need coordination before merging.

    Evidence

    Independently rerun during this review:

    • cd engine && TMPDIR=/private/tmp cargo test --offline -p xerj-mcp: 129 tests passed, including all five local-definition regressions.
    • TMPDIR=/private/tmp python3 scripts/mcp-def-smoke.py engine/target/ci-test/xerj: all three CLI/MCP request and ranked-response comparisons passed.
    • cd engine && cargo fmt --all -- --check: passed.
    • Release xerj-mcp real tools/list output compared as parsed JSON with the published schema: exact match, 21 tools. Used a Python subprocess timeout because GNU timeout is unavailable on this macOS host.
    • All gates from .github/workflows/seo.yml, plus factcheck.py --fixture-check and landing-constants-guard.sh: passed. Existing article/style warnings remain; SEO lint has zero gate violations and the report-only audit has zero critical findings.
    • Schema-based inventory check: all tools enumerated in AGENTS.md, 18 non-Hub tools, and valid matching example arguments across all five updated documentation copies.
    • workflow-timeout-guard.py and git diff --check: passed.
    • Rechecked article generation, page heads and sitemap after the documentation commit: passed.

    The first sandboxed MCP run could not bind loopback ports and also encountered macOS temporary-path aliasing. Repeating with loopback allowed and TMPDIR=/private/tmp passed; no source change was made for those environment failures.

    Earlier implementation validation, recorded in df61f3b5 and explicitly confirmed by the operator, not independently rerun in this review:

    • Regression failed before implementation with "unknown tool: xerj_def".
    • Scoped release builds, strict Clippy and schema checks passed.
    • ES-YAML: 1438 passed, 0 failed, 10 skipped.
    • Full autoindex suite: 1621 passed, 10 failed, 5 ignored. All ten failures were reproduced against unmodified upstream source at b64d9cb0 and concern non-UTF8 filenames and PDF worker/spool fixtures on macOS. The full autoindex suite is not claimed green.

    Contribution review

    Reviewed the effective upstream diff and ancestry under docs/CONTRIBUTION_REVIEW.md. Existing search/default/index behavior and upstream workflows are preserved. Relevant tests cover scope isolation, auth forwarding, missing/numeric mapping fields, legacy passages, ranking/deduplication, no match, invalid arguments before HTTP, malformed responses, HTTP errors and token budgeting. CI runs the real-entrypoint parity script without downloading a model or corpus.

    N/A: durable-state migration, recovery, destructive failure atomicity, optional accelerators, feature gates and performance measurement: this adds a read-only MCP adapter over existing CLI behavior and makes no such changes or performance claim. No new ES-compatible server behavior requires a YAML case. Installation/deployment recipes are unchanged.

    Provenance and limits

    Verified in this review: the commands and static review listed above. Earlier full-build/conformance and failing-before evidence is operator-confirmed and identified separately.

    Not rerun here: full autoindex, ES-YAML, release builds, Clippy, failing-before mutation, full first-time-agent/persona harness, or live-site deployment validation. The final follow-up changes only reference documentation; it does not change setup or onboarding. Other host platforms and MCP clients were not exercised in this review. CI must validate the final PR merge ref.

    No Co-Authored-By trailers were added.

    View discussion on GitHub
  • fix(import): accept formats advertised by parser engines

    Files
    4
    Additions
    +48
    Deletions
    −10
    Commits
    1
    Comments
    1
    Review comments
    1
    Merged by
    lyingbug
    PR description

    Description

    The knowledge-base UI advertises parser-supported formats such as .xlsm, but the shared import allowlist rejects them before parsing with unsupported file type.

    Add the ten already-advertised extensions to the shared allowlist: docm, xlsm, pptm, odt, ods, odp, rtf, bmp, tiff, and webp. Direct uploads, URL imports, worker re-checks, and connectors using this helper now accept the same formats. Parsing still requires an available engine supporting the selected format.

    Add a contract test checking locally registered parser metadata against the import gate, even when the anydoc converter is not linked into the test build. Extend service coverage for filename validation and normalized import types, including uppercase extensions, dot prefixes, and whitespace.

    Type of Change

    • 🐛 Bug fix
    • 🧪 Test

    Related Issue

    Fixes #4598

    Testing

    Passed:

    GOMAXPROCS=2 go test -p 1 ./internal/utils ./internal/infrastructure/docparser -count=1 -timeout=3m
    GOMAXPROCS=2 go test -p 1 ./internal/application/service -run 'Test(IsValidFileTypeHTML|IsSupportedImportExtension|ImportExtensionSetIsSharedAcrossPaths|IsDataTableFileType)$' -count=1 -timeout=3m
    GOMAXPROCS=2 GOFLAGS=-p=1 GOTOOLCHAIN=go1.26.2 golangci-lint run --concurrency=2 --new-from-rev=upstream/main --timeout=5m ./internal/utils ./internal/infrastructure/docparser ./internal/application/service
    git diff --check upstream/main...HEAD
    
    • New extension-acceptance cases and the parser/import contract test were run before the production change; both fail against the unchanged allowlist, identifying all ten missing formats.
    • Existing unsupported-extension and video rejection controls pass.
    • Tests used Go 1.27.1. Incremental lint used Go 1.26.2 and golangci-lint v2.12.2, reporting 0 issues. Formatter checks pass.
    • Full service/repository suites, a deployed browser upload, and live document conversion were not run; this change verifies the import gate and parser metadata contract.

    Checklist

    • Changed Go files are formatted
    • Targeted package and service tests pass
    • Diff-scoped lint and whitespace checks pass
    • Self-reviewed
    • Added regression coverage
    • Validation scope and limitations documented

    No dependency, schema, parser implementation, or UI layout changes. Documentation already advertises these formats; screenshots are not applicable.

    View discussion on GitHub
  • fix(gallery): cancel stale image fetches before Blob allocation

    Files
    2
    Additions
    +169
    Deletions
    −10
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Leaving the image gallery while a protected image is downloading can create a Blob URL after unmount cleanup has already revoked the existing cache. Cancelling a query or switching knowledge bases also leaves those old downloads running.

    • Abort pending image fetches when resetting results, switching knowledge bases, or unmounting.
    • Check the captured abort signal after response headers and body reads, so late completions cannot allocate or cache Blob URLs.
    • Clear obsolete in-flight entries and only let a request remove its own entry; an old completion cannot remove a newer request for the same storage URL.
    • Preserve active-query request sharing, completed-URL caching, and HTTP/network-error fallback.

    Only the gallery component and its existing tests change.

    Type of Change

    • 🐛 Bug fix
    • 🧪 Test

    Related Issue

    Fixes #4587

    Testing

    Passed from frontend/:

    node --import tsx --test src/views/knowledge/gallery/*.test.ts src/utils/protectedFileAccess.test.ts
    npm run type-check
    npm run build
    
    • 28 tests pass, including six added component cases covering request/cache sharing, unmount before headers or during a body read, query reset with a same-URL replacement, knowledge-base switching, and failure/retry behavior.
    • Five new regression cases fail when the tests execute the unchanged upstream e28c68cf5 component. The delayed-body case reproduces the original late Blob URL allocation directly.
    • Tests execute the actual component script with deferred proxy responses and recorded object-URL allocation/revocation. Responses deliberately ignore cancellation to exercise the late-completion guard.
    • git diff --check upstream/main...HEAD passes.
    • Production build succeeds with the existing large-chunk advisory.

    Full frontend/repository suites and a deployed browser end-to-end or memory-profile run were not performed. This does not claim to establish the cause of #4539's latency.

    Checklist

    • Diff whitespace check passes
    • Targeted component and protected-file tests pass
    • Frontend type-check and production build pass
    • Self-reviewed the change
    • Added regression coverage
    • Validation scope and limitations documented

    Documentation, API/schema changes, and screenshots: not applicable; this changes resource cleanup without changing the gallery layout or controls.

    View discussion on GitHub
  • fix(runtime): preserve node insertion consistency

    Files
    2
    Additions
    +245
    Deletions
    −0
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    insertBefore 在验证参考节点之前移除待插入节点,导致自身插入抛错、非法插入破坏原父子关系。现在先验证参考节点,再进行节点移动或展开 DocumentFragment;自身插入和自身替换直接返回,保持已有节点、事件索引和渲染数据。

    新增 20 个 runtime 用例,覆盖自身操作、非法参考节点(含空/非空 fragment)、同父节点重排、跨父节点移动、尾部追加、正常替换和 fragment 顺序。挂载测试验证实际 runtime 更新队列输出的 setData 数据,以及无效操作/自身操作不会新增更新、观察记录或 nearest-context epoch 变化。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    Closes #19550

    这个 PR 涉及以下平台:

    • 所有小程序

    验证

    • 原源码运行新增用例:11 failed / 9 passed;修复后新增 20 个用例通过。
    • pnpm --filter @tarojs/runtime run test:ci:16 个测试文件通过,197 tests passed / 1 skipped。
    • pnpm --filter @tarojs/runtime run build:通过。
    • pnpm build:全工作区构建通过(exit 0);未修改文件中仍有类型、Sass 与外部依赖解析等构建警告。
    • 修改文件 ESLint、git diff --check:通过。
    • 使用包内 runtime DOM 与模拟页面 setData 验证,未进行小程序开发者工具或真机测试。

    Summary by CodeRabbit

    • 问题修复
      • 插入节点时会先验证参考节点是否属于当前父节点,避免无效引用导致已有节点或文档片段被意外移动。
      • 将节点插入到自身之前,或用节点替换自身时,不再改变文档树。
      • 改进节点插入、替换及移动后的树结构和渲染更新表现。
    View discussion on GitHub
  • fix(h5): handle clipboard copy failures and clean up temporary textareas

    Files
    2
    Additions
    +237
    Deletions
    −11
    Commits
    6
    Comments
    6
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    H5 setClipboardData currently reports success and displays the copy-success toast even when document.execCommand('copy') returns false. If selecting or copying throws, its temporary textarea remains attached to the document.

    Check the command result and route failures through MethodHandler.fail. Remove the temporary textarea in finally, and move the explicit cache update after a successful copy. Preserve successful multiline copying and the hideDefaultMessage option.

    Closes #19547

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • Added 8 Jest/jsdom regression cases for command failures, Promise rejection, callback behavior, DOM cleanup, selection exceptions, unavailable execCommand, cached content, and successful copies with/without the default toast. Six cases fail against the original implementation.
    • pnpm --filter @tarojs/taro-h5 test:ci --watchman=false: 26 suites, 187 tests passed.
    • ESLint passed for both changed files.
    • git -c core.whitespace=cr-at-eol diff --check passed; the source file retains its existing CRLF line endings.
    • pnpm --filter @tarojs/taro-h5 build: passed with exit code 0 outside the restricted execution sandbox; warnings remain in unchanged files.
    • Clipboard outcomes are simulated in jsdom; no separate real-browser/device clipboard compatibility matrix was run.

    Summary by CodeRabbit

    • 问题修复
      • 修复 H5 端复制失败时仍将内容写入剪贴板缓存的问题;现在仅在复制成功后更新缓存。
      • 复制失败或缓存写入失败时会正确进入失败处理,避免误报成功。
      • 优化复制流程中的临时输入框清理,确保流程结束后及时移除。
      • 保持成功回调、完成回调及默认提示行为的一致性。
    View discussion on GitHub
  • fix(weapp): reuse independent subpackage app across pages

    Files
    2
    Additions
    +56
    Deletions
    −2
    Commits
    2
    Comments
    3
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    关联 #19501。

    独立分包的页面加载器此前会在每个页面首次加载时调用 createReactApp。同一独立分包内懒加载第二个页面时,这可能重新创建 React 根节点并覆盖正在使用的 Current.app。

    现在仅在当前运行时尚未创建 App 时执行初始化;后续页面仍会正常注册。新增了两个页面依次加载的测试,验证 App 只初始化一次、两个页面均完成注册。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: #19501
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    Summary by CodeRabbit

    • 修复
      • 加载同一应用包中的多个独立页面时,应用创建函数仅调用一次,页面配置仍会分别执行。
    View discussion on GitHub
  • fix(h5): settle getVideoInfo when video loading fails

    Files
    2
    Additions
    +109
    Deletions
    −1
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    When the video element emits error before metadata loads, H5 getVideoInfo currently leaves its Promise pending and never calls fail or complete. Handle that error through MethodHandler.fail, using the media error message when available and a fallback otherwise.

    Register listeners before setting src, and clear both listeners after the first metadata/error event so repeated events cannot trigger duplicate callbacks or fetches. Preserve the existing successful metadata/fetch behavior and fetch rejection handling.

    Closes #19545

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • Added 6 Jest/jsdom regression cases covering media error rejection, missing/empty media error messages, failure/completion callbacks, repeated events, successful metadata extraction, and fetch failures.
    • Confirmed the regression tests fail against the original implementation.
    • pnpm --filter @tarojs/taro-h5 test:ci --watchman=false: 26 suites and 185 tests passed.
    • ESLint passed for both changed files; git diff --check passed.
    • pnpm --filter @tarojs/taro-h5 build: passed with exit code 0 when rerun outside the restricted execution sandbox (same Node.js 26.8.1 and same source/dependencies). Sass/TypeScript warnings remain in unchanged files. The initial sandbox run emitted all outputs but did not exit: a standalone fs.watch probe reports asynchronous EMFILE inside the sandbox and succeeds outside it, and TypeScript file watchers remain active in the hanging process. This is an execution-environment limitation rather than a build failure introduced by this change.
    • No separate device/browser matrix run.
    View discussion on GitHub
  • docs(field-report): MCP prefix isolation validation

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    Add the single-file field report required by AGENTS.md after running XERJ for #2137. It records the controlled custom-prefix/default-corpus checks and the macOS temporary-path and timeout-tool friction. This is integration validation, not a retrieval-quality or performance evaluation.

    Verified: the report is within 25 lines; the existing .gitignore re-include covers it; the effective diff adds only this file. The test count comes from the observed composed-tree MCP crate run. No code changes, so engine/build/conformance checks are not applicable to this report-only PR.

    View discussion on GitHub
  • feat(mcp): support autoindex prefixes in xerj_search

    Files
    5
    Additions
    +301
    Deletions
    −13
    Commits
    4
    Comments
    2
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    xerj_search ignored the CLI-style prefix argument and searched the default ax-* corpus. It now accepts {"prefix":"project","query":"retry policy"} and searches project-*, using that same scope for mapping discovery and the final search. The expansion follows engine/crates/xerj-autoindex/src/search.rs:692.

    Non-empty index and prefix are mutually exclusive. Empty or non-string prefixes return an MCP tool error before any HTTP request; surrounding whitespace is trimmed and null is treated as omitted. Existing explicit-index and default ax-* behavior is preserved. prefix is not forwarded into the ES request body. README, changelog, and the generated MCP schema document the argument.

    Refs #2080 — prefix support only. The local xerj_def request remains unimplemented; this PR should not close the issue.

    Verified

    • Before the production change, cargo test --locked -p xerj-mcp --lib search_prefix -- --nocapture failed all four new tests: the builder used /ax-*/_search, mapping discovery used GET /ax-*/_mapping, conflicting scope arguments were accepted, and invalid arguments attempted HTTP.
    • On the final rc.98 tree composed with upstream 28de5cfc, TMPDIR=/private/tmp cargo test --locked --offline -p xerj-mcp passed all 124 tests: 117 library tests and 7 integration/schema tests, with 0 failures. The new real-node test seeds both project-docs and ax-other with matching text and checks custom prefix, default scope, and explicit index for plain-string and DSL queries. The transport tests independently check both HTTP paths and zero requests on invalid scope arguments. A new combination regression proves prefix-scoped code searches retain upstream's test-path demotion.
    • TMPDIR=/private/tmp cargo test --locked --offline --profile ci-test -p xerj-mcp --lib search_prefix passed all 5 focused regressions on the composed tree in the optimized CI test profile.
    • cargo fmt --all, cargo fmt --all --check, and cargo clippy --locked --offline -p xerj-mcp --all-targets -- -D warnings passed.
    • cargo build --locked --offline --release -j 32 -p xerj-mcp passed on the composed tree.
    • cargo build --locked --offline --profile ci-test -j 8 -p xerj-server -p es-yaml-runner passed on the final rc.98 tree. Against the candidate server in a fresh temporary data directory, ./target/ci-test/es-yaml-runner --url <isolated-loopback-node> --dir tests/es-compat-yaml/yaml completed with 1438 passed, 0 failed, 10 skipped (exit 0), including 75 cases under the existing catch-lenient policy. The node stopped normally (exit 0).
    • scripts/mcp-schema-check.sh --write regenerated the schema from the candidate debug xerj-mcp; subsequent checks against both debug and release binaries passed with the same 20 tools. On this macOS host a temporary Python timeout wrapper supplied the script's missing timeout command; no repository script was changed.

    Environment and site checks

    The first library-test run with the host's default temporary directory failed the existing loopback_url_with_no_auth_picks_up_the_local_admin_key assertion because /var/... and /private/var/... were compared as strings. The complete crate suite passed with TMPDIR=/private/tmp; that unrelated test was not changed.

    All applicable SEO workflow checks, factcheck fixture/self-tests and content checks, the critical-level site audit, and the landing constants guard passed. After the rc.98 merge was committed, gen_sitemap.py --check matched and seo_lint.py reported 0 gate violations. No additional website changes were needed beyond the generated tool schema.

    Review and limits

    Started independently from upstream main e1348b4d, then merged upstream search fixes and the rc.98 release, ending at base 28de5cfc. The mapping-read overlap preserves upstream's plain-query detection and ranking path while using the resolved prefix scope for the GET. The later description/schema overlap preserves the new upstream removal tool and deletion guidance. The prefix changelog entry stays under Unreleased, not the rc.98 release. The effective diff remains five files containing only the prefix feature, its tests, docs, and generated schema. No new dependencies or tool names. Scope resolution is shared by mapping discovery and request construction, and the request is read-only. Existing index selection, DSL forwarding, lexical query shaping, auth, token budgets, and recovery behavior are preserved.

    No stored-state schema, journal, migration, publication lifecycle, telemetry, execution identity, optimization, feature gate, cluster behavior, or operational recipe changes. The durable-state/migration, optional-accelerator, identity, telemetry, feature-gate, performance, cluster, and operational-recipe audits are therefore not applicable. Tests use isolated temporary data directories and loopback endpoints; no external models or corpus downloads are required by the new coverage.

    Not verified: Windows/Linux execution or external MCP clients. No performance claims; no claim that #2080's definition-lookup work is complete.

    View discussion on GitHub
  • fix(autoindex): report semantic verification counts and datasets

    Files
    2
    Additions
    +73
    Deletions
    −3
    Commits
    2
    Comments
    3
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    The semantic read-back barrier already compares its live count against the sealed passage and vector counts, but a failure only printed the group ID. Include live_semantic_records, expected_passages, expected_vectors, and the group's dataset slugs in that same error. The live value counts records carrying the semantic field, so the label deliberately describes records rather than claiming a vector count.

    The existing refusal condition is unchanged. A real-HTTP regression test injects missing semantic matches after publication, checks the diagnostic against the sealed generation, proves neither sync_validated nor sync_commit is written, and restores truthful read-backs to verify that the pending generation resumes without changing or duplicating its published documents.

    Refs #1971. This addresses its diagnostic gap; it does not reproduce or fix the original Windows/.NET semantic-count mismatch, so it should not close the issue.

    Verified

    • Fail before: the new HTTP regression test failed against the original production code with missing "live_semantic_records=0": live semantic count disagrees with desired group axg1-....

    • Pass after: cargo test --locked --offline -p xerj-autoindex --lib semantic_count_mismatch_reports_counts_and_datasets_and_resumes -- --nocapture — 1 passed, 0 failed.

    • cargo test --locked --offline -p xerj-autoindex --lib incremental_reconcile_http_tests — 74 passed, 0 failed.

    • cargo fmt --all and cargo fmt --all --check — passed.

    • Full cargo test --locked --offline -p xerj-autoindex on this macOS host: patch 1498 passed / 20 failed / 2 ignored; unmodified base 050a12e9 1497 passed / 20 failed / 2 ignored. Compared the failed test-name sets: identical; no new failures. Failures involve non-UTF-8 filenames, temporary-path aliases, PDF workers/reuse, and a snapshot-mutation test. This is not a claim that the full crate suite passes.

    • cargo build --locked --offline --release -j 32 -p xerj-autoindex — passed.

    • cargo build --locked --offline --profile ci-test -j 8 -p xerj-server -p es-yaml-runner — passed.

    • ./target/ci-test/es-yaml-runner --url http://127.0.0.1:19371 --dir tests/es-compat-yaml/yaml against the candidate binary in an isolated temporary data directory — 1436 passed, 0 failed, 10 skipped; exit 0. The runner also reports 75 catch-lenient cases under the existing suite policy. The test node stopped normally afterward.

    Review and limits

    Independent branch from upstream main; only the error and its HTTP regression coverage change. No schema, journal format, count calculation, publication ordering, or recovery policy changes. The test covers refusal after publication and successful resume over the same state.

    Not reproduced: the original .NET corpus on Windows, or its underlying count discrepancy. No performance claims.

    Contribution-review sections on operational recipes, persistent schema migrations, optional accelerators, execution identity, telemetry, feature gates, performance, and cluster behavior are not applicable: this change adds no behavior in those areas.

    View discussion on GitHub
  • docs(field-report): semantic verification diagnostics on macOS

    Files
    1
    Additions
    +13
    Deletions
    −0
    Commits
    1
    Comments
    0
    Review comments
    0
    Merged by
    xerj-org
    PR description

    Written by an AI coding agent (OpenAI Codex), run by @Jarvis636431.

    The single-file agent report required by AGENTS.md after running XERJ. Records the HTTP regression and isolated-node conformance work behind #2016, including the identical upstream/patch macOS failures and the original Windows/.NET scenario that was not reproduced.

    Only this report is added. Counts come from observed test runs; the report does not claim a retrieval evaluation. Confirmed the existing .gitignore re-include covers the new Markdown file. No engine code changes, so no additional engine tests are required for this report-only branch.

    View discussion on GitHub
  • fix(faq): preserve disabled state when importing entries

    Files
    4
    Additions
    +166
    Deletions
    −3
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    FAQ imports that explicitly set is_enabled=false currently create enabled entries. GORM applies the Chunk model's default:true to a zero-valued bool even when the insert uses Select("*"), and also mutates the caller's chunk before indexing.

    Use an insert-only projection with a non-nil boolean pointer so both enabled and disabled states are explicit. Embed the original chunk so generated sequence IDs and timestamps continue to populate it. The existing model, database defaults, and FAQ default-enabled behavior are preserved; no migration or dependency changes are required.

    Type of Change

    • 🐛 Bug fix
    • 🧪 Test

    Related Issue

    Fixes #4571

    Testing

    Passed:

    GOMAXPROCS=2 go test -p 1 ./internal/application/repository -count=1 -timeout=3m
    GOMAXPROCS=2 go test -p 1 ./internal/application/service -run 'FAQ|Faq' -count=1 -timeout=3m
    GOMAXPROCS=2 GOFLAGS=-p=1 GOTOOLCHAIN=go1.26.2 golangci-lint run --concurrency=2 --new-from-rev=upstream/main --timeout=10m ./internal/application/repository ./internal/application/service
    git diff --check upstream/main...HEAD
    

    Lint used v2.12.2 and reported 0 issues. Repository tests used Go 1.27.1. The service package and repeated import regression also pass with CI's Go 1.26.2 toolchain:

    GOMAXPROCS=2 LOG_FORMAT= GOTOOLCHAIN=go1.26.2 go test -p 1 ./internal/application/service -run '^TestFAQImportPreservesEnabledStateInStorageAndIndex
    
    - SQLite tests read back mixed enabled/disabled batches, including 502 chunks crossing the SQL batch boundary, and verify caller state, sequence IDs, and timestamps.
    - PostgreSQL SQL-mock coverage checks actual bound boolean arguments and generated `seq_id` writeback; this is not a live PostgreSQL integration test.
    - The real FAQ import service and chunk persistence path are exercised in append and replace modes with enabled, disabled, and omitted states. Both persisted rows and captured retrieval-index inputs are checked; index assertions match by Chunk ID because deduplication does not preserve order. Each test closes its SQLite connection so repeated runs remain isolated. Model and retrieval services are test doubles.
    - Running the final two-row SQLite regression with the unchanged upstream `chunk.go` overlaid fails because both the stored and caller states become `true`; the fixed implementation passes.
    
    Full-repository checks and a browser/Excel end-to-end import were not run. An initial parallel lint attempt timed out loading dependencies under local memory pressure; the lower-concurrency scoped command above passed.
    
    ## Checklist
    
    - [x] Diff whitespace check passes
    - [x] Changed Go files are formatted
    - [x] Repository package and FAQ-related service tests pass
    - [x] Diff-scoped lint passes
    - [x] Self-reviewed
    - [x] Added regression coverage
    - [x] Validation scope and limitations documented
    - [x] No public API, schema, or dependency changes
    
    Documentation and screenshots: not applicable; this fixes the existing import state contract without a UI change.
     -count=100 -timeout=3m
    uv run --no-project --python 3.12 -- env GOMAXPROCS=2 LOG_FORMAT= GOTOOLCHAIN=go1.26.2 go test -p 1 ./internal/application/service -count=1 -timeout=4m
    
    • SQLite tests read back mixed enabled/disabled batches, including 502 chunks crossing the SQL batch boundary, and verify caller state, sequence IDs, and timestamps.
    • PostgreSQL SQL-mock coverage checks actual bound boolean arguments and generated seq_id writeback; this is not a live PostgreSQL integration test.
    • The real FAQ import service and chunk persistence path are exercised in append and replace modes with enabled, disabled, and omitted states. Both persisted rows and captured retrieval-index inputs are checked; model and retrieval services are test doubles.
    • Running the final two-row SQLite regression with the unchanged upstream chunk.go overlaid fails because both the stored and caller states become true; the fixed implementation passes.

    Full-repository checks and a browser/Excel end-to-end import were not run. An initial parallel lint attempt timed out loading dependencies under local memory pressure; the lower-concurrency scoped command above passed.

    Checklist

    • Diff whitespace check passes
    • Changed Go files are formatted
    • Repository package and FAQ-related service tests pass
    • Diff-scoped lint passes
    • Self-reviewed
    • Added regression coverage
    • Validation scope and limitations documented
    • No public API, schema, or dependency changes

    Documentation and screenshots: not applicable; this fixes the existing import state contract without a UI change.

    View discussion on GitHub
  • feat(confluence): support personal access token authentication

    Files
    14
    Additions
    +306
    Deletions
    −14
    Commits
    1
    Comments
    1
    Review comments
    1
    Merged by
    lyingbug
    PR description

    Description

    Confluence Server/Data Center instances that require personal access tokens cannot connect through the current username/password-only connector.

    Accept an optional credentials.token for Server/DC. A nonblank PAT takes precedence over username/password and sends Authorization: Bearer <token> for API requests and private image downloads; username and password may be omitted. An absent or whitespace-only PAT retains Basic authentication. Cloud continues to require email and API token.

    • Partition the space-picker cache by authentication mode and credential fingerprint.
    • Add a masked PAT input, conditional required fields, and translations in all six locales. Creation and credential replacement keep the token out of public settings.
    • Document configuration and include a screenshot of the actual editor rendered with local mock configuration.

    No schema migration or dependency change.

    Type of Change

    • ✨ New feature
    • 📚 Documentation update
    • 🧪 Test

    Related Issue

    Fixes #4504

    Testing

    Passed:

    go test ./internal/datasource/connector/confluence -race -count=1
    go vet ./internal/datasource/connector/confluence
    GOTOOLCHAIN=go1.26.2 golangci-lint run --new-from-rev=upstream/main ./internal/datasource/connector/confluence/...
    cd frontend
    node --import tsx --test src/views/knowledge/settings/DataSourceEditorDialog.test.ts
    npm run type-check
    node --import tsx --test src/i18n/localeKeyAudit.test.ts
    npm run build
    cd ..
    node website-docs/scripts/check-links.mjs
    git diff --check upstream/main...HEAD
    

    The editor suite passes all 27 tests; locale audit passes all 15 tests. Lint v2.12.2 reports 0 issues using the repository-compatible Go 1.26 toolchain (the local default Go 1.27 is incompatible with that lint binary). Documentation checking covers 76 documents and 350 internal links, with no broken links.

    Backend regressions cover PAT-only credentials, precedence, Basic fallback, Cloud validation, API and image headers, cache isolation/rotation, and same-scope versus rejected cross-scope image redirects. Running the new backend tests with unchanged upstream production files overlaid fails the PAT cases before the fix. Frontend regressions cover PAT-only connection testing/creation, Cloud field visibility, Basic requirements, and replacement through the credentials subresource.

    Browser inspection used the real editor component with a mocked credentials-status endpoint and an example token. No live Confluence instance was used. Full-repository test suites were not run; production build succeeds with the existing large-chunk advisory.

    Checklist

    • Diff whitespace check passes
    • Changed Go files are formatted
    • Targeted tests, race checks, vet and diff-scoped lint pass
    • Self-reviewed
    • Added regression tests
    • Updated documentation and locale keys
    • Validation scope and environment limitations documented above

    Screenshots / Recordings

    Server/DC PAT entry; username and password become optional. Local mock configuration, example token only.

    Confluence Server/DC PAT editor

    View discussion on GitHub
  • fix(h5): prevent uploads after cancellation during file conversion

    Files
    2
    Additions
    +129
    Deletions
    −33
    Commits
    2
    Comments
    2
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Fixes cancellation while H5 uploadFile is still converting its blob URL. Previously, aborting before POST send could leave the task pending and the conversion continuation would still send the upload. The task now settles immediately on cancellation and ignores late conversion results.

    A shared terminal-state guard clears the timeout and XHR handlers before invoking callbacks, preventing duplicate completion after abort, timeout, errors or success.

    Regression coverage includes cancellation before conversion resolves/rejects, repeated cancellation, and success/error/abort/timeout/conversion-failure cleanup. File conversion failures preserve HTTP status values returned by the blob conversion helper instead of reporting an undefined message. The new tests fail against the original implementation.

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • Targeted upload lifecycle tests: 10 passed.
    • H5 package test:ci: 23 suites / 143 tests passed.
    • ESLint for changed files: passed.
    • H5 package build and full workspace build: passed with Node 20.19.4 / pnpm 10.0.0.

    Closes #19536

    Summary by CodeRabbit

    • Bug Fixes
      • 修复上传在成功、中止、网络错误、超时或文件转换失败时重复结算的问题。
      • 文件转换期间中止上传后,迟到的转换结果不会再发送请求或重复触发错误回调。
      • 上传完成后会清理相关事件处理器和超时计时器,失败提示统一带有 uploadFile:fail 前缀。
    View discussion on GitHub
  • fix(h5): cancel pending sensor callbacks when stopping listeners

    Files
    4
    Additions
    +96
    Deletions
    −6
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Cancel pending throttled callbacks when stopping H5 accelerometer, device motion and compass listeners. Previously, removing the DOM listener left a trailing invocation queued, so callbacks could fire after stop or from an old listener after restart.

    Each stop method now removes the DOM listener, cancels its throttle and releases the listener reference. Application subscriptions are preserved across stop/start cycles.

    Adds 9 regression tests covering queued callbacks after stop, restart, repeated stop and subscription preservation. The original implementation fails 6 of these tests.

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • Sensor lifecycle tests: 9 passed.
    • H5 package test:ci: 23 suites / 142 tests passed.
    • ESLint for changed files: passed.
    • H5 package build: passed with Node 20.19.4 / pnpm 10.0.0.

    Closes #19538

    Summary by CodeRabbit

    • 问题修复
      • 停止加速度计、指南针和设备运动监听时,会取消尚未执行的回调,避免停止后仍收到旧通知。
      • 在监听尚未启动时重复调用停止操作更加安全;停止并重新启动后,旧监听器排队的回调不会影响新一轮监听。
      • 订阅者可在停止和重新启动监听后继续保留。
    View discussion on GitHub
  • fix(vite): reset stateful regex cursors in compile filters

    Files
    2
    Additions
    +46
    Deletions
    −0
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Reset RegExp lastIndex before matching Vite compile include/exclude rules. A global or sticky regex previously retained its cursor, so matching the same path repeatedly could alternate between included and excluded.

    Adds tests for global/sticky matchers, existing cursors, exclusion precedence, compile options, string globs and Windows paths. The change is limited to resetting RegExp matchers before each test.

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • 所有平台(Vite 构建)

    验证

    • Vite runner test:ci: 2 suites / 13 tests passed.
    • ESLint for changed files: passed.
    • Vite runner build: passed with Node 20.19.4 / pnpm 10.0.0.
    • Original implementation fails 7 regression cases.

    Closes #19540

    Summary by CodeRabbit

    • Bug 修复
      • 修复过滤器在重复检查带状态标志的正则表达式时结果不一致的问题。
      • 确保排除规则优先级、路径匹配及空值输入等场景下的过滤结果符合预期。
    View discussion on GitHub
  • fix(h5): accept valid zero and negative location coordinates

    Files
    2
    Additions
    +100
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Fix H5 chooseLocation coordinate validation. Initial coordinates in the southern/western hemisphere were omitted from the map iframe URL, and selecting a point at latitude or longitude 0 incorrectly reported failure.

    Use one numeric latitude/longitude range check for both initial coordinates and selected results. Preserve the explicit coord override, cancellation and submitting without a selection.

    Adds 27 DOM regression tests covering negative/zero/boundary coordinates, missing and invalid values, map messages, iframe parameters and result callbacks. The original implementation fails 12 cases.

    这个 PR 是什么类型?

    • 错误修复 (Bugfix)

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • chooseLocation DOM tests: 27 passed.
    • H5 package test:ci: 23 suites / 160 tests passed.
    • ESLint for changed files: passed.
    • H5 package build: passed with Node 20.19.4 / pnpm 10.0.0.

    Closes #19542

    Summary by CodeRabbit

    • 修复

      • 地图查询仅在经纬度均为有效数字且处于合法范围内时传入坐标;无效或不完整的坐标将被省略。
      • 选点结果采用相同的经纬度校验规则,避免无效坐标被视为有效结果。
      • 显式传入的 coord 可覆盖初始坐标生成的查询参数。
    • 测试

      • 补充对有效、无效及缺失坐标,以及选点成功、失败和取消场景的覆盖。
    View discussion on GitHub
  • fix(search): preserve chunk types in tool results

    Files
    3
    Additions
    +39
    Deletions
    −2
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Search results retain their original chunk type in both results[].chunk_type and the text output's chunk_type attribute. MCP clients can distinguish document text from generated summaries and image evidence without guessing from content. Missing types remain an empty string rather than being inferred as text.

    The shared search formatter supplies both Agent and built-in MCP results. This change adds output metadata without changing retrieval or ranking, documents the field, and tests text/summary/image types, missing types, and XML escaping.

    Type of Change

    • 🐛 Bug fix
    • 📚 Documentation update
    • 🧪 Test

    Related Issue

    Fixes #4385

    Testing

    Passed:

    go test ./internal/agent/tools -run 'Test(Format|SearchKnowledge)' -count=1
    go vet ./internal/agent/tools
    git diff --check main...HEAD
    

    Changed Go files were formatted with gofmt.

    An additional go test ./internal/agent/tools -count=1 did not finish: TestLoadFromExcel_MultiSheet was blocked in newTestDuckDB while running INSTALL for a DuckDB extension. The run was manually terminated with SIGQUIT to inspect the stack; it is not counted as passing. This extension-installation path is unrelated to the search formatter. Full-repository tests and lint were not run locally.

    Checklist

    • Changed source files are formatted
    • Targeted tests pass
    • Self-reviewed the code
    • Added regression coverage
    • Updated related documentation
    • Broader validation limitations are documented above

    Follow-up validation: wrapped the lines flagged by CI’s 120-column lll rule, reran the tests above, and passed golangci-lint v2.12.2 with the repository configuration:

    golangci-lint run --new-from-merge-base=main --timeout=5m ./internal/agent/tools
    # 0 issues.
    
    View discussion on GitHub
  • fix(mcp): clarify read_document query and pagination semantics

    Files
    2
    Additions
    +13
    Deletions
    −6
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    The built-in MCP read_document schema describes query matching as phrase search and implies that limit also controls query results. The shared reader instead matches every whitespace-separated word case-insensitively, in any order, and query mode has a fixed cap of 20 matches plus neighboring context.

    Align the tool and parameter descriptions and the MCP documentation with the existing reader behavior: limit applies only to sequential pages, output budgets can reduce results, offset is a position in document reading order, and truncated query results continue with the returned next_offset. Query execution and pagination behavior are unchanged.

    Type of Change

    • 🐛 Bug fix
    • 📚 Documentation update

    Related Issue

    Fixes #4386

    Testing

    Passed:

    go test ./internal/mcpserver -count=1
    go vet ./internal/mcpserver
    git diff --check main...HEAD
    

    Changed Go files were formatted with gofmt. Descriptions were reviewed against ReadDocumentTool.Execute, readPage, and readByQuery. No new behavior tests were added because this change only corrects descriptions. Full-repository checks were not run locally.

    Checklist

    • Changed source files are formatted
    • Affected package tests pass
    • Self-reviewed the code
    • Updated related documentation
    • Validation scope is documented above

    Follow-up validation: wrapped the lines flagged by CI’s 120-column lll rule, reran the tests above, and passed golangci-lint v2.12.2 with the repository configuration:

    golangci-lint run --new-from-merge-base=main --timeout=5m ./internal/mcpserver
    # 0 issues.
    
    View discussion on GitHub
  • fix(generate): honor clock-time bounds in generation and previews

    Files
    8
    Additions
    +129
    Deletions
    −37
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    t8y2
    PR description

    变更说明 / Change Description

    Time generation parsed only hours and replaced a valid end hour of zero with 23. With a fixed random value of 0.5, 00:00–00:00 produced 12:30:30, and 09:15–09:20 produced 09:30:30 outside the selected interval.

    Use one clock-time range helper for generated time values, daily datetime windows, and both parameter previews. Sample whole seconds inclusively between the configured bounds. HH:mm bounds represent exact times with zero seconds; legacy hour-only upper bounds retain the entire hour. Missing/invalid bounds retain full-day defaults, and reversed bounds are normalized within the same day. New time configurations use valid HH:mm input values.

    变更类型 / Change Type

    • Bug 修复 / Bug fix

    涉及前端 / Frontend Changes

    • 本 PR 涉及前端改动,已附截图/录屏(见下方) / This PR includes frontend changes and screenshots or a recording are attached below.

    Production Time/DateTime parameter components and generated rows in an isolated local Vite harness (no database operation):

    Midnight and minute-level time bounds

    验证 / Validation

    • 33 tests passed across 6 relevant Vitest files, covering generation, both mounted preview components, existing generators, and generation sessions.
    • Deterministic cases cover midnight, minute/second bounds, identical endpoints, legacy hour-only values, reversed/invalid bounds, full-day mode, and both interval endpoints.
    • Mounted-component tests change the actual time inputs and refresh the preview, checking against production generation.
    • pnpm exec vue-tsc --noEmit --project apps/desktop/tsconfig.json — passed with an 8 GiB Node heap.
    • Full frontend oxfmt --check and pnpm lint — passed (existing repository warnings remain).
    • Connection-type generation check, offline i18n dry-run and git diff --check — passed.
    • Inspected the real components and their generated sample values in Chrome; screenshot attached.

    The full application test suite and live database insertion were not run.

    关联 Issue / Related Issue

    Closes #12553

    View discussion on GitHub
  • fix(csv): count decimal significant digits across the point

    Files
    2
    Additions
    +44
    Deletions
    −12
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    t8y2
    PR description

    变更说明 / Change Description

    Negative decimal strings such as -123456789012345.6 and -12345678.12345678 exceed the exporter's 15-significant-digit limit, but previously bypassed the text-preserving prefix because the integer and fractional parts were checked separately.

    Count significant digits across the whole decimal, skipping leading zeros only before the first nonzero digit. Apply the same rule to the bounded-memory snapshot/LOB streaming guard so streamed and in-memory exports remain consistent. Preserve numeric-literal validation and the unprefixed path for values within the limit.

    Regression coverage checks CSV/TSV output and guard removal, 15/16-digit boundaries, fractional zeros after a nonzero integer, and parity between the streaming and in-memory guards with decimal boundaries across reader buffers.

    变更类型 / Change Type

    • Bug 修复 / Bug fix

    涉及前端 / Frontend Changes

    No frontend changes.

    验证 / Validation

    • cargo fmt -p dbx-core -p dbx-formats -- --check — passed.
    • All 115 dbx-formats library tests passed using a temporary standalone manifest pointing directly at production source paths and initialized from the repository Cargo.lock.
    • An isolated harness additionally compiled the production streaming guard and its two consistency/buffered-read test bodies extracted from snapshot_export.rs. The old streaming implementation failed; the updated implementation passed. Together with the formats tests, 117 tests passed in this harness. This is not a full dbx-core build.
    • git diff --check — passed.

    The standalone manifest bypasses unrelated workspace Git dependencies unavailable in the local cache. cargo-nextest is not installed locally, so local validation used cargo test --lib. No Excel application behavior or full workspace build is claimed.

    The first CI run exposed the omitted streaming path (streamed_guard_matches_existing_cell_semantics, input -1.00000000000000001). The follow-up commit fixes that production path and extends the existing regressions; remote CI must validate the full application suite on the latest commit.

    关联 Issue / Related Issue

    Closes #12552

    View discussion on GitHub
  • docs(editor): explain double-click string and word selection

    Files
    2
    Additions
    +44
    Deletions
    −0
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    t8y2
    PR description

    变更说明 / Change Description

    The timestamp example in #12542 is supported by the existing Settings → Editor → Double-click inside a string → Select single word option, but the query editor guides do not explain it. Add matching English and Chinese instructions, including applying the setting, timestamp and punctuation examples, and the boundary that adjacent letters and digits remain one word.

    The default remains Select whole value. This PR documents the existing SQL editor behavior; it does not change selection code or result-grid behavior.

    变更类型 / Change Type

    • 文档更新 / Documentation

    涉及前端 / Frontend Changes

    Documentation only; no application UI changes.

    验证 / Validation

    • node docs/scripts/verify-doc-content.mjs — passed, 41 pages across 2 languages.
    • git diff --check — passed.
    • Offline i18n dry-run against the branch base — no new zh-CN keys.
    • Checked labels, default, Apply actions and the single-word fallback against production settings/selection code.
    • Used the lockfile versions @codemirror/state@6.7.6 and @codemirror/lang-sql@6.10.0 in an isolated temporary Node environment. All 18 EditorState.wordAt checks passed across MSSQL, MySQL and PostgreSQL: timestamp year/month/milliseconds, hyphen and decimal boundaries, and abc123 remaining a single word.

    These checks validate the fallback word boundaries, not end-to-end mouse interaction. The full docs build and application test suite were not run.

    关联 Issue / Related Issue

    Related #12542. The reported timestamp case is covered by the existing setting; this PR makes it discoverable. A digits-only mode inside alphanumeric words would be a separate behavior change.

    View discussion on GitHub
  • docs: sync pnpm version in contribution and setup guides

    Files
    6
    Additions
    +12
    Deletions
    −12
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    t8y2
    PR description

    变更说明 / Change Description

    The contribution and source setup guides still recommend pnpm 10.27.0, while the root package.json#packageManager and CI use 10.34.7. Update the prerequisites and pinned Corepack/npm installation commands to 10.34.7 in both English and Simplified Chinese.

    This updates six documentation files. The plugin SDK's documented 10.27.0 compatibility fallback and historical test fixtures are intentionally preserved.

    变更类型 / Change Type

    • 文档更新 / Documentation

    涉及前端 / Frontend Changes

    No application UI changes.

    验证 / Validation

    • node docs/scripts/verify-doc-content.mjs — verified 41 documentation pages across 2 languages.
    • git diff --check — passed.
    • Checked all six contribution/setup documents against the pnpm version in package.json; no stale 10.27.0 references remain in those guides.
    • Offline i18n dry-run against the upstream base — no new zh-CN i18n keys.

    Application tests and the full documentation build were not run for these version-only text changes.

    关联 Issue / Related Issue

    No existing issue found for this documentation discrepancy.

    View discussion on GitHub
  • docs: clarify the conformance gate in contributing guide

    Files
    1
    Additions
    +1
    Deletions
    −1
    Commits
    1
    Comments
    4
    Review comments
    0
    Merged by
    xerj-org
    PR description

    What this changes, and why

    The contribution guide hard-codes 1,329 ES-YAML cases and describes the target as 100% pass. The implemented gate fails on any failed case, reports skips separately, and does not pin the total.

    Update only that paragraph to describe the existing behavior. Contributor build commands, test scope, and AGENTS.md are unchanged.

    Evidence

    • .github/workflows/ci.yml, job step Run ES-compat YAML suite (0 failures required): explicitly documents that skipped cases do not fail the gate and totals grow as cases are added.
    • engine/tests/es-compat-yaml/src/main.rs:82-96: prints passed/failed/skipped/total and exits nonzero when total.failed > 0.
    • git diff --check and git diff --cached --check passed before commit.
    • The effective diff against fetched upstream main contains only one paragraph in CONTRIBUTING.md.

    Checks

    • Whitespace/diff checks: passed.
    • Rust formatting, scoped release build, crate tests, clippy, and ES-YAML execution: N/A, prose-only change with no code or command changes.
    • New ES-compatible behavior: N/A, existing behavior is documented.
    • Operational and durable-state audits: N/A, no runnable instructions, state transitions, or recovery behavior changed.

    Not run: Rust builds/tests and the live conformance suite; this PR makes no claim of a new runtime verification.

    Provenance

    • Written by: AI coding agent (Codex), run by @Jarvis636431.
    • Verified: CI configuration and runner source inspected; diff/whitespace checks passed; branch based on fetched upstream main.
    • Assumed: No new runtime behavior is inferred; the documentation describes the inspected CI and runner logic.
    View discussion on GitHub
  • fix(h5): release socket slots on server close

    Files
    3
    Additions
    +64
    Deletions
    −3
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Closes #19533

    H5 WebSocket 被服务端关闭时,如果业务没有注册 SocketTask.onClose,内部连接列表不会释放该连接,累计 5 次后就无法重连。

    在 SocketTask 构造时安装独立的 close 事件监听器,负责内部名额回收;业务 onClose 继续使用原来的回调逻辑。更新既有监听器数量断言,并新增服务端关闭的回归测试。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix) issue: #19533

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • WebSocket 新增及现有两份测试共 11 个用例通过。
    • 新增场景覆盖无业务 onClose 的服务端关闭、注册回调后的清理、关闭后名额复用和 5 个活动连接的限制。
    • 修复前新增测试中 2 个用例失败;修复后全部通过。
    • 修改文件 ESLint、git diff --check 通过。
    • 测试使用仓库现有 mock-socket Server,未声明真实网络浏览器端到端验证结果。

    Summary by CodeRabbit

    • Bug 修复
      • WebSocket 连接关闭时会自动清理连接状态;关闭回调仍会收到关闭详情,异常关闭时则提供备用信息。
    • 测试
      • 补充了连接关闭与重新连接场景的覆盖,并更新了关闭事件监听器数量的预期。
    View discussion on GitHub
  • CLA: add Jarvis636431 to .contributors

    Files
    1
    Additions
    +1
    Deletions
    −0
    Commits
    2
    Comments
    2
    Review comments
    0
    Merged by
    xerj-org
    PR description

    What this changes, and why

    Evidence

    Checks

    • cargo fmt --all (CI runs rustfmt --check and clippy -D warnings)
    • Scoped release build of the crates touched: cargo build --release -j 32 -p <crate>
    • cargo test -p <crate> passes (cargo check is not sufficient — test code is interleaved with production code)
    • ES-YAML conformance suite at 0 failed (cargo run --release -p es-yaml-runner -- --dir tests/es-compat-yaml/yaml), or: not applicable because this change is docs/landing-only
    • New ES-compatible behaviour has a matching YAML case under engine/tests/es-compat-yaml/yaml/
    • Docs updated if user-visible behaviour changed
    • For non-trivial changes: the applicable audit in docs/CONTRIBUTION_REVIEW.md
    • For non-trivial changes: if this PR changes an operational document or runnable recipe, complete the operational audit in docs/CONTRIBUTION_REVIEW.md. Record a negative control that exits non-zero with no artifact extracted, installed, published, or served. Keep verification and its action in one block; rerun the control with the failing exit discarded and with the next documented block appended, and require that neither reaches an artifact or unsafe/privileged path. List tested variants and unsupported variants separately, and verify every publication copy. Otherwise mark this item N/A with a reason.

    Not run:

    Provenance

    • Written by:
    • Verified (commands run, output observed):
    • Assumed (not tested, and what would falsify it):
    View discussion on GitHub
  • fix(h5): clear download timeout after completion

    Files
    2
    Additions
    +65
    Deletions
    −0
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    Closes #19531

    H5 downloadFile 在成功或网络错误后仍保留超时定时器,之后会再次触发 fail/complete。本 PR 在 xhr.onload 和 xhr.onerror 中清除该定时器。

    新增 4 个回归用例,覆盖成功、网络错误、取消和超时,检查定时器清理及回调次数。修复前成功/错误 2 个用例失败,修复后 4 个全部通过。

    这个 PR 是什么类型?

    • 错误修复 (Bugfix) issue: #19531

    这个 PR 涉及以下平台:

    • Web 端(H5)

    验证

    • pnpm --filter @tarojs/taro-h5 exec jest --watchman=false --runInBand __tests__/network/download.test.ts:4 个用例通过。
    • 修改文件 ESLint 通过。
    • 使用受控 XMLHttpRequest 和 fake timers 验证,未声明真实浏览器端到端验证结果。
    • 完整 H5 测试首次执行受缺失的工作区构建产物阻塞;正在补齐构建后复查。

    Summary by CodeRabbit

    • Bug Fixes
      • 下载请求成功或发生网络错误时,会及时清除超时计时器。
    View discussion on GitHub
  • fix(h5): release audio context listeners on destroy

    Files
    2
    Additions
    +48
    Deletions
    −7
    Commits
    1
    Comments
    2
    Review comments
    2
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    修复 H5 端 InnerAudioContext.destroy() 后仍保留全局路由事件监听的问题。此前每次创建音频实例都会注册路由变化回调,但销毁时没有注销。

    现在销毁实例时会注销该监听、清空内部回调并移除音频资源引用;重复调用 destroy() 不会再次触发停止回调。新增了销毁前后路由事件行为的回归测试。

    运行 pnpm --filter @tarojs/taro-h5 exec jest --runInBand --silent,17 个测试文件、116 个用例全部通过。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: 无
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    Summary by CodeRabbit

    • Bug Fixes
      • 音频上下文销毁后会停止播放并清理相关回调与状态,避免路由变化或重复销毁时再次触发处理。
    View discussion on GitHub
  • fix(h5): convert canvas pixel data correctly

    Files
    3
    Additions
    +113
    Deletions
    −53
    Commits
    2
    Comments
    2
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么? (简要描述所做更改)

    修复 H5 端 Canvas 像素数据接口的运行时数据格式:

    • canvasGetImageData 返回 ImageData.data,与接口声明的 Uint8ClampedArray 一致。
    • canvasPutImageData 根据传入的宽高创建 ImageData,再写入像素数组并绘制。
    • 找不到画布或 2D 上下文、像素数组长度与尺寸不符时,返回失败结果。

    新增了像素读写及失败场景的回归测试。运行 pnpm --filter @tarojs/taro-h5 exec jest --runInBand --silent,17 个测试文件、119 个用例全部通过。

    这个 PR 是什么类型? (至少选择一个)

    • 错误修复 (Bugfix) issue: 无
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    Summary by CodeRabbit

    • 功能改进
      • 读取画布图像数据时,返回实际图像尺寸和像素数据。
      • 写入像素数据时,可指定图像尺寸;像素数据长度与尺寸不匹配时会返回错误。
    • 错误处理
      • 画布或 2D 上下文不可用时,读取和写入图像数据会返回错误信息。
    View discussion on GitHub
  • docs(contributing): update development and testing instructions

    Files
    2
    Additions
    +16
    Deletions
    −22
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    SoonIter
    PR description

    Motivation

    Contributor instructions still reference a missing root reset script, pnpm global linking removed in v11, and the old rspress package name for linking and package-level tests. Following these examples no longer works with the current workspace.

    Closes #3750.

    Changes

    • Link the built packages/core directory directly from the consumer project and clarify the separate package watcher.
    • Remove the nonexistent root reset command; use root-level Rstest path filters and document snapshot updates.
    • Align AGENTS.md with the actual package layout, CLI commands and public exports; point version guidance at .nvmrc and package.json#packageManager.

    Validation

    • pnpm build
    • pnpm check
    • pnpm format AGENTS.md CONTRIBUTING.md
    • pnpm exec cspell AGENTS.md CONTRIBUTING.md
    • pnpm test:unit packages/core — 409 passed, 1 skipped.
    • Checked pnpm 11 local linking syntax against the official documentation and verified the installed Rstest CLI supports path filters and --update.
    View discussion on GitHub
  • docs: update renamed crates in project architecture

    Files
    2
    Additions
    +4
    Deletions
    −4
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    chenjiahan
    PR description

    Motivation

    The English and Chinese project architecture guides still point contributors to crate names replaced by #13547 and #12532.

    Closes #16086.

    Changes

    • Replace rspack_futures with rspack_parallel and describe its iterator consumers and scoped async execution utilities.
    • Replace rspack_plugin_warn_sensitive_module with rspack_plugin_case_sensitive and describe case-conflict warnings for module names and output filenames.
    • Keep both locales in sync.

    Validation: git diff --check passed. Verified that all 87 documented crate directories exist, both locale crate lists match, and the existing JavaScript API architecture link target exists. No headings or links changed. The website build was attempted but did not complete: local dependencies are absent, and the command was stopped after producing no output. No runtime code changed.

    View discussion on GitHub
  • fix(core): recognize charset attributes in custom HTML templates

    Files
    6
    Additions
    +61
    Deletions
    −1
    Commits
    1
    Comments
    1
    Review comments
    2
    Merged by
    chenjiahan
    PR description

    Motivation

    Custom templates containing <meta charset=utf-8> or <meta charset = 'utf-8'> receive a second charset declaration. Similar attribute names or text inside quoted attribute values can also suppress the default declaration incorrectly.

    Fixes #8669.

    Changes

    Recognize charset attributes independently of value quoting and whitespace around =, while skipping quoted attribute values and requiring an attribute boundary. Preserve the template's existing declaration.

    Add an HTML build regression covering unquoted and spaced declarations plus misleading attribute text. Exclude the two syntax fixtures from formatting so their input remains intact.

    Validation: the new regression failed before the fix; pnpm run build, pnpm run e2e cases/html (75 tests), and pnpm check passed.

    View discussion on GitHub
  • fix(frontend): preserve nonempty lists when pressing Enter

    Files
    2
    Additions
    +31
    Deletions
    −1
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Pressing Enter just before existing Markdown list text incorrectly treats the item as empty, removes its marker and skips the newline. Check the remaining text on the current line as well as the text before the caret before exiting a list.

    Add regression coverage for bullets, numbered lists, tasks, indentation and surrounding lines, plus controls for splitting within text and genuinely empty items.

    Fixes #4223

    Testing

    • npm test -- src/utils/markdownEditing.test.ts: 33 passed; six new regression cases failed before the fix.
    • npm run type-check and npm run build: passed (chunk-size warning).
    • git diff --check: passed.

    Before / After

    With the caret after - in - hello, press Enter:

    Before: "hello"
    After:  "- \n- hello"
    
    View discussion on GitHub
  • fix(frontend): preserve inline images in EPUB previews

    Files
    2
    Additions
    +87
    Deletions
    −2
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    EPUB previews resolve inline image data as ZIP paths and replace it with empty sources. Preserve data:image/ sources for HTML images and SVG href / xlink:href, while keeping relative archive image resolution and Blob URL reuse unchanged. The preview continues through its existing HTML sanitizer.

    Add ZIP-fixture regression tests covering inline HTML/SVG images, mixed archive and inline images, Blob contents/reuse, and rejection of non-image data or executable sources.

    Fixes #4225

    Testing

    • EPUB, document-preview Markdown and security tests: 15 passed; two EPUB regression cases fail against the original renderer.
    • npm run type-check, npm run build and git diff --check: passed (build chunk-size warning).
    • Chrome with the production renderer and sanitizeHTML: inline and ZIP raster images load, SVG inline references survive, and event attributes are removed.
    View discussion on GitHub
  • fix(helm): configure app rollouts and document shared storage

    Files
    5
    Additions
    +199
    Deletions
    −5
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    The Helm production example configures three App replicas with a shared ReadWriteOnce PVC, while the App update strategy is fixed to RollingUpdate.

    • Add configurable App update strategies and rolling-update settings, preserving the existing defaults. Recreate omits the rollingUpdate block, and unsupported strategy types fail rendering.
    • Update the production example to use one App replica with Recreate and explain the upgrade downtime.
    • Add a multi-replica example using a pre-provisioned RWX claim and document its shared-storage requirements.
    • Add seven template regression tests and run them in Helm CI.

    Related Issue

    Fixes #4106

    View discussion on GitHub
  • fix(frontend): respect Markdown indentation selection boundaries

    Files
    2
    Additions
    +45
    Deletions
    −2
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    Selecting a Markdown line including its newline and pressing Tab or Shift+Tab also changes the next, unselected line. Treat the textarea selection end as exclusive when it falls at a line start, and preserve the selected trailing newline so repeated indentation continues to affect the same block.

    Add regression coverage for Tab, Shift+Tab, empty final lines, repeated plain-text indentation and selections ending inside the following line. Existing caret and list behavior remains covered.

    Fixes #4194

    Testing

    • Editor tests: 25 passed; three new regression cases failed before the fix.
    • npm run type-check and npm run build passed (build reports a chunk-size warning).
    • Chrome keyboard checks passed in an isolated textarea harness using the repository helper: before/after Tab, Shift+Tab and repeated Tab.
    • git diff --check passed.

    Before / After

    Select - first and its newline in - first\n- second, then press Tab:

    Before: "  - first\n  - second"
    After:  "  - first\n- second"
    
    View discussion on GitHub
  • docs: explain knowledge upload folder paths

    Files
    1
    Additions
    +44
    Deletions
    −3
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    The file-upload API reference describes fileName only as a display-name override, leaving API users without instructions for uploading into a knowledge-base folder.

    Document path-qualified fileName values with a multipart curl example and the resulting folder_path / file_name. Explain that document folders are derived from stored document paths, require no prior creation, and cannot persist as empty folders. Point users to folder listing and document re-filing, and distinguish document folders from Wiki folders.

    Correct the folder-list response from an array to the actual object containing root/total document counts and nested folders, with a JSON example and count definitions.

    Type of Change

    • 📚 Documentation update

    Related Issue

    Fixes #4131

    Testing

    • Cross-checked upload parameters, path splitting, folder aggregation, response types and routes against the existing handlers, services, repository and types.
    • git diff --check — passed.
    • cd website-docs && npm run check:docs — passed (319 links, 60 Mermaid diagrams).
    • cd website-docs && npm run build:docs — passed (chunk-size warning).
    • Parsed the new folder-response JSON and checked all Bash examples in the edited API reference with bash -n.
    • No live upload request was performed; this change documents existing application behavior.

    Checklist

    • Self-reviewed the change
    • Updated related API documentation
    • Documentation-only change; no application behavior changes
    View discussion on GitHub
  • docs: clarify frontend development proxy configuration

    Files
    1
    Additions
    +18
    Deletions
    −1
    Commits
    1
    Comments
    1
    Review comments
    0
    Merged by
    lyingbug
    PR description

    Description

    The development guide names DEV_PROXY_TARGET, an internal Vite constant, without explaining which environment variables configure it. This makes it unclear how to point the frontend at a remote backend.

    Document the actual precedence (VITE_DEV_PROXY_TARGET, then FRONTEND_BACKEND_URL, then http://localhost:8080), include /mcp/ alongside /api and /files, and provide examples for the root .env.local / make dev-frontend workflow and direct npm commands. Explain that vite preview uses the same proxy configuration and that changing the target requires restarting the dev server.

    Type of Change

    • 📚 Documentation update

    Related Issue

    None.

    Testing

    • Manually cross-checked variable precedence and all dev/preview proxy paths against frontend/vite.config.ts.

    • Manually cross-checked root environment-file loading and export behavior against scripts/dev.sh.

    • git diff --check — passed.

    • node website-docs/scripts/check-links.mjs — passed (74 documents, 319 internal links, 0 broken).

    • cd website-docs && npm run check:docs — passed (319 internal links and 60 Mermaid diagrams).

    • cd website-docs && npm run build:docs — passed; verified the generated development-guide HTML contains the corrected variables and examples. The build emits a chunk-size warning.

    • No live remote-backend connectivity test was performed; proxy behavior was verified against the existing source configuration.

    Checklist

    • Self-reviewed the change
    • Updated related documentation
    • Documentation-only change; no application code or behavior changes
    View discussion on GitHub
  • fix(macOS): show tray window over full-screen apps

    Files
    7
    Additions
    +505
    Deletions
    −23
    Commits
    2
    Comments
    1
    Review comments
    0
    Merged by
    oldj
    PR description

    Summary

    • Convert the macOS tray webview window into a non-activating NSPanel.
    • Allow the tray panel to appear above another application's full-screen Space.
    • Avoid activating SwitchHosts or switching away from the current Space.
    • Fix the global mouse monitor mask so mouse movement no longer dismisses the tray panel.
    • Preserve the existing lazy window creation and destruction behavior.
    • Add regression tests and document the investigation.

    Implementation

    • Add CanJoinAllSpaces and FullScreenAuxiliary collection behaviors.
    • Use NonactivatingPanel with PopUpMenu window level.
    • Pin tauri-nspanel to a fixed Git revision.
    • Correct OtherMouseDown from event mask bit 5 (MouseMoved) to bit 25.
    • Keep all NSPanel-specific code behind macOS conditional compilation.

    Verification

    • cargo check
    • cargo test --test window_config — 27 passed
    • cargo test --lib — 143 passed
    • TypeScript type checking passed
    • Vitest — 84 passed
    • ESLint passed

    Manual verification

    • Tray panel appears over another application's full-screen window.
    • Moving the pointer inside the panel does not dismiss it.
    • Moving the pointer outside without clicking does not dismiss it.
    • Clicking outside dismisses the panel.
    View discussion on GitHub
  • fix(runtime): correct alias after removing event listener

    Files
    2
    Additions
    +70
    Deletions
    −2
    Commits
    1
    Comments
    2
    Review comments
    0
    Merged by
    Single-Dancer
    PR description

    这个 PR 做了什么?

    修复小程序端 Text 和 Image 节点移除最后一个事件监听器时,运行时访问不存在的 pure-text / pure-image alias 导致崩溃的问题。

    hydrate() 初始化无事件节点时遵循以下规则:

    • 无提取属性的 View 使用 pure-view
    • 其他 View、Text、Image 使用对应的 static-* alias

    但 removeEventListener() 原先会将所有无提取属性的特殊节点切换为 pure-*,导致 Text 和 Image 分别访问不存在的 pure-text 和 pure-image。

    本次修改使 removeEventListener() 的 alias 选择逻辑与 hydrate() 保持一致:

    • View 且无提取属性:pure-view
    • 其他特殊节点:static-${nodeName}

    同时增加回归测试,覆盖:

    • Text 移除最后一个事件监听器后切换到 static-text
    • Image 移除最后一个事件监听器后切换到 static-image
    • 无提取属性的 View 切换到 pure-view
    • 有提取属性的 View 切换到 static-view
    • 节点仍有其他监听器时不切换模板

    Fixes #19453

    这个 PR 是什么类型?

    • 错误修复 (Bugfix) issue: fix #19453
    • 新功能 (Feature)
    • 代码重构 (Refactor)
    • TypeScript 类型定义修改 (Types)
    • 文档修改 (Docs)
    • 代码风格更新 (Code style update)
    • 构建优化 (Chore)
    • 其他,请描述 (Other, please describe):

    这个 PR 涉及以下平台:

    • 所有平台
    • Web 端(H5)
    • 移动端(React-Native)
    • 鸿蒙(Harmony)
    • 鸿蒙容器(Harmony Hybrid)
    • ASCF 元服务
    • 快应用(QuickApp)
    • 所有小程序
    • 微信小程序
    • 企业微信小程序
    • 京东小程序
    • 百度小程序
    • 支付宝小程序
    • 支付宝 IOT 小程序
    • 钉钉小程序
    • QQ 小程序
    • 飞书小程序
    • 快手小程序
    • 头条小程序

    测试结果

    • pnpm --filter @tarojs/runtime exec vitest run tests/event.spec.ts
      • 33 tests passed
    • pnpm --filter @tarojs/runtime run test:ci
      • 133 tests passed,1 skipped
    • pnpm --filter @tarojs/runtime run build
      • passed
    • ESLint
      • passed

    Summary by CodeRabbit

    • Bug Fixes
      • 修复移除节点最后一个事件监听器时的模板别名切换逻辑,确保触发的模板更新符合预期。
      • 优化 view 节点在是否包含“提取属性”时的模板映射:无提取属性切换为纯模板,有提取属性切换为静态模板。
      • 仅移除部分事件监听器时不再触发不必要的模板更新。
    • Tests
      • 增加事件监听移除与节点模板切换的断言用例,覆盖 text/image/view 及负向场景。
    View discussion on GitHub
  • feat(cli): support init in current directory

    Files
    2
    Additions
    +236
    Deletions
    −2
    Commits
    4
    Comments
    2
    Review comments
    1
    Merged by
    Single-Dancer
    PR description

    Summary

    • Support taro init . / npx @tarojs/cli init . by resolving . to the current directory name while keeping the target path as the current directory.
    • Add unit coverage for . and ./ project names.

    Motivation

    Closes #19249. This lets users initialize a Taro project directly in an existing current directory. Existing non-conflicting files are preserved by the existing template copy behavior, while same-name template files can still be overwritten.

    Validation

    • pnpm --filter @tarojs/cli exec jest packages/taro-cli/src/__tests__/project.spec.ts --runInBand
    • pnpm --filter @tarojs/cli exec eslint src/create/project.ts src/__tests__/project.spec.ts

    Note: I also tried running cli.spec.ts, but this temporary worktree had unbuilt workspace package entries such as @tarojs/service, so that broader suite could not start in this local environment.

    Summary by CodeRabbit

    Release Notes

    • Tests

      • 新增对项目名为 . / ./ / .\ 等场景的项目目录与项目名解析覆盖,并覆盖当前目录初始化与同名目录询问行为。
    • Bug Fixes

      • taro init 在当前目录标识下自动规范项目目录与名称推导;当前目录初始化时跳过多余的同名目录校验与询问。
      • 对根目录初始化并选择 . 的异常场景增加校验,避免异常行为。
    View discussion on GitHub