Skip to content

fix(ci): restore typecheck after the Desktop extensions merge - #994

Merged
BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
MGHus4473:fix/desktop-extensions-typecheck
Nov 21, 2026
Merged

BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
MGHus4473:fix/desktop-extensions-typecheck

Conversation

@MGHus4473

Copy link
Copy Markdown
Contributor

Summary

Related issues

Restores the base-branch Typecheck check that is blocking #983. Follow-up to #992.

Test plan

  • npm run typecheck passed on Windows x64.
  • Ran the seven affected Vitest suites on Windows x64. All 81 tests passed.
  • Prettier and ESLint passed for the affected TypeScript tests. Prettier also passed for the new declarations.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • 测试
    • 更新了扩展市场、统计、主机通信及设置页面的相关测试校验,测试行为保持一致。
  • 开发工具
    • 补充了扩展目录构建和统计服务的类型声明,并更新了扩展注册包的模块配置。

本次更新为桌面扩展 registry 增加模块和类型声明,并调整相关测试的导入属性、模拟行为及类型标注。

Changes: 桌面扩展 registry 与测试更新

Layer / File(s) Summary
Registry 模块与类型声明
registry/desktop-extensions/package.json, registry/desktop-extensions/validate-and-build-catalog.d.mts, registry/desktop-extensions/worker/worker.d.ts
registry package 新增 ES module 声明。新增 buildCatalog、StatsKv 和 worker 默认导出的类型声明。
测试导入、模拟与夹具
packages/harness-plugin-files/test/*, packages/host-runtime/test/local-shared-host.test.ts, packages/renderer-extension/test/settings/*
测试改用带 JSON 导入属性的语法,调整 KV 模拟器签名和 thread/read 模拟的参数检查,并更新上下文断言、配置版本及 RPC 错误详情的类型。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Suggested reviewers: bytepioneer-ai

Merge Risk: Minimal · up to 8f06a

This change restores type checking with declarations and test fixture updates. It does not alter production runtime behavior, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 标题“fix(ci): restore typecheck after the Desktop extensions merge”指出主要变更:恢复 main 分支上因 Desktop extensions 合并而失败的 Typecheck 任务。变更集中包含 ESM 声明、类型声明和测试夹具的修正,与标题描述的目标一致。
Description check Passed 描述说明了恢复 Typecheck 任务的目标、涉及 #992 的合并、关键变更(ESM 边界声明、catalog 构建器与 Worker 入口的类型,以及测试夹具对齐 RPC 类型、配置版本和错误构造函数)以及测试计划。这些内容与变更集直接相关。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 80d4926 and 8f06a8f.

Files selected for processing: 9

  • packages/harness-plugin-files/test/desktop-extension-market.test.ts
  • packages/harness-plugin-files/test/desktop-extension-stats-worker.test.ts
  • packages/host-runtime/test/local-shared-host.test.ts
  • packages/renderer-extension/test/settings/desktop-extension-plugin-pages.test.ts
  • packages/renderer-extension/test/settings/desktop-extensions-marketplace.test.ts
  • packages/renderer-extension/test/settings/desktop-extensions-page.test.ts
  • registry/desktop-extensions/package.json
  • registry/desktop-extensions/validate-and-build-catalog.d.mts
  • registry/desktop-extensions/worker/worker.d.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Recent review details

Context from checks skipped due to timeout: 5

  • GitHub Check: CodeRabbit
  • GitHub Check: Check ubuntu-22.04
  • GitHub Check: Check macos-26
  • GitHub Check: Check windows-latest
  • GitHub Check: Vitest
Additional context used

Code guidelines: 2

AGENTS.md — auto-discovered
CLAUDE.md — auto-discovered
Path-based instructions: 2

Source excerpt: `renderer-extension` must not import Node.js built-ins, Electron private APIs, or Harness SDKs.

CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/renderer-extension/test/settings/desktop-extension-plugin-pages.test.ts
  • packages/renderer-extension/test/settings/desktop-extensions-marketplace.test.ts
  • packages/renderer-extension/test/settings/desktop-extensions-page.test.ts
Source excerpt: Host Runtime loads installed plugins through public contracts, not direct imports of concrete Adapter packages.

CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/host-runtime/test/local-shared-host.test.ts

@BytePioneer-AI
BytePioneer-AI merged commit 5362ebf into BytePioneer-AI:main Nov 21, 2026
8 checks passed
BytePioneer-AI added a commit that referenced this pull request Nov 21, 2026
Lint failed on non-null assertions, a dynamic delete and void-typed promises introduced by recent sidebar browser and Desktop tool lifecycle commits; Typecheck also had five test fixtures drifting from current types after #994. Replace the assertions with explicit narrowing that keeps runtime behavior, and align fixtures with the real types without weakening assertions.
@BytePioneer-AI

Copy link
Copy Markdown
Owner

Merged into main in 5362ebf (resolved the conflict in desktop-extension-market.test.ts by keeping main's version), thanks @MGHus4473! Main still had five more type errors that drifted after this PR plus 21 lint errors; those are fixed in 578c754.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants