Skip to content

fix(channels): 保留高级自定义渠道请求体透传设置 (#156) - #164

Merged
woncc merged 1 commit into
mainfrom
cursor/upstream-issue-156-7fb6e57a5-20261105
Nov 5, 2026
Merged

woncc merged 1 commit into
mainfrom
cursor/upstream-issue-156-7fb6e57a5-20261105

Conversation

@woncc

@woncc woncc commented Nov 5, 2026

Copy link
Copy Markdown

🔗 关联任务 / Related Issue

Closes #156

上游:7fb6e57a5ff671582131c74e00bdfaa867d4e985(QuantumNous#7971)。仅向 fork main 提交。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)

📝 变更描述 / Description

修复高级自定义渠道开启请求体透传后,保存时被强制写回 false 的问题。创建、更新及重载均保留开关;详细设置可关闭透传,开启时补充所有路由及格式转换风险提示,并同步七种语言。

复用现有 ConfirmDialog 与透传字段。12 个文件的增删内容与上游补丁一致,保留 fork 上下文及全部已有翻译。无依赖、后端、数据库或计费变更。

本次由 Codex AI 辅助移植和验证;已核对并精炼正文,对所列结果的准确性负责。人工审阅由独立 reviewer 完成,本 PR 不代替人工确认。

📸 运行证明 / Proof of Work

以下命令在 web/ 执行,设置 GOMAXPROCS=2、RAYON_NUM_THREADS=2:

  • bun run test src/features/channels/components/__tests__/channel-configuration.test.tsx src/features/channels/components/__tests__/channel-quick-options.test.tsx --maxWorkers=1 -t 'advanced custom body passthrough|preserves body passthrough':先只加入回归测试,3 失败、3 通过;复现保存 true 变 false 及两种布局缺少提示。
  • bun run test src/features/channels/components/__tests__/channel-configuration.test.tsx src/features/channels/components/__tests__/channel-quick-options.test.tsx --maxWorkers=1:修复后 115/115 通过。
  • bun run typecheck:退出码 0。
  • 对五个变更 TS/TSX 文件运行 bun x --no-install oxlint -c .oxlintrc.json:退出码 0;去除受保护版权头的临时副本经 oxfmt --check 检查通过。
  • bun run i18n:sync、git diff --check:通过;各语言仅新增一个键,既有值均保留。

真实组件及样式的本地浏览器截图已检查(中文、1280×1000,新增提示及按钮完整可见):
/home/box/.parallel-project-orchestrator/programs/new-api-cherry-20261022/evidence/R0208W156/g4-R0208W156-7fb6e57a5-01/passthrough-warning-zh.png

截图为隔离组件预览,未上传 GitHub;完整命令、原始日志、补丁及哈希见同目录 result.json。未运行全量套件、生产构建、真实供应商请求或部署;独立审阅待完成。

✅ 提交前检查项 / Checklist

  • 人工确认: 待独立 reviewer 审阅,不代勾。
  • 非重复提交: fork 对应分支无已有 PR;关联 [上游/现在能解] 7fb6e57a5 fix(channels): preserve advanced custom body passthrough settings #156。
  • 新功能关联 Issue: 本项为修复,已关联 Issue。
  • 事前沟通: 用户明确授权指定上游提交的隔离移植。
  • 功能范围: 仅渠道配置保存与提示。
  • 非透传: 修复配置持久化,不修改开启透传后的转发处理。
  • 范围聚焦: 仅授权的 12 个文件。
  • 本地验证: 已记录实际命令和结果。
  • 安全合规: 未引入凭据或修改认证流程。

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.

[上游/现在能解] 7fb6e57a5 fix(channels): preserve advanced custom body passthrough settings

1 participant