diff --git a/apps/desktop/src/components/editor-area/floating-button.tsx b/apps/desktop/src/components/editor-area/floating-button.tsx
index f59c63e7ca..2cb1a0b081 100644
--- a/apps/desktop/src/components/editor-area/floating-button.tsx
+++ b/apps/desktop/src/components/editor-area/floating-button.tsx
@@ -280,7 +280,7 @@ export function FloatingButton({
onClick={() => handleTemplateSelect("auto")}
>
⚡
- Hyprnote Default
+ No Template (Default)
{/* Show separator and custom templates only if custom templates exist */}
diff --git a/apps/desktop/src/components/editor-area/note-header/listen-button.tsx b/apps/desktop/src/components/editor-area/note-header/listen-button.tsx
index 41bf303c84..f5caa018d8 100644
--- a/apps/desktop/src/components/editor-area/note-header/listen-button.tsx
+++ b/apps/desktop/src/components/editor-area/note-header/listen-button.tsx
@@ -336,15 +336,20 @@ function RecordingControls({
-
+
No Template (Default)
- {templatesQuery.data?.map((template) => (
-
- {template.title || "Untitled"}
-
- ))}
+ {templatesQuery.data?.map((template) => {
+ const title = template.title || "Untitled";
+ const truncatedTitle = title.length > 20 ? title.substring(0, 20) + "..." : title;
+
+ return (
+
+ {truncatedTitle}
+
+ );
+ })}
diff --git a/apps/desktop/src/locales/en/messages.po b/apps/desktop/src/locales/en/messages.po
index 9ef9136627..b655d6320c 100644
--- a/apps/desktop/src/locales/en/messages.po
+++ b/apps/desktop/src/locales/en/messages.po
@@ -893,7 +893,7 @@ msgstr "Optional for participant suggestions"
msgid "Owner"
msgstr "Owner"
-#: src/components/editor-area/note-header/listen-button.tsx:359
+#: src/components/editor-area/note-header/listen-button.tsx:364
msgid "Pause"
msgstr "Pause"
@@ -1051,7 +1051,7 @@ msgstr "Start Monthly Plan"
msgid "Start recording"
msgstr "Start recording"
-#: src/components/editor-area/note-header/listen-button.tsx:367
+#: src/components/editor-area/note-header/listen-button.tsx:372
msgid "Stop"
msgstr "Stop"
diff --git a/apps/desktop/src/locales/ko/messages.po b/apps/desktop/src/locales/ko/messages.po
index 1a6511d356..98f26ead3d 100644
--- a/apps/desktop/src/locales/ko/messages.po
+++ b/apps/desktop/src/locales/ko/messages.po
@@ -893,7 +893,7 @@ msgstr ""
msgid "Owner"
msgstr ""
-#: src/components/editor-area/note-header/listen-button.tsx:359
+#: src/components/editor-area/note-header/listen-button.tsx:364
msgid "Pause"
msgstr ""
@@ -1051,7 +1051,7 @@ msgstr ""
msgid "Start recording"
msgstr ""
-#: src/components/editor-area/note-header/listen-button.tsx:367
+#: src/components/editor-area/note-header/listen-button.tsx:372
msgid "Stop"
msgstr ""
diff --git a/crates/db-user/src/lib.rs b/crates/db-user/src/lib.rs
index 6c94515adf..75922bd087 100644
--- a/crates/db-user/src/lib.rs
+++ b/crates/db-user/src/lib.rs
@@ -129,7 +129,7 @@ impl std::ops::Deref for UserDatabase {
}
// Append only. Do not reorder.
-const MIGRATIONS: [&str; 18] = [
+const MIGRATIONS: [&str; 19] = [
include_str!("./calendars_migration.sql"),
include_str!("./configs_migration.sql"),
include_str!("./events_migration.sql"),
@@ -148,6 +148,7 @@ const MIGRATIONS: [&str; 18] = [
include_str!("./sessions_migration_2.sql"),
include_str!("./sessions_migration_3.sql"),
include_str!("./sessions_migration_4.sql"),
+ include_str!("./templates_migration_1.sql"),
];
pub async fn migrate(db: &UserDatabase) -> Result<(), crate::Error> {
diff --git a/crates/db-user/src/templates_migration.sql b/crates/db-user/src/templates_migration.sql
index bd101fde46..000a703d7c 100644
--- a/crates/db-user/src/templates_migration.sql
+++ b/crates/db-user/src/templates_migration.sql
@@ -4,6 +4,5 @@ CREATE TABLE IF NOT EXISTS templates (
title TEXT NOT NULL,
description TEXT NOT NULL,
sections TEXT NOT NULL,
- tags TEXT NOT NULL,
- FOREIGN KEY (user_id) REFERENCES humans(id)
+ tags TEXT NOT NULL
);
diff --git a/crates/db-user/src/templates_migration_1.sql b/crates/db-user/src/templates_migration_1.sql
new file mode 100644
index 0000000000..e11a5f0d78
--- /dev/null
+++ b/crates/db-user/src/templates_migration_1.sql
@@ -0,0 +1,197 @@
+-- templates_migration_1.sql
+-- Insert default templates
+INSERT
+ OR IGNORE INTO templates (id, user_id, title, description, sections, tags)
+VALUES
+ (
+ 'default-meeting-notes',
+ 'placeholder',
+ '📝 General Meeting',
+ 'Comprehensive template for meeting notes with agenda, discussion points, and action items',
+ '[
+ {"title": "Meeting Details", "description": "Date, time, attendees, and meeting purpose"},
+ {"title": "Agenda", "description": "Topics to be discussed and objectives"},
+ {"title": "Discussion Points", "description": "Key points, decisions, and insights from the meeting"},
+ {"title": "Action Items", "description": "Tasks assigned with owners and deadlines"},
+ {"title": "Next Steps", "description": "Follow-up actions and next meeting details"}
+ ]',
+ '["general", "meeting", "agenda", "action-items", "builtin"]'
+ ),
+ (
+ 'default-standup',
+ 'placeholder',
+ '🌞 Daily Standup',
+ 'Template for daily standup meetings with progress updates and blockers',
+ '[
+ {"title": "Yesterday", "description": "What was accomplished yesterday"},
+ {"title": "Today", "description": "What will be worked on today"},
+ {"title": "Blockers", "description": "Any impediments or issues that need attention"},
+ {"title": "Goals", "description": "Key objectives for the day/sprint"},
+ {"title": "Notes", "description": "Additional updates or important information"}
+ ]',
+ '["general","standup", "daily", "progress", "blockers", "builtin"]'
+ ),
+ (
+ 'default-weekly-review',
+ 'placeholder',
+ '📅 Weekly Review',
+ 'Template for weekly reflection and planning',
+ '[
+ {"title": "Achievements", "description": "What was accomplished this week"},
+ {"title": "Challenges", "description": "Obstacles faced and how they were handled"},
+ {"title": "Lessons Learned", "description": "Key insights and takeaways"},
+ {"title": "Next Week Goals", "description": "Priorities and objectives for next week"},
+ {"title": "Improvements", "description": "Areas for personal or process improvement"}
+ ]',
+ '["general","weekly", "review", "reflection", "planning", "builtin"]'
+ ),
+ (
+ 'default-one-on-one',
+ 'placeholder',
+ '👥 1-on-1 Meeting',
+ 'Template for one-on-one meetings with team members',
+ '[
+ {"title": "Check-in", "description": "How are things going overall?"},
+ {"title": "Recent Work", "description": "Updates on current projects and tasks"},
+ {"title": "Challenges", "description": "Any blockers or difficulties"},
+ {"title": "Career Development", "description": "Growth opportunities and feedback"},
+ {"title": "Team Feedback", "description": "Thoughts on team dynamics and processes"},
+ {"title": "Action Items", "description": "Follow-up tasks and commitments"}
+ ]',
+ '["general","one-on-one", "1-on-1", "management", "feedback", "builtin"]'
+ ),
+ (
+ 'default-user-interview',
+ 'placeholder',
+ '👤 User Interview',
+ 'Template for conducting user research and feedback sessions',
+ '[
+ {"title": "Participant Info", "description": "Name, role, and background details"},
+ {"title": "Research Goals", "description": "What we want to learn from this session"},
+ {"title": "User Behavior", "description": "How they currently solve the problem"},
+ {"title": "Pain Points", "description": "Frustrations and challenges they face"},
+ {"title": "Feature Feedback", "description": "Reactions to proposed solutions"},
+ {"title": "Key Insights", "description": "Important learnings and next steps"}
+ ]',
+ '["startup", "user-interview", "research", "feedback", "ux", "builtin"]'
+ ),
+ (
+ 'default-b2b-discovery',
+ 'placeholder',
+ '🔍 B2B Customer: Discovery',
+ 'Template for B2B sales discovery calls and needs assessment',
+ '[
+ {"title": "Company Background", "description": "Organization size, industry, and context"},
+ {"title": "Current Challenges", "description": "Problems they are trying to solve"},
+ {"title": "Existing Solutions", "description": "What they use now and limitations"},
+ {"title": "Decision Process", "description": "How decisions are made and key stakeholders"},
+ {"title": "Requirements", "description": "Must-have features and success criteria"},
+ {"title": "Next Steps", "description": "Follow-up actions and timeline"}
+ ]',
+ '["startup", "b2b", "discovery", "sales", "customer", "builtin"]'
+ ),
+ (
+ 'default-b2b-pilot',
+ 'placeholder',
+ '🚀 B2B Customer: Pilot',
+ 'Template for B2B pilot program meetings and progress reviews',
+ '[
+ {"title": "Pilot Overview", "description": "Goals, scope, and success metrics"},
+ {"title": "Progress Update", "description": "Current status and milestones achieved"},
+ {"title": "User Feedback", "description": "How the team is using the solution"},
+ {"title": "Challenges", "description": "Issues encountered and resolution status"},
+ {"title": "Value Delivered", "description": "Benefits and ROI demonstrated"},
+ {"title": "Next Phase", "description": "Plans for expansion or full deployment"}
+ ]',
+ '["startup", "b2b", "pilot", "customer", "progress", "builtin"]'
+ ),
+ (
+ 'default-job-interview',
+ 'placeholder',
+ '💼 Job Interview',
+ 'Template for conducting job interviews and candidate assessment',
+ '[
+ {"title": "Candidate Profile", "description": "Name, role, and resume highlights"},
+ {"title": "Technical Assessment", "description": "Skills evaluation and problem-solving"},
+ {"title": "Experience Review", "description": "Past projects and relevant background"},
+ {"title": "Cultural Fit", "description": "Values alignment and team dynamics"},
+ {"title": "Questions & Answers", "description": "Candidate questions and responses"},
+ {"title": "Overall Evaluation", "description": "Recommendation and hiring decision"}
+ ]',
+ '["general","job-interview", "hiring", "candidate", "assessment", "builtin"]'
+ ),
+ (
+ 'default-patient-visit',
+ 'placeholder',
+ '🏥 Patient Visit',
+ 'Template for healthcare patient visits and medical consultations',
+ '[
+ {"title": "Patient Information", "description": "Name, age, and basic demographics"},
+ {"title": "Chief Complaint", "description": "Primary reason for visit"},
+ {"title": "Symptoms", "description": "Current symptoms and duration"},
+ {"title": "Assessment", "description": "Clinical findings and observations"},
+ {"title": "Treatment Plan", "description": "Recommended treatments and medications"},
+ {"title": "Follow-up", "description": "Next appointment and monitoring plan"}
+ ]',
+ '["patient", "medical", "healthcare", "consultation", "builtin"]'
+ ),
+ (
+ 'default-client-meeting-legal',
+ 'placeholder',
+ '🏛️ Client Meeting (Legal)',
+ 'Template for legal client meetings and case discussions',
+ '[
+ {"title": "Client Details", "description": "Name, contact info, and case reference"},
+ {"title": "Case Summary", "description": "Current status and key issues"},
+ {"title": "Legal Strategy", "description": "Approach and recommended actions"},
+ {"title": "Documents Needed", "description": "Required paperwork and evidence"},
+ {"title": "Timeline", "description": "Important dates and deadlines"},
+ {"title": "Next Steps", "description": "Action items and follow-up tasks"}
+ ]',
+ '["legal", "client", "case", "consultation", "builtin"]'
+ ),
+ (
+ 'default-therapy-session',
+ 'placeholder',
+ '💚 Therapy Session',
+ 'Template for therapy and counseling sessions',
+ '[
+ {"title": "Session Overview", "description": "Date, duration, and session goals"},
+ {"title": "Current State", "description": "How the client is feeling today"},
+ {"title": "Key Topics", "description": "Main issues and concerns discussed"},
+ {"title": "Insights", "description": "Breakthroughs and realizations"},
+ {"title": "Coping Strategies", "description": "Tools and techniques practiced"},
+ {"title": "Homework", "description": "Tasks and exercises for next session"}
+ ]',
+ '["healthcare", "therapy", "counseling", "mental-health", "session", "builtin"]'
+ ),
+ (
+ 'default-brainstorming',
+ 'placeholder',
+ '💡 Brainstorming Session',
+ 'Template for creative brainstorming and ideation sessions',
+ '[
+ {"title": "Challenge", "description": "Problem statement and objectives"},
+ {"title": "Ideas Generated", "description": "All concepts and suggestions"},
+ {"title": "Promising Concepts", "description": "Ideas worth exploring further"},
+ {"title": "Constraints", "description": "Limitations and considerations"},
+ {"title": "Next Steps", "description": "How to develop selected ideas"},
+ {"title": "Action Items", "description": "Who does what and when"}
+ ]',
+ '["startup","brainstorming", "creative", "ideation", "innovation", "builtin"]'
+ ),
+ (
+ 'default-coffee-chat',
+ 'placeholder',
+ '☕ Coffee Chat',
+ 'Template for informal networking and relationship building meetings',
+ '[
+ {"title": "Person Info", "description": "Name, role, and how you connected"},
+ {"title": "Background", "description": "Their experience and current focus"},
+ {"title": "Common Interests", "description": "Shared topics and connections"},
+ {"title": "Insights Shared", "description": "Valuable information exchanged"},
+ {"title": "Potential Collaboration", "description": "Ways to work together"},
+ {"title": "Follow-up", "description": "How to stay in touch and next steps"}
+ ]',
+ '["casual","coffee-chat", "networking", "relationship", "informal", "builtin"]'
+ );
diff --git a/crates/db-user/src/templates_ops.rs b/crates/db-user/src/templates_ops.rs
index 13e6b8bd77..4262cc0706 100644
--- a/crates/db-user/src/templates_ops.rs
+++ b/crates/db-user/src/templates_ops.rs
@@ -7,12 +7,9 @@ impl UserDatabase {
) -> Result, crate::Error> {
let conn = self.conn()?;
- let mut rows = conn
- .query(
- "SELECT * FROM templates WHERE user_id = ?",
- vec![user_id.into()],
- )
- .await?;
+ let _user_id = user_id.into();
+
+ let mut rows = conn.query("SELECT * FROM templates", ()).await?;
let mut items = Vec::new();
while let Some(row) = rows.next().await.unwrap() {
@@ -89,7 +86,7 @@ mod tests {
.unwrap();
let templates = db.list_templates(&human.id).await.unwrap();
- assert_eq!(templates.len(), 0);
+ assert_eq!(templates.len(), 2);
let _template = db
.upsert_template(Template {