Skip to content

docs: add navigator to the runtime globals table - #35937

Open
robobun wants to merge 1 commit into
mainfrom
farm/48a7b53d/docs-navigator-global
Open

robobun wants to merge 1 commit into
mainfrom
farm/48a7b53d/docs-navigator-global

Conversation

@robobun

@robobun robobun commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #35936

navigator was missing from the globals table at https://bun.com/docs/runtime/globals even though Bun has shipped it for a while.

Bun's navigator implements userAgent, platform, and hardwareConcurrency (verified against the current release), so the new row notes exactly that. Browser-only properties like navigator.clipboard are not implemented in Bun today (there is a separate feature PR for that, #33312), which is why TypeScript correctly rejects them.


no test proof · iteration 0 · docs-only change; test-proof not applicable

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@robobun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6308767c-351b-42c8-846c-03561ddab557

📥 Commits

Reviewing files that changed from the base of the PR and between 44f6469 and 549fae4.

📒 Files selected for processing (1)
  • docs/runtime/globals.mdx

Comment @coderabbitai help to get the list of available commands.

@robobun

robobun commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 4:52 AM PT - Jul 26th, 2026

✅ @robobun, your commit 549fae478852faca97056c0c784b28879bd83478 passed in Build #82450! 🎉


🧪   To try this PR locally:

bunx bun-pr 35937

That installs a local version of the PR into your bun-35937 executable, so you can run:

bun-35937 --bun

@claude claude 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.

LGTM — one-line docs addition.

What was reviewed:

  • Verified against ZigGlobalObject.cpp: navigator exposes exactly userAgent, platform, and hardwareConcurrency, so the notes column is accurate.
  • Row is placed alphabetically between module and performance, and the MDN link/table formatting matches neighboring rows.
Extended reasoning...

Overview

Adds a single row for navigator to the runtime globals table in docs/runtime/globals.mdx, linking to MDN and noting the three properties Bun implements. Fixes #35936.

Security risks

None. Docs-only change with no executable code.

Level of scrutiny

Low. This is a one-line markdown table insertion. I cross-referenced the claim against the actual implementation in src/jsc/bindings/ZigGlobalObject.cpp (m_navigatorObject.initLater), which confirms the object has exactly userAgent, platform, and hardwareConcurrency getters plus a Symbol.toStringTag — the doc text is accurate and doesn't over- or under-claim.

Other factors

Alphabetical placement is correct (m < n < p). The MDN link target and column padding match the style of surrounding rows. No prior reviews to address, and no CODEOWNERS concerns for docs. The bug hunting system found no issues.

@robobun

robobun commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

This PR is the one to keep for #35936. I closed #41347 as a duplicate of it. The branch still merges cleanly into the current main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigator missing from Bun Globals

1 participant