Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ export function ChatInput(
.chat-editor .tiptap-normal {
padding: 12px 40px 12px 12px !important;
min-height: 50px !important;
max-height: 50px !important;
overflow-y: auto !important;
max-height: 80px!important;
font-size: 14px !important;
line-height: 1.5 !important;
}
Expand All @@ -283,7 +282,7 @@ export function ChatInput(
}
.chat-editor .tiptap-normal p {
margin: 0 !important;
display: inline !important;
display: block !important;
}
.chat-editor .mention {
color: #3b82f6 !important;
Expand Down Expand Up @@ -323,7 +322,8 @@ export function ChatInput(
`}
</style>

<div className={`relative chat-editor ${inputValue.trim() ? "has-content" : ""}`}>
{/* Make the editor area flex-grow and scrollable */}
<div className={`relative chat-editor flex-1 overflow-y-auto ${inputValue.trim() ? "has-content" : ""}`}>
<Editor
ref={editorRef}
handleChange={handleContentChange}
Expand All @@ -339,7 +339,8 @@ export function ChatInput(
)}
</div>

<div className="flex items-center justify-between pb-2 px-3">
{/* Bottom area stays fixed */}
<div className="flex items-center justify-between pb-2 px-3 flex-shrink-0">
{entityId
? (
<Badge
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/src/components/right-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function RightPanel() {
<ResizablePanel
minSize={30}
maxSize={50}
defaultSize={45}
className="h-full border-l bg-neutral-50 overflow-hidden"
>
{(currentView === "transcript") ? <TranscriptView /> : <ChatView />}
Expand Down
8 changes: 7 additions & 1 deletion apps/desktop/src/components/settings/views/integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ export default function IntegrationsComponent() {
}
});

// store initial base url even if it's not by the user
const currentValues = form.getValues();
if (getBaseUrl.isSuccess && !getBaseUrl.data && currentValues.baseUrl) {
obsidianCommands.setBaseUrl(currentValues.baseUrl);
}

return () => subscription.unsubscribe();
}, [form]);
}, [form, getBaseUrl.isSuccess, getBaseUrl.data]);

return (
<div className="space-y-6">
Expand Down
37 changes: 34 additions & 3 deletions apps/desktop/src/components/toolbar/buttons/share-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,14 @@ function ShareButtonInNote() {
} else if (optionId === "pdf") {
result = await exportHandlers.pdf(session);
} else if (optionId === "email") {
result = await exportHandlers.email(session);
try {
// fetch participants directly, bypassing cache
const freshParticipants = await dbCommands.sessionListParticipants(param.id);
result = await exportHandlers.email(session, freshParticipants);
} catch (participantError) {
console.warn("Failed to fetch participants, sending email without them:", participantError);
result = await exportHandlers.email(session, undefined);
}
Comment on lines +166 to +173
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace try/catch with promise fallback to align with “no error handling” guideline

You only need a best-effort participant list. Avoid explicit try/catch and fallback via catch chain:

-      } else if (optionId === "email") {
-        try {
-          // fetch participants directly, bypassing cache
-          const freshParticipants = await dbCommands.sessionListParticipants(param.id);
-          result = await exportHandlers.email(session, freshParticipants);
-        } catch (participantError) {
-          console.warn("Failed to fetch participants, sending email without them:", participantError);
-          result = await exportHandlers.email(session, undefined);
-        }
+      } else if (optionId === "email") {
+        const freshParticipants = await dbCommands
+          .sessionListParticipants(param.id)
+          .catch(() => undefined);
+        result = await exportHandlers.email(session, freshParticipants);
       }
📝 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
try {
// fetch participants directly, bypassing cache
const freshParticipants = await dbCommands.sessionListParticipants(param.id);
result = await exportHandlers.email(session, freshParticipants);
} catch (participantError) {
console.warn("Failed to fetch participants, sending email without them:", participantError);
result = await exportHandlers.email(session, undefined);
}
const freshParticipants = await dbCommands
.sessionListParticipants(param.id)
.catch(() => undefined);
result = await exportHandlers.email(session, freshParticipants);
🤖 Prompt for AI Agents
In apps/desktop/src/components/toolbar/buttons/share-button.tsx around lines
166-173, replace the explicit try/catch that fetches participants and falls back
to undefined with a promise-based fallback: call
dbCommands.sessionListParticipants(param.id) and let it resolve or, on
rejection, return undefined via .catch(...) so you can pass the resulting value
directly into exportHandlers.email(session, participants). Remove the try/catch
block and ensure the failure is best-effort (no logging or thrown error) and
email is still sent with undefined when participant fetch fails.

} else if (optionId === "obsidian") {
sessionTags.refetch();
sessionParticipants.refetch();
Expand Down Expand Up @@ -438,7 +445,10 @@ const exportHandlers = {
return { type: "pdf", path };
},

email: async (session: Session): Promise<ExportResult> => {
email: async (
session: Session,
sessionParticipants?: Array<{ full_name: string | null; email: string | null }>,
): Promise<ExportResult> => {
let bodyContent = "Here is the meeting summary: \n\n";

if (session.enhanced_memo_html) {
Expand All @@ -449,9 +459,30 @@ const exportHandlers = {
bodyContent += "No content available";
}

if (sessionParticipants && sessionParticipants.length > 0) {
const participantNames = sessionParticipants
.filter(p => p.full_name)
.map(p => p.full_name)
.join(", ");

if (participantNames) {
bodyContent += `\n\nMeeting Participants: ${participantNames}`;
}
}

bodyContent += "\n\nSent with Hyprnote (www.hyprnote.com)\n\n";

const url = `mailto:?subject=${encodeURIComponent(session.title)}&body=${encodeURIComponent(bodyContent)}`;
const participantEmails = sessionParticipants
?.filter(participant => participant.email && participant.email.trim())
?.map(participant => participant.email!)
?.join(",") || "";

const subject = encodeURIComponent(session.title);
const body = encodeURIComponent(bodyContent);

const to = participantEmails ? `&to=${encodeURIComponent(participantEmails)}` : "";

const url = `mailto:?subject=${subject}&body=${body}${to}`;
return { type: "email", url };
},

Expand Down
32 changes: 16 additions & 16 deletions apps/desktop/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ msgstr "API Base URL"
#: src/components/welcome-modal/custom-endpoint-view.tsx:361
#: src/components/welcome-modal/custom-endpoint-view.tsx:438
#: src/components/welcome-modal/custom-endpoint-view.tsx:518
#: src/components/settings/views/integrations.tsx:197
#: src/components/settings/views/integrations.tsx:203
#: src/components/settings/components/ai/llm-custom-view.tsx:277
#: src/components/settings/components/ai/llm-custom-view.tsx:373
#: src/components/settings/components/ai/llm-custom-view.tsx:479
Expand Down Expand Up @@ -448,11 +448,11 @@ msgstr "Autonomy Selector"
msgid "Back"
msgstr "Back"

#: src/components/settings/views/integrations.tsx:246
#: src/components/settings/views/integrations.tsx:252
msgid "Base Folder"
msgstr "Base Folder"

#: src/components/settings/views/integrations.tsx:173
#: src/components/settings/views/integrations.tsx:179
msgid "Base URL"
msgstr "Base URL"

Expand Down Expand Up @@ -573,7 +573,7 @@ msgstr "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compati
#~ msgid "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."
#~ msgstr "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."

#: src/components/settings/views/integrations.tsx:121
#: src/components/settings/views/integrations.tsx:127
msgid "Connect with external tools and services to enhance your workflow"
msgstr "Connect with external tools and services to enhance your workflow"

Expand All @@ -589,7 +589,7 @@ msgstr "Connect your calendar and contacts for a better experience"
msgid "Connect your calendar and track events"
msgstr "Connect your calendar and track events"

#: src/components/settings/views/integrations.tsx:133
#: src/components/settings/views/integrations.tsx:139
msgid "Connect your Obsidian vault to export notes"
msgstr "Connect your Obsidian vault to export notes"

Expand Down Expand Up @@ -742,7 +742,7 @@ msgstr "Emoji"
msgid "Enable"
msgstr "Enable"

#: src/components/settings/views/integrations.tsx:147
#: src/components/settings/views/integrations.tsx:153
msgid "Enable Integration"
msgstr "Enable Integration"

Expand Down Expand Up @@ -896,7 +896,7 @@ msgstr "Important Q&As"
#~ msgstr "Integration with other apps like Notion and Google Calendar"

#: src/routes/app.settings.tsx:66
#: src/components/settings/views/integrations.tsx:118
#: src/components/settings/views/integrations.tsx:124
msgid "Integrations"
msgstr "Integrations"

Expand Down Expand Up @@ -1053,7 +1053,7 @@ msgstr "Model Name"
#~ msgid "Monthly"
#~ msgstr "Monthly"

#: src/components/settings/views/integrations.tsx:272
#: src/components/settings/views/integrations.tsx:278
msgid "More integrations coming soon..."
msgstr "More integrations coming soon..."

Expand Down Expand Up @@ -1142,7 +1142,7 @@ msgstr "No upcoming events with this contact"
msgid "Notifications"
msgstr "Notifications"

#: src/components/settings/views/integrations.tsx:130
#: src/components/settings/views/integrations.tsx:136
msgid "Obsidian"
msgstr "Obsidian"

Expand Down Expand Up @@ -1181,7 +1181,7 @@ msgstr "OpenAI"
msgid "OpenRouter"
msgstr "OpenRouter"

#: src/components/settings/views/integrations.tsx:255
#: src/components/settings/views/integrations.tsx:261
msgid "Optional base folder path within your Obsidian vault."
msgstr "Optional base folder path within your Obsidian vault."

Expand Down Expand Up @@ -1496,11 +1496,11 @@ msgstr "Templates"
#~ msgid "The AI Meeting Notepad"
#~ msgstr "The AI Meeting Notepad"

#: src/components/settings/views/integrations.tsx:182
#: src/components/settings/views/integrations.tsx:188
msgid "The base URL of your Obsidian server. This is typically http://127.0.0.1:27123."
msgstr "The base URL of your Obsidian server. This is typically http://127.0.0.1:27123."

#: src/components/settings/views/integrations.tsx:231
#: src/components/settings/views/integrations.tsx:237
msgid "The name of your Obsidian vault."
msgstr "The name of your Obsidian vault."

Expand Down Expand Up @@ -1552,7 +1552,7 @@ msgstr "Toggle transcriptpanel"
msgid "Transcription"
msgstr "Transcription"

#: src/components/settings/views/integrations.tsx:150
#: src/components/settings/views/integrations.tsx:156
msgid "Turn on Obsidian integration to export notes to Obsidian vault."
msgstr "Turn on Obsidian integration to export notes to Obsidian vault."

Expand Down Expand Up @@ -1612,7 +1612,7 @@ msgstr "User"
msgid "username"
msgstr "username"

#: src/components/settings/views/integrations.tsx:222
#: src/components/settings/views/integrations.tsx:228
msgid "Vault Name"
msgstr "Vault Name"

Expand All @@ -1637,7 +1637,7 @@ msgstr "We think different."
#~ msgid "We'll only use this to follow up if needed."
#~ msgstr "We'll only use this to follow up if needed."

#: src/components/settings/views/integrations.tsx:275
#: src/components/settings/views/integrations.tsx:281
msgid "We're working on adding more tools and services to connect with your workflow"
msgstr "We're working on adding more tools and services to connect with your workflow"

Expand Down Expand Up @@ -1681,7 +1681,7 @@ msgstr "Where Conversations Stay Yours"
#~ msgid "You can make Hyprnote takes these words into account when transcribing"
#~ msgstr "You can make Hyprnote takes these words into account when transcribing"

#: src/components/settings/views/integrations.tsx:207
#: src/components/settings/views/integrations.tsx:213
msgid "Your API key for Obsidian local-rest-api plugin."
msgstr "Your API key for Obsidian local-rest-api plugin."

Expand Down
32 changes: 16 additions & 16 deletions apps/desktop/src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ msgstr ""
#: src/components/welcome-modal/custom-endpoint-view.tsx:361
#: src/components/welcome-modal/custom-endpoint-view.tsx:438
#: src/components/welcome-modal/custom-endpoint-view.tsx:518
#: src/components/settings/views/integrations.tsx:197
#: src/components/settings/views/integrations.tsx:203
#: src/components/settings/components/ai/llm-custom-view.tsx:277
#: src/components/settings/components/ai/llm-custom-view.tsx:373
#: src/components/settings/components/ai/llm-custom-view.tsx:479
Expand Down Expand Up @@ -448,11 +448,11 @@ msgstr ""
msgid "Back"
msgstr ""

#: src/components/settings/views/integrations.tsx:246
#: src/components/settings/views/integrations.tsx:252
msgid "Base Folder"
msgstr ""

#: src/components/settings/views/integrations.tsx:173
#: src/components/settings/views/integrations.tsx:179
msgid "Base URL"
msgstr ""

Expand Down Expand Up @@ -573,7 +573,7 @@ msgstr ""
#~ msgid "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."
#~ msgstr ""

#: src/components/settings/views/integrations.tsx:121
#: src/components/settings/views/integrations.tsx:127
msgid "Connect with external tools and services to enhance your workflow"
msgstr ""

Expand All @@ -589,7 +589,7 @@ msgstr ""
msgid "Connect your calendar and track events"
msgstr ""

#: src/components/settings/views/integrations.tsx:133
#: src/components/settings/views/integrations.tsx:139
msgid "Connect your Obsidian vault to export notes"
msgstr ""

Expand Down Expand Up @@ -742,7 +742,7 @@ msgstr ""
msgid "Enable"
msgstr ""

#: src/components/settings/views/integrations.tsx:147
#: src/components/settings/views/integrations.tsx:153
msgid "Enable Integration"
msgstr "Enable Integration"

Expand Down Expand Up @@ -896,7 +896,7 @@ msgstr ""
#~ msgstr ""

#: src/routes/app.settings.tsx:66
#: src/components/settings/views/integrations.tsx:118
#: src/components/settings/views/integrations.tsx:124
msgid "Integrations"
msgstr ""

Expand Down Expand Up @@ -1053,7 +1053,7 @@ msgstr ""
#~ msgid "Monthly"
#~ msgstr ""

#: src/components/settings/views/integrations.tsx:272
#: src/components/settings/views/integrations.tsx:278
msgid "More integrations coming soon..."
msgstr ""

Expand Down Expand Up @@ -1142,7 +1142,7 @@ msgstr ""
msgid "Notifications"
msgstr ""

#: src/components/settings/views/integrations.tsx:130
#: src/components/settings/views/integrations.tsx:136
msgid "Obsidian"
msgstr ""

Expand Down Expand Up @@ -1181,7 +1181,7 @@ msgstr ""
msgid "OpenRouter"
msgstr ""

#: src/components/settings/views/integrations.tsx:255
#: src/components/settings/views/integrations.tsx:261
msgid "Optional base folder path within your Obsidian vault."
msgstr ""

Expand Down Expand Up @@ -1496,11 +1496,11 @@ msgstr ""
#~ msgid "The AI Meeting Notepad"
#~ msgstr ""

#: src/components/settings/views/integrations.tsx:182
#: src/components/settings/views/integrations.tsx:188
msgid "The base URL of your Obsidian server. This is typically http://127.0.0.1:27123."
msgstr ""

#: src/components/settings/views/integrations.tsx:231
#: src/components/settings/views/integrations.tsx:237
msgid "The name of your Obsidian vault."
msgstr ""

Expand Down Expand Up @@ -1552,7 +1552,7 @@ msgstr ""
msgid "Transcription"
msgstr ""

#: src/components/settings/views/integrations.tsx:150
#: src/components/settings/views/integrations.tsx:156
msgid "Turn on Obsidian integration to export notes to Obsidian vault."
msgstr ""

Expand Down Expand Up @@ -1612,7 +1612,7 @@ msgstr ""
msgid "username"
msgstr ""

#: src/components/settings/views/integrations.tsx:222
#: src/components/settings/views/integrations.tsx:228
msgid "Vault Name"
msgstr ""

Expand All @@ -1637,7 +1637,7 @@ msgstr ""
#~ msgid "We'll only use this to follow up if needed."
#~ msgstr ""

#: src/components/settings/views/integrations.tsx:275
#: src/components/settings/views/integrations.tsx:281
msgid "We're working on adding more tools and services to connect with your workflow"
msgstr ""

Expand Down Expand Up @@ -1681,7 +1681,7 @@ msgstr ""
#~ msgid "You can make Hyprnote takes these words into account when transcribing"
#~ msgstr ""

#: src/components/settings/views/integrations.tsx:207
#: src/components/settings/views/integrations.tsx:213
msgid "Your API key for Obsidian local-rest-api plugin."
msgstr ""

Expand Down
Loading
Loading