Skip to content

Project loop#1376

Merged
duckduckhero merged 4 commits intomainfrom
project-loop
Aug 20, 2025
Merged

Project loop#1376
duckduckhero merged 4 commits intomainfrom
project-loop

Conversation

@duckduckhero
Copy link
Contributor

@duckduckhero duckduckhero commented Aug 20, 2025

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.

  • New Features
    • Contact View: Show “Recommend Hyprnote” for non-user contacts with an email; opens a prefilled mailto and fires analytics event recommend_button_clicked (distinct_id=userId).
    • Billing: Add “What you get with Pro” panel listing benefits (Exclusive STT models, Unlimited Templates & AI Chat, HyprCloud, Priority support).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Contact View: Recommend button + analytics
apps/desktop/src/components/finder/views/contact-view.tsx
Imports UserPlus icon, analyticsCommands and openUrl. Renders a “Recommend Hyprnote to …” button (shown when selectedPersonData.is_user is false and selectedPersonData.email exists) in two UI sections. On click: logs recommend_button_clicked with distinct_id = userId, builds URI-encoded mailto: subject/body including recipient name when available, and calls openUrl(mailtoUrl).
Billing: Pro info panel
apps/desktop/src/components/settings/views/billing.tsx
Adds a static “What you get with Pro” panel to FreeSectionCheckout listing four Pro features. No state, logic, or control-flow 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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • changed link #1242 — Also modifies FreeSectionCheckout in apps/desktop/src/components/settings/views/billing.tsx (adds/updates UI in the same component).

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 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 04feb04 and f0019ea.

📒 Files selected for processing (1)
  • apps/desktop/src/components/finder/views/contact-view.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/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). (2)
  • GitHub Check: ci (macos, macos-latest)
  • GitHub Check: ci (windows, windows-latest)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch project-loop

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

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: 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 9037179 and 04feb04.

📒 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.tsx
  • apps/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 analytics event() call accepts a properties bag before merging

Please confirm that analyticsCommands.event() in @hypr/plugin-analytics supports an optional properties field. If it does, adding target_person_id will 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)
• Ensure selectedPersonData.id is 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,
+   },
+ });

@duckduckhero duckduckhero merged commit 79e921c into main Aug 20, 2025
6 of 7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 27, 2025
@ComputelessComputer ComputelessComputer deleted the project-loop branch December 14, 2025 15:21
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.

1 participant

Comments