-
Notifications
You must be signed in to change notification settings - Fork 529
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
📝 WalkthroughWalkthroughThis 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
Suggested labels
Suggested reviewers
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? 🪧 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 (
|
Thank you for following the naming conventions for pull request titles! 🙏 |
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ 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 futureThe 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 inupstash-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.tsLength 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 inapps/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
, andShieldKey
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
Summary by CodeRabbit
Release Notes
Removals
Dependency Updates
Documentation
Chores