Skip to content

[Docs] add go snippets to reference pages - #2667

Open
akeimach wants to merge 5 commits into
v4-spikefrom
alyssamaruyama/stg-2801-add-go-snippets-to-missing-reference-docs
Open

[Docs] add go snippets to reference pages#2667
akeimach wants to merge 5 commits into
v4-spikefrom
alyssamaruyama/stg-2801-add-go-snippets-to-missing-reference-docs

Conversation

@akeimach

@akeimach akeimach commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

why

Missing go snippets in the reference files. Also adding the vitest change so this is prevented in the future

what changed

test plan


Summary by cubic

Adds Go snippets to the missing v4 reference pages and expands the vitest docs checker to keep TypeScript, Python, and Go in sync. Completes Linear STG-2801 by adding Go to locator, page, context, stagehand, and clipboard.

  • New Features

    • Added Go tabs with quick start and API examples to: reference/locator, reference/page, reference/context, reference/stagehand, reference/clipboard; examples show defer cleanup and include Page.URL() usage. Strengthened the vitest checker for Go: parses Go source to validate shared SDK surface coverage, exact method headings, direct parameter lists, response members, and verbatim Go ParamField types; enforces exactly one tab per SDK language per page and flags missing language snippets.
  • Bug Fixes

    • Corrected Go docs for Response.HeaderValue() to show (string, bool, error) and clarified header lookup behavior.
    • Formatted Go Clipboard.Paste shortcut options for readability.

Written for commit 0f34006. Summary will update on new commits.

Review in cubic

@akeimach
akeimach requested a review from a team as a code owner August 9, 2026 23:17
@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0f34006

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cubic analysis

Review completed against the latest diff

Linked issue analysis

Linked issue: STG-2801: Add Go snippets to missing reference docs

Status Acceptance criteria Notes
Add Go snippets to reference/locator The PR adds a section with multiple Go examples (Quick start, Click, Hover, Fill, etc.) to packages/docs/v4/reference/locator.mdx.
Add Go snippets to reference/page The PR adds a section with many Go examples for page methods (Goto, Click, Hover, Screenshot, etc.) to packages/docs/v4/reference/page.mdx.
Add Go snippets to reference/context The PR adds a section documenting BrowserContext methods (Pages, NewPage, Cookies, ClearCookies, etc.) in packages/docs/v4/reference/context.mdx.
Add Go snippets to reference/stagehand The PR adds a section covering Stagehand client and methods (Create, Act, Observe, Extract, ExperimentalBatch, etc.) in packages/docs/v4/reference/stagehand.mdx.
Add Go snippets to reference/clipboard The PR adds a section with Go examples for clipboard methods (ReadText, WriteText, Clear, Paste, Copy, Cut) in packages/docs/v4/reference/clipboard.mdx.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/docs/v4/reference/stagehand.mdx Outdated
Comment thread packages/docs/v4/reference/locator.mdx
Comment thread packages/docs/v4/reference/page.mdx Outdated
Comment thread packages/docs/v4/reference/page.mdx
Comment thread packages/docs/v4/reference/locator.mdx Outdated
Comment thread packages/docs/v4/reference/clipboard.mdx
Comment thread packages/docs/v4/reference/context.mdx Outdated
Comment thread packages/docs/v4/reference/page.mdx Outdated
@akeimach
akeimach force-pushed the alyssamaruyama/stg-2801-add-go-snippets-to-missing-reference-docs branch from e40b950 to d2475b2 Compare August 9, 2026 23:24

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/docs/tests/sdk-reference.test.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/docs/v4/reference/context.mdx Outdated
Comment thread packages/docs/v4/reference/stagehand.mdx

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/docs/v4/reference/clipboard.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant