Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(ui): close empty-state gaps found in the audit (#1565)

Alcahest Malus Dienheim7acbad4f1a71
diff --git a/src/components/MemberPickList.tsx b/src/components/MemberPickList.tsx
index 55d8f575e..1e7863cee 100644
--- a/src/components/MemberPickList.tsx
+++ b/src/components/MemberPickList.tsx
@@ -87,7 +87,7 @@ export default function MemberPickList({
})}
{filteredMembers.length === 0 && !footer && (
<p className="text-xs text-foreground/25 text-center py-2">
- {t("notes.context.noResults")}
+ {t("notes.spaces.members.noResults")}
</p>
)}
{filteredMembers.length === 0 && footer}
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsx
index de77dc955..2cb16b811 100644
--- a/src/components/notes/PersonalNotesView.tsx
+++ b/src/components/notes/PersonalNotesView.tsx
@@ -57,6 +57,7 @@ import { useTeamSpacesCapability } from "../../hooks/useTeamSpacesCapability";
import { useAuth } from "../../hooks/useAuth";
import { usePolicySnapshot, useTranscriptionContextAllowed } from "../../hooks/usePolicy";
import NotesOnboarding from "./NotesOnboarding";
+import { notesEmptyTitleKey } from "./shared";
import { isRegenerableNoteTitle } from "../../helpers/regenerableNoteTitle";
import { handleMeetingRecordingRequest } from "../../helpers/meetingRecordingRequest";
import { markIntroSeen, NOTES_STRUCTURE_INTRO, shouldShowIntro } from "../../lib/versionedIntro";
@@ -978,7 +979,7 @@ export default function PersonalNotesView({
{notes.length === 0 ? (
<>
<h3 className="text-xs font-semibold text-foreground/60 mb-1">
- {t("notes.empty.title")}
+ {t(notesEmptyTitleKey(activeFolderId != null))}
</h3>
<p className="text-xs text-foreground/50 dark:text-foreground/25 text-center max-w-55 mb-4">
{t("notes.empty.description")}
diff --git a/src/components/notes/ShareNoteDialog.tsx b/src/components/notes/ShareNoteDialog.tsx
index 1d6ecdc94..93600376e 100644
--- a/src/components/notes/ShareNoteDialog.tsx
+++ b/src/components/notes/ShareNoteDialog.tsx
@@ -91,6 +91,8 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
const [submitting, setSubmitting] = useState(false);
const [suggestions, setSuggestions] = useState<AccessPrincipalSuggestion[]>([]);
const [searchingSuggestions, setSearchingSuggestions] = useState(false);
+ // True once a search resolved for the current input, so zero matches can say so.
+ const [suggestionsSettled, setSuggestionsSettled] = useState(false);
const [copied, setCopied] = useState(false);
const [resendingId, setResendingId] = useState<string | null>(null);
const [busyGrantId, setBusyGrantId] = useState<string | null>(null);
@@ -234,14 +236,19 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
if (!open || !cloudId || !canSearchPrincipals || !query) {
setSuggestions([]);
setSearchingSuggestions(false);
+ setSuggestionsSettled(false);
return;
}
let cancelled = false;
setSearchingSuggestions(true);
+ setSuggestionsSettled(false);
const timer = window.setTimeout(() => {
NoteSharingService.searchAccessPrincipals(cloudId, query)
.then((res) => {
- if (!cancelled) setSuggestions(res.suggestions.filter((item) => !item.existing_grant_id));
+ if (!cancelled) {
+ setSuggestions(res.suggestions.filter((item) => !item.existing_grant_id));
+ setSuggestionsSettled(true);
+ }
})
.catch(() => {
if (!cancelled) setSuggestions([]);
@@ -720,12 +727,18 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
{access &&
emailInput.trim() &&
- (searchingSuggestions || suggestions.length > 0) && (
+ (searchingSuggestions || suggestions.length > 0 || suggestionsSettled) && (
<div className="absolute z-20 top-9 left-0 right-[72px] max-h-44 overflow-y-auto rounded-lg border border-border bg-popover p-1 shadow-lg">
{searchingSuggestions && suggestions.length === 0 ? (
<div className="h-8 flex items-center justify-center">
<Loader2 size={12} className="animate-spin text-foreground/40" />
</div>
+ ) : suggestions.length === 0 ? (
+ <div className="h-8 flex items-center justify-center">
+ <span className="text-xs text-foreground/40">
+ {t("noteEditor.share.dialog.noResults")}
+ </span>
+ </div>
) : (
suggestions.map((principal) => (
<button
diff --git a/src/components/notes/shared.ts b/src/components/notes/shared.ts
index b4bf3dc4f..ee23442fe 100644
--- a/src/components/notes/shared.ts
+++ b/src/components/notes/shared.ts
@@ -43,6 +43,11 @@ export function transcriptionErrorKey(failure: unknown): string | undefined {
return code ? TRANSCRIPTION_ERROR_KEYS[code] : undefined;
}
+// Folder scopes get the folder-specific empty title; space roots keep the generic one.
+export function notesEmptyTitleKey(inFolder: boolean): string {
+ return inFolder ? "notes.empty.emptyFolder" : "notes.empty.title";
+}
+
export const notesInputClass = cn(
"w-full h-8 px-3 rounded-md text-xs",
"bg-foreground/3 dark:bg-white/4 border border-border/30 dark:border-white/6",
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 5a94cf248..81486a288 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -2621,6 +2621,7 @@
"you": "Du",
"addFailed": "{{failed}} von {{total}} Personen konnten nicht hinzugefügt werden",
"searchPlaceholder": "Personen suchen…",
+ "noResults": "Keine Personen gefunden",
"roleAdmin": "Administrator",
"roleMember": "Mitglied",
"remove": "Entfernen",
@@ -3372,6 +3373,7 @@
"title": "Notiz teilen",
"description": "Lade Personen per E-Mail ein oder teile einen Link zu dieser Notiz.",
"searchPlaceholder": "Personen, Ordner oder E-Mails suchen",
+ "noResults": "Keine Treffer gefunden",
"emailLabel": "Personen, Ordner oder E-Mail",
"shareButton": "Teilen",
"createLink": "Link erstellen",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index deae51f72..afd715699 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -2621,6 +2621,7 @@
"you": "You",
"addFailed": "{{failed}} of {{total}} people couldn't be added",
"searchPlaceholder": "Search people…",
+ "noResults": "No people found",
"roleAdmin": "Admin",
"roleMember": "Member",
"remove": "Remove",
@@ -3372,6 +3373,7 @@
"title": "Share note",
"description": "Invite people by email or share a link to this note.",
"searchPlaceholder": "Search people, folders, or emails",
+ "noResults": "No matches found",
"emailLabel": "People, folders, or email",
"shareButton": "Share",
"createLink": "Create link",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index 894bef97a..4a0e4399d 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -2461,6 +2461,7 @@
"you": "Tú",
"addFailed": "No se pudo añadir a {{failed}} de {{total}} personas",
"searchPlaceholder": "Buscar personas…",
+ "noResults": "No se encontraron personas",
"roleAdmin": "Administrador",
"roleMember": "Miembro",
"remove": "Quitar",
@@ -3295,6 +3296,7 @@
"title": "Compartir nota",
"description": "Invita a personas por correo o comparte un enlace a esta nota.",
"searchPlaceholder": "Buscar personas, carpetas o correos",
+ "noResults": "No se encontraron coincidencias",
"emailLabel": "Personas, carpetas o correo",
"shareButton": "Compartir",
"createLink": "Crear enlace",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 2a35b49b2..070c2e92c 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -2621,6 +2621,7 @@
"you": "Vous",
"addFailed": "Impossible d'ajouter {{failed}} personnes sur {{total}}",
"searchPlaceholder": "Rechercher des personnes…",
+ "noResults": "Aucune personne trouvée",
"roleAdmin": "Administrateur",
"roleMember": "Membre",
"remove": "Retirer",
@@ -3372,6 +3373,7 @@
"title": "Partager la note",
"description": "Invitez des personnes par e-mail ou partagez un lien vers cette note.",
"searchPlaceholder": "Rechercher des personnes, dossiers ou e-mails",
+ "noResults": "Aucun résultat trouvé",
"emailLabel": "Personnes, dossiers ou e-mail",
"shareButton": "Partager",
"createLink": "Créer un lien",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index 3ba303dbe..52249400d 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -2413,6 +2413,7 @@
"you": "Tu",
"addFailed": "Impossibile aggiungere {{failed}} persone su {{total}}",
"searchPlaceholder": "Cerca persone…",
+ "noResults": "Nessuna persona trovata",
"roleAdmin": "Amministratore",
"roleMember": "Membro",
"remove": "Rimuovi",
@@ -3247,6 +3248,7 @@
"title": "Condividi nota",
"description": "Invita persone tramite email o condividi un link a questa nota.",
"searchPlaceholder": "Cerca persone, cartelle o email",
+ "noResults": "Nessun risultato trovato",
"emailLabel": "Persone, cartelle o email",
"shareButton": "Condividi",
"createLink": "Crea link",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 691df1510..ad936a25c 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -2341,6 +2341,7 @@
"you": "自分",
"addFailed": "{{total}}人中{{failed}}人を追加できませんでした",
"searchPlaceholder": "メンバーを検索…",
+ "noResults": "メンバーが見つかりません",
"roleAdmin": "管理者",
"roleMember": "メンバー",
"remove": "削除",
@@ -3247,6 +3248,7 @@
"title": "ノートを共有",
"description": "メールで招待するか、このノートへのリンクを共有します。",
"searchPlaceholder": "ユーザー、フォルダー、メールを検索",
+ "noResults": "一致する結果が見つかりません",
"emailLabel": "ユーザー、フォルダー、メール",
"shareButton": "共有",
"createLink": "リンクを作成",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index e33325a99..60dbfb0d7 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -2413,6 +2413,7 @@
"you": "Você",
"addFailed": "Não foi possível adicionar {{failed}} de {{total}} pessoas",
"searchPlaceholder": "Pesquisar pessoas…",
+ "noResults": "Nenhuma pessoa encontrada",
"roleAdmin": "Administrador",
"roleMember": "Membro",
"remove": "Remover",
@@ -3247,6 +3248,7 @@
"title": "Compartilhar nota",
"description": "Convide pessoas por e-mail ou compartilhe um link para esta nota.",
"searchPlaceholder": "Buscar pessoas, pastas ou emails",
+ "noResults": "Nenhum resultado encontrado",
"emailLabel": "Pessoas, pastas ou email",
"shareButton": "Compartilhar",
"createLink": "Criar link",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index d7cd920d0..31d7d4436 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -2429,6 +2429,7 @@
"you": "Вы",
"addFailed": "Не удалось добавить {{failed}} из {{total}} участников",
"searchPlaceholder": "Поиск людей…",
+ "noResults": "Люди не найдены",
"roleAdmin": "Администратор",
"roleMember": "Участник",
"remove": "Удалить",
@@ -3275,6 +3276,7 @@
"title": "Поделиться заметкой",
"description": "Приглашайте людей по эл. почте или поделитесь ссылкой на эту заметку.",
"searchPlaceholder": "Поиск людей, папок или адресов",
+ "noResults": "Совпадений не найдено",
"emailLabel": "Люди, папки или адрес эл. почты",
"shareButton": "Поделиться",
"createLink": "Создать ссылку",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index ea020f94d..79262265a 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -2413,6 +2413,7 @@
"you": "你",
"addFailed": "{{total}} 人中有 {{failed}} 人无法添加",
"searchPlaceholder": "搜索成员…",
+ "noResults": "未找到成员",
"roleAdmin": "管理员",
"roleMember": "成员",
"remove": "移除",
@@ -3247,6 +3248,7 @@
"title": "分享笔记",
"description": "通过电子邮件邀请他人,或分享此笔记的链接。",
"searchPlaceholder": "搜索人员、文件夹或邮箱",
+ "noResults": "未找到匹配结果",
"emailLabel": "人员、文件夹或邮箱",
"shareButton": "分享",
"createLink": "创建链接",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index efc3e4237..27bc6e0ef 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -2413,6 +2413,7 @@
"you": "你",
"addFailed": "{{total}} 人中有 {{failed}} 人無法加入",
"searchPlaceholder": "搜尋成員…",
+ "noResults": "找不到成員",
"roleAdmin": "管理員",
"roleMember": "成員",
"remove": "移除",
@@ -3247,6 +3248,7 @@
"title": "分享筆記",
"description": "透過電子郵件邀請成員,或分享此筆記的連結。",
"searchPlaceholder": "搜尋人員、資料夾或電子郵件",
+ "noResults": "找不到符合的結果",
"emailLabel": "人員、資料夾或電子郵件",
"shareButton": "分享",
"createLink": "建立連結",
diff --git a/test/components/memberPickList.test.js b/test/components/memberPickList.test.js
new file mode 100644
index 000000000..9bcad2976
--- /dev/null
+++ b/test/components/memberPickList.test.js
@@ -0,0 +1,70 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const fs = require("node:fs");
+const path = require("node:path");
+const { createElement } = require("react");
+const { renderToStaticMarkup } = require("react-dom/server");
+const i18next = require("i18next");
+const { initReactI18next } = require("react-i18next");
+
+// tsx resolves tsconfig from the cwd, where none sets the automatic JSX runtime,
+// so compiled .tsx uses the classic transform and needs a global React.
+globalThis.React = require("react");
+
+const MEMBERS = [
+ {
+ user_id: "u1",
+ role: "member",
+ joined_at: "2026-01-01T00:00:00Z",
+ email: "[email protected]",
+ name: "Ada Lovelace",
+ image: null,
+ },
+];
+
+async function renderPickList(props) {
+ if (!i18next.isInitialized) {
+ const en = JSON.parse(
+ fs.readFileSync(path.join(__dirname, "../../src/locales/en/translation.json"), "utf8")
+ );
+ await i18next.use(initReactI18next).init({
+ lng: "en",
+ resources: { en: { translation: en } },
+ interpolation: { escapeValue: false },
+ });
+ }
+ // tsx compiles the .tsx module to CJS, so its default lands one level deeper.
+ const mod = await import("../../src/components/MemberPickList.tsx");
+ const MemberPickList = mod.default.default ?? mod.default;
+ return renderToStaticMarkup(
+ createElement(MemberPickList, {
+ members: MEMBERS,
+ search: "",
+ onSearchChange: () => {},
+ onSelect: () => {},
+ ...props,
+ })
+ );
+}
+
+test("a people filter with no matches says no people were found", async () => {
+ const html = await renderPickList({ search: "zzz-no-such-person" });
+
+ assert.ok(html.includes("No people found"));
+ assert.ok(!html.includes("No folders found"));
+});
+
+test("matching members render instead of the no-results row", async () => {
+ const html = await renderPickList({ search: "ada" });
+
+ assert.ok(html.includes("Ada Lovelace"));
+ assert.ok(!html.includes("No people found"));
+});
+
+test("a provided footer suppresses the built-in no-results row", async () => {
+ const footer = createElement("div", null, "Invite by email");
+ const html = await renderPickList({ search: "zzz-no-such-person", footer });
+
+ assert.ok(html.includes("Invite by email"));
+ assert.ok(!html.includes("No people found"));
+});
diff --git a/test/components/notesShared.test.js b/test/components/notesShared.test.js
new file mode 100644
index 000000000..38a1c79cc
--- /dev/null
+++ b/test/components/notesShared.test.js
@@ -0,0 +1,31 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const fs = require("node:fs");
+const path = require("node:path");
+
+const load = () => import("../../src/components/notes/shared.ts");
+
+test("folder scopes get the folder-specific empty title", async () => {
+ const { notesEmptyTitleKey } = await load();
+
+ assert.equal(notesEmptyTitleKey(true), "notes.empty.emptyFolder");
+});
+
+test("space roots keep the generic empty title", async () => {
+ const { notesEmptyTitleKey } = await load();
+
+ assert.equal(notesEmptyTitleKey(false), "notes.empty.title");
+});
+
+test("both empty-title keys resolve to strings in the en locale", async () => {
+ const { notesEmptyTitleKey } = await load();
+ const en = JSON.parse(
+ fs.readFileSync(path.join(__dirname, "../../src/locales/en/translation.json"), "utf8")
+ );
+
+ for (const inFolder of [true, false]) {
+ const key = notesEmptyTitleKey(inFolder);
+ const value = key.split(".").reduce((node, part) => node?.[part], en);
+ assert.equal(typeof value, "string", `missing en translation for ${key}`);
+ }
+});