feat(ui): add beta badge to automations sidebar and view header#1673
feat(ui): add beta badge to automations sidebar and view header#1673arnestrickmann merged 3 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded "Beta" badge UI elements for the Automations feature in two renderer components and annotated the docs navigation tree and Automations docs page to display the same badge; no exported signatures or runtime control flow changes were introduced. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/components/sidebar/LeftSidebar.tsx (1)
427-429: LGTM! Beta badge implementation is clean.The badge styling is consistent and includes proper dark mode support. The implementation aligns well with the PR objectives.
Optional: Consider extracting the badge to a reusable component.
The exact same badge styling appears in both
LeftSidebar.tsxandAutomationsView.tsx. If this pattern will be used elsewhere or needs future updates, consider extracting it to a sharedBetaBadgecomponent.♻️ Optional refactor to create a reusable badge component
Create a new file
src/renderer/components/ui/BetaBadge.tsx:import React from 'react'; export const BetaBadge: React.FC = () => { return ( <span className="rounded bg-zinc-500/15 px-1.5 py-0.5 text-[9px] font-medium uppercase leading-none tracking-wide text-zinc-600 dark:bg-zinc-400/15 dark:text-zinc-400"> Beta </span> ); };Then update this file:
+import { BetaBadge } from '../ui/BetaBadge'; + ... <Timer className="h-5 w-5 text-muted-foreground sm:h-4 sm:w-4" /> <span className="text-sm font-medium">Automations</span> - <span className="rounded bg-zinc-500/15 px-1.5 py-0.5 text-[9px] font-medium uppercase leading-none tracking-wide text-zinc-600 dark:bg-zinc-400/15 dark:text-zinc-400"> - Beta - </span> + <BetaBadge /> </Button>And similarly update
AutomationsView.tsx.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/components/sidebar/LeftSidebar.tsx` around lines 427 - 429, Extract the repeated span markup into a reusable BetaBadge component: create a new component named BetaBadge (e.g., export const BetaBadge) that returns the existing span markup, place it under src/renderer/components/ui/BetaBadge.tsx, then replace the inline span in LeftSidebar.tsx and AutomationsView.tsx with a JSX <BetaBadge /> and add the corresponding import for BetaBadge in both files; ensure the component preserves the className and text content and is exported as a named export so it can be reused elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/renderer/components/sidebar/LeftSidebar.tsx`:
- Around line 427-429: Extract the repeated span markup into a reusable
BetaBadge component: create a new component named BetaBadge (e.g., export const
BetaBadge) that returns the existing span markup, place it under
src/renderer/components/ui/BetaBadge.tsx, then replace the inline span in
LeftSidebar.tsx and AutomationsView.tsx with a JSX <BetaBadge /> and add the
corresponding import for BetaBadge in both files; ensure the component preserves
the className and text content and is exported as a named export so it can be
reused elsewhere.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0e2b2894-2324-4130-9127-df84c69efdc4
📒 Files selected for processing (2)
src/renderer/components/automations/AutomationsView.tsxsrc/renderer/components/sidebar/LeftSidebar.tsx
Summary
AutomationsViewpage headerTest plan
Summary by CodeRabbit