Remaining edge paths for an instance with no address

オープン
#2,022 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Start with src/features/auth/ClusterInstanceSignIn.tsx, src/features/instance/instanceLayoutRoute.ts, src/features/cluster/Instances.tsx, useInstanceMenuItems.tsx, and ClusterHome.tsx; trace the URL helper and byInstanceFqdnThenPort mentioned in the issue. Check the sign-in, remembered connection, URL display and copy, sorting, and Disconnect paths for address-less instances, while preserving Local Studio's fallback. Done when each path handles missing or invalid addresses consistently and the existing behavior is checked.

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

説明

Summary

Some edge paths around an instance Studio has no address for are still unhandled. Both predate the #2020 fix and were found by code trace during its review; neither is observed in production.

1. The sign-in health probe fires before it knows where to go

ClusterInstanceSignIn (src/features/auth/ClusterInstanceSignIn.tsx) runs getInstanceHealthQueryOptions whenever the cluster isn't terminated. Two states send that GET /health somewhere unintended:

  • While the cluster query is still loading, operationsUrl is null, so getInstanceClient falls back to a stored sign-in URL or the page's own origin.
  • When the route's instanceId isn't in cluster.instances, the memo takes the cluster branch and probes the cluster's URL instead.

A plain !!operationsUrl gate would break Local Studio, which has no cluster and relies on the same fallback, so the gate needs to keep that case (for example isLocalStudio || !!operationsUrl).

2. A remembered sign-in reopens an instance that has lost its address

On reload, checkClusterInstanceAuthenticationBeforeLoad (src/features/instance/instanceLayoutRoute.ts) resumes a remembered connection before it reaches the Fabric Connect attempt that now refuses an address-less instance. So an instance that was signed in while it had an FQDN still opens after central manager stops listing one, through the stored URL or the proxy, while its row on the Instances list shows —.

3. Raw FQDN checks disagree with the URL helper

getOperationsUrlForInstance returns null for an FQDN that new URL rejects (whitespace-only, a bare https://), but the self-hosted URL column (src/features/cluster/Instances.tsx), the menu's copy actions (useInstanceMenuItems.tsx) and byInstanceFqdnThenPort still test the raw field for truthiness. Such a value gets a garbled URL cell, copy actions, and a sort position ahead of real addresses. Hypothetical (central manager has not been seen to send one) and cosmetic; nothing throws. Fix by normalising the address once.

4. Self-hosted Disconnect with an address-less first instance

ClusterHome.tsx's Disconnect passes getOperationsUrlForInstance(firstInstance), which can now be null, so getInstanceClient falls back to the stored sign-in URL. A connected instance always has one, so this looks correct; recorded so it gets checked rather than assumed.

Related: #2021 (cluster sign-out can't clear such an instance).

Review-Deferral: b326cc50556fa97a severity=nit category=correctness
Review-Deferral: aa30a9bb10d1ee30 severity=nit category=correctness
Review-Deferral: d4ecec465c740ecf severity=nit category=correctness
Review-Deferral: 1e45c35cbd41a55f severity=nit category=reliability

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.

主要言語
TypeScript
スター
5
フォーク
4
平均マージ
1日 19時間
マージ済み PR(30日)
144

環境構築

はじめの一歩

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

HarperFast/studio のほかの issue

HarperFast/studio の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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