Skip to content

Conversation

madster456
Copy link
Collaborator

@madster456 madster456 commented Jul 22, 2025

This fixes the broken links on the SDK pages.


Important

Fixes broken SDK links by ensuring URLs are absolute in overview.tsx and index.mdx.

  • Behavior:
    • Fixes broken links in SDK pages by ensuring URLs are absolute in overview.tsx.
    • Introduces buildSDKUrl function in SDKOverview to construct absolute URLs using getPlatformUrl.
  • Code Changes:
    • Updates href in Link components in overview.tsx to use buildSDKUrl.
    • Removes './' from href in sdkSections in index.mdx to make paths absolute.

This description was created by Ellipsis for 242e369. You can customize this summary. It will automatically update as commits are pushed.

Copy link

vercel bot commented Jul 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 6:27am
stack-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 6:27am
stack-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 6:27am
stack-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 6:27am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR addresses broken links in the SDK documentation by making two key changes:

  1. Removes the './' prefix from href links in the SDK documentation navigation structure (docs/templates/sdk/index.mdx)
  2. Implements proper URL path handling in the SDK overview component (docs/src/components/sdk/overview.tsx) by adding platform-aware path construction

The changes ensure that SDK documentation links work correctly across different platforms (next, react, js, python) by maintaining proper URL paths and platform context. The solution involves using next/navigation's usePathname hook and implementing a buildSDKUrl utility function that constructs absolute URLs with the correct platform context.

Confidence score: 5/5

  1. This PR is very safe to merge as it only affects documentation link paths and URL construction
  2. The changes are focused, well-structured, and follow a consistent pattern across all documentation sections
  3. Key files that need attention:
    • docs/templates/sdk/index.mdx - Verify all link paths are correctly updated
    • docs/src/components/sdk/overview.tsx - Review URL construction logic

2 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

Copy link

recurseml bot commented Jul 22, 2025

✨ No issues found! Your code is sparkling clean! ✨

🗒️ View all ignored comments in this repo
  • The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
  • Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
  • There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.
  • Throwing an error when no active span is found is too aggressive. The log function should gracefully fallback to console.log or another logging mechanism when there's no active span, since not all execution contexts will have an active span. This makes the code less resilient and could break functionality in non-traced environments.

📚 Relevant Docs

  • Function sets backendContext with a new configuration but doesn't pass 'defaultProjectKeys'. Since defaultProjectKeys is required in the type definition and cannot be updated (throws error if tried to set), this will cause a type error.
  • The schema is using array syntax for pick() which is incorrect for Yup schemas. The pick() method in Yup expects individual arguments, not an array. Should be changed to: emailConfigSchema.pick('type', 'host', 'port', 'username', 'sender_name', 'sender_email')

📚 Relevant Docs

  • Creating a refresh token with current timestamp as expiration means it expires immediately. Should set a future date for token expiration.
  • The 'tools' object is initialized as an empty object, even though 'tools' is presumably expected to contain tool definitions. This could cause the server capabilities to lack necessary tool configurations, thus potentially impacting functionalities that depend on certain tool setups.

📚 Relevant Docs

  • 'STACK_SECRET_SERVER_KEY' is potentially being included in every request header without checking its existence again here. Although it's checked during initialization, this could lead to security issues as it's exposed in all communications where the header is logged or captured.

📚 Relevant Docs

  • When adding 'use client' directive at the beginning, it doesn't check if file.text already contains the 'use client' directive. This could lead to duplicate 'use client' directives if the file already has one.

📚 Relevant Docs

Need help? Join our Discord for support!
https://discord.gg/qEjHQk64Z9

@N2D4 N2D4 merged commit d94e62b into dev Jul 22, 2025
13 of 17 checks passed
@N2D4 N2D4 deleted the fix_sdk-links branch July 22, 2025 06:59
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.

2 participants