Skip to content

docs: supplement website documentation for recent GeneralUpdate API changes (i18n zh/en)#40

Merged
JusterZhu merged 3 commits intomainfrom
copilot/update-website-docs-i18n
Apr 10, 2026
Merged

docs: supplement website documentation for recent GeneralUpdate API changes (i18n zh/en)#40
JusterZhu merged 3 commits intomainfrom
copilot/update-website-docs-i18n

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Syncs website documentation with recently merged PRs in GeneralLibrary/GeneralUpdate. Updates applied consistently across docs/ (default/zh), i18n/zh-Hans/, and i18n/en/.

GeneralUpdate.ClientCore

  • Add AddListenerUpdatePrecheck(Func<UpdateInfoEventArgs, bool>) — unified precheck replacing the AddListenerUpdateInfo + SetCustomSkipOption combo; callback receives full version info and returns true to skip. IsForcibly versions always proceed regardless.
  • Remove SetCustomSkipOption — deprecated and removed upstream.
  • Add AddListenerUpdateInfo(Action<object, UpdateInfoEventArgs>) — fires immediately after version validation; each VersionInfo now carries UpdateLog for release notes.
  • Add UpdateOption.EnableSilentUpdate — opt-in background polling (every 20 min), silent package prep, updater launched on process exit.
  • Add ConfiginfoBuilder section — zero-config builder requiring only UpdateUrl, Token, Scheme; auto-detects app name/version/publisher from .csproj and adapts to platform.
  • Add DriverDirectory to Configinfo — propagated through ConfigurationMapper → ProcessInfo → PipelineContext → DrivelutionMiddleware.
// Before: two disconnected registrations
.AddListenerUpdateInfo((s, e) => ShowInfo(e.Info))
.SetCustomSkipOption(() => userSaidNo)

// After: single entry with full context
.AddListenerUpdatePrecheck(info => ShowDialogAndAskSkip(info.Info))

GeneralUpdate.Core

  • Remove SetFieldMappings() — deleted upstream.
  • Update driver upgrade docs — now configured via Configinfo.DriverDirectory; DrivelutionMiddleware handles installation automatically with no extra bootstrap calls.
  • Add DriverDirectory to Packet class — documents the field auto-populated by ConfigurationMapper from Configinfo.DriverDirectory.

Release log

  • Added 2026-04-10 entry covering all the above changes plus full lifecycle GeneralTracer instrumentation and two bug fixes (DefaultCleanMatcher, BinaryHandler orphaned temp files).
  • English in docs/ and i18n/en/; Chinese in i18n/zh-Hans/.

Global documentation audit

  • .NET 10 added to version compatibility tables across all component docs that only listed up to .NET 9: GeneralUpdate.Bowl, GeneralUpdate.Core, GeneralUpdate.Differential, GeneralUpdate.Drivelution, GeneralClient.OSS, UpgradeHub — all three file copies each.
  • Fixed formatting in zh-Hans/GeneralTracer.md: version string 9,10 corrected to 9, 10.

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
…t PRs

