Repository navigation
docs: eagerly load comments section - #6511
Conversation
|
Warning Rate limit exceeded@juliusmarminge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 28 seconds before requesting another review. β How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. π¦ How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. π Files selected for processing (2)
WalkthroughThe changes remove the existing BlogComments component and update the blog post item to utilize the Giscus component directly. The BlogComments file, which previously used the Docusaurus Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BlogPostItem
participant Giscus
User->>BlogPostItem: Load Blog Post Page
BlogPostItem->>useColorMode: Retrieve current color mode
BlogPostItem->>Giscus: Render Giscus with configured comment props
Giscus-->>User: Display comments thread
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
|
π Previously deployed to Railway in the trpc-sse-and-websockets project. Environment has been deleted. |
There was a problem hiding this comment.
Actionable comments posted: 1
π§Ή Nitpick comments (2)
www/src/theme/BlogPostItem/index.tsx (2)
7-13: Consider adding proper TypeScript types.The component uses
anytype for props which reduces type safety. Consider defining proper types:-export default function BlogPostItemWrapper(props: any) { +import type { Props as BlogPostItemProps } from '@theme-original/BlogPostItem'; + +export default function BlogPostItemWrapper(props: BlogPostItemProps) {
17-30: Consider extracting Giscus configuration to a separate file.The Giscus configuration contains hardcoded values that might be better managed in a dedicated configuration file.
+// giscus.config.ts +export const giscusConfig = { + repo: "trpc/trpc", + repoId: "MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ", + mapping: "number", + strict: "0", + reactionsEnabled: "1", + emitMetadata: "1", + inputPosition: "top", + lang: "en", +} as const;Then update the component:
- <Giscus - repo="trpc/trpc" - repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" - mapping="number" - term={commentDiscussionId as string} - strict="0" - reactionsEnabled="1" - emitMetadata="1" - inputPosition="top" - theme={colorMode} - lang="en" - /> + <Giscus + {...giscusConfig} + term={commentDiscussionId as string} + theme={colorMode} + />
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (2)
www/src/components/BlogComments.tsx(0 hunks)www/src/theme/BlogPostItem/index.tsx(2 hunks)
π€ Files with no reviewable changes (1)
- www/src/components/BlogComments.tsx
β° Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test
- GitHub Check: Lint and auto-fix
π Additional comments (1)
www/src/theme/BlogPostItem/index.tsx (1)
1-6: LGTM! Import statements are well-organized.The new imports for
useColorModeandGiscusare appropriate for the comment system integration.
| repo="trpc/trpc" | ||
| repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" |
There was a problem hiding this comment.
π‘ Verification agent
π§© Analysis chain
Verify the repository configuration.
Please verify that the hardcoded repository details are correct:
π Script executed:
#!/bin/bash
# Description: Verify that the repository ID matches the trpc/trpc repository
# Test: Query GitHub API for the repository ID
gh api graphql -f query='
query {
repository(owner: "trpc", name: "trpc") {
id
databaseId
}
}'Length of output: 197
Mismatch in Repository ID: Update Required
The GitHub API query confirms that the correct repository ID for trpc/trpc is "MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ=", which includes a trailing =. Currently, the code specifies the repository ID as "MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" (missing the trailing =). Please update this value to match the verified API response.
- File:
www/src/theme/BlogPostItem/index.tsx(Line 20) - Change diff:
- repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" + repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ="
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| repo="trpc/trpc" | |
| repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" | |
| repo="trpc/trpc" | |
| - repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ" | |
| + repoId="MDEwOlJlcG9zaXRvcnkyODA1NTcwNTQ=" |
@trpc/client
@trpc/next
@trpc/server
@trpc/react-query
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Summary by CodeRabbit