Skip to content

refactor(desktop): share local HTTP and LAN size caps - #546

Open
cursor[bot] wants to merge 1 commit into
mainfrom
chore/desktop-shared-limits-20261110
Open

cursor[bot] wants to merge 1 commit into
mainfrom
chore/desktop-shared-limits-20261110

Conversation

@cursor

@cursor cursor Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

问题

桌面端 client-host 自己写了两份 1 MiB 上限,和已经抽到 limits.ts 的控制通道上限、以及 Core LAN MAX_FRAME_BYTES / MAX_LINE_BYTES 是同一组边界。LAN 桥接回包行长度还用了更松的 1_500_000,和写入路径、Core 不一致。

改动

  • 把本机 HTTP 响应体和 LAN 帧上限放到 limits.ts,与控制包、secure-ffi 帧上限对齐。
  • LAN 桥接读写都按 Core 的 MAX_LINE_BYTES 失败关闭。
  • 激活队列里未对外使用的类型不再导出。
  • 补上本机 HTTP 超限响应的失败关闭测试。

没有改协议、存储、schema 或产品行为取舍。不和 #545 整库审计、#544 GPUI、#479 TextDecoder、#483 聊天缓存、#472/#543 CI 改动重叠。

验证

  • 桌面 pnpm test:18 个文件 142 项通过(含新增超限用例)。
  • 桌面 pnpm typecheck 通过。

开发分支 PR 不跑 GitHub Actions。未改数据库。本轮无法向受保护的 main 压缩合并(token 无 push/merge,分支无远端 CI)。

Open in Web View Automation 

Keep the client host fail-closed at the same 1 MiB bounds as control packets and the LAN frame limit, and cover oversized local HTTP bodies.

Co-authored-by: redial.solute_1r <redial.solute_1r@icloud.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

本轮关闭意图:这条 PR 已经失效,不要合并。

对照 main @ 9300b1f(已合入 #544 GPUI):四个改动文件 apps/desktop/src/main/{activation-queue,client-host,limits}.ts 和 tests/client-host.test.ts 都已从主分支删除。GitHub 是 CONFLICTING,无法 rebase。桌面 LAN / HTTP 上限现在在原生 host 和 Core 常量里,不再有 Electron limits.ts。

替代交付:#553 删除 GPUI 之后真正无人调用的 Electron 适配(Core stdio bridge、CLI desktop-profile)。请关闭本 PR。

View PR

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

这条 PR 仍已失效,不要合并。

对照 main @ 8a06a332(#544 GPUI 已合入):四个改动文件 apps/desktop/src/main/{activation-queue,client-host,limits}.ts 和 tests/client-host.test.ts 都已从主分支删除。GitHub 仍是 CONFLICTING。目标文件消失的 PR 不要 rebase。

本代理无法 close PR。请作者关闭。

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

这条 PR 仍已失效,不要合并。

对照 main @ 64562374(#544 GPUI 已合入):四个改动文件 apps/desktop/src/main/{activation-queue,client-host,limits}.ts 和 tests/client-host.test.ts 都已从主分支删除。GitHub 仍是 CONFLICTING。目标文件消失的 PR 不要 rebase。

替代交付:#571 删除 GPUI 之后真正无人调用的 Electron 适配。本代理无法 close PR。请作者关闭。

View PR

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

目标文件已随 GPUI 从 main 删除。替代清理 #571 已 squash 合入 3ec7eac7。请关闭本 PR。本代理无法 close。

View PR

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

这条 PR 已失效,不要合并。

对照 main @ 07191092(#544 GPUI 已合入):四个改动文件 apps/desktop/src/main/{activation-queue,client-host,limits,client-host.test}.ts 已从 main 删除。GitHub 仍是 CONFLICTING。目标文件已消失的 PR 不要 rebase。

请作者关闭。

View PR

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这条 PR 已失效,不要合并。

对照 main @ 4ee0dcf2:apps/desktop/src/main/*.ts 已随 GPUI 删除。Electron client-host 的 1 MiB 上限改动无法应用到当前桌面。请作者关闭。本代理无法 gh pr close。不要 rebase。

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

This branch has not been deployed

No deployments
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