Skip to content

Make Tailscale Effect integration more idiomatic#2875

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/idiomatic-effect-patterns-9f45
Draft

Make Tailscale Effect integration more idiomatic#2875
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/idiomatic-effect-patterns-9f45

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 30, 2026

What Changed

  • Switched Tailscale timeout constants and APIs to effect/Duration inputs.
  • Represented optional MagicDNS results with Option instead of null through the Tailscale parser and desktop endpoint provider.
  • Converted Tailscale errors to Schema.TaggedErrorClass and updated tests to use Layer.mock plus TestClock for timeout coverage.

Why

This keeps the Tailscale integration aligned with idiomatic Effect patterns and makes timeout behavior deterministic in tests.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web View Automation 

Note

Replace nullable strings with Option types in Tailscale Effect integration

  • Converts magicDnsName fields across TailscaleStatus, parseTailscaleMagicDnsName, and resolveTailscaleHttpsBaseUrl from string | null to Option.Option<string>
  • Replaces numeric millisecond timeout constants with Duration-based constants (TAILSCALE_STATUS_TIMEOUT, TAILSCALE_SERVE_TIMEOUT, TAILSCALE_PROBE_TIMEOUT) and updates runTailscaleCommand to accept timeout: Duration.Input instead of timeoutMs: number
  • Migrates error classes (TailscaleCommandError, TailscaleStatusParseError, TailscaleUnavailableError) from Data.TaggedError to Schema.TaggedErrorClass with explicit field schemas
  • Adds a timeout test using TestClock to verify readTailscaleStatus fails with TailscaleCommandError after TAILSCALE_STATUS_TIMEOUT
  • Risk: probeTailscaleHttpsEndpoint callers passing timeoutMs will silently have no effect; the property is now timeout

Macroscope summarized df8b880.

cursoragent and others added 4 commits May 30, 2026 16:06
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant