Skip to content

Improve idiomatic Effect usage in config and Tailscale paths#3073

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

Improve idiomatic Effect usage in config and Tailscale paths#3073
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/idiomatic-effect-patterns-eea2

Conversation

@cursor

@cursor cursor Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Replaced manual VCS project config JSON.parse/null flow with shared Schema lenient JSON decoding and Option handling.
  • Added VCS config tests for malformed JSON and schema-invalid VCS kind fallback behavior.
  • Replaced Tailscale raw timeout millisecond constants with Duration values and Duration.Input timeout wiring.
  • Added a deterministic TestClock timeout test for readTailscaleStatus.

Why

These are small, focused idiomatic Effect improvements that make parsing and timeout behavior easier to test and maintain without escaping to ad-hoc JSON parsing or real-time waits.

UI Changes

N/A - no UI changes.

Checklist

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

Note

Refactor VCS config parsing and Tailscale timeouts to use idiomatic Effect patterns

  • Replaces manual null checks in VcsProjectConfig with Option-based control flow; malformed or schema-invalid JSON in .t3code/vcs.json now falls back to 'auto' with a warning log instead of propagating errors.
  • Converts Tailscale timeout constants from raw millisecond numbers to Duration-typed values (TAILSCALE_STATUS_TIMEOUT, TAILSCALE_SERVE_TIMEOUT, TAILSCALE_PROBE_TIMEOUT) and updates all call sites.
  • Adds test coverage for malformed JSON, invalid config kinds, and deterministic timeout behavior via TestClock.
  • Behavioral Change: probeTailscaleHttpsEndpoint callers must now pass timeout: Duration.Input instead of timeoutMs: number.

Macroscope summarized 3152229.

cursoragent and others added 4 commits June 13, 2026 16:04
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 Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Expo continuous deployment is ready!

  • Project → t3-code
  • Platforms → android, ios
  • Scheme → t3code-preview
  🤖 Android 🍎 iOS
Fingerprint ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e 313e506a7f15a9c3f15b01d787d68a12382432bf
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
App version: 0.1.0
Git commit: afda6b0090c744f0262bdd2eb168f1521603e626
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: 313e506a7f15a9c3f15b01d787d68a12382432bf
App version: 0.1.0
Git commit: afda6b0090c744f0262bdd2eb168f1521603e626
Update Details Update Permalink
DetailsBranch: pr-3073
Runtime version: ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
Git commit: afda6b0090c744f0262bdd2eb168f1521603e626
Update Permalink
DetailsBranch: pr-3073
Runtime version: 313e506a7f15a9c3f15b01d787d68a12382432bf
Git commit: afda6b0090c744f0262bdd2eb168f1521603e626
Update QR

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