Conversation
📝 WalkthroughWalkthroughAdds a “Recommend Hyprnote” button for non-user contacts with email in contact-view, logging analytics and opening a mailto link; adds a static “What you get with Pro” panel to FreeSectionCheckout in billing. No public APIs changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant CV as ContactView
participant A as analyticsCommands
participant O as openUrl (tauri)
participant M as Mail Client
rect rgba(200,230,255,0.25)
note over CV: Button rendered when<br/>is_user == false && email exists
U->>CV: Click "Recommend Hyprnote" button
CV->>A: recommend_button_clicked(distinct_id = userId)
A-->>CV: ack
CV->>CV: Build mailto: link (encode subject/body)
CV->>O: openUrl(mailto:...)
O-->>M: Launch default mail client with pre-filled compose
M-->>U: Compose window shown
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
apps/desktop/src/components/settings/views/billing.tsx (1)
71-93: Nice UX touch; consider data-driving the Pro features list.Rendering these bullets from a small constant reduces repetition and makes later edits/localization safer.
Apply this diff within the list, and add the constant shown below:
- <ul className="space-y-2 text-sm text-muted-foreground"> - <li className="flex items-center"> - <div className="w-1.5 h-1.5 rounded-full bg-primary mr-2.5"></div> - Exclusive STT models - </li> - <li className="flex items-center"> - <div className="w-1.5 h-1.5 rounded-full bg-primary mr-2.5"></div> - Unlimited Templates & AI Chat - </li> - <li className="flex items-center"> - <div className="w-1.5 h-1.5 rounded-full bg-primary mr-2.5"></div> - HyprCloud (managed LLM endpoint) - </li> - <li className="flex items-center"> - <div className="w-1.5 h-1.5 rounded-full bg-primary mr-2.5"></div> - Priority support through dedicated Discord channel - </li> - </ul> + <ul className="space-y-2 text-sm text-muted-foreground"> + {proFeatures.map((text) => ( + <li key={text} className="flex items-center"> + <div className="w-1.5 h-1.5 rounded-full bg-primary mr-2.5"></div> + {text} + </li> + ))} + </ul>Place this just above the return in FreeSectionCheckout():
// Above the return in FreeSectionCheckout() const proFeatures = [ "Exclusive STT models", "Unlimited Templates & AI Chat", "HyprCloud (managed LLM endpoint)", "Priority support through dedicated Discord channel", ] as const;apps/desktop/src/components/finder/views/contact-view.tsx (2)
406-408: Prevent “undefined” in the button label when full_name is missing.Fallback avoids an awkward label in edge cases where the contact has no name.
Apply this diff:
- Recommend Hyprnote to {selectedPersonData.full_name} + Recommend Hyprnote to {selectedPersonData.full_name || "them"}
377-409: Optional: extract the “recommend” action into a small helper to reuse.If this button appears elsewhere (or will), centralizing the mailto composition reduces duplication and copy drift.
You could add:
// utilities/recommend.ts (or colocate above component) export function buildHyprnoteRecommendationMailto(email: string, name?: string) { const subject = encodeURIComponent("I'd like to recommend Hyprnote to you"); const body = encodeURIComponent(`Hi ${name || "there"}, I wanted to share Hyprnote with you - it's an AI notetaker for private meetings. Hyprnote is super cool because you can transcribe your meetings and summarize them with AI, fully locally (even works offline). It's great to use if your company policy doesn't allow cloud-based AI notetakers like Granola or Otter. You can check it out at: https://www.hyprnote.com Let me know what you think! Best regards`); return `mailto:${email}?subject=${subject}&body=${body}`; }And then here:
- const subject = encodeURIComponent("I'd like to recommend Hyprnote to you"); - const body = encodeURIComponent(`Hi ${selectedPersonData.full_name || "there"}, - ... - const mailtoUrl = - `mailto:${selectedPersonData.email}?subject=${subject}&body=${body}`; - openUrl(mailtoUrl); + openUrl( + buildHyprnoteRecommendationMailto( + selectedPersonData.email, + selectedPersonData.full_name || undefined, + ) + );
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/desktop/src/components/finder/views/contact-view.tsx(3 hunks)apps/desktop/src/components/settings/views/billing.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit Configuration File
**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".
Files:
apps/desktop/src/components/settings/views/billing.tsxapps/desktop/src/components/finder/views/contact-view.tsx
⏰ 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). (3)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: ci (windows, windows-latest)
- GitHub Check: ci (macos, macos-latest)
🔇 Additional comments (2)
apps/desktop/src/components/finder/views/contact-view.tsx (2)
3-3: Imports look correct and are all used.UserPlus, analyticsCommands, and openUrl are referenced below; complies with the “no unused imports” guideline.
Also applies to: 6-6, 16-16
380-384: Verify that the analyticsevent()call accepts apropertiesbag before mergingPlease confirm that
analyticsCommands.event()in@hypr/plugin-analyticssupports an optionalpropertiesfield. If it does, addingtarget_person_idwill provide non-PII attribution for funnel analysis. If not, you’ll need to update the plugin types or wrap the call accordingly.• File:
apps/desktop/src/components/finder/views/contact-view.tsx(lines 380–384)
• EnsureselectedPersonData.idis available in this scope.Suggested diff:
- analyticsCommands.event({ - event: "recommend_button_clicked", - distinct_id: userId, - }); + analyticsCommands.event({ + event: "recommend_button_clicked", + distinct_id: userId, + properties: { + target_person_id: selectedPersonData.id, + }, + });
Summary by cubic
Add a “Recommend Hyprnote” button in Contact View to share via prefilled email and track clicks. Update Billing with a concise Pro benefits panel.