tailshare: surface Tailscale initialization failures #131

Closed
opened 2026-07-26 03:19:17 +02:00 by codinget · 0 comments
Owner

Goal

Show actionable failure information when Tailshare cannot initialize Tailscale instead of leaving the interface in a permanent loading state.

Context

PR #129 adds optional initialization-error callbacks to useBuildIpn and useBuildIpnWorker. Tailshare can now consume those callbacks for both its SharedWorker path and its direct main-thread path.

Failures can come from WASM loading, SharedWorker construction or initialization, the automatic main-thread fallback, IndexedDB/OPFS access, Web Lock contention, or synchronous IPN construction/startup.

Requirements

  • pass initialization-error callbacks to both Tailshare build hooks;
  • store a structured initialization failure in IpnPrepareContext rather than leaving willBuild as an indefinite spinner;
  • show a clear user-facing error state on the Tailscale page and state button;
  • include safe technical details such as the error message and attempted connection mode, without exposing auth keys or other stored credentials;
  • distinguish a SharedWorker failure followed by a failed fallback where that information is available;
  • provide an explicit retry path and access to configuration so the user can correct settings before retrying;
  • clear stale failure state after a successful connection;
  • cover worker rejection, main-thread construction failure, retry, and credential-redaction behavior with focused tests.

Acceptance

When Tailscale initialization fails, Tailshare stops showing an indefinite loading state, explains what failed, provides safe diagnostic details, and lets the user retry or adjust configuration without reloading blindly.

## Goal Show actionable failure information when Tailshare cannot initialize Tailscale instead of leaving the interface in a permanent loading state. ## Context PR #129 adds optional initialization-error callbacks to `useBuildIpn` and `useBuildIpnWorker`. Tailshare can now consume those callbacks for both its SharedWorker path and its direct main-thread path. Failures can come from WASM loading, SharedWorker construction or initialization, the automatic main-thread fallback, IndexedDB/OPFS access, Web Lock contention, or synchronous IPN construction/startup. ## Requirements - pass initialization-error callbacks to both Tailshare build hooks; - store a structured initialization failure in `IpnPrepareContext` rather than leaving `willBuild` as an indefinite spinner; - show a clear user-facing error state on the Tailscale page and state button; - include safe technical details such as the error message and attempted connection mode, without exposing auth keys or other stored credentials; - distinguish a SharedWorker failure followed by a failed fallback where that information is available; - provide an explicit retry path and access to configuration so the user can correct settings before retrying; - clear stale failure state after a successful connection; - cover worker rejection, main-thread construction failure, retry, and credential-redaction behavior with focused tests. ## Acceptance When Tailscale initialization fails, Tailshare stops showing an indefinite loading state, explains what failed, provides safe diagnostic details, and lets the user retry or adjust configuration without reloading blindly.
codinget added the
Agent
gpt-5.6-sol
4
Agentic
labels 2026-07-26 03:19:17 +02:00
Sign in to join this conversation.