- Add AddListenerUpdateInfo() method documentation (PR #166)
- Add AddListenerUpdatePrecheck() replacing SetCustomSkipOption (PR #172)
- Remove deprecated SetCustomSkipOption from ClientCore docs
- Add UpdateOption.EnableSilentUpdate for silent update mode (PR #164)
- Add ConfiginfoBuilder zero-configuration builder section (PR #157)
- Add DriverDirectory field to Configinfo documentation (PR #145)
- Remove SetFieldMappings from Core docs (PR #148)
- Update driver upgrade example to use new DriverDirectory approach
- Add new examples for precheck, silent update, and ConfiginfoBuilder
- Add 2026-04-10 release log entries in English and Chinese
- All changes applied to docs/, i18n/zh-Hans/, and i18n/en/"

Agent-Logs-Url: https://github.com/GeneralLibrary/GeneralUpdate-Samples/sessions/1116c9d1-3933-4783-83a9-842784e0e6bd

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title [WIP] Update website documentation based on recent PR changes docs: supplement website documentation for recent GeneralUpdate API changes (i18n zh/en) Apr 10, 2026
Copilot AI requested a review from JusterZhu April 10, 2026 11:53
@JusterZhu
Copy link
Copy Markdown
Collaborator

@copilot 检查全局有没有文档和现有代码不一样的地方进行补充或更改。

- Add DriverDirectory to Packet class in Core.md (all 3 copies)
- Update .NET version tables to include .NET 10 in Bowl, Core, Differential,
  Drivelution, GeneralClient.OSS, UpgradeHub docs (all 3 copies each)
- Fix malformed version string '9,10' -> '9, 10' in zh-Hans GeneralTracer.md

Agent-Logs-Url: https://github.com/GeneralLibrary/GeneralUpdate-Samples/sessions/eacb5b23-1edb-47a0-a533-95ac3b940688

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot 检查全局有没有文档和现有代码不一样的地方进行补充或更改。

已完成全局检查,发现并修复了以下文档与现有代码不一致的地方(commit 1ff5a20):

  1. Packet 类缺少 DriverDirectory 字段GeneralUpdate.Core.mdPacket 类中补充了 DriverDirectory 属性(对应 Configinfo.DriverDirectory,由 ConfigurationMapper 自动填充),已同步到 docs/zh-Hans/en 三份。

  2. 各组件 .NET 版本表未含 .NET 10:以下文档的版本表从 5, 6, 7, 8, 9 补充为 5, 6, 7, 8, 9, 10,已同步三份(docs/zh-Hans/en):

    • GeneralUpdate.Bowl.md
    • GeneralUpdate.Core.md
    • GeneralUpdate.Differential.md
    • GeneralUpdate.Drivelution.md
    • GeneralClient.OSS.md
    • UpgradeHub.md
  3. zh-Hans/GeneralTracer.md 版本格式错误9,109, 10(缺少空格)。

Copilot AI requested a review from JusterZhu April 10, 2026 12:32
@JusterZhu JusterZhu marked this pull request as ready for review April 10, 2026 12:49
Copilot AI review requested due to automatic review settings April 10, 2026 12:49
@JusterZhu JusterZhu merged commit 4f6f4bd into main Apr 10, 2026
1 check passed
@JusterZhu JusterZhu deleted the copilot/update-website-docs-i18n branch April 10, 2026 12:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Docusaurus website documentation (default + i18n zh-Hans/en) to reflect recently merged GeneralUpdate API changes and to refresh version-compatibility tables.

Changes:

  • Document new ClientCore APIs (AddListenerUpdatePrecheck, updated AddListenerUpdateInfo), silent update option, ConfiginfoBuilder, and DriverDirectory flow.
  • Update Core driver-upgrade docs to use Configinfo.DriverDirectory and remove SetFieldMappings docs.
  • Add .NET 10 to compatibility tables and add a 2026-04-10 release log entry (zh/en).

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md Adds 2026-04-10 zh-Hans release log entry describing the new APIs/behaviors.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md Updates zh-Hans compatibility table to include .NET 10.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md Updates zh-Hans compatibility table to include .NET 10.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Updates zh-Hans compatibility table to include .NET 10.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md Removes SetFieldMappings docs; documents Packet.DriverDirectory and driver-upgrade configuration via Configinfo.DriverDirectory (zh-Hans).
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md Documents new ClientCore APIs, silent update, DriverDirectory, and ConfiginfoBuilder (zh-Hans).
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md Updates zh-Hans compatibility table to include .NET 10.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralTracer.md Fixes zh-Hans version string formatting (9,109, 10).
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md Updates zh-Hans compatibility table to include .NET 10.
website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md Adds 2026-04-10 en release log entry describing the new APIs/behaviors.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md Updates en compatibility table to include .NET 10.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md Updates en compatibility table to include .NET 10.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Updates en compatibility table to include .NET 10.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md Removes SetFieldMappings docs; documents Packet.DriverDirectory and driver-upgrade configuration via Configinfo.DriverDirectory (en).
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md Documents new ClientCore APIs, silent update, DriverDirectory, and ConfiginfoBuilder (en).
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md Updates en compatibility table to include .NET 10.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md Updates en compatibility table to include .NET 10.
website/docs/releaselog/GeneralUpdateReleaselog.md Adds 2026-04-10 release log entry describing the new APIs/behaviors (default docs).
website/docs/doc/UpgradeHub.md Updates compatibility table to include .NET 10 (default docs).
website/docs/doc/GeneralUpdate.Drivelution.md Updates compatibility table to include .NET 10 (default docs).
website/docs/doc/GeneralUpdate.Differential.md Updates compatibility table to include .NET 10 (default docs).
website/docs/doc/GeneralUpdate.Core.md Removes SetFieldMappings docs; documents Packet.DriverDirectory and driver-upgrade configuration via Configinfo.DriverDirectory (default docs).
website/docs/doc/GeneralUpdate.ClientCore.md Documents new ClientCore APIs, silent update, DriverDirectory, and ConfiginfoBuilder (default docs).
website/docs/doc/GeneralUpdate.Bowl.md Updates compatibility table to include .NET 10 (default docs).
website/docs/doc/GeneralClient.OSS.md Updates compatibility table to include .NET 10 (default docs).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

```csharp
.AddListenerUpdateInfo((sender, e) =>
{
foreach (var v in e.Info.Body ?? [])
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The e.Info.Body ?? [] fallback uses C# collection expressions, which won’t compile on many setups (e.g., projects still using older C# for .NET 5/6). Consider using a more broadly compatible empty-sequence fallback so the sample compiles across the supported target versions.

Suggested change
foreach (var v in e.Info.Body ?? [])
if (e.Info.Body == null)
return;
foreach (var v in e.Info.Body)

Copilot uses AI. Check for mistakes.
Comment on lines +453 to +466
```csharp
using GeneralUpdate.Common.Shared.Object;

// 零配置:从 .csproj 自动提取名称、版本、发布者
var config = ConfiginfoBuilder
.Create("https://api.example.com/updates", "your-token", "Bearer")
.Build();

await new GeneralClientBootstrap()
.SetConfig(config)
.LaunchAsync();
```

### 自定义覆盖
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This ConfiginfoBuilder “Quick Usage” snippet uses GeneralClientBootstrap but only imports GeneralUpdate.Common.Shared.Object; it will not compile without also importing the GeneralUpdate.ClientCore namespace (or fully-qualifying the type). Please make the snippet self-contained by adding the missing import.

Copilot uses AI. Check for mistakes.
```csharp
.AddListenerUpdateInfo((sender, e) =>
{
foreach (var v in e.Info.Body ?? [])
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The e.Info.Body ?? [] fallback uses C# collection expressions, which won’t compile on many setups (e.g., projects still using older C# for .NET 5/6). Consider using a more broadly compatible empty-sequence fallback so the sample compiles across the supported target versions.

Suggested change
foreach (var v in e.Info.Body ?? [])
foreach (var v in e.Info.Body ?? Enumerable.Empty<VersionRespDTO>())

Copilot uses AI. Check for mistakes.
Comment on lines +456 to +467
```csharp
using GeneralUpdate.Common.Shared.Object;

// Zero-configuration: name, version, and publisher auto-extracted from .csproj
var config = ConfiginfoBuilder
.Create("https://api.example.com/updates", "your-token", "Bearer")
.Build();

await new GeneralClientBootstrap()
.SetConfig(config)
.LaunchAsync();
```
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This ConfiginfoBuilder “Quick Usage” snippet uses GeneralClientBootstrap but only imports GeneralUpdate.Common.Shared.Object; it will not compile without also importing the GeneralUpdate.ClientCore namespace (or fully-qualifying the type). Please make the snippet self-contained by adding the missing import.

Copilot uses AI. Check for mistakes.
```

**UpdateInfoEventArgs Properties:**
- `Info`: `VersionRespDTO` — version response data from the server, containing the list of available versions and a `UpdateLog` field per version
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Grammar: use “an UpdateLog field” (not “a UpdateLog field”) because UpdateLog starts with a vowel sound.

Suggested change
- `Info`: `VersionRespDTO` — version response data from the server, containing the list of available versions and a `UpdateLog` field per version
- `Info`: `VersionRespDTO` — version response data from the server, containing the list of available versions and an `UpdateLog` field per version

Copilot uses AI. Check for mistakes.
Comment on lines +269 to +271
.AddListenerUpdateInfo((sender, e) =>
{
foreach (var v in e.Info.Body ?? [])
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The e.Info.Body ?? [] fallback uses C# collection expressions, which won’t compile on many setups (e.g., projects still using older C# for .NET 5/6). Consider using a more broadly compatible empty-sequence fallback so the sample compiles across the supported target versions.

Suggested change
.AddListenerUpdateInfo((sender, e) =>
{
foreach (var v in e.Info.Body ?? [])
using System.Linq;
.AddListenerUpdateInfo((sender, e) =>
{
foreach (var v in e.Info.Body ?? Enumerable.Empty<VersionInfoDTO>())

Copilot uses AI. Check for mistakes.
Comment on lines +453 to +466
```csharp
using GeneralUpdate.Common.Shared.Object;

// 零配置:从 .csproj 自动提取名称、版本、发布者
var config = ConfiginfoBuilder
.Create("https://api.example.com/updates", "your-token", "Bearer")
.Build();

await new GeneralClientBootstrap()
.SetConfig(config)
.LaunchAsync();
```

### 自定义覆盖
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This ConfiginfoBuilder “快速使用” snippet uses GeneralClientBootstrap but only imports GeneralUpdate.Common.Shared.Object; it will not compile without also importing the GeneralUpdate.ClientCore namespace (or fully-qualifying the type). Please make the snippet self-contained by adding the missing import.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to 26



- ### 📍2026-01-06 10.0.0

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

There is a stray leading - before the ### 📍2026-01-06 10.0.0 heading, which turns the heading into a list item and changes the rendering/indentation of that entire section. Please remove the leading dash (or otherwise normalize the formatting) so this release log matches the surrounding headings.

Copilot uses AI. Check for mistakes.
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.

website在线文档补充

3 participants