-
Notifications
You must be signed in to change notification settings - Fork 619
Update API reference links to use local /reference paths #7993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
|
Caution Review failedThe pull request is closed. WalkthroughReplaced absolute api.thirdweb.com/reference links with relative /reference routes across portal components, MDX pages, sidebars, Nebula API endpoint metadata, and an OpenAPI helper. Removed BASE_API_URL; no exported signatures changed and only link targets were updated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant P as Portal UI
participant R as Router
rect rgba(200,230,255,0.25)
note over U,P: New flow (internal navigation)
U->>P: Click "API Reference" link
P->>R: Navigate to /reference[#tag/...]
R-->>P: Render reference page
P-->>U: In-app page shown
end
rect rgba(255,230,200,0.25)
note over U,P: Previous flow (external)
U->>P: Click "API Reference" link
P->>U: Open https://api.thirdweb.com/reference in new tab
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (20)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7993 +/- ##
=======================================
Coverage 56.63% 56.63%
=======================================
Files 904 904
Lines 58677 58677
Branches 4161 4161
=======================================
Hits 33231 33231
Misses 25340 25340
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (3)
apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx (1)
25-25: Relative reference URL — looks goodConsistent with the new internal docs routing.
See the verification script in update-session/EndpointMetadata.tsx.
apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx (1)
27-27: Good switch to /referenceMatches the standardized pattern used elsewhere in this PR.
Use the earlier script to validate anchors exist and no external URLs remain.
apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx (1)
18-18: LGTM on internal anchorAligned with BLD-221; no functional changes.
Anchor existence covered by the shared verification script.
🧹 Nitpick comments (5)
apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx (1)
18-18: Double-checkreferenceUrlanchor
/reference#tag/ai/ai/clear-sessionmay contain a duplicatedai. Please confirm the exact anchor format used by the reference page builder; align with other Nebula endpoints for consistency.To avoid per-file drift, consider deriving
referenceUrlvia a shared helper (same logic used byOpenApiEndpoint) based on tag/method/path inputs.apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx (1)
11-13: Add explicit return type for EndpointMetadataFollow our TS guideline for explicit return types.
-export function EndpointMetadata() { +export function EndpointMetadata(): JSX.Element {apps/portal/src/app/wallets/sidebar.tsx (1)
76-76: Updated HTTP API link to internal docs — approvedKeeps users inside the portal.
If more sidebars link to API tags, consider a tiny helper (e.g., referenceTagHref("wallets") ->
/reference#tag/wallets) to avoid drift if the anchor scheme ever changes.apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx (1)
508-508: Good: centralized relative anchor generation.This matches the
/reference#tag/{tag}/{method}{path}convention. Consider updating hardcodedreferenceUrlvalues (e.g., Nebula pages) to this scheme to avoid drift.apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx (1)
18-18: Fix reference anchor to include HTTP method and full path.To match the site’s anchor format, include
getand the endpoint path.- referenceUrl: "/reference#tag/ai/ai/get-session", + referenceUrl: "/reference#tag/ai/get/session/{session_id}",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (20)
apps/portal/src/app/Header.tsx(1 hunks)apps/portal/src/app/ai/chat/page.mdx(1 hunks)apps/portal/src/app/ai/llm-txt/page.mdx(1 hunks)apps/portal/src/app/ai/sidebar.tsx(1 hunks)apps/portal/src/app/contracts/sidebar.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx(1 hunks)apps/portal/src/app/page.tsx(1 hunks)apps/portal/src/app/payments/page.mdx(1 hunks)apps/portal/src/app/transactions/page.mdx(1 hunks)apps/portal/src/app/transactions/sponsor/page.mdx(1 hunks)apps/portal/src/app/wallets/server/page.mdx(1 hunks)apps/portal/src/app/wallets/sidebar.tsx(1 hunks)apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsxapps/portal/src/app/ai/sidebar.tsxapps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsxapps/portal/src/app/contracts/sidebar.tsxapps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsxapps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsxapps/portal/src/app/page.tsxapps/portal/src/app/wallets/sidebar.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsxapps/portal/src/app/ai/sidebar.tsxapps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsxapps/portal/src/app/contracts/sidebar.tsxapps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsxapps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsxapps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsxapps/portal/src/app/page.tsxapps/portal/src/app/wallets/sidebar.tsx
🧠 Learnings (6)
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
PR: thirdweb-dev/js#7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout changes.
Applied to files:
apps/portal/src/app/payments/page.mdx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Applied to files:
apps/portal/src/app/transactions/sponsor/page.mdx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use `NavLink` for internal navigation with automatic active states in dashboard and playground apps
Applied to files:
apps/portal/src/app/page.tsx
📚 Learning: 2025-08-07T20:43:21.864Z
Learnt from: MananTank
PR: thirdweb-dev/js#7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.
Applied to files:
apps/portal/src/app/page.tsxapps/portal/src/app/wallets/sidebar.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Applied to files:
apps/portal/src/app/page.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Use `NavLink` for internal navigation to get active state handling
Applied to files:
apps/portal/src/app/page.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: Build Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (10)
apps/portal/src/app/transactions/sponsor/page.mdx (1)
58-58: LGTM: updated to internal/referenceMatches the migration goal; external Engine references remain appropriately external.
apps/portal/src/app/ai/llm-txt/page.mdx (1)
21-21: LGTM: internalized HTTP API reference linkSwitch to
/referenceis consistent with the portal navigation pattern.apps/portal/src/app/wallets/server/page.mdx (1)
34-34: Verify reference anchor resolution: internal link set to/reference#tag/transactions/post/v1/transactions; confirm this fragment navigates to the intended endpoint in the built preview.apps/portal/src/app/transactions/page.mdx (1)
67-67: Updated API link to /reference — LGTM.Matches the new convention and keeps navigation internal.
apps/portal/src/app/ai/sidebar.tsx (1)
34-34: Sidebar “API Reference” now points to local /reference — LGTM.Consistent with the portal-wide change.
apps/portal/src/app/Header.tsx (1)
127-127: Header “HTTP API” now routes internally — LGTM.Works with existing
targetlogic (no_blankfor internal links).apps/portal/src/app/ai/chat/page.mdx (1)
91-91: Full API Reference now uses /reference — LGTM.Keeps users within the docs site.
apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx (1)
19-19: Replace all remaining external api.thirdweb.com/reference links
- Straggler links found in:
• packages/api/README.md:42
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx:116
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/page.tsx:83
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/page.tsx:109
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx:84
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:97
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/ai/page.tsx:72Update these to use the internal
/reference#tag/...anchors.⛔ Skipped due to learnings
Learnt from: MananTank PR: thirdweb-dev/js#7812 File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60 Timestamp: 2025-08-07T20:43:21.864Z Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.apps/portal/src/app/page.tsx (1)
140-140: LGTM: Internalize HTTP API link.Switching to
/referencecorrectly keeps navigation in‑app; target logic already avoids_blankfor internal links.apps/portal/src/app/contracts/sidebar.tsx (1)
66-66: LGTM: Contracts reference now uses internal route.Anchor
/reference#tag/contractsmatches the tag section pattern.
apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx
Outdated
Show resolved
Hide resolved
apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx
Outdated
Show resolved
Hide resolved
Merge activity
|
Replaced external 'https://api.thirdweb.com/reference' links with local '/reference' paths across documentation, sidebar, and metadata files for consistency and improved navigation within the portal. Closes BLD-221 <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the reference URLs from absolute paths to relative paths across various components in the application. This change aims to streamline navigation within the app and improve consistency in referencing API documentation. ### Detailed summary - Changed `href` values from absolute URLs to relative paths in multiple files: - `Header.tsx` - `ai/sidebar.tsx` - `wallets/sidebar.tsx` - `contracts/sidebar.tsx` - `ai/llm-txt/page.mdx` - `payments/page.mdx` - `nebula/api-reference` files - `transactions/sponsor/page.mdx` - `page.tsx` - `Document/APIEndpointMeta/OpenApiEndpoint.tsx` - `wallets/server/page.mdx` - `transactions/page.mdx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Documentation - Updated API Reference links across the site (AI, Contracts, Transactions, Payments, Wallets, Nebula endpoints, Home, and Header) to use internal paths (/reference and anchored routes). - Bug Fixes - API Reference links now navigate within the docs site instead of opening an external domain, improving navigation continuity. - Refactor - Standardized reference URL handling to consistently use relative routes for a unified in-app experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
b03441e to
f714e5d
Compare
Replaced external 'https://api.thirdweb.com/reference' links with local '/reference' paths across documentation, sidebar, and metadata files for consistency and improved navigation within the portal.
Closes BLD-221
PR-Codex overview
This PR focuses on updating the API reference links throughout the application to use relative paths instead of absolute URLs, enhancing maintainability and consistency.
Detailed summary
hrefproperties in various components to use relative paths..mdxfiles to point to the new relative API reference.generateReferenceUrlfunction to return relative URLs.Summary by CodeRabbit