Skip to content
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

fix: Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation. #2624

Closed

Conversation

BadriVishalPadhy
Copy link
Contributor

@BadriVishalPadhy BadriVishalPadhy commented Oct 31, 2024

What does this PR do?

Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation.

Fixes #2396

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Test A
  • Test B

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • [ x] Commented on my code in hard-to-understand areas
  • [ x] Ran pnpm build
  • [ x] Ran pnpm fmt
  • [ x] Checked for warnings, there are none
  • [ x] Removed all console.logs
  • [ x] Merged the latest changes from main onto my branch with git pull origin main
  • [ x] My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Updated link in the Ratelimit Overview Page to direct users to more specific documentation on ratelimiting.
  • Bug Fixes

    • Enhanced response format for the verifyKey operation, providing clearer validation codes for key management.

Copy link

changeset-bot bot commented Oct 31, 2024

⚠️ No Changeset found

Latest commit: 3538b96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 31, 2024

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

Name Status Preview Comments Updated (UTC)
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 2:29am

Copy link

vercel bot commented Oct 31, 2024

@BadriVishalPadhy is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Oct 31, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve modifications to the RatelimitOverviewPage component to update the documentation link from the home documentation page to the specific Rate Limits documentation page. Additionally, the OpenAPI TypeScript definitions have been updated to enhance the OneOf type helper and the deprecated.verifyKey operation, improving formatting consistency and response structure.

Changes

File Path Change Summary
apps/dashboard/app/(app)/ratelimits/page.tsx Updated Link component's href attribute from /docs to /docs/ratelimiting/introduction.
packages/api/src/openapi.d.ts Adjusted OneOf type helper for formatting consistency; updated deprecated.verifyKey response structure.

Assessment against linked issues

Objective Addressed Explanation
Redirect the Read the Docs button to the specific Rate Limits documentation. (#2396)

Possibly related PRs

Suggested labels

Bug, Documentation, :joystick: 150 points

Suggested reviewers

  • mcstepp
  • chronark
  • perkinsjr

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a30d220 and 3538b96.

📒 Files selected for processing (1)
  • packages/api/src/openapi.d.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/api/src/openapi.d.ts

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Oct 31, 2024

Thank you for following the naming conventions for pull request titles! 🙏

@BadriVishalPadhy BadriVishalPadhy changed the title Fix/Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation. fix:Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation. Oct 31, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
packages/api/src/openapi.d.ts (1)

1067-1069: Documentation formatting could be improved.

The description has some formatting issues with extra whitespace and could be more concise.

Consider updating the description to:

-             * @description The day of the month, when we will refill the remaining verifications. To refill on the 15th of each month, set 'refillDay': 15.
-             *                     If the day does not exist, for example you specified the 30th and it's february, we will refill them on the last day of the month instead.
+             * @description The day of the month when verifications will be refilled. If the specified day doesn't exist (e.g., 30th in February), refill occurs on the last day of the month.

Also applies to: 1080-1084

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c531755 and aab4e78.

📒 Files selected for processing (2)
  • apps/dashboard/app/(app)/ratelimits/page.tsx (1 hunks)
  • packages/api/src/openapi.d.ts (7 hunks)
🔇 Additional comments (2)
apps/dashboard/app/(app)/ratelimits/page.tsx (1)

Line range hint 84-89: LGTM! Documentation link updated correctly.

The change properly fixes the "Read the Docs" button redirection by updating the href from /docs to /docs/ratelimiting/introduction, which aligns with the PR objectives to direct users to the specific Rate Limits documentation.

Let's verify that the documentation path exists:

✅ Verification successful

Documentation path exists and is properly referenced

The verification confirms that /docs/ratelimiting/introduction is a valid documentation path:

  • Found in apps/docs/mint.json as part of the documentation structure
  • Referenced consistently across multiple blog posts and documentation files
  • The path matches the documentation structure and naming conventions used in the project
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the Rate Limits documentation page exists
# Expected: Find references to the rate limiting documentation path

# Search for the documentation path in markdown files
rg -t md "ratelimiting/introduction"

# Search for other references to this path
rg "ratelimiting/introduction" --type-not md

Length of output: 1626

packages/api/src/openapi.d.ts (1)

361-363: LGTM! Well-documented refill configuration.

The new refillDay property is thoroughly documented with clear explanations about:

  • Non-zero indexing (1 is first day)
  • Default behavior (first day of month)
  • Nullability when interval is 'daily'

Also applies to: 378-383

packages/api/src/openapi.d.ts Outdated Show resolved Hide resolved
Comment on lines 1381 to 1382
/** @description The day verifications will refill each month, when interval is set to 'monthly' */
refillDay?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Documentation needs to be consistent with other sections.

The refillDay property documentation in the UpdateKey operation is missing important details that are present in other sections.

Add the following details to match other sections:

-            /** @description The day verifications will refill each month, when interval is set to 'monthly' */
+            /**
+             * @description The day verifications will refill each month, when interval is set to 'monthly'. Value is not zero-indexed making 1 the first day of the month. If left blank it will default to the first day of the month. When 'daily' is set for 'interval' 'refillDay' will be set to null.
+             * @default 1
+             * @example 15
+             */
📝 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.

Suggested change
/** @description The day verifications will refill each month, when interval is set to 'monthly' */
refillDay?: number;
/**
* @description The day verifications will refill each month, when interval is set to 'monthly'. Value is not zero-indexed making 1 the first day of the month. If left blank it will default to the first day of the month. When 'daily' is set for 'interval' 'refillDay' will be set to null.
* @default 1
* @example 15
*/
refillDay?: number;

@BadriVishalPadhy BadriVishalPadhy changed the title fix:Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation. fix: Read the docs button on /ratelimits page was redirecting users to the home documentation page now after this fix it is redirecting users to specific Rate Limits documentation. Oct 31, 2024
Copy link
Collaborator

@perkinsjr perkinsjr left a comment

Choose a reason for hiding this comment

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

Please remove the openapi.d.ts from the commit.

Then I will approve.

@BadriVishalPadhy
Copy link
Contributor Author

ok @perkinsjr

@BadriVishalPadhy
Copy link
Contributor Author

hey @perkinsjr fixed the openapi.d.ts

@BadriVishalPadhy
Copy link
Contributor Author

@perkinsjr hey can u merge it else if any queries plz do say

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants