Skip to content

Comments

Minor fixes 0808#1305

Merged
duckduckhero merged 2 commits intomainfrom
minor-fixes-0808
Aug 8, 2025
Merged

Minor fixes 0808#1305
duckduckhero merged 2 commits intomainfrom
minor-fixes-0808

Conversation

@duckduckhero
Copy link
Contributor

@duckduckhero duckduckhero commented Aug 8, 2025

  • added gpt-5 option
  • added info link to template & autonomy selector

Summary by cubic

Added GPT-5 model option and info links for the template and autonomy selectors in settings. Updated free user chat limits and improved schema field ordering.

  • Improvements
    • Added "gpt-5-chat-latest" to model selection.
    • Added info buttons linking to docs for template and autonomy selectors.
    • Changed free user chat limit messaging to match new limits.
    • Reordered fields in schema definitions for consistency.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

📝 Walkthrough

Walkthrough

This update reduces the free message limit for unlicensed users in chat, adds a new OpenAI model option, introduces informational tooltips with external documentation links in the AI and templates settings views, updates translation files with new entries and reference lines, and reorders properties in the model configuration JSON schema for consistency.

Changes

Cohort / File(s) Change Summary
Free Message Limit Logic
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts
Reduced the free message limit for users without a license from 14 to 6, and updated the user-facing message to indicate "3 messages allowed per conversation for free users." No changes to exported entity signatures.
OpenAI Model List Update
apps/desktop/src/components/settings/components/ai/llm-custom-view.tsx
Added "gpt-5-chat-latest" to the openaiModels array, expanding the selectable OpenAI models in the UI. No changes to exports or logic.
AI Settings Tooltip
apps/desktop/src/components/settings/views/ai.tsx
Added an informational tooltip with a clickable icon next to the "Autonomy Selector" label, linking to external documentation. No changes to logic or exports.
Templates Settings Tooltip
apps/desktop/src/components/settings/views/templates.tsx
Added an informational tooltip button next to "Your Templates" header, linking to templates documentation. No changes to logic or exports.
English Translations Update
apps/desktop/src/locales/en/messages.po
Updated source code reference line numbers and added two new translation entries for the tooltips. No changes to message content.
Korean Translations Update
apps/desktop/src/locales/ko/messages.po
Updated source code reference line numbers and added two new untranslated message IDs for the tooltips. No changes to message content.
ModelConfig JSON Schema Reordering
owhisper/schema.json
Reordered properties within each model variant to place "type" first for consistency. No changes to required fields or types.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SettingsUI
    participant Shell
    participant DocsSite

    User->>SettingsUI: Hover/click tooltip icon (AI or Templates)
    SettingsUI->>Shell: Open external documentation URL
    Shell->>DocsSite: Launch browser with docs link
    DocsSite-->>User: Display documentation page
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • fastrepl/hyprnote#1287: Also modifies useChatLogic.ts, focusing on analytics and multi-keyword search tool, related by file but not overlapping logic.
  • fastrepl/hyprnote#1265: Modifies the same free message limit logic in useChatLogic.ts, previously increasing the limit and extending function signatures; closely related by code area.

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch minor-fixes-0808

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. Examples:
    • @coderabbitai explain this code block.
  • 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 src/utils.ts and explain its main purpose.
    • @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 comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

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

cubic analysis

1 issue found across 7 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

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

🔭 Outside diff range comments (1)
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)

244-256: Free limit gating mismatches the user-facing copy; gate by user turns (3) instead of total messages (6).

messages.length counts both user and assistant messages. If the intent is “3 user messages,” gate by user messages to avoid confusion and magic numbers.

Apply:

