Skip to content

Add Tailscale Serve advertised URL support - #1

Open
johnlombardo-dev wants to merge 1 commit into
mainfrom
codex/tailscale-serve-advertised-url
Open

Add Tailscale Serve advertised URL support#1
johnlombardo-dev wants to merge 1 commit into
mainfrom
codex/tailscale-serve-advertised-url

Conversation

@johnlombardo-dev

Copy link
Copy Markdown
Owner

Summary

  • add --tailscale-serve-host / T3CODE_TAILSCALE_SERVE_HOST config support
  • centralize advertised startup URL resolution for Tailscale Serve, MagicDNS discovery, and HTTP fallback
  • use advertised HTTPS URLs for startup browser targets and headless pairing output
  • document the host override and fallback behavior in REMOTE.md

Verification

  • bun fmt
  • bun lint (passes with existing warnings)
  • bun typecheck
  • bun --cwd apps/server vitest run src/cli/config.test.ts src/startupAccess.test.ts

Note: bun run test was started, but the apps/server Vitest worker hung after other packages reported passing and was terminated. The focused server tests touched by this PR pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 607b104020

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/startupAccess.ts Outdated
Comment on lines +101 to +107
return resolveTailscaleHttpsBaseUrl({ servePort: input.tailscaleServePort }).pipe(
Effect.catch((cause) =>
Effect.logDebug("failed to resolve tailscale https startup url", { cause }).pipe(
Effect.as(null),
),
),
Effect.map((tailscaleBaseUrl) => tailscaleBaseUrl ?? input.httpBaseUrl),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back when Tailscale Serve is not configured

When --tailscale-serve is set on a Tailnet machine where tailscale status --json succeeds but tailscale serve --bg fails, this still advertises the MagicDNS HTTPS URL. The actual Serve setup error is swallowed in apps/server/src/server.ts lines 374-379 so the backend keeps running on HTTP, but the headless output/startup pairing URL now points clients at an HTTPS endpoint that was never configured. This should be gated on successful Serve setup or probed before replacing input.httpBaseUrl.

Useful? React with 👍 / 👎.

@johnlombardo-dev

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 607b104020

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/startupAccess.ts Outdated
@johnlombardo-dev
johnlombardo-dev force-pushed the codex/tailscale-serve-advertised-url branch from 607b104 to 4c019e8 Compare May 28, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant