Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Sidebar "update everything" never updates CLI/npm servers (npm check blocked by CORS preflight)

オープン 初心者向け
#18,690 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
desktop, frontend

調査の方向性

apps/web/src/state/npmRelease.tsを読み、特にnpmReleasePublishedAtomのリクエストとそのEffectパイプラインを確認し、提案されているtracer伝播設定と比較してください。WebアプリまたはElectron rendererからnpmのバージョンを検索し、CORSのプリフライトなしで成功することを確認してください。対象のnpmバージョンが公開された時点で、条件を満たすboot-service CLIサーバーも「すべて更新」に含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

accepted bug via-triage
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-58 filters with useNpmReleasePublished(targetVersion)
  • apps/web/src/state/npmRelease.ts:14 checks with Effect's HttpClient.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
平均マージ
11時間 33分
マージ済み PR(30日)
312

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。