Skip to content

Build your personal knowledge base with Trilium Notes

feat(transcription): say in the launcher's tooltip that recordings are kept

Elian Doranf6ebccc46581
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index fc412cf203..881de63f85 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -4594,7 +4594,8 @@
"note_title": "Meeting {{date}}",
"starting": "Starting the transcription…",
"stop": "Stop transcribing",
- "stopping": "Finishing the transcript…"
+ "stopping": "Finishing the transcript…",
+ "title_keeping_recordings": "{{title}} (keeps the audio for troubleshooting)"
},
"transcript": {
"speaker_me": "Me",
diff --git a/apps/client/src/widgets/launch_bar/RecordMeetingButton.spec.tsx b/apps/client/src/widgets/launch_bar/RecordMeetingButton.spec.tsx
index c1196f5285..7b3269ea9e 100644
--- a/apps/client/src/widgets/launch_bar/RecordMeetingButton.spec.tsx
+++ b/apps/client/src/widgets/launch_bar/RecordMeetingButton.spec.tsx
@@ -12,13 +12,15 @@ const mocks = vi.hoisted(() => ({
requireResources: vi.fn(),
transcriptionModel: null as string | null,
speakersEnabled: true,
- transcriptionEnabled: true
+ transcriptionEnabled: true,
+ keepRecordings: false
}));
vi.mock("../react/hooks", async (importOriginal) => ({
...(await importOriginal<typeof import("../react/hooks")>()),
useTriliumOptionBool: (name: string) => [
- name === "transcriptionEnabled" && mocks.transcriptionEnabled,
+ (name === "transcriptionEnabled" && mocks.transcriptionEnabled)
+ || (name === "transcriptionKeepRecordings" && mocks.keepRecordings),
vi.fn()
]
}));
@@ -60,6 +62,7 @@ beforeEach(() => {
mocks.transcriptionModel = null;
mocks.speakersEnabled = true;
mocks.transcriptionEnabled = true;
+ mocks.keepRecordings = false;
vi.useFakeTimers({ now: new Date(2026, 9, 13, 14, 30), toFake: [ "Date" ] });
});
@@ -208,6 +211,15 @@ describe("RecordMeetingButton", () => {
window.electronApi = undefined;
});
+ it("says before a recording that its audio will be kept, while recordings are kept", async () => {
+ const button = async () => (await renderWithState({ status: "idle" }))?.querySelector("button");
+
+ expect((await button())?.textContent).toBe("Record meeting");
+ mocks.keepRecordings = true;
+ expect((await button())?.textContent).toContain("record_meeting.title_keeping_recordings");
+ window.electronApi = undefined;
+ });
+
it("shows no badge while the recording starts", async () => {
const container = await renderWithState({ status: "starting", noteId: "meeting" });
expect(container?.querySelector(".record-meeting-launcher .ext-badge")).toBeNull();
diff --git a/apps/client/src/widgets/launch_bar/RecordMeetingButton.tsx b/apps/client/src/widgets/launch_bar/RecordMeetingButton.tsx
index 4e5dd8b631..381dbd67ac 100644
--- a/apps/client/src/widgets/launch_bar/RecordMeetingButton.tsx
+++ b/apps/client/src/widgets/launch_bar/RecordMeetingButton.tsx
@@ -30,6 +30,7 @@ export default function RecordMeetingButton({ launcherNote }: LauncherNoteProps)
const { icon, title } = useLauncherIconAndTitle(launcherNote);
const { status, error, startedAt } = useTranscriptionState();
const [ isEnabled ] = useTriliumOptionBool("transcriptionEnabled");
+ const [ keepsRecordings ] = useTriliumOptionBool("transcriptionKeepRecordings");
const [ now, setNow ] = useState(Date.now);
const handleClick = useCallback(() => {
void toggleRecording(status);
@@ -59,7 +60,7 @@ export default function RecordMeetingButton({ launcherNote }: LauncherNoteProps)
<LaunchBarActionButton
launcherNote={launcherNote}
onClick={handleClick}
- {...getAppearance(status, icon, title)}
+ {...getAppearance(status, icon, title, keepsRecordings)}
/>
{status === "idle" && (
<Badge text={t("common.beta")} className="record-meeting-beta-badge" />
@@ -76,10 +77,21 @@ export default function RecordMeetingButton({ launcherNote }: LauncherNoteProps)
const BUSY_ICON = "bx bx-loader-alt bx-spin";
-function getAppearance(status: TranscriptionStatus, idleIcon: string, idleTitle: string) {
+/**
+ * The icon and tooltip for each state. While recordings are kept, the idle tooltip says so, since
+ * starting is when the people in the meeting would need to agree to it.
+ */
+function getAppearance(
+ status: TranscriptionStatus, idleIcon: string, idleTitle: string, keepsRecordings: boolean
+) {
switch (status) {
case "idle":
- return { icon: idleIcon, text: idleTitle };
+ return {
+ icon: idleIcon,
+ text: keepsRecordings
+ ? t("record_meeting.title_keeping_recordings", { title: idleTitle })
+ : idleTitle
+ };
case "starting":
return { icon: BUSY_ICON, text: t("record_meeting.starting"), disabled: true };
case "recording":