Repository navigation
fix(cli): prefix scheme for bare-host URLs in browse tab new - #3577
Closed
embrace897 wants to merge 1 commit into
Closed
embrace897 wants to merge 1 commit into
embrace897 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f88d77d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
1 task done
shrey150
approved these changes
Nov 30, 2026
Contributor
shrey150
pushed a commit
that referenced
this pull request
Nov 30, 2026
…tab new (#3585) Mirrored from external contributor PR #3577 after approval by @shrey150. Original author: @embrace897 Original PR: #3577 Approved source head SHA: `f88d77d8ba7d0ebe18b598ded23a928dfda8add0` @embrace897, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here. ## Original description ## Summary - Apply `normalizeUrlScheme` to the optional `url` argument in `TabNew.run` (`packages/cli/src/commands/tab/new.ts`), matching `browse open` (#3512). - Preserve `undefined` when no URL is passed and keep explicit schemes (`https://`, `about:blank`, etc.) unchanged. - Add unit tests in `packages/cli/tests/tab-new.test.ts` and a patch changeset for `browse`. Fixes #3574. ## Testing - `pnpm --filter browse exec vitest run tests/tab-new.test.ts tests/normalize-url.test.ts` (21 passed) - `pnpm --filter browse check` (`tsc --noEmit`, 0 errors) - `oxlint` & `oxfmt --check` on changed files (0 warnings, 0 errors) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prefixes bare-host URLs with a scheme in `browse tab new`, matching `browse open` so commands like `browse tab new example.com` resolve correctly. Explicit schemes (for example `https://` or `about:blank`) and calls without a URL are left unchanged. Fixes #3574. <sup>Written for commit f88d77d. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/browserbase/stagehand/pull/3577?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <!-- End of auto-generated description by cubic. --> <!-- external-contributor-pr:owned source-pr=3577 source-sha=f88d77d8ba7d0ebe18b598ded23a928dfda8add0 claimer=shrey150 --> Co-authored-by: embrace897 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
The mirrored PR #3585 has been merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalizeUrlSchemeto the optionalurlargument inTabNew.run(packages/cli/src/commands/tab/new.ts), matchingbrowse open(fix(cli): prefix scheme for bare-host URLs in browse open #3512).undefinedwhen no URL is passed and keep explicit schemes (https://,about:blank, etc.) unchanged.packages/cli/tests/tab-new.test.tsand a patch changeset forbrowse.Fixes #3574.
Testing
pnpm --filter browse exec vitest run tests/tab-new.test.ts tests/normalize-url.test.ts(21 passed)pnpm --filter browse check(tsc --noEmit, 0 errors)oxlint&oxfmt --checkon changed files (0 warnings, 0 errors)Summary by cubic
Prefixes bare-host URLs with a scheme in
browse tab new, matchingbrowse openso commands likebrowse tab new example.comresolve correctly. Explicit schemes (for examplehttps://orabout:blank) and calls without a URL are left unchanged. Fixes #3574.Written for commit f88d77d. Summary will update on new commits.