Skip to content

changed to system instructions#1296

Merged
duckduckhero merged 1 commit intomainfrom
template-upgrade-0805
Aug 6, 2025
Merged

changed to system instructions#1296
duckduckhero merged 1 commit intomainfrom
template-upgrade-0805

Conversation

@duckduckhero
Copy link
Contributor

@duckduckhero duckduckhero commented Aug 6, 2025

Summary by cubic

Renamed "Description" fields to "System Instruction" in the template editor and updated all default template instructions for clarity and specificity. Custom system instructions are now passed to the enhance system prompt and prioritized during note enhancement.

  • New Features

    • Custom system instructions from templates are injected into the enhance system prompt and treated as the top rule.
  • Refactors

    • Updated all default template instructions to be more detailed and actionable.
    • Changed UI labels and placeholders from "Description" to "System Instruction" in English and Korean.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

📝 Walkthrough

Walkthrough

The changes update the enhance system template rendering by introducing a new customInstruction property derived from the selected template's description. Associated UI labels and placeholders are changed from "Description" to "System Instruction" in both English and Korean, and default template descriptions are expanded for clarity. The enhance system template now conditionally incorporates the custom instruction as a primary guideline.

Changes

Cohort / File(s) Change Summary
Enhance Mutation & Template Rendering
apps/desktop/src/components/editor-area/index.tsx
Adds customInstruction from selected template's description to the enhance system template rendering context when shouldUseH1Headers is false.
Settings UI Text Update
apps/desktop/src/components/settings/views/template.tsx
Updates label and placeholder from "Description" to "System Instruction" for the template description textarea.
English Localization
apps/desktop/src/locales/en/messages.po
Marks "Add a description..." and "Description" as obsolete; adds "Add a system instruction..." and "System Instruction" for updated UI text.
Korean Localization
apps/desktop/src/locales/ko/messages.po
Marks "Add a description..." and "Description" as obsolete; adds "Add a system instruction..." and "System Instruction" (untranslated) for updated UI text.
Default Template Descriptions
apps/desktop/src/utils/default-templates.ts
Expands and clarifies the description fields for all default templates, providing more detailed and explicit instructions.
Enhance System Template Asset
crates/template/assets/enhance.system.jinja
Adds a conditional block to insert the custom instruction as the most important rule in the enhance system template, superseding other rules if conflicts arise.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI (Settings)
    participant EditorArea
    participant TemplateRenderer
    participant SystemTemplate (Jinja)

    User->>UI (Settings): Enters system instruction for template
    UI (Settings)->>EditorArea: Passes selected template with system instruction
    EditorArea->>TemplateRenderer: Calls render with customInstruction from template description
    TemplateRenderer->>SystemTemplate (Jinja): Renders enhance.system with customInstruction
    SystemTemplate (Jinja)-->>TemplateRenderer: Outputs enhanced note with custom instruction as key guideline
    TemplateRenderer-->>EditorArea: Returns rendered content
    EditorArea-->>User: Displays enhanced note
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Post Meeting Template Editor & Selector  #1050: Modifies the same enhance mutation function to pass a detailed template info string and generate custom grammar, similar in extending the rendering context with template-based data.
  • Added AI Creativity Selection to Settings  #1183: Updates the enhance mutation to optionally use extracted H1 headers and update grammar metadata, related by modifying the same function but focusing on different context data.
  • Preserve error notes #1259: Improves error handling in the enhance mutation function, related by modifying the same hook but addressing error management rather than rendering context.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch template-upgrade-0805

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

No issues found across 6 files. Review in cubic

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

🧹 Nitpick comments (2)
apps/desktop/src/locales/ko/messages.po (2)

332-337: Korean translations missing for system instruction terminology.

The localization correctly marks the old "Add a description..." entry as obsolete and introduces the new "Add a system instruction..." entry, but the Korean translation (msgstr) remains empty.

Consider providing Korean translations for these new system instruction terms:

 #: src/components/settings/views/template.tsx:233
 msgid "Add a system instruction..."
-msgstr ""
+msgstr "시스템 지침을 추가하세요..."

429-431: Korean translation needed for "System Instruction" label.

The localization properly transitions from the obsolete "Description" entry to the new "System Instruction" entry, but lacks the Korean translation.

Add Korean translation for the system instruction label:

 #: src/components/settings/views/template.tsx:227
 msgid "System Instruction"
-msgstr ""
+msgstr "시스템 지침"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f655a3e and 9e2d724.

📒 Files selected for processing (6)
  • apps/desktop/src/components/editor-area/index.tsx (2 hunks)
  • apps/desktop/src/components/settings/views/template.tsx (1 hunks)
  • apps/desktop/src/locales/en/messages.po (3 hunks)
  • apps/desktop/src/locales/ko/messages.po (3 hunks)
  • apps/desktop/src/utils/default-templates.ts (13 hunks)
  • crates/template/assets/enhance.system.jinja (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/utils/default-templates.ts
  • apps/desktop/src/components/settings/views/template.tsx
  • apps/desktop/src/components/editor-area/index.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 (macos, macos-latest)
  • GitHub Check: ci (windows, windows-latest)
🔇 Additional comments (7)
apps/desktop/src/utils/default-templates.ts (1)

8-198: Excellent expansion of template descriptions into actionable system instructions.

The transformation of brief template descriptions into comprehensive, specific system instructions significantly improves their utility. Each description now provides clear, actionable guidance using imperative language that will effectively guide the AI enhancement process.

Key improvements:

  • Specific elements to capture are enumerated
  • Instructions use actionable verbs (capture, document, record, identify, etc.)
  • Consistent structure across all templates
  • Focus on concrete deliverables rather than generic descriptions
apps/desktop/src/components/settings/views/template.tsx (1)

227-233: LGTM! UI terminology updated to reflect functional changes.

The label and placeholder text changes from "Description" to "System Instruction" properly align with the broader architectural change where template descriptions now serve as system instructions for AI enhancement.

crates/template/assets/enhance.system.jinja (1)

87-90: LGTM! Proper integration of custom instructions with appropriate priority.

The conditional block correctly incorporates the customInstruction as the highest priority rule in the enhancement guidelines. The explicit priority language ensures that user-defined system instructions override other rules when conflicts arise, which is the intended behavior.

apps/desktop/src/components/editor-area/index.tsx (2)

371-371: LGTM! Clean extraction of custom instruction from template description.

The assignment properly extracts the template description to serve as a custom instruction for the enhancement process.


381-381: LGTM! Proper integration of custom instruction into template rendering context.

The customInstruction is correctly added to the rendering context when not using H1 headers, ensuring that the template's description is passed as a system instruction to guide the AI enhancement process.

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

332-337: LGTM! Localization properly updated to support terminology changes.

The obsolete entries are correctly marked and new localization strings added to support the shift from "Description" to "System Instruction" terminology throughout the UI.


429-431: LGTM! New localization entry for "System Instruction" added.

The new localization string properly supports the updated UI terminology.

@duckduckhero duckduckhero merged commit 3d0ddd6 into main Aug 6, 2025
8 checks passed
This was referenced Aug 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 4, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 3, 2025
@ComputelessComputer ComputelessComputer deleted the template-upgrade-0805 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