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

chore: remove a bunch of old stuff an unused deps #2786

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

chronark
Copy link
Collaborator

@chronark chronark commented Jan 2, 2025

Summary by CodeRabbit

Release Notes

  • Removals

    • Removed semantic cache-related pages and components
    • Deleted rate limit testing and demo pages
    • Removed chart visualization for roles and permissions
  • Dependency Updates

    • Updated Radix UI Alert Dialog to version 1.1.4
    • Updated TypeScript to version 5.5.3
    • Updated Upstash Redis dependency
  • Documentation

    • Updated RFC document title and date
    • Added new icons to design documentation
  • Chores

    • Cleaned up unused dependencies
    • Simplified workspace navigation types

Copy link

vercel bot commented Jan 2, 2025

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

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 3:36pm
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 3:36pm
play ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 3:36pm
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 3:36pm

Copy link

changeset-bot bot commented Jan 2, 2025

⚠️ No Changeset found

Latest commit: 344eafc

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
Contributor

coderabbitai bot commented Jan 2, 2025

📝 Walkthrough

Walkthrough

This pull request represents a significant cleanup and deprecation of semantic caching and rate limit features within the Unkey dashboard. Multiple files related to semantic cache, rate limit testing, and associated navigation have been removed. The changes simplify the workspace navigation structure, remove unused dependencies, and eliminate components and routes related to semantic caching and rate limit demonstrations.

Changes

File Path Change Summary
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/chart.tsx Removed React component for rendering roles and permissions chart
apps/dashboard/app/(app)/desktop-sidebar.tsx Removed llmGateways property from workspace prop type
apps/dashboard/app/(app)/semantic-cache/ Deleted entire semantic cache feature directory, including layout, settings, and page components
apps/dashboard/app/(app)/workspace-navigations.tsx Removed semantic cache navigation item and simplified workspace navigation type
apps/dashboard/app/ratelimit/ Deleted rate limit page, test, and reset routes
apps/dashboard/package.json Removed dependencies like @ant-design/graphs, @faker-js/faker, dagre, @upstash/ratelimit, and @upstash/redis
packages/cache/package.json Updated @upstash/redis dependency version

Suggested labels

deprecation, cleanup, feature-removal

Suggested reviewers

  • mcstepp
  • perkinsjr
  • MichaelUnkey
  • ogzhanolguncu

