-
Notifications
You must be signed in to change notification settings - Fork 593
chore: Remove un-used UI components #4472
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
|
📝 WalkthroughWalkthroughRemoves many dashboard UI components and utilities (PageHeader, Navbar, Confirm, chart and LLM-search subsystems, several UI atoms). Replaces inline Confirm with a ConfirmPopover flow in members UI and removes some header/submenu renderings in settings and integrations pages. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2024-12-03T14:07:45.173ZApplied to files:
📚 Learning: 2025-01-07T19:55:33.055ZApplied to files:
🧬 Code graph analysis (1)apps/dashboard/app/(app)/[workspaceSlug]/settings/team/members.tsx (3)
⏰ 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). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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: 1
🧹 Nitpick comments (4)
apps/dashboard/app/integrations/vercel/callback/client.tsx (1)
23-23: Consider deleting the commented‑outWorkspaceSwitcherimportGiven this PR’s goal of cleaning up unused UI components, it’d be more consistent to either fully remove this import or turn it into an explicit
// TODO:note if you plan to reintroduce it. As-is, it’s just dead/commented code adding noise.apps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx (1)
85-102: Consider removing the unnecessary wrapper div and redundant key props for cleaner code.The wrapping
<div>around the Select component (line 87) serves no styling or structural purpose and can be removed. Additionally, thekeyprops on the Select and InviteButton components (lines 88, 100) are redundant since these are single instances and not part of a list. Removing them would simplify the code:{isAdmin ? ( <div className="flex flex-row justify-end w-full gap-4"> - <div> - <Select key="tab-select" value={tab} onValueChange={(value: Tab) => setTab(value)}> + <Select value={tab} onValueChange={(value: Tab) => setTab(value)}> <SelectTrigger className="w-[180px]"> <SelectValue /> </SelectTrigger> <SelectContent> <SelectGroup> <SelectItem value="members">Members</SelectItem> <SelectItem value="invitations">Invitations</SelectItem> </SelectGroup> </SelectContent> </Select> - </div> - <InviteButton key="invite-button" user={user} organization={organization} /> + <InviteButton user={user} organization={organization} /> </div> ) : null}apps/dashboard/app/(app)/[workspaceSlug]/settings/team/members.tsx (2)
72-93: Consider clearing selection/closing the popover after a successful removal
onConfirmperforms the mutation but never resetscurrentMembershipor explicitly closes the controlled popover. Depending onConfirmPopover’s internals this may still work, but keeping local state in sync makes the component more predictable and avoids stale selection.You could reset on success:
onConfirm={async () => { try { await removeMember.mutateAsync({ orgId: organization.id, membershipId: currentMembership.id, }); + setIsConfirmPopoverOpen(false); + setCurrentMembership(null); } catch (error) { console.error("Error removing member:", error); } }}If
ConfirmPopoveralready callsonOpenChange(false)on confirm, this will just be redundant but harmless and keepscurrentMembershipconsistent with the UI.
97-100: Tidy the JSX comment in the header cellMinor nit:
{/*/ empty */}is slightly odd to read; it works, but the extra slash can confuse future readers. Consider simplifying to a standard JSX comment:- <TableHead>{/*/ empty */}</TableHead> + <TableHead>{/* empty */}</TableHead>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
apps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx(1 hunks)apps/dashboard/app/(app)/[workspaceSlug]/settings/team/members.tsx(5 hunks)apps/dashboard/app/(app)/[workspaceSlug]/settings/vercel/client.tsx(0 hunks)apps/dashboard/app/(app)/[workspaceSlug]/settings/vercel/page.tsx(0 hunks)apps/dashboard/app/integrations/vercel/callback/client.tsx(1 hunks)apps/dashboard/components/dashboard/charts.tsx(0 hunks)apps/dashboard/components/dashboard/confirm.tsx(0 hunks)apps/dashboard/components/dashboard/navbar.tsx(0 hunks)apps/dashboard/components/dashboard/page-header.tsx(0 hunks)apps/dashboard/components/dashboard/root-key-table/index.tsx(0 hunks)apps/dashboard/components/dashboard/root-key-table/table.tsx(0 hunks)apps/dashboard/components/logs/llm-search/components/search-actions.tsx(0 hunks)apps/dashboard/components/logs/llm-search/components/search-example-tooltip.tsx(0 hunks)apps/dashboard/components/logs/llm-search/components/search-icon.tsx(0 hunks)apps/dashboard/components/logs/llm-search/components/search-input.tsx(0 hunks)apps/dashboard/components/logs/llm-search/hooks/use-search-strategy.test.tsx(0 hunks)apps/dashboard/components/logs/llm-search/hooks/use-search-strategy.ts(0 hunks)apps/dashboard/components/logs/llm-search/index.tsx(0 hunks)apps/dashboard/components/ui/calendar.tsx(0 hunks)apps/dashboard/components/ui/code.tsx(0 hunks)apps/dashboard/components/ui/metric.tsx(0 hunks)apps/dashboard/components/ui/shiny-text.tsx(0 hunks)
💤 Files with no reviewable changes (19)
- apps/dashboard/components/logs/llm-search/hooks/use-search-strategy.ts
- apps/dashboard/components/logs/llm-search/components/search-actions.tsx
- apps/dashboard/components/dashboard/page-header.tsx
- apps/dashboard/app/(app)/[workspaceSlug]/settings/vercel/client.tsx
- apps/dashboard/components/dashboard/confirm.tsx
- apps/dashboard/components/ui/shiny-text.tsx
- apps/dashboard/components/ui/code.tsx
- apps/dashboard/components/dashboard/navbar.tsx
- apps/dashboard/components/ui/calendar.tsx
- apps/dashboard/components/logs/llm-search/components/search-example-tooltip.tsx
- apps/dashboard/app/(app)/[workspaceSlug]/settings/vercel/page.tsx
- apps/dashboard/components/dashboard/root-key-table/index.tsx
- apps/dashboard/components/logs/llm-search/components/search-input.tsx
- apps/dashboard/components/logs/llm-search/index.tsx
- apps/dashboard/components/dashboard/root-key-table/table.tsx
- apps/dashboard/components/logs/llm-search/hooks/use-search-strategy.test.tsx
- apps/dashboard/components/logs/llm-search/components/search-icon.tsx
- apps/dashboard/components/dashboard/charts.tsx
- apps/dashboard/components/ui/metric.tsx
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2024-10-04T17:27:09.821Z
Learnt from: chronark
Repo: unkeyed/unkey PR: 2146
File: apps/dashboard/app/(app)/apis/[apiId]/settings/default-prefix.tsx:74-75
Timestamp: 2024-10-04T17:27:09.821Z
Learning: In `apps/dashboard/app/(app)/apis/[apiId]/settings/default-prefix.tsx`, the hidden `<input>` elements for `workspaceId` and `keyAuthId` work correctly without being registered with React Hook Form.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsxapps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx
📚 Learning: 2025-07-28T19:42:37.047Z
Learnt from: mcstepp
Repo: unkeyed/unkey PR: 3662
File: apps/dashboard/app/(app)/projects/page.tsx:74-81
Timestamp: 2025-07-28T19:42:37.047Z
Learning: In apps/dashboard/app/(app)/projects/page.tsx, the user mcstepp prefers to keep placeholder functions like generateSlug inline during POC/demonstration phases rather than extracting them to utility modules, with plans to refactor later when the feature matures beyond the proof-of-concept stage.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsxapps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx
📚 Learning: 2025-07-28T20:38:53.244Z
Learnt from: mcstepp
Repo: unkeyed/unkey PR: 3662
File: apps/dashboard/app/(app)/projects/[projectId]/diff/[...compare]/components/client.tsx:322-341
Timestamp: 2025-07-28T20:38:53.244Z
Learning: In apps/dashboard/app/(app)/projects/[projectId]/diff/[...compare]/components/client.tsx, mcstepp prefers to keep hardcoded endpoint logic in the getDiffType function during POC phases for demonstrating diff functionality, rather than implementing a generic diff algorithm. This follows the pattern of keeping simplified implementations for demonstration purposes.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsx
📚 Learning: 2025-08-18T10:28:47.391Z
Learnt from: ogzhanolguncu
Repo: unkeyed/unkey PR: 3797
File: apps/dashboard/app/(app)/projects/[projectId]/deployments/components/control-cloud/index.tsx:1-4
Timestamp: 2025-08-18T10:28:47.391Z
Learning: In Next.js App Router, components that use React hooks don't need their own "use client" directive if they are rendered within a client component that already has the directive. The client boundary propagates to child components.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsxapps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx
📚 Learning: 2025-09-23T17:39:59.820Z
Learnt from: perkinsjr
Repo: unkeyed/unkey PR: 4009
File: apps/dashboard/app/(app)/[workspace]/apis/[apiId]/_overview/components/table/components/override-indicator.tsx:88-97
Timestamp: 2025-09-23T17:39:59.820Z
Learning: The useWorkspaceNavigation hook in the Unkey dashboard guarantees that a workspace exists. If no workspace is found, the hook redirects the user to create a new workspace. Users cannot be logged in without a workspace, and new users must create one to continue. Therefore, workspace will never be null when using this hook.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsxapps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx
📚 Learning: 2025-05-15T16:26:08.666Z
Learnt from: ogzhanolguncu
Repo: unkeyed/unkey PR: 3242
File: apps/dashboard/app/(app)/apis/[apiId]/_overview/components/table/components/override-indicator.tsx:50-65
Timestamp: 2025-05-15T16:26:08.666Z
Learning: In the Unkey dashboard, Next.js router (router.push) should be used for client-side navigation instead of window.location.href to preserve client state and enable smoother transitions between pages.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsx
📚 Learning: 2025-09-22T18:44:56.279Z
Learnt from: perkinsjr
Repo: unkeyed/unkey PR: 4009
File: apps/dashboard/app/(app)/[workspace]/apis/[apiId]/_overview/components/table/components/log-details/index.tsx:4-5
Timestamp: 2025-09-22T18:44:56.279Z
Learning: In the Unkey dashboard, the workspace hook (useWorkspace) provides security validation by checking database access and user authorization to the workspace, with 10-minute caching for performance. Using URL params (useParams) for workspace slug would bypass this security validation and allow unauthorized access attempts. Always use the workspace hook for workspace-scoped navigation and handle loading states properly rather than switching to URL parameters.
Applied to files:
apps/dashboard/app/integrations/vercel/callback/client.tsx
🧬 Code graph analysis (1)
apps/dashboard/app/(app)/[workspaceSlug]/settings/team/client.tsx (1)
internal/ui/src/components/form/select.tsx (6)
Select(171-171)SelectTrigger(174-174)SelectValue(173-173)SelectContent(175-175)SelectGroup(172-172)SelectItem(177-177)
⏰ 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). (1)
- GitHub Check: Test Dashboard / Test Dashboard
…n-used-ui-components
…n-used-ui-components
Graphite Automations"Post a GIF when PR approved" took an action on this PR • (12/05/25)1 gif was posted to this PR based on Andreas Thomas's automation. |
* removed un used components * updated members refs --------- Co-authored-by: James P <[email protected]> Co-authored-by: Andreas Thomas <[email protected]>
* removed un used components * updated members refs --------- Co-authored-by: James P <[email protected]> Co-authored-by: Andreas Thomas <[email protected]>
* feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane * feat: inject env vars into pod spec via Krane * feat: add customer-workload service account for pod isolation * remove gw from k8s manifest, add agent fix ctrl vault for certs * seperate master keys too * add inital webhook stuff * add generated stuff * adjust comments * use otel lgtm stack in k8s too * fix some rabbit comments * fix some rabbit comments * get rid of some unncessary comments * actually add unkey env cmd gitignores... * fix golint issues * Fix/update validation issues status label (#4478) * fix: update API key status label from 'Potential issues' to 'High Error Rate' Changed the validation-issues status label to more clearly communicate that the key is receiving invalid requests, rather than implying the API or key itself is broken. Changes: - Label: 'Potential issues' → 'High Error Rate' - Tooltip: Updated to clarify that requests are invalid (rate limited, unauthorized, etc.) rather than suggesting system issues Fixes #4474 * chore: apply biome formatting * fix: update status label to 'Elevated Rejections' per review --------- Co-authored-by: CodeReaper <[email protected]> * chore: Remove un-used UI components (#4472) * removed un used components * updated members refs --------- Co-authored-by: James P <[email protected]> Co-authored-by: Andreas Thomas <[email protected]> * perf: fix n+1 (#4484) * fix: add 403 error when 0 key verification perms (#4483) * fix: add 403 error when 0 key verification perms * cleanup tests * feat: add environment variables db schema and queries (#4450) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars (#4451) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * feat: add GetPullToken * feat: dashboard UI for environment variables management (#4452) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * feat: decrypt env vars in CTRL workflow before passing to Krane (#4453) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * feat: inject env vars into pod spec via Krane (#4454) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane * feat: inject env vars into pod spec via Krane --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * feat: add customer-workload service account for pod isolation (#4455) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane * feat: inject env vars into pod spec via Krane * feat: add customer-workload service account for pod isolation --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * remove gw from k8s manifest, add agent fix ctrl vault for certs (#4463) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane * feat: inject env vars into pod spec via Krane * feat: add customer-workload service account for pod isolation * remove gw from k8s manifest, add agent fix ctrl vault for certs * seperate master keys too --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * chore: Make Stripe Great Again (#4479) * fix: Make stripe webhooks more robust * chore: Move alert to UI (#4485) * Moved alert to ui and swapped usages * feat: better env var injection (#4468) * feat: add environment variables db schema and queries * fix db query * feat: add SecretsConfig proto for encrypted env vars * [autofix.ci] apply automated fixes * feat: dashboard UI for environment variables management * fix comment and rename file * fix file export name * Remove unnecessary comments from add-env-vars * add toasts for environment variable operations * [autofix.ci] apply automated fixes * fix: add try/catch error handling to env var mutations * unfmt file * [autofix.ci] apply automated fixes * feat: decrypt env vars in CTRL workflow before passing to Krane * feat: inject env vars into pod spec via Krane * feat: add customer-workload service account for pod isolation * remove gw from k8s manifest, add agent fix ctrl vault for certs * seperate master keys too * add inital webhook stuff * add generated stuff * adjust comments * use otel lgtm stack in k8s too * fix some rabbit comments * fix some rabbit comments * get rid of some unncessary comments * actually add unkey env cmd gitignores... * fix golint issues (#4477) * [autofix.ci] apply automated fixes * fix fmt * linter be happy --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andreas Thomas <[email protected]> * make token pod owned * feat: add lets encrypt challenges (#4471) * feat: add lets encrypt challenges * always disable cname following * cleanup some code * cleanup some code * cleanup some code * cleanup some code * cleanup some code * fix golint issues * fix golint issues * fmt * remove old webhook code * remove old webhook code * make build id not optiona * cleanup * cleanup * fmt * fmt --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: abhay <[email protected]> Co-authored-by: CodeReaper <[email protected]> Co-authored-by: James P <[email protected]> Co-authored-by: Andreas Thomas <[email protected]>

What does this PR do?
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps us understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtmake fmton/godirectoryconsole.logsgit pull origin mainAppreciated