Skip to content

feat(open): prefer OAuth alias URLs#68

Merged
roodboi merged 2 commits into
mainfrom
feat/open-alias-preference
Jul 10, 2026
Merged

feat(open): prefer OAuth alias URLs#68
roodboi merged 2 commits into
mainfrom
feat/open-alias-preference

Conversation

@roodboi

@roodboi roodboi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make OAuth alias hosts the automatic browser-facing default when OAuth is enabled
  • add project-level open.prefer and one-shot hack open --prefer <auto|alias|dev> controls
  • apply the preference consistently to service shorthand, linked-worktree branch URLs, and hack branch open
  • preserve explicit URLs and fully qualified hostnames exactly as entered
  • update generated config/schema, CLI reference, docs, and agent guidance

Why

Projects that enable OAuth need browser-facing .hack.gy aliases for callbacks and shared cookie domains, while dev_host should remain the stable primary routing identity. Previously hack open always returned the primary .hack host, forcing applications and agents to reconstruct or redirect to the alias themselves.

User impact

With the default open.prefer: auto, hack open now opens the alias whenever oauth.enabled is true and falls back to the dev host otherwise. Users can pin either behavior in project config or override one invocation. Container-to-container traffic remains on Compose DNS.

Validation

  • bun run check
  • bunx tsc -p packages/cli/tsconfig.json --noEmit
  • bun run build
  • focused unit/documentation tests: 34 passed
  • bun tests/e2e/run.ts --only=worktree-branch-default
  • full unit suite: 915 passed, 5 skipped; the sole failure is the existing sandbox-only ps EPERM in daemon-command.test.ts
  • full local E2E: 8 scenarios passed; lifecycle process-table scenario is likewise sandbox-blocked by ps

Release signal

Feature change; publish as a minor release.

@roodboi

roodboi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor 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: a3f832636b

ℹ️ 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 src/lib/open-host.ts
@roodboi

roodboi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 5de6c15e14

ℹ️ 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".

@roodboi roodboi merged commit 0320eca into main Jul 10, 2026
5 checks passed
@roodboi roodboi deleted the feat/open-alias-preference branch July 10, 2026 05:52
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