-    if (messages.length >= 6 && !getLicense.data?.valid) {
+    if (messages.filter(m => m.isUser).length >= 3 && !getLicense.data?.valid) {
       if (userId) {
         await analyticsCommands.event({
           event: "pro_license_required_chat",
           distinct_id: userId,
         });
       }
-      await message("3 messages are allowed per conversation for free users.", {
+      await message("3 messages are allowed per conversation for free users.", {
         title: "Pro License Required",
         kind: "info",
       });
       return;
     }

Optional: hoist 3 to a named constant (e.g., FREE_USER_TURN_LIMIT) to avoid drift between logic and text.

🧹 Nitpick comments (2)
apps/desktop/src/components/settings/views/ai.tsx (1)

831-850: Add an accessible label to the info icon button.

Icon-only buttons should have an aria-label (and optionally title) for screen readers.

-                                <Button
+                                <Button
                                   size="icon"
                                   variant="ghost"
                                   onClick={() => open("https://docs.hyprnote.com/features/ai-autonomy")}
                                   className="h-8 w-8"
+                                  aria-label="Learn more about AI autonomy"
+                                  title="Learn more about AI autonomy"
                                 >
                                   <InfoIcon className="w-4 h-4" />
                                 </Button>

Optional: track clicks with analytics (e.g., autonomy_doc_opened) to measure feature discovery.

apps/desktop/src/locales/ko/messages.po (1)

468-472: Fill key template-related ko translations for a coherent Settings experience.

These strings are now prominent in Templates settings. Suggested translations:

 #: src/components/settings/views/templates.tsx:319
 #: src/components/settings/components/templates-sidebar.tsx:68
 msgid "Built-in Templates"
-msgstr ""
+msgstr "내장 템플릿"

 #: src/components/settings/views/templates.tsx:309
 msgid "Create your first template to get started"
-msgstr ""
+msgstr "시작하려면 첫 번째 템플릿을 만들어 보세요"

 #: src/components/settings/views/templates.tsx:240
 msgid "Loading templates..."
-msgstr ""
+msgstr "템플릿 불러오는 중..."

 #: src/components/settings/views/templates.tsx:306
 msgid "No templates yet"
-msgstr ""
+msgstr "아직 템플릿이 없습니다"

 #: src/components/settings/views/templates.tsx:255
 #: src/components/settings/components/templates-sidebar.tsx:45
 msgid "Your Templates"
-msgstr ""
+msgstr "내 템플릿"

Also applies to: 647-650, 979-982, 1108-1111, 1622-1666

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66cdb2b and 7a91eb0.

📒 Files selected for processing (7)
  • apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1 hunks)
  • apps/desktop/src/components/settings/components/ai/llm-custom-view.tsx (1 hunks)
  • apps/desktop/src/components/settings/views/ai.tsx (4 hunks)
  • apps/desktop/src/components/settings/views/templates.tsx (3 hunks)
  • apps/desktop/src/locales/en/messages.po (24 hunks)
  • apps/desktop/src/locales/ko/messages.po (24 hunks)
  • owhisper/schema.json (4 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/right-panel/hooks/useChatLogic.ts
  • apps/desktop/src/components/settings/views/ai.tsx
  • apps/desktop/src/components/settings/components/ai/llm-custom-view.tsx
  • apps/desktop/src/components/settings/views/templates.tsx
🔇 Additional comments (6)
owhisper/schema.json (1)

50-55: Consistent property ordering across model variants looks good.

Moving "type" first improves readability and UI generation consistency without changing validation semantics. No issues spotted.

Also applies to: 62-67, 77-85, 108-119, 131-145

apps/desktop/src/components/settings/views/ai.tsx (1)

5-7: Imports for tooltip and shell open are correctly added and used.

Also applies to: 19-19, 29-29

apps/desktop/src/components/settings/views/templates.tsx (1)

4-6: New tooltip/link imports are used and look correct.

Also applies to: 15-16

apps/desktop/src/locales/ko/messages.po (1)

259-262: Approve and resolve: localization wiring is correct
All newly added messages—“Learn more about AI autonomy,” “Learn more about templates,” “Autonomy Selector,” and “Control how autonomous the AI enhancement should be”—are present in the React components, the English catalog (with matching msgstr), and the Korean catalog (with empty msgstr entries ready for translation). No mismatches or missing entries detected.

apps/desktop/src/locales/en/messages.po (2)

935-938: LGTM: new tooltip strings added with translations.

“Learn more about AI autonomy” and “Learn more about templates” are present and correctly translated for EN.

Also applies to: 943-946


443-446: Locale Parity Verified for AI Autonomy & Template Strings

All four new msgids are present in both English and Korean locales with matching entries:

  • “Learn more about AI autonomy” at line 936
  • “Learn more about templates” at line 944
  • “Autonomy Selector” at line 444
  • “Control how autonomous the AI enhancement should be” at line 619

No discrepancies found—approving these changes.

Comment on lines +254 to +271
<div className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
<Trans>Your Templates</Trans>
</div>
<Tooltip>
<TooltipTrigger asChild>
<Button
size="icon"
variant="ghost"
onClick={() => open("https://docs.hyprnote.com/features/templates.mdx")}
className="h-8 w-8"
>
<InfoIcon className="w-4 h-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
<Trans>Learn more about templates</Trans>
</TooltipContent>
</Tooltip>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Use an accessible label and verify the docs URL (avoid .mdx if the site doesn’t serve extensions).

  • Add aria-label/title for accessibility.
  • The link ends with .mdx; many docs sites don’t serve that path publicly. Prefer the route without extension if available.
-                  <Button
+                  <Button
                     size="icon"
                     variant="ghost"
-                    onClick={() => open("https://docs.hyprnote.com/features/templates.mdx")}
+                    onClick={() => open("https://docs.hyprnote.com/features/templates")}
                     className="h-8 w-8"
+                    aria-label="Learn more about templates"
+                    title="Learn more about templates"
                   >
                     <InfoIcon className="w-4 h-4" />
                   </Button>

Check which URL returns 200/301:


🏁 Script executed:

#!/bin/bash
set -e
for url in \
  "https://docs.hyprnote.com/features/templates.mdx" \
  "https://docs.hyprnote.com/features/templates"
do
  echo "Testing: $url"
  curl -sI "$url" | sed -n '1,3p'
  echo
done

Length of output: 776


Add an accessible label to the Info button and use the extension-less docs URL

The .mdx URL does work (HTTP 200), and the extension-less route returns a 307 redirect, so you can safely link to:

https://docs.hyprnote.com/features/templates

This masks the file extension and still resolves correctly. Also, for screen-reader users, add both an aria-label and a title to the icon button.

• File: apps/desktop/src/components/settings/views/templates.tsx
Lines: ~259 (the <Button size="icon"…> block)

                   <Button
                     size="icon"
                     variant="ghost"
-                    onClick={() => open("https://docs.hyprnote.com/features/templates.mdx")}
+                    onClick={() => open("https://docs.hyprnote.com/features/templates")}
                     className="h-8 w-8"
+                    aria-label="Learn more about templates"
+                    title="Learn more about templates"
                   >
                     <InfoIcon className="w-4 h-4" />
                   </Button>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
<Trans>Your Templates</Trans>
</div>
<Tooltip>
<TooltipTrigger asChild>
<Button
size="icon"
variant="ghost"
onClick={() => open("https://docs.hyprnote.com/features/templates.mdx")}
className="h-8 w-8"
>
<InfoIcon className="w-4 h-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
<Trans>Learn more about templates</Trans>
</TooltipContent>
</Tooltip>
<div className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
<Trans>Your Templates</Trans>
</div>
<Tooltip>
<TooltipTrigger asChild>
<Button
size="icon"
variant="ghost"
onClick={() => open("https://docs.hyprnote.com/features/templates")}
className="h-8 w-8"
aria-label="Learn more about templates"
title="Learn more about templates"
>
<InfoIcon className="w-4 h-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
<Trans>Learn more about templates</Trans>
</TooltipContent>
</Tooltip>
🤖 Prompt for AI Agents
In apps/desktop/src/components/settings/views/templates.tsx around line 259,
update the Button component's onClick URL to
"https://docs.hyprnote.com/features/templates" without the .mdx extension to use
the cleaner route. Also, add an accessible label by including both an aria-label
and a title attribute on the Button to improve screen reader accessibility,
describing the button's purpose such as "Learn more about templates".

@duckduckhero duckduckhero merged commit bc96105 into main Aug 8, 2025
8 checks passed
@yujonglee yujonglee deleted the minor-fixes-0808 branch August 9, 2025 17:12
@coderabbitai coderabbitai bot mentioned this pull request Aug 27, 2025
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