Skip to content

docs: establish Electron + Node vNext architecture baseline - #86

Merged
Dailin521 merged 1 commit into
mainfrom
docs/vnext-electron-node-architecture
Aug 24, 2026
Merged

docs: establish Electron + Node vNext architecture baseline#86
Dailin521 merged 1 commit into
mainfrom
docs/vnext-electron-node-architecture

Conversation

@Dailin521

Copy link
Copy Markdown
Owner

概述

将已确认的 codex-provider-sync vNext 架构正式纳入仓库,作为 Electron 跨平台桌面升级与 Node 单核心迁移的执行基线。

变更

  • 新增 docs/VNEXT_ELECTRON_NODE_ARCHITECTURE_ZH.md
  • 明确 Electron + React + TypeScript + Node 单核心目标架构
  • 保留现有 CLI、Local Web UI、WSL、备份和错误语义等用户合同
  • 给出分阶段迁移路线、首批 PR 拆分、测试/CI/发布门槛和 Definition of Done
  • 更新 README.mddocs/README_ZH.md 的文档入口
  • 更新 AGENTS.md,区分当前 Node + .NET 实现与 vNext 目标,避免 AI 提前删除旧实现或进行大爆炸式重写

边界

  • 仅修改文档,不改任何运行代码
  • 不把 README 的“当前架构”误写成已完成 Electron 迁移
  • 配套 ADR-0001~ADR-0010 留在阶段 0 后续落地

验证

  • 分支相对 main:1 个提交、4 个文档文件、无业务代码
  • 架构文档 2,753 行,Markdown 围栏成对
  • 已复核目标态/迁移态、History 隐私、跨进程锁、Web Server 归属、packages/core 迁移节点和 ADR 数量一致性

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51faf14653

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- 完整消息正文;
- `encrypted_content` 内容。

History 只在用户主动查看时读取完整消息正文,并且仅用于本地展示;正文不得进入应用数据库、持久缓存、日志、诊断包或遥测。日志只记录数量、路径类别、错误码和 operationId。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep message bodies confined to the Web History view

When the Electron History page opens a session, this design permits the shared Core to return complete message bodies to the desktop renderer, but the repository privacy boundary allows exposing bodies only in the Web UI's explicit read-only History view. Because this document is now the mandatory vNext baseline and also makes desktop History a v1 requirement, following it would expand sensitive-content exposure beyond the allowed interface; either remove message-body access from Electron or deliberately reconcile the privacy contract before implementation.

AGENTS.md reference: AGENTS.md:L54-L56

Useful? React with 👍 / 👎.

- 列出托管备份;
- 显示 Provider、创建时间、覆盖内容、大小和恢复能力;
- Restore 前生成恢复计划;
- 跨 SQLite Home 恢复需要额外确认;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve every cross-home restore requirement

When restoring a metadata-v2 backup into a different SQLite Home, an extra confirmation alone is insufficient: the operation must also use an explicit target and disable config restoration. An Electron implementation following this page contract would either be rejected by the existing Core or be tempted to weaken its relocation checks, potentially restoring configuration that points back to the source database; document and enforce all three requirements in the restore plan/UI.

AGENTS.md reference: AGENTS.md:L36-L36

Useful? React with 👍 / 👎.

- Packaged Smoke;
- native SQLite 加载;
- macOS Notarization;
- Windows 签名(签名阶段启用后);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail stable Windows releases when signing fails

In the Release CI section inspected here, Windows signing is fail-closed only after an unspecified signing phase is enabled, while the same architecture says unsigned builds are Preview-only and stage 6 can declare Electron Stable once merely a signing strategy is documented. This permits the stable/default Windows release to ship unsigned despite the stated channel policy; make Authenticode signing an unconditional stable-release gate while retaining the conditional exception only for explicitly marked Preview artifacts.

Useful? React with 👍 / 👎.

```ts
contextBridge.exposeInMainWorld("codexProvider", {
status: {
get: (input) => ipcRenderer.invoke("cps:v1:status:get", input)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Expose a cancellation token for status scans

On a large Codex Home, the status scan can run long enough that the document requires progress and cancellation, but this preload API returns only the final invoke promise and exposes cancellation solely by an operationId that a status request never provides. The runtime request ID is also hidden inside Main, so the renderer has no identifier with which to cancel the scan; make status return an operation handle before completion or accept a cancellable token/abort request through the typed API.

Useful? React with 👍 / 👎.

@Dailin521
Dailin521 merged commit 1bf4f4c into main Aug 24, 2026
8 checks passed
@Dailin521
Dailin521 deleted the docs/vnext-electron-node-architecture branch August 24, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant