Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mydea
added this pull request to stack #19507
September 18, 2026 10:24
6 tasks
mydea
marked this pull request as ready for review
September 18, 2026 10:48
mydea
force-pushed
the
guide-cat/04-category-predicates
branch
from
September 18, 2026 10:49
a4545ae to
7115ebe
Compare
Comment on lines
+10
to
+12
| * `server` tags alone cannot express) and are primarily consumed from MDX via | ||
| * `<PlatformCategorySection>`. | ||
| */ |
Contributor
There was a problem hiding this comment.
Bug: The hasServerCategory and hasBrowserCategory helpers fail to check for the 'server-only' and 'browser-only' categories, respectively, making them logically incomplete.
Severity: LOW
Suggested Fix
Update the helper functions to include checks for the '-only' category variants. The hasServerCategory function should be modified to also return true if the categories include 'server-only', and hasBrowserCategory should be updated to include 'browser-only'.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/categories.ts#L10-L12
Potential issue: The new helper functions `hasServerCategory` and `hasBrowserCategory`
do not correctly handle all possible category types. Specifically, `hasServerCategory`
checks for `'server'` and `'serverless'` but omits the `'server-only'` category.
Similarly, `hasBrowserCategory` checks for `'browser'` but omits `'browser-only'`. While
these `'-only'` categories are defined in the `PlatformCategory` type, they are not
currently used in the codebase. This means the bug is latent and would only be triggered
if a developer creates a new platform using these categories, which could lead to
incorrect UI rendering or logic.
Also affects:
src/categories.ts:18~20
Did we get this right? 👍 / 👎 to inform future reviews.
chargome
approved these changes
Sep 21, 2026
Extract the repeated `categories.includes('server') || includes('serverless')`
logic into shared `hasServerCategory` / `hasBrowserCategory` helpers
(src/categories.ts) and use them in `sdkOption` and `platformLink`.
Behavior-preserving cleanup; no rendered output changes. The `nextjs` /
`sveltekit` env-var exclusion in `shouldShowEnvVar` is intentionally left as a
framework-specific special case (it is not a "server-only" proxy: other
meta-frameworks such as astro/remix/nuxt do read process.env on their server
side and should keep the ENV row).
The new `browser-only` / `server-only` categories are consumed generically by
`PlatformCategorySection` from MDX and need no dedicated code path here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mydea
force-pushed
the
guide-cat/04-category-predicates
branch
from
September 21, 2026 08:06
7115ebe to
18ba9ae
Compare
mydea
added a commit
that referenced
this pull request
Sep 21, 2026
…ts (#19496) ## DESCRIBE YOUR PR > **Stacked PR.** Part of the JavaScript guide-categories series (#19492 → #19506). Depends on #19495; review/merge bottom-up. Key the “Only available on: Client/Server” hint in `getPlatformHints` off the new `isBrowserOnly` / `isServerOnly` category checks instead of hand-rolled runtime detection. - The hint is only informative on dual-runtime (meta-framework) platforms; on a single-runtime platform the option's runtime is already implied, so it's suppressed there. - Note: this also surfaces the hint on `desktop` (electron), which runs both a browser and a Node runtime. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've supplied a deadline. Thanks in advance for your help! ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
DESCRIBE YOUR PR
Extract the repeated
categories.includes('server') || includes('serverless')logic into sharedhasServerCategory/hasBrowserCategoryhelpers (src/categories.ts) and use them insdkOptionandplatformLink.nextjs/sveltekitenv-var exclusion inshouldShowEnvVaris intentionally left as a framework-specific special case.IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code