Skip to content

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

feat(notes): polish team-space onboarding and sync reliability

Chadpiha5987a8ca71c3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9506b9260..8b4e5169b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@ Team spaces and web note sharing headline this release: create shared spaces ins
### Team spaces & sharing
- **Team spaces in the notes sidebar.** A new TEAM SPACES section sits alongside your private space: create a space with a name and emoji, organize per-space folders and notes, drag notes between containers, and drive the whole tree from the keyboard. The editor shows where a note lives — a breadcrumb chip that jumps to and reveals its space, and an audience pill showing how many people can see it. Content is local-first: your notes stay in the on-device database as the source of truth, with each space syncing to the cloud in the background. (#925)
-- **Membership, roles, and invitations.** Invite teammates by email with team spaces pre-selected; the invitation email lands on notes.openwhispr.com with a one-click "Open in OpenWhispr" deep link straight into the accept flow (and an honest copy-the-link path on phones). Space members are admins or members, workspace owners and admins hold implicit admin access to every space, and rosters are managed from the space's Members dialog or Settings → Workspace → Teams — with type-the-name confirmation before a space is deleted, everywhere it can be deleted from. (#925)
+- **Membership, roles, and invitations.** Invite teammates by email with team spaces pre-selected; the invitation email lands on notes.openwhispr.com with a one-click "Open in OpenWhispr" deep link straight into the accept flow (and an honest copy-the-link path on phones). Space members are admins or members, workspace owners and admins hold implicit admin access to every space, and rosters are managed from the space's Members dialog or Settings → Workspace → Team spaces — with type-the-name confirmation before a space is deleted, everywhere it can be deleted from. (#925)
- **Server-enforced access with graceful revocation.** Membership checks live on the server — non-members get existence privacy, and revoked or archived spaces return typed errors the app understands. Losing access to a space removes its synced notes locally and relocates anything you never managed to sync into your private space, with a toast explaining what happened. If a teammate's edit arrives while you have unpushed changes, a conflict banner names who edited it and lets you take their copy or keep yours. (#925)
- **Share notes on the web.** Personal notes can be published to notes.openwhispr.com under three visibilities: anyone with the link, anyone signed in under your email domain, or invited people only. Rich link previews (title and snippet) are emitted only for link-visibility shares — restricted notes unfurl generically so nothing leaks into chat preview caches. Team notes deliberately have no public link; their audience is the space. (#925)
- **Changes land live, everywhere.** Space changes now broadcast across windows the way notes and folders already did: a teammate's rename, a role or member-count change, or a freshly accepted invitation appears in an open sidebar without remounting, skeleton rows clear as a new space's content finishes backfilling, and a deleted space vanishes from every window at once. (#925)
diff --git a/src/components/AcceptInvitationModal.tsx b/src/components/AcceptInvitationModal.tsx
index 432fe6564..09b4e7360 100644
--- a/src/components/AcceptInvitationModal.tsx
+++ b/src/components/AcceptInvitationModal.tsx
@@ -26,9 +26,10 @@ import type { InvitationPreview } from "../types/electron";
interface Props {
token: string | null;
onClose: () => void;
+ onAccepted?: (entry: { workspaceId: string; teamIds: string[] }) => void;
}
-export default function AcceptInvitationModal({ token, onClose }: Props) {
+export default function AcceptInvitationModal({ token, onClose, onAccepted }: Props) {
const { t } = useTranslation();
const { toast } = useToast();
const { isSignedIn, user } = useAuth();
@@ -65,9 +66,13 @@ export default function AcceptInvitationModal({ token, onClose }: Props) {
}
setAccepting(true);
try {
- await InvitationsService.accept(token);
+ const accepted = await InvitationsService.accept(token);
clearPendingInvitationToken();
await refresh();
+ // A free invitee just gained a billable seat server-side; refetch usage
+ // so the isSubscribed flag flips and team sync can run (the flag flip
+ // itself kicks another sync pass).
+ window.dispatchEvent(new Event("usage-changed"));
// Pull the just-granted team spaces right away (skeleton rows render
// while their backfill is pending).
syncService.requestSyncAll("manual");
@@ -78,6 +83,10 @@ export default function AcceptInvitationModal({ token, onClose }: Props) {
: undefined,
});
onClose();
+ onAccepted?.({
+ workspaceId: accepted.workspace_id,
+ teamIds: preview?.team_ids ?? [],
+ });
} catch (err) {
toast({
title: t("workspaces.accept.errorTitle"),
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index 3a9cb87de..fb5a3c315 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -101,6 +101,10 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
);
const [showReferrals, setShowReferrals] = useState(false);
const [invitationToken, setInvitationToken] = useState<string | null>(null);
+ const [invitationNotesEntry, setInvitationNotesEntry] = useState<{
+ workspaceId: string;
+ teamIds: string[];
+ } | null>(null);
const [showSearch, setShowSearch] = useState(false);
const showDiscarded = useShowDiscarded();
const [showCloudMigrationBanner, setShowCloudMigrationBanner] = useState(false);
@@ -826,7 +830,14 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
</Suspense>
)}
- <AcceptInvitationModal token={invitationToken} onClose={() => setInvitationToken(null)} />
+ <AcceptInvitationModal
+ token={invitationToken}
+ onClose={() => setInvitationToken(null)}
+ onAccepted={(entry) => {
+ setInvitationNotesEntry(entry);
+ setActiveView("personal-notes");
+ }}
+ />
{showSearch && (
<Suspense fallback={null}>
@@ -1055,6 +1066,8 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
onOpenSearch={() => setShowSearch(true)}
meetingRecordingRequest={meetingRecordingRequest}
onMeetingRecordingRequestHandled={handleMeetingRecordingRequestHandled}
+ invitationEntry={invitationNotesEntry}
+ onInvitationEntryHandled={() => setInvitationNotesEntry(null)}
/>
</Suspense>
)}
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsx
index 2718548e7..6d685d56d 100644
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@ -3464,6 +3464,9 @@ EOF`,
</SettingsRow>
</SettingsPanelRow>
</SettingsPanel>
+ <p className="mt-1 text-xs text-muted-foreground">
+ {t("settingsPage.privacy.cloudBackupTeamCaveat")}
+ </p>
{migration && (
<div className="mt-2 space-y-1">
<div className="flex items-center justify-between text-xs text-muted-foreground">
diff --git a/src/components/notes/CreateSpaceDialog.tsx b/src/components/notes/CreateSpaceDialog.tsx
index dc3fbae3e..596be477e 100644
--- a/src/components/notes/CreateSpaceDialog.tsx
+++ b/src/components/notes/CreateSpaceDialog.tsx
@@ -2,17 +2,30 @@ import { useCallback, useEffect, useMemo, useState } from "react";
import { useShallow } from "zustand/react/shallow";
import { useTranslation } from "react-i18next";
import { Loader2 } from "lucide-react";
-import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../ui/dialog";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ DialogFooter,
+} from "../ui/dialog";
import { Button } from "../ui/button";
import { Input } from "../ui/input";
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
import { useToast } from "../ui/useToast";
import CreateWorkspaceDialog from "../CreateWorkspaceDialog";
import MemberPickList from "../MemberPickList";
import { createTeamSpace } from "../../services/teamSpaceActions";
+import { CloudApiError } from "../../services/cloudApi";
import { useWorkspace } from "../../hooks/useWorkspace";
import { useWorkspaceStore } from "../../stores/workspaceStore";
import { useAuth } from "../../hooks/useAuth";
import { useDelayedFlag } from "../../hooks/useDelayedFlag";
+import {
+ manageableWorkspaces as findManageableWorkspaces,
+ selectWorkspaceForSpaceCreation,
+} from "../../lib/workspaceSelection";
import { revealContainer, setActiveContext } from "../../stores/noteStore";
import type { WorkspaceMember } from "../../types/electron";
@@ -44,13 +57,18 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
const [memberSearch, setMemberSearch] = useState("");
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
const [membersError, setMembersError] = useState(false);
+ const [rosterWorkspaceId, setRosterWorkspaceId] = useState<string | null>(null);
const [isCreating, setIsCreating] = useState(false);
+ const [selectedWorkspaceId, setSelectedWorkspaceId] = useState<string | null>(null);
const showSpinner = useDelayedFlag(isCreating);
- // Multiple workspaces with none active: default to the first the user can
- // create spaces in (owner/admin) — kept deliberately simple for v1.
- const workspace =
- active ?? workspaces.find((w) => w.role === "owner" || w.role === "admin") ?? null;
+ const manageableWorkspaces = useMemo(() => findManageableWorkspaces(workspaces), [workspaces]);
+ const defaultWorkspace = selectWorkspaceForSpaceCreation(manageableWorkspaces, active, null);
+ const workspace = selectWorkspaceForSpaceCreation(
+ manageableWorkspaces,
+ active,
+ selectedWorkspaceId
+ );
// A failed workspace fetch gets a retry state, never the create funnel.
const needsWorkspace = open && loaded && !workspace && !workspacesError;
const workspacesFailed = loaded && !workspace && workspacesError;
@@ -58,8 +76,10 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
const loadMembers = useCallback(
async (workspaceId: string) => {
setMembersError(false);
+ setRosterWorkspaceId(null);
try {
await refreshMembers(workspaceId);
+ setRosterWorkspaceId(workspaceId);
} catch {
setMembersError(true);
}
@@ -71,9 +91,17 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
if (open && workspace) void loadMembers(workspace.id);
}, [open, workspace, loadMembers]);
+ useEffect(() => {
+ if (!open) return;
+ setSelectedWorkspaceId((current) => {
+ if (current && manageableWorkspaces.some((w) => w.id === current)) return current;
+ return defaultWorkspace?.id ?? null;
+ });
+ }, [open, manageableWorkspaces, defaultWorkspace?.id]);
+
const candidates = useMemo(
- () => roster.filter((m) => m.user_id !== user?.id),
- [roster, user?.id]
+ () => (rosterWorkspaceId === workspace?.id ? roster.filter((m) => m.user_id !== user?.id) : []),
+ [roster, rosterWorkspaceId, user?.id, workspace?.id]
);
const filteredCandidates = useMemo(() => {
const query = memberSearch.trim().toLowerCase();
@@ -90,6 +118,8 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
setEmoji("");
setMemberSearch("");
setSelectedIds(new Set());
+ setRosterWorkspaceId(null);
+ setSelectedWorkspaceId(null);
}
};
@@ -112,6 +142,13 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
});
};
+ const handleWorkspaceChange = (workspaceId: string) => {
+ setSelectedWorkspaceId(workspaceId);
+ setSelectedIds(new Set());
+ setMemberSearch("");
+ setMembersError(false);
+ };
+
const handleCreate = async () => {
const trimmed = name.trim();
if (!trimmed || isCreating || !workspace) return;
@@ -140,7 +177,12 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
} catch (err) {
toast({
title: t("notes.spaces.couldNotCreate"),
- description: err instanceof Error ? err.message : t("common.unknownError"),
+ description:
+ err instanceof CloudApiError && err.code === "upgrade_required"
+ ? t("notes.spaces.upgradeRequired")
+ : err instanceof Error
+ ? err.message
+ : t("common.unknownError"),
variant: "destructive",
});
} finally {
@@ -156,6 +198,7 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
<DialogContent className="sm:max-w-95 p-6 gap-5">
<DialogHeader>
<DialogTitle>{t("notes.spaces.createTitle")}</DialogTitle>
+ <DialogDescription>{t("notes.spaces.createDescription")}</DialogDescription>
</DialogHeader>
{workspacesFailed ? (
@@ -181,6 +224,26 @@ export default function CreateSpaceDialog({ open, onOpenChange }: CreateSpaceDia
</div>
) : (
<>
+ {manageableWorkspaces.length > 1 && workspace && (
+ <div className="space-y-1.5">
+ <label className="text-xs font-medium text-foreground/50">
+ {t("settingsPage.workspace.title")}
+ </label>
+ <Select value={workspace.id} onValueChange={handleWorkspaceChange}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {manageableWorkspaces.map((item) => (
+ <SelectItem key={item.id} value={item.id}>
+ {item.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ )}
+
<div className="flex gap-3">
<div className="space-y-1.5 w-14 shrink-0">
<label className="text-xs font-medium text-foreground/50">
diff --git a/src/components/notes/NotesStructureIntroDialog.tsx b/src/components/notes/NotesStructureIntroDialog.tsx
new file mode 100644
index 000000000..e760623cf
--- /dev/null
+++ b/src/components/notes/NotesStructureIntroDialog.tsx
@@ -0,0 +1,92 @@
+import { Building2, ChevronRight, FolderOpen, Lock, Users } from "lucide-react";
+import { useTranslation } from "react-i18next";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "../ui/dialog";
+import { Button } from "../ui/button";
+
+interface NotesStructureIntroDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+export default function NotesStructureIntroDialog({
+ open,
+ onOpenChange,
+}: NotesStructureIntroDialogProps) {
+ const { t } = useTranslation();
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-md p-6 gap-5">
+ <DialogHeader>
+ <DialogTitle>{t("notes.structureIntro.title")}</DialogTitle>
+ <DialogDescription>{t("notes.structureIntro.description")}</DialogDescription>
+ </DialogHeader>
+
+ <div className="space-y-3">
+ <div className="rounded-xl border border-border/50 bg-foreground/[0.025] dark:bg-white/[0.025] p-3.5">
+ <div className="flex items-start gap-3">
+ <div className="mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-foreground/5 text-foreground/50 dark:bg-white/5">
+ <Lock size={13} />
+ </div>
+ <div>
+ <p className="text-xs font-medium text-foreground">
+ {t("notes.structureIntro.personal.title")}
+ </p>
+ <p className="mt-0.5 text-xs leading-relaxed text-muted-foreground">
+ {t("notes.structureIntro.personal.description")}
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div className="rounded-xl border border-primary/15 bg-primary/[0.025] p-3.5">
+ <div className="flex items-start gap-3">
+ <div className="mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-primary/8 text-primary/70">
+ <Building2 size={13} />
+ </div>
+ <div className="min-w-0 flex-1">
+ <p className="text-xs font-medium text-foreground">
+ {t("notes.structureIntro.workspace.title")}
+ </p>
+ <p className="mt-0.5 text-xs leading-relaxed text-muted-foreground">
+ {t("notes.structureIntro.workspace.description")}
+ </p>
+
+ <div className="mt-3 flex items-center gap-2 rounded-lg border border-border/40 bg-background/70 px-3 py-2.5">
+ <ChevronRight size={12} className="shrink-0 text-foreground/25" />
+ <Users size={13} className="shrink-0 text-primary/60" />
+ <div className="min-w-0">
+ <p className="text-xs font-medium text-foreground/80">
+ {t("notes.structureIntro.teamSpace.title")}
+ </p>
+ <p className="text-[11px] leading-relaxed text-muted-foreground">
+ {t("notes.structureIntro.teamSpace.description")}
+ </p>
+ </div>
+ </div>
+
+ <div className="mt-2 flex items-center gap-2 pl-5 text-[11px] text-muted-foreground">
+ <FolderOpen size={12} className="shrink-0" />
+ {t("notes.structureIntro.contents")}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <DialogFooter>
+ <Button size="sm" onClick={() => onOpenChange(false)}>
+ {t("notes.structureIntro.done")}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsx
index cc538ca01..5f44eb3ba 100644
--- a/src/components/notes/PersonalNotesView.tsx
+++ b/src/components/notes/PersonalNotesView.tsx
@@ -17,6 +17,7 @@ import { Input } from "../ui/input";
import { useToast } from "../ui/useToast";
import NoteEditor from "./NoteEditor";
import SpacesTree from "./SpacesTree";
+import NotesStructureIntroDialog from "./NotesStructureIntroDialog";
import ActionPicker from "./ActionPicker";
import ActionManagerDialog from "./ActionManagerDialog";
import AddNotesToFolderDialog from "./AddNotesToFolderDialog";
@@ -41,6 +42,7 @@ import {
useActiveNoteId,
useActiveFolderId,
useActiveContext,
+ useIsTreeLoading,
initializeNotes,
initializeNotesTree,
loadFolders,
@@ -61,8 +63,14 @@ import {
setSessionExpectedCount,
} from "../../stores/meetingRecordingStore";
import { useNotesOnboarding } from "../../hooks/useNotesOnboarding";
+import { useTeamSpacesCapability } from "../../hooks/useTeamSpacesCapability";
+import { useAuth } from "../../hooks/useAuth";
import NotesOnboarding from "./NotesOnboarding";
import { isRegenerableNoteTitle } from "../../helpers/regenerableNoteTitle";
+import {
+ markNotesStructureIntroSeen,
+ shouldShowNotesStructureIntro,
+} from "../../lib/notesStructureIntro";
function makeContentHash(content: string): string {
return String(content.length) + "-" + content.slice(0, 50);
@@ -77,6 +85,8 @@ interface PersonalNotesViewProps {
event: any;
} | null;
onMeetingRecordingRequestHandled?: () => void;
+ invitationEntry?: { workspaceId: string; teamIds: string[] } | null;
+ onInvitationEntryHandled?: () => void;
}
export default function PersonalNotesView({
@@ -84,6 +94,8 @@ export default function PersonalNotesView({
onOpenSearch,
meetingRecordingRequest,
onMeetingRecordingRequestHandled,
+ invitationEntry,
+ onInvitationEntryHandled,
}: PersonalNotesViewProps) {
const isMeetingMode = useIsMeetingMode();
const isNarrowWindow = useIsNarrowWindow();
@@ -124,6 +136,13 @@ export default function PersonalNotesView({
const isCloudMode = useSettingsStore(selectIsCloudNoteFormattingMode);
const effectiveModelId = useSettingsStore((s) => selectResolvedNoteFormatting(s).model);
const { isComplete: isOnboardingComplete, complete: completeOnboarding } = useNotesOnboarding();
+ const { isSignedIn } = useAuth();
+ const teamSpacesAvailable = useTeamSpacesCapability();
+ const isTreeLoading = useIsTreeLoading();
+ const [structureIntroPending, setStructureIntroPending] = useState(() =>
+ shouldShowNotesStructureIntro(localStorage)
+ );
+ const [showStructureIntro, setShowStructureIntro] = useState(false);
const isTranscribing = useMeetingRecordingStore((s) => s.isRecording);
const diarizationSessionId = useMeetingRecordingStore((s) => s.diarizationSessionId);
@@ -140,6 +159,65 @@ export default function PersonalNotesView({
initializeNotesTree();
}, []);
+ useEffect(() => {
+ if (
+ structureIntroPending &&
+ isOnboardingComplete &&
+ isSignedIn &&
+ teamSpacesAvailable &&
+ !isTreeLoading &&
+ !isSidePanelLayout
+ ) {
+ setShowStructureIntro(true);
+ }
+ }, [
+ structureIntroPending,
+ isOnboardingComplete,
+ isSignedIn,
+ teamSpacesAvailable,
+ isTreeLoading,
+ isSidePanelLayout,
+ ]);
+
+ // Arriving via an accepted invitation reopens the structure intro even when
+ // this device has already seen it, and even before notes onboarding is done
+ // (the dialog also renders in the onboarding branch below).
+ useEffect(() => {
+ if (invitationEntry && !isSidePanelLayout) setShowStructureIntro(true);
+ }, [invitationEntry, isSidePanelLayout]);
+
+ // The acceptance modal starts a sync before navigating here. Once the first
+ // invited cloud team appears in the local spaces mirror, take the user to it
+ // instead of leaving the newly shared content hidden behind Personal.
+ useEffect(() => {
+ if (!invitationEntry) return;
+ const invitedTeamIds = new Set(invitationEntry.teamIds);
+ const invitedSpace = spaces.find(
+ (space) =>
+ space.kind === "team" &&
+ space.workspace_id === invitationEntry.workspaceId &&
+ space.cloud_team_id != null &&
+ // Workspace owners/admins receive implicit access, so their invitation
+ // may not enumerate team ids. In that case, open the first accessible
+ // team space belonging to the accepted workspace.
+ (invitedTeamIds.size === 0 || invitedTeamIds.has(space.cloud_team_id))
+ );
+ if (!invitedSpace) return;
+
+ setActiveNoteId(null);
+ revealContainer(invitedSpace.id, null);
+ setActiveContext(invitedSpace.id, null);
+ onInvitationEntryHandled?.();
+ }, [invitationEntry, onInvitationEntryHandled, spaces]);
+
+ const handleStructureIntroOpenChange = useCallback((open: boolean) => {
+ setShowStructureIntro(open);
+ if (!open) {
+ markNotesStructureIntroSeen(localStorage);
+ setStructureIntroPending(false);
+ }
+ }, []);
+
const activeNote = useActiveNote();
// Derive folder name and calendar event name for the metadata chips
@@ -563,7 +641,15 @@ export default function PersonalNotesView({
: null;
if (!isOnboardingComplete) {
- return <NotesOnboarding onComplete={completeOnboarding} />;
+ return (
+ <>
+ <NotesOnboarding onComplete={completeOnboarding} />
+ <NotesStructureIntroDialog
+ open={showStructureIntro}
+ onOpenChange={handleStructureIntroOpenChange}
+ />
+ </>
+ );
}
return (
@@ -619,6 +705,8 @@ export default function PersonalNotesView({
onMoveNote={handleMoveNote}
onCreateFolderAndMove={handleCreateFolderAndMove}
onNewNote={handleNewNoteIn}
+ onShowStructureIntro={() => setShowStructureIntro(true)}
+ onUpgrade={() => onOpenSettings?.("plansBilling")}
/>
</div>
</div>
@@ -986,6 +1074,11 @@ export default function PersonalNotesView({
</DialogFooter>
</DialogContent>
</Dialog>
+
+ <NotesStructureIntroDialog
+ open={showStructureIntro}
+ onOpenChange={handleStructureIntroOpenChange}
+ />
</div>
);
}
diff --git a/src/components/notes/ShareNoteDialog.tsx b/src/components/notes/ShareNoteDialog.tsx
index f9cb11140..a5ad5867e 100644
--- a/src/components/notes/ShareNoteDialog.tsx
+++ b/src/components/notes/ShareNoteDialog.tsx
@@ -18,6 +18,7 @@ import {
type ShareMutationResponse,
} from "../../services/NoteSharingService.js";
import { syncService } from "../../services/SyncService.js";
+import { CloudApiError } from "../../services/cloudApi.js";
import {
getShareCacheEntry,
persistNoteShareState,
@@ -205,7 +206,10 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
rawToken: previous.rawToken,
}));
toast({
- title: t("noteEditor.share.dialog.error.visibilityFailed"),
+ title:
+ err instanceof CloudApiError && err.code === "upgrade_required"
+ ? t("noteEditor.share.dialog.error.upgradeRequired")
+ : t("noteEditor.share.dialog.error.visibilityFailed"),
variant: "destructive",
});
return null;
@@ -308,7 +312,11 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
}
} catch (err) {
console.error("Invite failed:", err);
- setInputError(t("noteEditor.share.dialog.error.inviteFailed"));
+ setInputError(
+ err instanceof CloudApiError && err.code === "upgrade_required"
+ ? t("noteEditor.share.dialog.error.upgradeRequired")
+ : t("noteEditor.share.dialog.error.inviteFailed")
+ );
} finally {
setSubmitting(false);
}
diff --git a/src/components/notes/SpacesTree.tsx b/src/components/notes/SpacesTree.tsx
index c5258de42..b7b14f8c7 100644
--- a/src/components/notes/SpacesTree.tsx
+++ b/src/components/notes/SpacesTree.tsx
@@ -1,4 +1,4 @@
-import { useMemo, useRef, useState } from "react";
+import { useMemo, useRef, useState, useSyncExternalStore } from "react";
import { useTranslation } from "react-i18next";
import {
Check,
@@ -7,6 +7,7 @@ import {
FileText,
Folder,
FolderOpen,
+ Info,
Loader2,
Lock,
LogOut,
@@ -42,6 +43,7 @@ import { useTeamSpacesCapability } from "../../hooks/useTeamSpacesCapability";
import { useAuth } from "../../hooks/useAuth";
import { useWorkspace } from "../../hooks/useWorkspace";
import { canManageSpace } from "../../lib/spacePermissions";
+import { readIsSubscribed, subscribeIsSubscribed } from "../../lib/subscriptionFlag";
import { NoteSharingService } from "../../services/NoteSharingService";
import { deleteTeamSpace, leaveTeamSpace, renameTeamSpace } from "../../services/teamSpaceActions";
import { useSettingsStore } from "../../stores/settingsStore";
@@ -123,6 +125,8 @@ interface SpacesTreeProps {
onMoveNote: (noteId: number, target: NoteMoveTarget) => Promise<void>;
onCreateFolderAndMove: (noteId: number, folderName: string) => void;
onNewNote: (spaceId: number, folderId: number | null) => void;
+ onShowStructureIntro?: () => void;
+ onUpgrade?: () => void;
}
function spaceDisplayName(space: SpaceItem, t: TFn): string {
@@ -1020,6 +1024,8 @@ export default function SpacesTree({
onMoveNote,
onCreateFolderAndMove,
onNewNote,
+ onShowStructureIntro,
+ onUpgrade,
}: SpacesTreeProps) {
const { t } = useTranslation();
const { toast, dismiss } = useToast();
@@ -1035,6 +1041,7 @@ export default function SpacesTree({
const activeNoteId = useActiveNoteId();
const isTreeLoading = useIsTreeLoading();
const teamCapability = useTeamSpacesCapability();
+ const isSubscribed = useSyncExternalStore(subscribeIsSubscribed, readIsSubscribed);
const { isSignedIn, user } = useAuth();
const { workspaces, loaded: workspacesLoaded } = useWorkspace();
const noteFilesEnabled = useSettingsStore((s) => s.noteFilesEnabled);
@@ -1059,6 +1066,23 @@ export default function SpacesTree({
const privateSpaces = useMemo(() => spaces.filter((s) => s.kind === "private"), [spaces]);
const teamSpaces = useMemo(() => spaces.filter((s) => s.kind === "team"), [spaces]);
+ const showWorkspaceGroups = workspaces.length > 1;
+ const teamSpaceGroups = useMemo(
+ () =>
+ workspaces
+ .map((workspace) => ({
+ workspace,
+ spaces: teamSpaces.filter((space) => space.workspace_id === workspace.id),
+ }))
+ .filter((group) => group.spaces.length > 0),
+ [teamSpaces, workspaces]
+ );
+ const ungroupedTeamSpaces = useMemo(() => {
+ const workspaceIds = new Set(workspaces.map((workspace) => workspace.id));
+ return teamSpaces.filter(
+ (space) => space.workspace_id == null || !workspaceIds.has(space.workspace_id)
+ );
+ }, [teamSpaces, workspaces]);
const visibleSpaces = teamCapability ? spaces : privateSpaces;
// The server 403s team creation for plain members; no-workspace users get the create funnel.
@@ -1817,27 +1841,62 @@ export default function SpacesTree({
{teamCapability && (
<div role="none" className="group/section">
<SectionHeader
- label={t("notes.spaces.teamSpaces")}
+ label={
+ showWorkspaceGroups
+ ? t("workspaces.switcher.workspaces")
+ : t("notes.spaces.teamSpaces")
+ }
className="mt-3"
action={
- canCreateTeamSpace ? (
- <Button
- variant="ghost"
- size="icon"
- aria-label={t("notes.spaces.newSpace")}
- onClick={() => setShowCreateSpace(true)}
- className={cn(
- "h-5 w-5 rounded-sm opacity-0 group-hover/section:opacity-100 focus-visible:opacity-100",
- "transition-opacity text-muted-foreground/60 dark:text-muted-foreground/40",
- "hover:text-foreground/60 hover:bg-foreground/5 active:bg-foreground/8"
- )}
- >
- <Plus size={12} />
- </Button>
- ) : undefined
+ <div className="flex items-center gap-px">
+ {onShowStructureIntro && (
+ <Button
+ variant="ghost"
+ size="icon"
+ aria-label={t("notes.structureIntro.reopen")}
+ onClick={onShowStructureIntro}
+ className={cn(
+ "h-5 w-5 rounded-sm opacity-0 group-hover/section:opacity-100 focus-visible:opacity-100",
+ "transition-opacity text-muted-foreground/60 dark:text-muted-foreground/40",
+ "hover:text-foreground/60 hover:bg-foreground/5 active:bg-foreground/8"
+ )}
+ >
+ <Info size={11} />
+ </Button>
+ )}
+ {canCreateTeamSpace && (
+ <Button
+ variant="ghost"
+ size="icon"
+ aria-label={t("notes.spaces.newSpace")}
+ onClick={() => setShowCreateSpace(true)}
+ className={cn(
+ "h-5 w-5 rounded-sm opacity-0 group-hover/section:opacity-100 focus-visible:opacity-100",
+ "transition-opacity text-muted-foreground/60 dark:text-muted-foreground/40",
+ "hover:text-foreground/60 hover:bg-foreground/5 active:bg-foreground/8"
+ )}
+ >
+ <Plus size={12} />
+ </Button>
+ )}
+ </div>
}
/>
- {teamSpaces.map(renderSpace)}
+ {showWorkspaceGroups
+ ? teamSpaceGroups.map(({ workspace, spaces: workspaceSpaces }) => (
+ <div key={workspace.id} role="group" aria-label={workspace.name} className="mt-1">
+ <div
+ role="none"
+ title={workspace.name}
+ className="h-5 px-4 text-[10px] font-medium text-foreground/40 truncate"
+ >
+ {workspace.name}
+ </div>
+ {workspaceSpaces.map(renderSpace)}
+ </div>
+ ))
+ : teamSpaces.map(renderSpace)}
+ {showWorkspaceGroups && ungroupedTeamSpaces.map(renderSpace)}
{teamSpaces.length === 0 &&
(canCreateTeamSpace ? (
<div className="pl-[18px] pr-2 py-1">
@@ -1858,6 +1917,24 @@ export default function SpacesTree({
))}
</div>
)}
+ {!teamCapability && isSignedIn && !isSubscribed && (
+ <div role="none">
+ <SectionHeader label={t("notes.spaces.teamSpaces")} className="mt-3" />
+ <p className="pl-[18px] pr-2 py-1 text-xs text-foreground/40 leading-relaxed">
+ {t("notes.spaces.lockedPitch")}
+ </p>
+ <div className="pl-[18px] pr-2 pb-1">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={onUpgrade}
+ className="h-6 px-2 text-xs gap-1 text-primary/70 hover:text-primary hover:bg-primary/8"
+ >
+ {t("settingsPage.account.pricing.upgrade")}
+ </Button>
+ </div>
+ </div>
+ )}
</div>
<CreateSpaceDialog open={showCreateSpace} onOpenChange={setShowCreateSpace} />
diff --git a/src/lib/notesStructureIntro.ts b/src/lib/notesStructureIntro.ts
new file mode 100644
index 000000000..a8cf21bd4
--- /dev/null
+++ b/src/lib/notesStructureIntro.ts
@@ -0,0 +1,19 @@
+type IntroStorage = Pick<Storage, "getItem" | "setItem">;
+
+export const NOTES_STRUCTURE_INTRO_VERSION = 1;
+export const NOTES_STRUCTURE_INTRO_STORAGE_KEY = "notesStructureIntroVersion";
+
+export function shouldShowNotesStructureIntro(
+ storage: IntroStorage,
+ version: number = NOTES_STRUCTURE_INTRO_VERSION
+): boolean {
+ const seenVersion = Number(storage.getItem(NOTES_STRUCTURE_INTRO_STORAGE_KEY));
+ return !Number.isFinite(seenVersion) || seenVersion < version;
+}
+
+export function markNotesStructureIntroSeen(
+ storage: IntroStorage,
+ version: number = NOTES_STRUCTURE_INTRO_VERSION
+): void {
+ storage.setItem(NOTES_STRUCTURE_INTRO_STORAGE_KEY, String(version));
+}
diff --git a/src/lib/workspaceSelection.ts b/src/lib/workspaceSelection.ts
new file mode 100644
index 000000000..785ae90d4
--- /dev/null
+++ b/src/lib/workspaceSelection.ts
@@ -0,0 +1,16 @@
+import type { Workspace } from "../types/electron";
+
+export function manageableWorkspaces(workspaces: Workspace[]): Workspace[] {
+ return workspaces.filter((workspace) => workspace.role === "owner" || workspace.role === "admin");
+}
+
+export function selectWorkspaceForSpaceCreation(
+ manageable: Workspace[],
+ active: Workspace | null,
+ selectedWorkspaceId: string | null
+): Workspace | null {
+ const selected = manageable.find((workspace) => workspace.id === selectedWorkspaceId);
+ if (selected) return selected;
+ const activeManageable = active && manageable.find((workspace) => workspace.id === active.id);
+ return activeManageable ?? manageable[0] ?? null;
+}
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 7e3585e4b..85a3b534c 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -1205,7 +1205,7 @@
"tab": {
"general": "Allgemein",
"members": "Mitglieder",
- "teams": "Teams",
+ "teams": "Team-Bereiche",
"billing": "Abrechnung",
"developer": "Entwickler"
},
@@ -1258,13 +1258,13 @@
}
},
"teams": {
- "title": "Teams",
- "description": "Mitglieder gruppieren für gezieltes Teilen.",
- "new": "Neues Team",
- "empty": "Noch keine Teams.",
- "createFirst": "Erstellen Sie Ihr erstes Team",
- "createTitle": "Team erstellen",
- "nameLabel": "Team-Name",
+ "title": "Team-Bereiche",
+ "description": "Organisieren Sie gemeinsame Ordner und Notizen für ausgewählte Workspace-Mitglieder.",
+ "new": "Neuer Team-Bereich",
+ "empty": "Noch keine Team-Bereiche.",
+ "createFirst": "Erstellen Sie Ihren ersten Team-Bereich",
+ "createTitle": "Team-Bereich erstellen",
+ "nameLabel": "Name des Team-Bereichs",
"memberCount_one": "{{count}} Mitglied",
"memberCount_other": "{{count}} Mitglieder"
},
@@ -1438,6 +1438,7 @@
"Unbegrenzte Cloud-Transkription",
"20 Stunden Meeting-Aufnahmen/Monat",
"Geräteübergreifende Synchronisierung",
+ "Notizen per öffentlichem Link teilen",
"Persönlicher API-Zugang",
"MCP-Integration in all deinen Apps",
"Mobile App (iOS demnächst verfügbar)",
@@ -1456,6 +1457,8 @@
"includesPrefix": "Alle Pro-Funktionen +",
"badge": "Beliebteste Wahl",
"features": [
+ "Team-Bereiche für gemeinsame Notizen",
+ "Workspace-Rollen & Mitgliederverwaltung",
"Unbegrenzte Meeting-Aufnahmen",
"Agentenmodus",
"Chat über Ihre Daten",
@@ -1896,6 +1899,7 @@
"privacy": {
"cloudBackup": "Cloud-Backup",
"cloudBackupDescription": "Sichern Sie Ihre Transkriptionen und Notizen in der Cloud für nahtlosen Zugriff auf allen Geräten.",
+ "cloudBackupTeamCaveat": "Notizen in Team-Bereichen und geteilte Notizen werden unabhängig von dieser Einstellung immer synchronisiert.",
"cloudNotesMigration": "Notizen werden gesichert… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Alle Notizen gesichert",
"description": "Steuern Sie, welche Daten Ihr Gerät verlassen. Standardmäßig ist alles deaktiviert.",
@@ -2211,7 +2215,7 @@
},
"create": {
"title": "Workspace erstellen",
- "description": "Workspaces ermöglichen Zusammenarbeit, geteilte Notizen und gemeinsame Abrechnung.",
+ "description": "Ein Workspace bündelt die Mitglieder und Abrechnung Ihrer Organisation. Darin erstellen Sie Team-Bereiche für gemeinsame Notizen.",
"nameLabel": "Workspace-Name",
"namePlaceholder": "Acme Corp",
"submit": "Workspace erstellen",
@@ -2386,8 +2390,9 @@
"teamSpaces": "Team-Bereiche",
"personal": "Persönlich",
"privateTooltip": "Nur du kannst deinen persönlichen Bereich sehen",
- "newSpace": "Neuer Bereich",
- "createTitle": "Bereich erstellen",
+ "newSpace": "Neuer Team-Bereich",
+ "createTitle": "Team-Bereich erstellen",
+ "createDescription": "Ein gemeinsamer Bereich in einem Workspace für ausgewählte Teammitglieder.",
"nameLabel": "Name",
"emojiLabel": "Emoji",
"create": "Erstellen",
@@ -2423,6 +2428,8 @@
"undo": "Rückgängig",
"emptySpace": "Noch keine Notizen. Notizen hier sind für alle in {{space}} sichtbar.",
"emptyTeamHint": "Mit Ihnen geteilte Bereiche erscheinen hier.",
+ "lockedPitch": "Erstellen Sie gemeinsame Bereiche, in denen die Notizen Ihres Teams synchron bleiben.",
+ "upgradeRequired": "Team-Bereiche erfordern einen kostenpflichtigen Tarif.",
"noteCount_one": "{{count}} Notiz",
"noteCount_other": "{{count}} Notizen",
"accessRevoked": "Du hast keinen Zugriff mehr auf {{space}}",
@@ -2452,6 +2459,25 @@
"invitedTo_one": "Sie treten {{count}} Team-Bereich bei",
"invitedTo_other": "Sie treten {{count}} Team-Bereichen bei"
},
+ "structureIntro": {
+ "title": "Wo Ihre Notizen gespeichert sind",
+ "description": "OpenWhispr trennt private Gedanken von gemeinsamer Arbeit, damit nur die richtigen Personen Ihre Notizen sehen.",
+ "personal": {
+ "title": "Persönlicher Bereich",
+ "description": "Nur Sie können die Ordner und Notizen hier sehen."
+ },
+ "workspace": {
+ "title": "Workspace",
+ "description": "Hier werden Mitglieder, Rollen und Abrechnung Ihrer Organisation verwaltet."
+ },
+ "teamSpace": {
+ "title": "Team-Bereich",
+ "description": "Ein gemeinsamer Bereich in einem Workspace für ausgewählte Teammitglieder."
+ },
+ "contents": "Jeder Bereich kann Ordner und Notizen enthalten.",
+ "done": "Verstanden",
+ "reopen": "Organisation der Bereiche erklären"
+ },
"folders": {
"title": "Ordner",
"soon": "Demnächst",
@@ -3084,6 +3110,7 @@
"alreadyInvited": "{{email}} ist bereits eingeladen",
"inviteFailed": "Die Einladung konnte nicht gesendet werden. Versuche es erneut.",
"visibilityFailed": "Die Freigabe konnte nicht aktualisiert werden. Versuche es erneut.",
+ "upgradeRequired": "Das Teilen von Notizen erfordert einen kostenpflichtigen Tarif.",
"copyFailed": "Der Link konnte nicht kopiert werden. Versuche es erneut.",
"revokeFailed": "Die Einladung konnte nicht entfernt werden. Versuche es erneut.",
"resendFailed": "Die Einladung konnte nicht erneut gesendet werden. Versuche es erneut.",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 6d272035d..0a6423e7d 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -1205,7 +1205,7 @@
"tab": {
"general": "General",
"members": "Members",
- "teams": "Teams",
+ "teams": "Team spaces",
"billing": "Billing",
"developer": "Developer"
},
@@ -1258,13 +1258,13 @@
}
},
"teams": {
- "title": "Teams",
- "description": "Group members for scoped sharing.",
- "new": "New team",
- "empty": "No teams yet.",
- "createFirst": "Create your first team",
- "createTitle": "Create team",
- "nameLabel": "Team name",
+ "title": "Team spaces",
+ "description": "Organize shared folders and notes for selected workspace members.",
+ "new": "New team space",
+ "empty": "No team spaces yet.",
+ "createFirst": "Create your first team space",
+ "createTitle": "Create team space",
+ "nameLabel": "Team space name",
"memberCount_one": "{{count}} member",
"memberCount_other": "{{count}} members"
},
@@ -1438,6 +1438,7 @@
"Unlimited cloud transcription",
"20 hours of meeting recordings/month",
"Sync across devices",
+ "Share notes with public links",
"Personal API access",
"MCP integration in all your apps",
"Mobile app (iOS Coming Soon)",
@@ -1456,6 +1457,8 @@
"includesPrefix": "All Pro features +",
"badge": "Most Popular",
"features": [
+ "Team spaces for shared notes",
+ "Workspace roles & member management",
"Unlimited meeting recordings",
"Agent mode",
"Chat over your data",
@@ -1896,6 +1899,7 @@
"privacy": {
"cloudBackup": "Cloud backup",
"cloudBackupDescription": "Back up your transcriptions and notes to the cloud for seamless access across devices.",
+ "cloudBackupTeamCaveat": "Notes in team spaces and notes you've shared always sync, regardless of this setting.",
"cloudNotesMigration": "Backing up notes… {{done}} / {{total}}",
"cloudNotesMigrationDone": "All notes backed up",
"description": "Control what data leaves your device. Everything is off by default.",
@@ -2211,7 +2215,7 @@
},
"create": {
"title": "Create workspace",
- "description": "Workspaces let you collaborate, share notes, and manage billing in one place.",
+ "description": "A workspace brings your organization's members and billing together. Create team spaces inside it for shared notes.",
"nameLabel": "Workspace name",
"namePlaceholder": "Acme Corp",
"submit": "Create workspace",
@@ -2386,8 +2390,9 @@
"teamSpaces": "Team spaces",
"personal": "Personal",
"privateTooltip": "Only you can see your Personal space",
- "newSpace": "New space",
- "createTitle": "Create space",
+ "newSpace": "New team space",
+ "createTitle": "Create team space",
+ "createDescription": "A shared area inside a workspace for selected teammates.",
"nameLabel": "Name",
"emojiLabel": "Emoji",
"create": "Create",
@@ -2423,6 +2428,8 @@
"undo": "Undo",
"emptySpace": "No notes yet. Notes here are visible to everyone in {{space}}.",
"emptyTeamHint": "Spaces shared with you will appear here.",
+ "lockedPitch": "Create shared spaces where your team's notes stay in sync.",
+ "upgradeRequired": "Team spaces require a paid plan.",
"noteCount_one": "{{count}} note",
"noteCount_other": "{{count}} notes",
"accessRevoked": "You no longer have access to {{space}}",
@@ -2452,6 +2459,25 @@
"invitedTo_one": "You'll join {{count}} team space",
"invitedTo_other": "You'll join {{count}} team spaces"
},
+ "structureIntro": {
+ "title": "Where your notes live",
+ "description": "OpenWhispr separates private thoughts from shared work so the right people see the right notes.",
+ "personal": {
+ "title": "Personal space",
+ "description": "Only you can see the folders and notes here."
+ },
+ "workspace": {
+ "title": "Workspace",
+ "description": "The home for your organization's members, roles, and billing."
+ },
+ "teamSpace": {
+ "title": "Team space",
+ "description": "A shared area inside a workspace for selected teammates."
+ },
+ "contents": "Each space can contain folders and notes.",
+ "done": "Got it",
+ "reopen": "Learn how spaces are organized"
+ },
"folders": {
"title": "Folders",
"soon": "Soon",
@@ -3084,6 +3110,7 @@
"alreadyInvited": "{{email}} is already invited",
"inviteFailed": "Couldn't send the invitation. Try again.",
"visibilityFailed": "Couldn't update sharing. Try again.",
+ "upgradeRequired": "Sharing notes requires a paid plan.",
"copyFailed": "Couldn't copy the link. Try again.",
"revokeFailed": "Couldn't remove the invitation. Try again.",
"resendFailed": "Couldn't resend the invitation. Try again.",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index a99b9aff7..671c17bc9 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -1228,6 +1228,7 @@
"Transcripción en la nube ilimitada",
"20 horas de grabaciones de reuniones/mes",
"Sincronización entre dispositivos",
+ "Comparte notas con enlaces públicos",
"Acceso personal a la API",
"Integración MCP en todas tus apps",
"Aplicación móvil (iOS próximamente)",
@@ -1246,6 +1247,8 @@
"includesPrefix": "Todas las funciones de Pro +",
"badge": "Más popular",
"features": [
+ "Espacios de equipo para notas compartidas",
+ "Roles y gestión de miembros del espacio de trabajo",
"Grabaciones de reuniones ilimitadas",
"Modo agente",
"Chatea sobre tus datos",
@@ -1686,6 +1689,7 @@
"privacy": {
"cloudBackup": "Respaldo en la nube",
"cloudBackupDescription": "Respalda tus transcripciones y notas en la nube para acceder desde cualquier dispositivo.",
+ "cloudBackupTeamCaveat": "Las notas en espacios de equipo y las notas que has compartido siempre se sincronizan, independientemente de este ajuste.",
"cloudNotesMigration": "Respaldando notas… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Todas las notas respaldadas",
"description": "Controla qué datos salen de tu dispositivo. Todo está desactivado por defecto.",
@@ -1863,7 +1867,7 @@
"tab": {
"general": "General",
"members": "Miembros",
- "teams": "Equipos",
+ "teams": "Espacios de equipo",
"billing": "Facturación",
"developer": "Desarrollador"
},
@@ -1916,13 +1920,13 @@
}
},
"teams": {
- "title": "Equipos",
- "description": "Agrupa miembros para compartir con alcance limitado.",
- "new": "Nuevo equipo",
- "empty": "Aún no hay equipos.",
- "createFirst": "Crea tu primer equipo",
- "createTitle": "Crear equipo",
- "nameLabel": "Nombre del equipo",
+ "title": "Espacios de equipo",
+ "description": "Organiza carpetas y notas compartidas para miembros seleccionados del espacio de trabajo.",
+ "new": "Nuevo espacio de equipo",
+ "empty": "Aún no hay espacios de equipo.",
+ "createFirst": "Crea tu primer espacio de equipo",
+ "createTitle": "Crear espacio de equipo",
+ "nameLabel": "Nombre del espacio de equipo",
"memberCount_one": "{{count}} miembro",
"memberCount_other": "{{count}} miembros"
},
@@ -2226,8 +2230,9 @@
"teamSpaces": "Espacios de equipo",
"personal": "Personal",
"privateTooltip": "Solo tú puedes ver tu espacio personal",
- "newSpace": "Nuevo espacio",
- "createTitle": "Crear espacio",
+ "newSpace": "Nuevo espacio de equipo",
+ "createTitle": "Crear espacio de equipo",
+ "createDescription": "Un área compartida dentro de un espacio de trabajo para compañeros seleccionados.",
"nameLabel": "Nombre",
"emojiLabel": "Emoji",
"create": "Crear",
@@ -2263,6 +2268,8 @@
"undo": "Deshacer",
"emptySpace": "Aún no hay notas. Las notas aquí son visibles para todos en {{space}}.",
"emptyTeamHint": "Los espacios compartidos contigo aparecerán aquí.",
+ "lockedPitch": "Crea espacios compartidos donde las notas de tu equipo se mantienen sincronizadas.",
+ "upgradeRequired": "Los espacios de equipo requieren un plan de pago.",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} notas",
"accessRevoked": "Ya no tienes acceso a {{space}}",
@@ -2292,6 +2299,25 @@
"invitedTo_one": "Te unirás a {{count}} espacio de equipo",
"invitedTo_other": "Te unirás a {{count}} espacios de equipo"
},
+ "structureIntro": {
+ "title": "Dónde están tus notas",
+ "description": "OpenWhispr separa las ideas privadas del trabajo compartido para que las notas lleguen a las personas adecuadas.",
+ "personal": {
+ "title": "Espacio personal",
+ "description": "Solo tú puedes ver las carpetas y notas de este espacio."
+ },
+ "workspace": {
+ "title": "Espacio de trabajo",
+ "description": "El lugar de los miembros, roles y facturación de tu organización."
+ },
+ "teamSpace": {
+ "title": "Espacio de equipo",
+ "description": "Un área compartida dentro de un espacio de trabajo para compañeros seleccionados."
+ },
+ "contents": "Cada espacio puede contener carpetas y notas.",
+ "done": "Entendido",
+ "reopen": "Cómo se organizan los espacios"
+ },
"folders": {
"title": "Carpetas",
"soon": "Próximamente",
@@ -3027,6 +3053,7 @@
"alreadyInvited": "{{email}} ya está invitado",
"inviteFailed": "No se pudo enviar la invitación. Inténtalo de nuevo.",
"visibilityFailed": "No se pudo actualizar el uso compartido. Inténtalo de nuevo.",
+ "upgradeRequired": "Compartir notas requiere un plan de pago.",
"copyFailed": "No se pudo copiar el enlace. Inténtalo de nuevo.",
"revokeFailed": "No se pudo quitar la invitación. Inténtalo de nuevo.",
"resendFailed": "No se pudo reenviar la invitación. Inténtalo de nuevo.",
@@ -3099,7 +3126,7 @@
},
"create": {
"title": "Crear espacio de trabajo",
- "description": "Los espacios de trabajo te permiten colaborar, compartir notas y administrar la facturación.",
+ "description": "Un espacio de trabajo reúne a los miembros y la facturación de tu organización. Crea dentro espacios de equipo para notas compartidas.",
"nameLabel": "Nombre del espacio de trabajo",
"namePlaceholder": "Acme Corp",
"submit": "Crear espacio de trabajo",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 79ccf94e9..c8cd8b46f 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -1205,7 +1205,7 @@
"tab": {
"general": "Général",
"members": "Membres",
- "teams": "Équipes",
+ "teams": "Espaces d'équipe",
"billing": "Facturation",
"developer": "Développeur"
},
@@ -1258,13 +1258,13 @@
}
},
"teams": {
- "title": "Équipes",
- "description": "Groupez les membres pour un partage ciblé.",
- "new": "Nouvelle équipe",
- "empty": "Aucune équipe.",
- "createFirst": "Créez votre première équipe",
- "createTitle": "Créer une équipe",
- "nameLabel": "Nom de l'équipe",
+ "title": "Espaces d'équipe",
+ "description": "Organisez des dossiers et notes partagés pour certains membres de l'espace de travail.",
+ "new": "Nouvel espace d'équipe",
+ "empty": "Aucun espace d'équipe.",
+ "createFirst": "Créez votre premier espace d'équipe",
+ "createTitle": "Créer un espace d'équipe",
+ "nameLabel": "Nom de l'espace d'équipe",
"memberCount_one": "{{count}} membre",
"memberCount_other": "{{count}} membres"
},
@@ -1438,6 +1438,7 @@
"Transcription cloud illimitée",
"20 heures d'enregistrements de réunions/mois",
"Synchronisation entre appareils",
+ "Partagez des notes via des liens publics",
"Accès personnel à l'API",
"Intégration MCP dans toutes vos apps",
"Application mobile (iOS bientôt disponible)",
@@ -1456,6 +1457,8 @@
"includesPrefix": "Toutes les fonctionnalités Pro +",
"badge": "Le plus populaire",
"features": [
+ "Espaces d'équipe pour des notes partagées",
+ "Rôles et gestion des membres de l'espace de travail",
"Enregistrements de réunions illimités",
"Mode agent",
"Discutez avec vos données",
@@ -1896,6 +1899,7 @@
"privacy": {
"cloudBackup": "Sauvegarde cloud",
"cloudBackupDescription": "Sauvegardez vos transcriptions et notes dans le cloud pour un accès fluide sur tous vos appareils.",
+ "cloudBackupTeamCaveat": "Les notes des espaces d'équipe et celles que vous avez partagées sont toujours synchronisées, quel que soit ce réglage.",
"cloudNotesMigration": "Sauvegarde des notes… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Toutes les notes sauvegardées",
"description": "Contrôlez quelles données quittent votre appareil. Tout est désactivé par défaut.",
@@ -2211,7 +2215,7 @@
},
"create": {
"title": "Créer un espace de travail",
- "description": "Les espaces de travail vous permettent de collaborer, partager des notes et gérer la facturation.",
+ "description": "Un espace de travail réunit les membres et la facturation de votre organisation. Créez-y des espaces d'équipe pour les notes partagées.",
"nameLabel": "Nom de l'espace de travail",
"namePlaceholder": "Acme Corp",
"submit": "Créer l'espace",
@@ -2386,8 +2390,9 @@
"teamSpaces": "Espaces d'équipe",
"personal": "Personnel",
"privateTooltip": "Vous seul pouvez voir votre espace personnel",
- "newSpace": "Nouvel espace",
- "createTitle": "Créer un espace",
+ "newSpace": "Nouvel espace d'équipe",
+ "createTitle": "Créer un espace d'équipe",
+ "createDescription": "Un espace partagé au sein d'un espace de travail pour certains coéquipiers.",
"nameLabel": "Nom",
"emojiLabel": "Émoji",
"create": "Créer",
@@ -2423,6 +2428,8 @@
"undo": "Annuler",
"emptySpace": "Aucune note pour le moment. Les notes ici sont visibles par tous les membres de {{space}}.",
"emptyTeamHint": "Les espaces partagés avec vous apparaîtront ici.",
+ "lockedPitch": "Créez des espaces partagés où les notes de votre équipe restent synchronisées.",
+ "upgradeRequired": "Les espaces d'équipe nécessitent un forfait payant.",
"noteCount_one": "{{count}} note",
"noteCount_other": "{{count}} notes",
"accessRevoked": "Vous n'avez plus accès à {{space}}",
@@ -2452,6 +2459,25 @@
"invitedTo_one": "Vous rejoindrez {{count}} espace d'équipe",
"invitedTo_other": "Vous rejoindrez {{count}} espaces d'équipe"
},
+ "structureIntro": {
+ "title": "Où se trouvent vos notes",
+ "description": "OpenWhispr sépare les idées privées du travail partagé afin que les bonnes personnes voient les bonnes notes.",
+ "personal": {
+ "title": "Espace personnel",
+ "description": "Vous seul pouvez voir les dossiers et les notes qui s'y trouvent."
+ },
+ "workspace": {
+ "title": "Espace de travail",
+ "description": "L'espace des membres, des rôles et de la facturation de votre organisation."
+ },
+ "teamSpace": {
+ "title": "Espace d'équipe",
+ "description": "Un espace partagé au sein d'un espace de travail pour certains coéquipiers."
+ },
+ "contents": "Chaque espace peut contenir des dossiers et des notes.",
+ "done": "Compris",
+ "reopen": "Comprendre l'organisation des espaces"
+ },
"folders": {
"title": "Dossiers",
"soon": "Bientôt",
@@ -3084,6 +3110,7 @@
"alreadyInvited": "{{email}} est déjà invité(e)",
"inviteFailed": "Impossible d'envoyer l'invitation. Réessayez.",
"visibilityFailed": "Impossible de modifier le partage. Réessayez.",
+ "upgradeRequired": "Le partage de notes nécessite un forfait payant.",
"copyFailed": "Impossible de copier le lien. Réessayez.",
"revokeFailed": "Impossible de retirer l'invitation. Réessayez.",
"resendFailed": "Impossible de renvoyer l'invitation. Réessayez.",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index db30eec9e..2d66272c2 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -1200,6 +1200,7 @@
"Trascrizione cloud illimitata",
"20 ore di registrazioni riunioni/mese",
"Sincronizzazione tra dispositivi",
+ "Condividi note con link pubblici",
"Accesso personale all'API",
"Integrazione MCP in tutte le tue app",
"App mobile (iOS in arrivo)",
@@ -1218,6 +1219,8 @@
"includesPrefix": "Tutte le funzionalità Pro +",
"badge": "Più popolare",
"features": [
+ "Spazi del team per note condivise",
+ "Ruoli e gestione dei membri dell'area di lavoro",
"Registrazioni riunioni illimitate",
"Modalità agente",
"Chatta con i tuoi dati",
@@ -1638,6 +1641,7 @@
"privacy": {
"cloudBackup": "Backup cloud",
"cloudBackupDescription": "Salva trascrizioni e note nel cloud per un accesso senza interruzioni da tutti i dispositivi.",
+ "cloudBackupTeamCaveat": "Le note negli spazi del team e quelle che hai condiviso vengono sempre sincronizzate, indipendentemente da questa impostazione.",
"cloudNotesMigration": "Backup delle note in corso… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Tutte le note salvate nel cloud",
"description": "Controlla quali dati escono dal tuo dispositivo. Tutto è disattivato per impostazione predefinita.",
@@ -1815,7 +1819,7 @@
"tab": {
"general": "Generale",
"members": "Membri",
- "teams": "Team",
+ "teams": "Spazi del team",
"billing": "Fatturazione",
"developer": "Sviluppatore"
},
@@ -1868,13 +1872,13 @@
}
},
"teams": {
- "title": "Team",
- "description": "Raggruppa i membri per una condivisione mirata.",
- "new": "Nuovo team",
- "empty": "Ancora nessun team.",
- "createFirst": "Crea il tuo primo team",
- "createTitle": "Crea team",
- "nameLabel": "Nome del team",
+ "title": "Spazi del team",
+ "description": "Organizza cartelle e note condivise per membri selezionati dell'area di lavoro.",
+ "new": "Nuovo spazio del team",
+ "empty": "Ancora nessuno spazio del team.",
+ "createFirst": "Crea il tuo primo spazio del team",
+ "createTitle": "Crea spazio del team",
+ "nameLabel": "Nome dello spazio del team",
"memberCount_one": "{{count}} membro",
"memberCount_other": "{{count}} membri"
},
@@ -2178,8 +2182,9 @@
"teamSpaces": "Spazi del team",
"personal": "Personale",
"privateTooltip": "Solo tu puoi vedere il tuo spazio personale",
- "newSpace": "Nuovo spazio",
- "createTitle": "Crea spazio",
+ "newSpace": "Nuovo spazio del team",
+ "createTitle": "Crea spazio del team",
+ "createDescription": "Un'area condivisa in un'area di lavoro per i membri selezionati del team.",
"nameLabel": "Nome",
"emojiLabel": "Emoji",
"create": "Crea",
@@ -2215,6 +2220,8 @@
"undo": "Annulla",
"emptySpace": "Ancora nessuna nota. Le note qui sono visibili a tutti in {{space}}.",
"emptyTeamHint": "Gli spazi condivisi con te appariranno qui.",
+ "lockedPitch": "Crea spazi condivisi dove le note del tuo team restano sincronizzate.",
+ "upgradeRequired": "Gli spazi del team richiedono un piano a pagamento.",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} note",
"accessRevoked": "Non hai più accesso a {{space}}",
@@ -2244,6 +2251,25 @@
"invitedTo_one": "Entrerai in {{count}} spazio del team",
"invitedTo_other": "Entrerai in {{count}} spazi del team"
},
+ "structureIntro": {
+ "title": "Dove si trovano le tue note",
+ "description": "OpenWhispr separa i pensieri privati dal lavoro condiviso, così le note sono visibili alle persone giuste.",
+ "personal": {
+ "title": "Spazio personale",
+ "description": "Solo tu puoi vedere le cartelle e le note in questo spazio."
+ },
+ "workspace": {
+ "title": "Area di lavoro",
+ "description": "La sede di membri, ruoli e fatturazione della tua organizzazione."
+ },
+ "teamSpace": {
+ "title": "Spazio del team",
+ "description": "Un'area condivisa in un'area di lavoro per i membri selezionati del team."
+ },
+ "contents": "Ogni spazio può contenere cartelle e note.",
+ "done": "Ho capito",
+ "reopen": "Scopri come sono organizzati gli spazi"
+ },
"folders": {
"title": "Cartelle",
"soon": "Presto",
@@ -2979,6 +3005,7 @@
"alreadyInvited": "{{email}} è già stato invitato",
"inviteFailed": "Impossibile inviare l'invito. Riprova.",
"visibilityFailed": "Impossibile aggiornare la condivisione. Riprova.",
+ "upgradeRequired": "La condivisione delle note richiede un piano a pagamento.",
"copyFailed": "Impossibile copiare il link. Riprova.",
"revokeFailed": "Impossibile rimuovere l'invito. Riprova.",
"resendFailed": "Impossibile reinviare l'invito. Riprova.",
@@ -3099,7 +3126,7 @@
},
"create": {
"title": "Crea area di lavoro",
- "description": "Le aree di lavoro ti permettono di collaborare, condividere note e gestire la fatturazione in un unico posto.",
+ "description": "Un'area di lavoro riunisce membri e fatturazione della tua organizzazione. Crea al suo interno spazi del team per le note condivise.",
"nameLabel": "Nome dell'area di lavoro",
"namePlaceholder": "Acme Corp",
"submit": "Crea area di lavoro",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 0da1834fb..c6dd650e2 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -1180,6 +1180,7 @@
"無制限のクラウド文字起こし",
"月20時間の会議録音",
"デバイス間の同期",
+ "公開リンクでノートを共有",
"個人APIアクセス",
"すべてのアプリでMCP統合",
"モバイルアプリ(iOS 近日公開)",
@@ -1198,6 +1199,8 @@
"includesPrefix": "Pro の全機能 +",
"badge": "一番人気",
"features": [
+ "共有ノートのためのチームスペース",
+ "ワークスペースのロールとメンバー管理",
"無制限の会議録音",
"エージェントモード",
"データとチャット",
@@ -1638,6 +1641,7 @@
"privacy": {
"cloudBackup": "クラウドバックアップ",
"cloudBackupDescription": "文字起こしとノートをクラウドにバックアップして、すべてのデバイスからシームレスにアクセスできます。",
+ "cloudBackupTeamCaveat": "チームスペース内のノートと共有したノートは、この設定に関係なく常に同期されます。",
"cloudNotesMigration": "ノートをバックアップ中… {{done}} / {{total}}",
"cloudNotesMigrationDone": "すべてのノートがバックアップされました",
"description": "デバイスからのデータ送信を管理します。初期設定ではすべてオフです。",
@@ -1815,7 +1819,7 @@
"tab": {
"general": "一般",
"members": "メンバー",
- "teams": "チーム",
+ "teams": "チームスペース",
"billing": "請求",
"developer": "開発者"
},
@@ -1868,13 +1872,13 @@
}
},
"teams": {
- "title": "チーム",
- "description": "メンバーをグループ化して共有範囲を絞ります。",
- "new": "新しいチーム",
- "empty": "チームはまだありません。",
- "createFirst": "最初のチームを作成",
- "createTitle": "チームを作成",
- "nameLabel": "チーム名",
+ "title": "チームスペース",
+ "description": "ワークスペース内の選択したメンバーと共有するフォルダーやノートを整理します。",
+ "new": "新しいチームスペース",
+ "empty": "チームスペースはまだありません。",
+ "createFirst": "最初のチームスペースを作成",
+ "createTitle": "チームスペースを作成",
+ "nameLabel": "チームスペース名",
"memberCount_one": "{{count}}人のメンバー",
"memberCount_other": "{{count}}人のメンバー"
},
@@ -2106,8 +2110,9 @@
"teamSpaces": "チームスペース",
"personal": "個人",
"privateTooltip": "パーソナルスペースはあなただけが見られます",
- "newSpace": "新しいスペース",
- "createTitle": "スペースを作成",
+ "newSpace": "新しいチームスペース",
+ "createTitle": "チームスペースを作成",
+ "createDescription": "選択したチームメンバーのための、ワークスペース内の共有エリアです。",
"nameLabel": "名前",
"emojiLabel": "絵文字",
"create": "作成",
@@ -2143,6 +2148,8 @@
"undo": "元に戻す",
"emptySpace": "まだノートがありません。ここのノートは{{space}}の全員に表示されます。",
"emptyTeamHint": "共有されたスペースはここに表示されます。",
+ "lockedPitch": "チームのノートが同期される共有スペースを作成しましょう。",
+ "upgradeRequired": "チームスペースの利用には有料プランが必要です。",
"noteCount_one": "{{count}} 件のノート",
"noteCount_other": "{{count}} 件のノート",
"accessRevoked": "{{space}} へのアクセス権がなくなりました",
@@ -2172,6 +2179,25 @@
"invitedTo_one": "{{count}} 件のチームスペースに参加します",
"invitedTo_other": "{{count}} 件のチームスペースに参加します"
},
+ "structureIntro": {
+ "title": "ノートの保存場所",
+ "description": "OpenWhispr は個人的な考えと共同作業を分け、適切な人だけがノートを見られるようにします。",
+ "personal": {
+ "title": "個人スペース",
+ "description": "ここのフォルダーとノートは自分だけが見ることができます。"
+ },
+ "workspace": {
+ "title": "ワークスペース",
+ "description": "組織のメンバー、役割、請求をまとめる場所です。"
+ },
+ "teamSpace": {
+ "title": "チームスペース",
+ "description": "選択したチームメンバーのための、ワークスペース内の共有エリアです。"
+ },
+ "contents": "各スペースにはフォルダーとノートを作成できます。",
+ "done": "了解",
+ "reopen": "スペースの構成を確認"
+ },
"editor": {
"transcribe": "文字起こし",
"staleIndicator": "強化後にコンテンツが変更されました",
@@ -2979,6 +3005,7 @@
"alreadyInvited": "{{email}} はすでに招待されています",
"inviteFailed": "招待を送信できませんでした。もう一度お試しください。",
"visibilityFailed": "共有設定を更新できませんでした。もう一度お試しください。",
+ "upgradeRequired": "ノートの共有には有料プランが必要です。",
"copyFailed": "リンクをコピーできませんでした。もう一度お試しください。",
"revokeFailed": "招待を削除できませんでした。もう一度お試しください。",
"resendFailed": "招待を再送信できませんでした。もう一度お試しください。",
@@ -3099,7 +3126,7 @@
},
"create": {
"title": "ワークスペースを作成",
- "description": "ワークスペースでは、コラボレーション、ノートの共有、請求の管理を一括で行えます。",
+ "description": "ワークスペースには組織のメンバーと請求がまとまります。その中に共有ノート用のチームスペースを作成できます。",
"nameLabel": "ワークスペース名",
"namePlaceholder": "Acme Corp",
"submit": "ワークスペースを作成",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index cdb692a98..fba41a692 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -1179,6 +1179,7 @@
"Transcrição na nuvem ilimitada",
"20 horas de gravação de reuniões/mês",
"Sincronização entre dispositivos",
+ "Compartilhe notas com links públicos",
"Acesso pessoal à API",
"Integração MCP em todos os seus apps",
"Aplicativo móvel (iOS em breve)",
@@ -1197,6 +1198,8 @@
"includesPrefix": "Todos os recursos do Pro +",
"badge": "Mais popular",
"features": [
+ "Espaços de equipe para notas compartilhadas",
+ "Funções e gestão de membros do espaço de trabalho",
"Gravações de reuniões ilimitadas",
"Modo agente",
"Converse com seus dados",
@@ -1617,6 +1620,7 @@
"privacy": {
"cloudBackup": "Backup na nuvem",
"cloudBackupDescription": "Salve suas transcrições e notas na nuvem para acesso contínuo em todos os dispositivos.",
+ "cloudBackupTeamCaveat": "Notas em espaços de equipe e notas que você compartilhou são sempre sincronizadas, independentemente desta configuração.",
"cloudNotesMigration": "Fazendo backup das notas… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Todas as notas salvas na nuvem",
"description": "Controle quais dados saem do seu dispositivo. Tudo está desativado por padrão.",
@@ -1794,7 +1798,7 @@
"tab": {
"general": "Geral",
"members": "Membros",
- "teams": "Equipes",
+ "teams": "Espaços de equipe",
"billing": "Cobrança",
"developer": "Desenvolvedor"
},
@@ -1847,13 +1851,13 @@
}
},
"teams": {
- "title": "Equipes",
- "description": "Agrupe membros para compartilhamento direcionado.",
- "new": "Nova equipe",
- "empty": "Ainda não há equipes.",
- "createFirst": "Crie sua primeira equipe",
- "createTitle": "Criar equipe",
- "nameLabel": "Nome da equipe",
+ "title": "Espaços de equipe",
+ "description": "Organize pastas e notas compartilhadas para membros selecionados do espaço de trabalho.",
+ "new": "Novo espaço de equipe",
+ "empty": "Ainda não há espaços de equipe.",
+ "createFirst": "Crie seu primeiro espaço de equipe",
+ "createTitle": "Criar espaço de equipe",
+ "nameLabel": "Nome do espaço de equipe",
"memberCount_one": "{{count}} membro",
"memberCount_other": "{{count}} membros"
},
@@ -2178,8 +2182,9 @@
"teamSpaces": "Espaços de equipe",
"personal": "Pessoal",
"privateTooltip": "Somente você pode ver seu espaço pessoal",
- "newSpace": "Novo espaço",
- "createTitle": "Criar espaço",
+ "newSpace": "Novo espaço de equipe",
+ "createTitle": "Criar espaço de equipe",
+ "createDescription": "Uma área compartilhada dentro de um espaço de trabalho para colegas selecionados.",
"nameLabel": "Nome",
"emojiLabel": "Emoji",
"create": "Criar",
@@ -2215,6 +2220,8 @@
"undo": "Desfazer",
"emptySpace": "Nenhuma nota ainda. As notas aqui são visíveis para todos em {{space}}.",
"emptyTeamHint": "Os espaços compartilhados com você aparecerão aqui.",
+ "lockedPitch": "Crie espaços compartilhados onde as notas da sua equipe ficam sincronizadas.",
+ "upgradeRequired": "Os espaços de equipe exigem um plano pago.",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} notas",
"accessRevoked": "Você não tem mais acesso a {{space}}",
@@ -2244,6 +2251,25 @@
"invitedTo_one": "Você entrará em {{count}} espaço de equipe",
"invitedTo_other": "Você entrará em {{count}} espaços de equipe"
},
+ "structureIntro": {
+ "title": "Onde ficam suas notas",
+ "description": "O OpenWhispr separa pensamentos privados do trabalho compartilhado para que as pessoas certas vejam as notas certas.",
+ "personal": {
+ "title": "Espaço pessoal",
+ "description": "Somente você pode ver as pastas e notas deste espaço."
+ },
+ "workspace": {
+ "title": "Espaço de trabalho",
+ "description": "O lugar dos membros, funções e cobrança da sua organização."
+ },
+ "teamSpace": {
+ "title": "Espaço de equipe",
+ "description": "Uma área compartilhada dentro de um espaço de trabalho para colegas selecionados."
+ },
+ "contents": "Cada espaço pode conter pastas e notas.",
+ "done": "Entendi",
+ "reopen": "Entenda como os espaços são organizados"
+ },
"folders": {
"title": "Pastas",
"soon": "Em breve",
@@ -2979,6 +3005,7 @@
"alreadyInvited": "{{email}} já foi convidado",
"inviteFailed": "Não foi possível enviar o convite. Tente novamente.",
"visibilityFailed": "Não foi possível atualizar o compartilhamento. Tente novamente.",
+ "upgradeRequired": "Compartilhar notas exige um plano pago.",
"copyFailed": "Não foi possível copiar o link. Tente novamente.",
"revokeFailed": "Não foi possível remover o convite. Tente novamente.",
"resendFailed": "Não foi possível reenviar o convite. Tente novamente.",
@@ -3099,7 +3126,7 @@
},
"create": {
"title": "Criar espaço de trabalho",
- "description": "Espaços de trabalho permitem colaborar, compartilhar notas e gerenciar a cobrança em um só lugar.",
+ "description": "Um espaço de trabalho reúne os membros e a cobrança da sua organização. Crie espaços de equipe dentro dele para notas compartilhadas.",
"nameLabel": "Nome do espaço de trabalho",
"namePlaceholder": "Acme Corp",
"submit": "Criar espaço de trabalho",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index b3a7e83b9..9d84417ff 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -1200,6 +1200,7 @@
"Безлимитная облачная транскрипция",
"20 часов записи встреч/месяц",
"Синхронизация между устройствами",
+ "Делитесь заметками по публичным ссылкам",
"Персональный доступ к API",
"Интеграция MCP во всех ваших приложениях",
"Мобильное приложение (iOS скоро)",
@@ -1218,6 +1219,8 @@
"includesPrefix": "Все функции Pro +",
"badge": "Самый популярный",
"features": [
+ "Командные пространства для общих заметок",
+ "Роли и управление участниками рабочего пространства",
"Безлимитные записи встреч",
"Режим агента",
"Чат с вашими данными",
@@ -1638,6 +1641,7 @@
"privacy": {
"cloudBackup": "Облачное резервное копирование",
"cloudBackupDescription": "Сохраняйте транскрипции и заметки в облаке для удобного доступа со всех устройств.",
+ "cloudBackupTeamCaveat": "Заметки в командных пространствах и заметки, которыми вы поделились, всегда синхронизируются независимо от этой настройки.",
"cloudNotesMigration": "Резервное копирование заметок… {{done}} / {{total}}",
"cloudNotesMigrationDone": "Все заметки скопированы в облако",
"description": "Контролируйте, какие данные покидают ваше устройство. По умолчанию всё отключено.",
@@ -1815,7 +1819,7 @@
"tab": {
"general": "Общие",
"members": "Участники",
- "teams": "Команды",
+ "teams": "Командные пространства",
"billing": "Оплата",
"developer": "Разработчик"
},
@@ -1868,13 +1872,13 @@
}
},
"teams": {
- "title": "Команды",
- "description": "Группируйте участников для адресного доступа.",
- "new": "Новая команда",
- "empty": "Команд пока нет.",
- "createFirst": "Создайте первую команду",
- "createTitle": "Создать команду",
- "nameLabel": "Название команды",
+ "title": "Командные пространства",
+ "description": "Организуйте общие папки и заметки для выбранных участников рабочего пространства.",
+ "new": "Новое командное пространство",
+ "empty": "Командных пространств пока нет.",
+ "createFirst": "Создайте первое командное пространство",
+ "createTitle": "Создать командное пространство",
+ "nameLabel": "Название командного пространства",
"memberCount_one": "{{count}} участник",
"memberCount_few": "{{count}} участника",
"memberCount_many": "{{count}} участников",
@@ -2182,8 +2186,9 @@
"teamSpaces": "Командные пространства",
"personal": "Личное",
"privateTooltip": "Только вы видите своё личное пространство",
- "newSpace": "Новое пространство",
- "createTitle": "Создать пространство",
+ "newSpace": "Новое командное пространство",
+ "createTitle": "Создать командное пространство",
+ "createDescription": "Общая область внутри рабочего пространства для выбранных коллег.",
"nameLabel": "Название",
"emojiLabel": "Эмодзи",
"create": "Создать",
@@ -2219,6 +2224,8 @@
"undo": "Отменить",
"emptySpace": "Пока нет заметок. Заметки здесь видны всем в {{space}}.",
"emptyTeamHint": "Пространства, которыми с вами поделились, появятся здесь.",
+ "lockedPitch": "Создавайте общие пространства, где заметки вашей команды остаются синхронизированными.",
+ "upgradeRequired": "Командные пространства доступны только на платном тарифе.",
"noteCount_one": "{{count}} заметка",
"noteCount_few": "{{count}} заметки",
"noteCount_many": "{{count}} заметок",
@@ -2252,6 +2259,25 @@
"invitedTo_many": "Вы присоединитесь к {{count}} командным пространствам",
"invitedTo_other": "Вы присоединитесь к {{count}} командным пространствам"
},
+ "structureIntro": {
+ "title": "Где находятся ваши заметки",
+ "description": "OpenWhispr отделяет личные мысли от совместной работы, чтобы заметки видели только нужные люди.",
+ "personal": {
+ "title": "Личное пространство",
+ "description": "Папки и заметки здесь видны только вам."
+ },
+ "workspace": {
+ "title": "Рабочее пространство",
+ "description": "Здесь находятся участники, роли и настройки оплаты вашей организации."
+ },
+ "teamSpace": {
+ "title": "Командное пространство",
+ "description": "Общая область внутри рабочего пространства для выбранных коллег."
+ },
+ "contents": "В каждом пространстве могут быть папки и заметки.",
+ "done": "Понятно",
+ "reopen": "Как организованы пространства"
+ },
"folders": {
"title": "Папки",
"soon": "Скоро",
@@ -2991,6 +3017,7 @@
"alreadyInvited": "{{email}} уже приглашён",
"inviteFailed": "Не удалось отправить приглашение. Попробуйте ещё раз.",
"visibilityFailed": "Не удалось обновить настройки доступа. Попробуйте ещё раз.",
+ "upgradeRequired": "Чтобы делиться заметками, нужен платный тариф.",
"copyFailed": "Не удалось скопировать ссылку. Попробуйте ещё раз.",
"revokeFailed": "Не удалось удалить приглашение. Попробуйте ещё раз.",
"resendFailed": "Не удалось отправить приглашение повторно. Попробуйте ещё раз.",
@@ -3111,7 +3138,7 @@
},
"create": {
"title": "Создать рабочее пространство",
- "description": "Рабочие пространства позволяют работать с командой, делиться заметками и управлять оплатой в одном месте.",
+ "description": "Рабочее пространство объединяет участников и оплату вашей организации. Создавайте в нём командные пространства для общих заметок.",
"nameLabel": "Название рабочего пространства",
"namePlaceholder": "Acme Corp",
"submit": "Создать рабочее пространство",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 2aa276328..e3efe71c3 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -1200,6 +1200,7 @@
"无限云端转录",
"每月 20 小时会议录制",
"跨设备同步",
+ "通过公开链接分享笔记",
"个人 API 访问",
"在所有应用中集成 MCP",
"移动应用(iOS 即将推出)",
@@ -1217,7 +1218,14 @@
"annualEquivalent": "$16.67",
"includesPrefix": "所有 Pro 功能 +",
"badge": "最受欢迎",
- "features": ["无限会议录制", "代理模式", "与您的数据对话", "优先支持"],
+ "features": [
+ "用于共享笔记的团队空间",
+ "工作区角色与成员管理",
+ "无限会议录制",
+ "代理模式",
+ "与您的数据对话",
+ "优先支持"
+ ],
"cta": "开始使用",
"switchToAnnual": "切换为年付"
},
@@ -1633,6 +1641,7 @@
"privacy": {
"cloudBackup": "云端备份",
"cloudBackupDescription": "将转录记录和笔记备份到云端,实现跨设备无缝访问。",
+ "cloudBackupTeamCaveat": "团队空间中的笔记和您已分享的笔记会始终同步,不受此设置影响。",
"cloudNotesMigration": "正在备份笔记… {{done}} / {{total}}",
"cloudNotesMigrationDone": "所有笔记已备份",
"description": "控制哪些数据会离开你的设备。默认全部关闭。",
@@ -1810,7 +1819,7 @@
"tab": {
"general": "常规",
"members": "成员",
- "teams": "团队",
+ "teams": "团队空间",
"billing": "账单",
"developer": "开发者"
},
@@ -1863,13 +1872,13 @@
}
},
"teams": {
- "title": "团队",
- "description": "将成员分组以进行有针对性的共享。",
- "new": "新建团队",
- "empty": "暂无团队。",
- "createFirst": "创建您的第一个团队",
- "createTitle": "创建团队",
- "nameLabel": "团队名称",
+ "title": "团队空间",
+ "description": "为工作区中的指定成员整理共享文件夹和笔记。",
+ "new": "新建团队空间",
+ "empty": "暂无团队空间。",
+ "createFirst": "创建您的第一个团队空间",
+ "createTitle": "创建团队空间",
+ "nameLabel": "团队空间名称",
"memberCount_one": "{{count}} 名成员",
"memberCount_other": "{{count}} 名成员"
},
@@ -2173,8 +2182,9 @@
"teamSpaces": "团队空间",
"personal": "个人",
"privateTooltip": "只有你可以看到你的个人空间",
- "newSpace": "新建空间",
- "createTitle": "创建空间",
+ "newSpace": "新建团队空间",
+ "createTitle": "创建团队空间",
+ "createDescription": "工作区内供指定团队成员使用的共享区域。",
"nameLabel": "名称",
"emojiLabel": "表情符号",
"create": "创建",
@@ -2210,6 +2220,8 @@
"undo": "撤销",
"emptySpace": "还没有笔记。这里的笔记对 {{space}} 中的所有人可见。",
"emptyTeamHint": "与你共享的空间将显示在这里。",
+ "lockedPitch": "创建共享空间,让团队笔记保持同步。",
+ "upgradeRequired": "团队空间需要付费方案。",
"noteCount_one": "{{count}} 条笔记",
"noteCount_other": "{{count}} 条笔记",
"accessRevoked": "你已无法访问 {{space}}",
@@ -2239,6 +2251,25 @@
"invitedTo_one": "你将加入 {{count}} 个团队空间",
"invitedTo_other": "你将加入 {{count}} 个团队空间"
},
+ "structureIntro": {
+ "title": "笔记存放在哪里",
+ "description": "OpenWhispr 将个人想法与协作内容分开,让合适的人看到合适的笔记。",
+ "personal": {
+ "title": "个人空间",
+ "description": "只有你能看到这里的文件夹和笔记。"
+ },
+ "workspace": {
+ "title": "工作区",
+ "description": "集中管理组织的成员、角色和账单。"
+ },
+ "teamSpace": {
+ "title": "团队空间",
+ "description": "工作区内供指定团队成员使用的共享区域。"
+ },
+ "contents": "每个空间都可以包含文件夹和笔记。",
+ "done": "知道了",
+ "reopen": "了解空间的组织方式"
+ },
"folders": {
"title": "文件夹",
"soon": "即将推出",
@@ -2974,6 +3005,7 @@
"alreadyInvited": "{{email}} 已经被邀请",
"inviteFailed": "无法发送邀请。请重试。",
"visibilityFailed": "无法更新分享设置。请重试。",
+ "upgradeRequired": "分享笔记需要付费方案。",
"copyFailed": "无法复制链接。请重试。",
"revokeFailed": "无法移除邀请。请重试。",
"resendFailed": "无法重新发送邀请。请重试。",
@@ -3094,7 +3126,7 @@
},
"create": {
"title": "创建工作区",
- "description": "工作区让你在一处协作、共享笔记并管理账单。",
+ "description": "工作区集中管理组织的成员和账单。你可以在其中创建团队空间来共享笔记。",
"nameLabel": "工作区名称",
"namePlaceholder": "Acme Corp",
"submit": "创建工作区",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index 34894fb60..0345c31ac 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -1200,6 +1200,7 @@
"無限雲端轉錄",
"每月 20 小時會議錄製",
"跨裝置同步",
+ "透過公開連結分享筆記",
"個人 API 存取",
"在所有應用程式中整合 MCP",
"行動應用程式(iOS 即將推出)",
@@ -1217,7 +1218,14 @@
"annualEquivalent": "$16.67",
"includesPrefix": "所有 Pro 功能 +",
"badge": "最熱門",
- "features": ["無限會議錄製", "代理模式", "與您的資料對話", "優先支援"],
+ "features": [
+ "用於共享筆記的團隊空間",
+ "工作區角色與成員管理",
+ "無限會議錄製",
+ "代理模式",
+ "與您的資料對話",
+ "優先支援"
+ ],
"cta": "開始使用",
"switchToAnnual": "切換為年付"
},
@@ -1633,6 +1641,7 @@
"privacy": {
"cloudBackup": "雲端備份",
"cloudBackupDescription": "將轉錄記錄和筆記備份至雲端,實現跨裝置無縫存取。",
+ "cloudBackupTeamCaveat": "團隊空間中的筆記和您已分享的筆記會始終同步,不受此設定影響。",
"cloudNotesMigration": "正在備份筆記… {{done}} / {{total}}",
"cloudNotesMigrationDone": "所有筆記已備份",
"description": "控制哪些資料會離開你的裝置。預設全部關閉。",
@@ -1810,7 +1819,7 @@
"tab": {
"general": "一般",
"members": "成員",
- "teams": "團隊",
+ "teams": "團隊空間",
"billing": "帳單",
"developer": "開發者"
},
@@ -1863,13 +1872,13 @@
}
},
"teams": {
- "title": "團隊",
- "description": "將成員分組以進行有針對性的共享。",
- "new": "新增團隊",
- "empty": "尚無團隊。",
- "createFirst": "建立您的第一個團隊",
- "createTitle": "建立團隊",
- "nameLabel": "團隊名稱",
+ "title": "團隊空間",
+ "description": "為工作區中的指定成員整理共享資料夾和筆記。",
+ "new": "新增團隊空間",
+ "empty": "尚無團隊空間。",
+ "createFirst": "建立您的第一個團隊空間",
+ "createTitle": "建立團隊空間",
+ "nameLabel": "團隊空間名稱",
"memberCount_one": "{{count}} 位成員",
"memberCount_other": "{{count}} 位成員"
},
@@ -2173,8 +2182,9 @@
"teamSpaces": "團隊空間",
"personal": "個人",
"privateTooltip": "只有你可以看到你的個人空間",
- "newSpace": "新增空間",
- "createTitle": "建立空間",
+ "newSpace": "新增團隊空間",
+ "createTitle": "建立團隊空間",
+ "createDescription": "工作區內供指定團隊成員使用的共享區域。",
"nameLabel": "名稱",
"emojiLabel": "表情符號",
"create": "建立",
@@ -2210,6 +2220,8 @@
"undo": "復原",
"emptySpace": "還沒有筆記。這裡的筆記對 {{space}} 中的所有人可見。",
"emptyTeamHint": "與你共享的空間將顯示在這裡。",
+ "lockedPitch": "建立共享空間,讓團隊筆記保持同步。",
+ "upgradeRequired": "團隊空間需要付費方案。",
"noteCount_one": "{{count}} 則筆記",
"noteCount_other": "{{count}} 則筆記",
"accessRevoked": "你已無法存取 {{space}}",
@@ -2239,6 +2251,25 @@
"invitedTo_one": "你將加入 {{count}} 個團隊空間",
"invitedTo_other": "你將加入 {{count}} 個團隊空間"
},
+ "structureIntro": {
+ "title": "筆記存放在哪裡",
+ "description": "OpenWhispr 將個人想法與協作內容分開,讓合適的人看到合適的筆記。",
+ "personal": {
+ "title": "個人空間",
+ "description": "只有你能看到這裡的資料夾和筆記。"
+ },
+ "workspace": {
+ "title": "工作區",
+ "description": "集中管理組織的成員、角色和帳單。"
+ },
+ "teamSpace": {
+ "title": "團隊空間",
+ "description": "工作區內供指定團隊成員使用的共享區域。"
+ },
+ "contents": "每個空間都可以包含資料夾和筆記。",
+ "done": "知道了",
+ "reopen": "瞭解空間的組織方式"
+ },
"folders": {
"title": "資料夾",
"soon": "即將推出",
@@ -2974,6 +3005,7 @@
"alreadyInvited": "{{email}} 已被邀請",
"inviteFailed": "無法傳送邀請。請再試一次。",
"visibilityFailed": "無法更新分享設定。請再試一次。",
+ "upgradeRequired": "分享筆記需要付費方案。",
"copyFailed": "無法複製連結。請再試一次。",
"revokeFailed": "無法移除邀請。請再試一次。",
"resendFailed": "無法重新傳送邀請。請再試一次。",
@@ -3094,7 +3126,7 @@
},
"create": {
"title": "建立工作區",
- "description": "工作區讓你在同一處協作、分享筆記並管理帳單。",
+ "description": "工作區集中管理組織的成員和帳單。你可以在其中建立團隊空間來分享筆記。",
"nameLabel": "工作區名稱",
"namePlaceholder": "Acme Corp",
"submit": "建立工作區",
diff --git a/src/services/NotesService.ts b/src/services/NotesService.ts
index 82bafeca6..5d85709f5 100644
--- a/src/services/NotesService.ts
+++ b/src/services/NotesService.ts
@@ -1,4 +1,5 @@
import { cloudGet, cloudPost, cloudPatch, cloudDelete } from "./cloudApi.js";
+import { buildNotesListPath } from "./noteListQuery";
interface NoteInput {
client_note_id?: string;
@@ -80,15 +81,12 @@ async function list(
limit?: number,
before?: string,
since?: string,
- scope?: "all"
+ scope?: "all",
+ cursorId?: string
): Promise<{ notes: CloudNote[] }> {
- const params = new URLSearchParams();
- if (limit !== undefined) params.set("limit", String(limit));
- if (before !== undefined) params.set("before", before);
- if (since !== undefined) params.set("since", since);
- if (scope !== undefined) params.set("scope", scope);
- const query = params.toString();
- return cloudGet<{ notes: CloudNote[] }>(`/api/notes/list${query ? `?${query}` : ""}`);
+ return cloudGet<{ notes: CloudNote[] }>(
+ buildNotesListPath({ limit, before, since, scope, cursorId })
+ );
}
async function deleteAll(): Promise<{ deleted: number; errors: number }> {
diff --git a/src/services/SyncService.ts b/src/services/SyncService.ts
index cc9bf4a78..91293d5de 100644
--- a/src/services/SyncService.ts
+++ b/src/services/SyncService.ts
@@ -14,6 +14,7 @@ import { DictionaryService } from "./DictionaryService.js";
import { SnippetService, type CloudSnippetEntry } from "./SnippetService.js";
import { CloudApiError } from "./cloudApi.js";
import { notifyTeamSpacesCapabilityChanged } from "../lib/teamSpacesCapability";
+import { subscribeIsSubscribed } from "../lib/subscriptionFlag";
function isHttpStatus(err: unknown, status: number): boolean {
return err instanceof CloudApiError && err.status === status;
@@ -58,6 +59,8 @@ const SNIPPET_BATCH_SIZE = 200;
// any window (the stamp lives in shared localStorage).
const AUTO_SYNC_THROTTLE_MS = 20000;
const AUTO_SYNC_INTERVAL_MS = 5 * 60 * 1000;
+const TEAM_SPACES_RETRY_MS = 10_000;
+const TEAM_SPACES_MAX_RETRY_MS = AUTO_SYNC_INTERVAL_MS;
// Web Lock name serializing syncAll() across windows (each renderer has its
// own SyncService instance, but localStorage and the local DB are shared).
const SYNC_ALL_LOCK = "openwhispr-sync-all";
@@ -121,6 +124,8 @@ class SyncService {
private dictionaryDirty = false;
private snippetsDirty = false;
private pushTimers = new Map<string, ReturnType<typeof setTimeout>>();
+ private teamSpacesRetryTimer: ReturnType<typeof setTimeout> | null = null;
+ private teamSpacesRetryAttempt = 0;
canSync(): boolean {
return (
@@ -219,9 +224,26 @@ class SyncService {
this.requestSyncAll("start");
}
});
+ // Storage events only fire in other windows; the window that flips the
+ // subscription flag itself (post-checkout refetch, invite acceptance)
+ // kicks a pass through the reactive flag instead.
+ subscribeIsSubscribed(() => this.requestSyncAll("start"));
setInterval(() => this.requestSyncAll("interval"), AUTO_SYNC_INTERVAL_MS);
}
+ private scheduleTeamSpacesRetry(): void {
+ if (this.teamSpacesRetryTimer) return;
+ const delay = Math.min(
+ TEAM_SPACES_RETRY_MS * 2 ** this.teamSpacesRetryAttempt,
+ TEAM_SPACES_MAX_RETRY_MS
+ );
+ this.teamSpacesRetryAttempt++;
+ this.teamSpacesRetryTimer = setTimeout(() => {
+ this.teamSpacesRetryTimer = null;
+ this.requestSyncAll("retry");
+ }, delay);
+ }
+
async syncAll(waitForLock = false): Promise<void> {
const full = this.canSync();
if (!full && !this.canSyncTeamSpaces()) return;
@@ -232,13 +254,14 @@ class SyncService {
return;
}
this.syncing = true;
+ let teamSpacesReady = false;
try {
// Ambient passes skip when another window holds the lock — that pass
// reads the same local DB and cloud state, so it covers this request.
// Manual passes wait so a user action is never silently dropped.
await navigator.locks.request(SYNC_ALL_LOCK, { ifAvailable: !waitForLock }, async (lock) => {
if (!lock) return;
- await this.syncSpaces();
+ teamSpacesReady = await this.syncSpaces();
if (full) {
await this.syncFolders();
await this.syncNotes();
@@ -261,10 +284,26 @@ class SyncService {
await this.syncFolders(true);
await this.syncNotes(true);
}
+ if (teamSpacesReady) {
+ if (this.teamSpacesRetryTimer) {
+ clearTimeout(this.teamSpacesRetryTimer);
+ this.teamSpacesRetryTimer = null;
+ }
+ this.teamSpacesRetryAttempt = 0;
+ } else {
+ // A failed team probe must not wait for the five-minute interval;
+ // the backoff retry bypasses the throttle the stamp below feeds.
+ this.scheduleTeamSpacesRetry();
+ }
+ // Stamped even when the team probe failed: ambient triggers stay
+ // throttled while the dedicated retry handles probe recovery.
localStorage.setItem("lastSyncedAt", new Date().toISOString());
});
} catch (err) {
console.error("Sync failed:", err);
+ // A throw mid-pass skips the retry scheduling above; recover discovery
+ // only when this pass never confirmed the team probe.
+ if (!teamSpacesReady && this.canSyncTeamSpaces()) this.scheduleTeamSpacesRetry();
} finally {
this.syncing = false;
}
@@ -274,15 +313,26 @@ class SyncService {
}
}
- requestSyncAll(reason: "start" | "focus" | "interval" | "online" | "manual" | "team-push"): void {
+ requestSyncAll(
+ reason: "start" | "focus" | "interval" | "online" | "manual" | "team-push" | "retry"
+ ): void {
if (!this.canSync() && !this.canSyncSharedNotes()) return;
+ const waitForLock = reason === "manual" || reason === "retry";
+ // An older client may have just stamped the global sync time without ever
+ // probing team spaces. The upgrade's first probe must bypass that throttle;
+ // it stays ambient so another window holding the lock can cover it.
+ const firstTeamSpacesProbe =
+ reason === "start" &&
+ this.canSyncTeamSpaces() &&
+ localStorage.getItem("teamSpacesCapability.probedAt") == null;
+ const bypassThrottle = waitForLock || firstTeamSpacesProbe;
if (
- reason !== "manual" &&
+ !bypassThrottle &&
(this.syncing || Date.now() - this.lastCompletedSyncAt() < AUTO_SYNC_THROTTLE_MS)
) {
return;
}
- void this.syncAll(reason === "manual");
+ void this.syncAll(waitForLock);
}
async syncDictionaryNow(): Promise<void> {
@@ -564,17 +614,20 @@ class SyncService {
// Runs first in every pass: probes team-spaces availability, mirrors the
// caller's teams into local spaces, purges spaces whose teams vanished
// (deleted, archived, or membership revoked) and backfills new ones.
- private async syncSpaces(): Promise<void> {
- if (!this.canSyncTeamSpaces()) return;
+ private async syncSpaces(): Promise<boolean> {
+ if (!this.canSyncTeamSpaces()) return true;
let teams: MyTeam[];
try {
teams = await TeamsService.myTeams();
} catch (err) {
// 404 = endpoint not deployed yet (rollout probe): remember and skip
// silently so pulls and pushes stay personal-only until a probe succeeds.
- if (isHttpStatus(err, 404)) this.cacheTeamSpacesCapability(false);
- else console.error("Teams fetch failed:", err);
- return;
+ if (isHttpStatus(err, 404)) {
+ this.cacheTeamSpacesCapability(false);
+ return true;
+ }
+ console.error("Teams fetch failed:", err);
+ return false;
}
this.cacheTeamSpacesCapability(true);
@@ -612,8 +665,11 @@ class SyncService {
for (const id of backfillIds) {
await window.electronAPI.setSpaceSyncStatus?.(id, "synced");
}
+ } else {
+ return false;
}
}
+ return true;
}
// Upserts cloud teams into local spaces. Returns local ids of spaces that
@@ -1073,6 +1129,8 @@ class SyncService {
private async syncNotes(teamOnly = false): Promise<void> {
await this.pushPendingNotes(teamOnly);
await this.pushNoteDeletes();
+ // A dirty pull left its cursors in place, so the next pass re-sees the
+ // parked rows — typically after syncSpaces has mirrored the missing team.
await this.pullNotes(teamOnly);
}
@@ -1202,10 +1260,12 @@ class SyncService {
const scope = teamCapable ? "all" : undefined;
let cursor: string | undefined = since;
+ let cursorId: string | undefined;
+ let dirtyRows = 0;
while (true) {
const { notes: cloudNotes } = since
- ? await NotesService.list(BATCH_SIZE, undefined, cursor, scope)
- : await NotesService.list(BATCH_SIZE, cursor, undefined, scope);
+ ? await NotesService.list(BATCH_SIZE, undefined, cursor, scope, cursorId)
+ : await NotesService.list(BATCH_SIZE, cursor, undefined, scope, cursorId);
if (cloudNotes.length === 0) break;
for (const cloudNote of cloudNotes) {
@@ -1278,6 +1338,7 @@ class SyncService {
const space = await this.resolveSpaceForCloudRow(cloudNote.team_id, ctx);
if (!space) {
+ dirtyRows++;
console.warn(`Parking note ${cloudNote.id}: unknown team ${cloudNote.team_id}`);
continue;
}
@@ -1308,13 +1369,17 @@ class SyncService {
if (cloudNotes.length < BATCH_SIZE) break;
const last = cloudNotes[cloudNotes.length - 1];
const next = since ? last.updated_at : last.created_at;
- if (next === cursor) break;
+ if (next === cursor && last.id === cursorId) {
+ console.warn(`Note pull cursor stalled at ${next} / ${last.id}`);
+ return false;
+ }
cursor = next;
+ cursorId = last.id;
}
// A backfill snapshot never sees tombstones or stubs, so it must not
// advance the delta cursors.
- if (!snapshot) {
+ if (!snapshot && dirtyRows === 0) {
// A degraded (own-rows-only) pull never saw team rows; advancing
// would permanently skip teammate edits once the capability probe
// recovers.
@@ -1326,7 +1391,7 @@ class SyncService {
if (!teamOnly) localStorage.setItem("lastSyncedAt.notes.team", syncStartedAt);
}
}
- return true;
+ return dirtyRows === 0;
} catch (err) {
console.error("Note pull failed:", err);
return false;
diff --git a/src/services/noteListQuery.ts b/src/services/noteListQuery.ts
new file mode 100644
index 000000000..5660467a2
--- /dev/null
+++ b/src/services/noteListQuery.ts
@@ -0,0 +1,29 @@
+interface NoteListQuery {
+ limit?: number;
+ before?: string;
+ since?: string;
+ scope?: "all";
+ cursorId?: string;
+}
+
+export function buildNotesListPath({
+ limit,
+ before,
+ since,
+ scope,
+ cursorId,
+}: NoteListQuery): string {
+ const params = new URLSearchParams();
+ if (limit !== undefined) params.set("limit", String(limit));
+ if (before !== undefined) params.set("before", before);
+ if (since !== undefined) params.set("since", since);
+ if (scope !== undefined) params.set("scope", scope);
+ // Timestamps are not unique (legacy SQLite rows have second precision),
+ // so every paginated request carries the last row id as a tie-breaker.
+ if (cursorId !== undefined) {
+ if (before !== undefined) params.set("before_id", cursorId);
+ else if (since !== undefined) params.set("since_id", cursorId);
+ }
+ const query = params.toString();
+ return `/api/notes/list${query ? `?${query}` : ""}`;
+}
diff --git a/test/helpers/notesStructureIntro.test.js b/test/helpers/notesStructureIntro.test.js
new file mode 100644
index 000000000..c30ce748e
--- /dev/null
+++ b/test/helpers/notesStructureIntro.test.js
@@ -0,0 +1,45 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+
+const load = () => import("../../src/lib/notesStructureIntro.ts");
+
+function memoryStorage(initial = {}) {
+ const values = new Map(Object.entries(initial));
+ return {
+ getItem: (key) => values.get(key) ?? null,
+ setItem: (key, value) => values.set(key, value),
+ };
+}
+
+test("notes structure intro is shown until the current version is recorded", async () => {
+ const {
+ NOTES_STRUCTURE_INTRO_STORAGE_KEY,
+ NOTES_STRUCTURE_INTRO_VERSION,
+ markNotesStructureIntroSeen,
+ shouldShowNotesStructureIntro,
+ } = await load();
+ const storage = memoryStorage();
+
+ assert.equal(shouldShowNotesStructureIntro(storage), true);
+ markNotesStructureIntroSeen(storage);
+ assert.equal(
+ storage.getItem(NOTES_STRUCTURE_INTRO_STORAGE_KEY),
+ String(NOTES_STRUCTURE_INTRO_VERSION)
+ );
+ assert.equal(shouldShowNotesStructureIntro(storage), false);
+});
+
+test("a version bump reopens the notes structure intro", async () => {
+ const { NOTES_STRUCTURE_INTRO_STORAGE_KEY, shouldShowNotesStructureIntro } = await load();
+ const storage = memoryStorage({ [NOTES_STRUCTURE_INTRO_STORAGE_KEY]: "1" });
+
+ assert.equal(shouldShowNotesStructureIntro(storage, 1), false);
+ assert.equal(shouldShowNotesStructureIntro(storage, 2), true);
+});
+
+test("malformed stored versions do not suppress the intro", async () => {
+ const { NOTES_STRUCTURE_INTRO_STORAGE_KEY, shouldShowNotesStructureIntro } = await load();
+ const storage = memoryStorage({ [NOTES_STRUCTURE_INTRO_STORAGE_KEY]: "not-a-version" });
+
+ assert.equal(shouldShowNotesStructureIntro(storage), true);
+});
diff --git a/test/services/migrationFlows.test.js b/test/services/migrationFlows.test.js
new file mode 100644
index 000000000..a354d88aa
--- /dev/null
+++ b/test/services/migrationFlows.test.js
@@ -0,0 +1,53 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+
+test("note snapshot pagination includes an id tie-breaker", async () => {
+ const { buildNotesListPath } = await import("../../src/services/noteListQuery.ts");
+ const path = buildNotesListPath({
+ limit: 50,
+ before: "2026-07-22T12:00:00.000Z",
+ scope: "all",
+ cursorId: "note-50",
+ });
+
+ assert.equal(
+ path,
+ "/api/notes/list?limit=50&before=2026-07-22T12%3A00%3A00.000Z&scope=all&before_id=note-50"
+ );
+});
+
+test("note delta pagination includes an id tie-breaker", async () => {
+ const { buildNotesListPath } = await import("../../src/services/noteListQuery.ts");
+ const path = buildNotesListPath({
+ limit: 50,
+ since: "2026-07-22T12:00:00.000Z",
+ scope: "all",
+ cursorId: "note-50",
+ });
+
+ assert.equal(
+ path,
+ "/api/notes/list?limit=50&since=2026-07-22T12%3A00%3A00.000Z&scope=all&since_id=note-50"
+ );
+});
+
+test("space creation ignores a persisted member-only workspace", async () => {
+ const { manageableWorkspaces, selectWorkspaceForSpaceCreation } =
+ await import("../../src/lib/workspaceSelection.ts");
+ const memberWorkspace = { id: "member", role: "member", name: "Member workspace" };
+ const adminWorkspace = { id: "admin", role: "admin", name: "Admin workspace" };
+ const manageable = manageableWorkspaces([memberWorkspace, adminWorkspace]);
+
+ assert.deepEqual(manageable, [adminWorkspace]);
+ assert.equal(selectWorkspaceForSpaceCreation(manageable, memberWorkspace, null), adminWorkspace);
+});
+
+test("space creation honors an explicit manageable workspace selection", async () => {
+ const { manageableWorkspaces, selectWorkspaceForSpaceCreation } =
+ await import("../../src/lib/workspaceSelection.ts");
+ const first = { id: "first", role: "owner", name: "First" };
+ const second = { id: "second", role: "admin", name: "Second" };
+ const manageable = manageableWorkspaces([first, second]);
+
+ assert.equal(selectWorkspaceForSpaceCreation(manageable, first, second.id), second);
+});