[Bug]: Sidebar "update everything" never updates CLI/npm servers (npm check blocked by CORS preflight)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读 apps/web/src/state/npmRelease.ts,特别是 npmReleasePublishedAtom 请求及其 Effect 管道;将其与提议的 tracer 传播设置进行比较。从 Web 应用或 Electron renderer 检查 npm 版本查询,并确认它无需 CORS 预检即可成功。目标 npm 版本发布后,“update everything”也包含符合条件的 boot-service CLI 服务器,即视为完成。
由索引模型根据 Issue 内容生成。
描述
What happens
On desktop nightly 0.0.46-nightly.20261012.3021, the sidebar's "update everything" button (#18053) updates desktop-app servers but never includes a CLI server. The connected server is a launcher-managed t3 __service-launcher systemd service on 0.0.46-nightly.20261012.3010, which advertises serverSelfUpdate: "boot-service". That server's row in Settings → Connections still shows its update icon, and updating from there works.
npm already has the target version (nightly dist-tag = 0.0.46-nightly.20261012.3021), and both versions are on the nightly channel, so the server should be included.
Cause
useUpdateEverything keeps non-desktop-managed servers only after npm confirms the target version:
apps/web/src/components/sidebar/useUpdateEverything.ts:56-58filters withuseNpmReleasePublished(targetVersion)apps/web/src/state/npmRelease.ts:14checks with Effect'sHttpClient.get+FetchHttpClient.layer
Effect's HttpClient adds traceparent and b3 headers to every request by default (HttpClient.TracerPropagationEnabled defaults to true). Those headers make the browser send a CORS preflight, and registry.npmjs.org answers OPTIONS with 404 and no Access-Control-Allow-Origin. The fetch is blocked, the atom fails, AsyncResult.getOrElse(result, () => false) (npmRelease.ts:40) reports "not published", and every npm/CLI server is dropped from the run. This affects the desktop renderer and app.t3.codes alike. The Connections "Update all" and per-row update don't check npm, which is why they still work.
Repro / evidence
Preflight is rejected:
$ curl -sI -X OPTIONS -H 'Origin: https://app.t3.codes' -H 'Access-Control-Request-Method: GET' \
https://registry.npmjs.org/t3/0.0.46-nightly.20261012.3021
HTTP/2 404 # no access-control-allow-origin
What the effect 4.0.1 the web app ships sends for HttpClient.get(...) with FetchHttpClient.layer:
{"b3":"d25f…-a0cb…-1","traceparent":"00-d25f…-a0cb…-01"}
The same fetch inside the repo's Electron 44 (Chromium), run from an https:// page:
plain GET: ok 200
with trace headers: FAILED Failed to fetch
Expected
"Update everything" includes boot-service CLI servers once npm has the target version.
Suggested fix
Turn off trace propagation for this cross-origin request in npmReleasePublishedAtom (apps/web/src/state/npmRelease.ts):
}).pipe(
Effect.provideService(HttpClient.TracerPropagationEnabled, false),
Effect.provide(FetchHttpClient.layer),
)
With that change no extra headers are sent and the request stays a simple CORS GET (checked with the same probe). A test on the fetch-failure path would also help: right now a failed check looks the same as "not published", which hid this.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 6 小时 53 分钟
- 30 天内合并 PR
- 222
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
bug via-triage
难度 2/5 1-3 小时 新手友好度 72/100
pingdotgg/t3code#20128 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: T3_CODE_ORCHESTRATION_INSTRUCTIONS has no carve-out for user- or repo-mandated CLI review workflows (unlike T3_CODE_BROWSER_TOOL_INSTRUCTIONS)可能已有人在做 @nivethass15102007-tech 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
pingdotgg/t3code#19908 · 1 条评论 ·
维护者通常 1 天内回复
-
accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 70/100
pingdotgg/t3code#19536 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
[Bug]: Diff panel hides the current branch name and the arrow overlaps the base ref when the panel is narrow可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 72/100
pingdotgg/t3code#19048 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
melgarafael/DeskcommCRM#3000 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
callstackincubator/simlock#639 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
aws/agentcore-cli#2606 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 7 天内回复
-
ai-driven-qa bug Cosmetic
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复