Possibly related PRs


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 Jan 2, 2025

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

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b8de7f and 344eafc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/chart.tsx (0 hunks)
  • apps/dashboard/app/(app)/desktop-sidebar.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/analytics/page.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/layout.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/actions.ts (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/delete-gateway.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/page.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/components/sidebar.tsx (0 hunks)
  • apps/dashboard/app/(app)/semantic-cache/page.tsx (0 hunks)
  • apps/dashboard/app/(app)/workspace-navigations.tsx (2 hunks)
  • apps/dashboard/app/ratelimit/page.tsx (0 hunks)
  • apps/dashboard/app/ratelimit/reset/route.ts (0 hunks)
  • apps/dashboard/app/ratelimit/test/route.ts (0 hunks)
  • apps/dashboard/package.json (1 hunks)
  • apps/engineering/content/design/icons.mdx (2 hunks)
  • apps/engineering/content/rfcs/0003-key-shape.mdx (1 hunks)
  • packages/cache/package.json (1 hunks)
💤 Files with no reviewable changes (12)
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/actions.ts
  • apps/dashboard/app/ratelimit/reset/route.ts
  • apps/dashboard/app/(app)/semantic-cache/page.tsx
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/delete-gateway.tsx
  • apps/dashboard/app/(app)/desktop-sidebar.tsx
  • apps/dashboard/app/ratelimit/test/route.ts
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/analytics/page.tsx
  • apps/dashboard/app/ratelimit/page.tsx
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/settings/page.tsx
  • apps/dashboard/app/(app)/semantic-cache/[gatewayId]/layout.tsx
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/chart.tsx
  • apps/dashboard/app/(app)/semantic-cache/components/sidebar.tsx
🧰 Additional context used
📓 Learnings (1)
apps/dashboard/app/(app)/workspace-navigations.tsx (1)
Learnt from: chronark
PR: unkeyed/unkey#2180
File: apps/dashboard/lib/constants/workspace-navigations.tsx:56-118
Timestamp: 2024-11-10T16:45:16.994Z
Learning: When typing the `workspace` parameter in functions like `createWorkspaceNavigation`, prefer importing the `Workspace` type from the database module and picking the necessary keys (e.g., `features`) instead of redefining the interface.
🔇 Additional comments (7)
apps/engineering/content/rfcs/0003-key-shape.mdx (1)

5-5: Date is set in the future

The date is set to "2025-01-02", which is in the future. This could cause confusion about when this RFC was actually written or when it becomes effective.

Consider setting the date to when this RFC was actually written or adding an "effective date" field if you need to indicate future implementation.

apps/dashboard/app/(app)/workspace-navigations.tsx (2)

49-49: Consider verifying color contrast for accessibility.

You've replaced "bg-background" and "text-content-subtle" with "text-gray-11" and "border-gray-6 hover:border-gray-8". Ensure that the new styling provides sufficient contrast for users in both light and dark modes.


58-58: Usage aligns with retrieved learnings on typing the workspace parameter.

This new signature Pick<Workspace, "features" | "betaFeatures"> is consistent with the recommendation to avoid redefining interfaces.

packages/cache/package.json (1)

43-43: Validate any potential breakage or deprecations.

@upstash/redis has been upgraded to ^1.34.3. Ensure no breaking changes or migration steps are needed by checking its release notes.

✅ Verification successful

Let me check the release notes for @upstash/redis to verify any breaking changes.


Let me check how the Redis client is being used in the codebase to better understand the impact.


The upgrade to @upstash/redis ^1.34.3 appears safe to proceed

The codebase uses only stable and basic Redis operations (get, set, del) with standard options. The implementation in upstash-redis.ts is type-safe and doesn't rely on any advanced or deprecated features. The version bump from the caret range (^) suggests this is a minor/patch update, which should maintain backward compatibility according to semver.

Looking at the usage:

  • Only imported as a type import
  • Basic Redis operations used: get, set, del
  • Standard options utilized (pxat for expiration)
  • No usage of experimental or advanced features
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Searching for references to upstash/redis in the codebase to confirm usage
rg --context 3 '@upstash/redis'

Length of output: 1889


Script:

#!/bin/bash
# Check git history for previous version
rg -B 2 -A 2 '"@upstash/redis":\s*".*"' $(git ls-files '**/package.json' '**/package-lock.json' '**/pnpm-lock.yaml')

Length of output: 1539


Script:

#!/bin/bash
# Check Redis client usage
ast-grep --pattern 'import { Redis } from "@upstash/redis"'
cat packages/cache/src/stores/upstash-redis.ts

Length of output: 1630

apps/dashboard/package.json (1)

17-17: Check for breaking changes in Radix UI.

@radix-ui/react-alert-dialog has been updated to ^1.1.4. Make sure components remain functional and styles are consistent.

✅ Verification successful

Let me gather more information about the usage of AlertDialog components to verify if there are any potential breaking changes.


Let me check for actual usage of the AlertDialog components in the codebase.


Let me try again with correct ripgrep syntax.


No breaking changes detected in Radix UI AlertDialog update

The update to @radix-ui/[email protected] appears safe. The component is properly defined in apps/dashboard/components/ui/alert-dialog.tsx following Radix UI's standard patterns, and while we don't see active usage of the component in the codebase, the implementation remains consistent with Radix UI's API. The version bump from the lockfile shows it's compatible with the current React version (18.3.1).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Checking usage references to @radix-ui/react-alert-dialog
rg -A3 '@radix-ui/react-alert-dialog'

Length of output: 1261


Script:

#!/bin/bash
# Check the content of alert-dialog.tsx to see component implementation
cat apps/dashboard/components/ui/alert-dialog.tsx

# Find all files that use AlertDialog components
rg -l "AlertDialog[A-Za-z]*" apps/dashboard/

Length of output: 4519


Script:

#!/bin/bash
# Find actual usage of AlertDialog components in the codebase
rg -A5 "import.*AlertDialog" --type tsx --type jsx --glob '!**/alert-dialog.tsx'

# Also check for direct component usage
rg "<AlertDialog" --type tsx --type jsx --glob '!**/alert-dialog.tsx'

Length of output: 210


Script:

#!/bin/bash
# Find actual usage of AlertDialog components in the codebase, excluding the component definition file
rg -A5 "import.*AlertDialog" --type-add 'tsx:*.tsx' --type tsx --glob '!**/alert-dialog.tsx'

# Check for direct component usage
rg "<AlertDialog" --type-add 'tsx:*.tsx' --type tsx --glob '!**/alert-dialog.tsx'

Length of output: 178

apps/engineering/content/design/icons.mdx (2)

19-21: Icons imported successfully.

The additions of Gauge, Gear, InputSearch, and ShieldKey are properly declared. Confirm alphabetical order if it's part of your convention.

Also applies to: 26-26


80-82: Icons rendered correctly in the swatch.

The icons are now showcased in the grid. Verify design documentation is up-to-date and that no additional tooling is required.

Also applies to: 87-87

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