Skip to content

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

chore(release): gate workspaces and note sharing behind feature flags

Gabriel Stein9c4d5035360f
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index e65a5e4b9..ad971d450 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -46,6 +46,7 @@ import AcceptInvitationModal, {
consumePendingInvitationToken,
clearPendingInvitationToken,
} from "./AcceptInvitationModal";
+import { WORKSPACES_ENABLED } from "../lib/features";
const platform = getCachedPlatform();
@@ -244,6 +245,7 @@ export default function ControlPanel() {
}, [usage?.isPastDue, usage?.hasLoaded, toast, t]);
useEffect(() => {
+ if (!WORKSPACES_ENABLED) return;
const unsubscribe = window.electronAPI?.onWorkspaceInvitationToken?.((token) => {
setInvitationToken(token);
});
@@ -251,7 +253,7 @@ export default function ControlPanel() {
}, []);
useEffect(() => {
- if (!authLoaded || !isSignedIn) return;
+ if (!WORKSPACES_ENABLED || !authLoaded || !isSignedIn) return;
const pending = consumePendingInvitationToken();
if (pending) {
setInvitationToken(pending);
@@ -674,14 +676,16 @@ export default function ControlPanel() {
</Suspense>
)}
- <AcceptInvitationModal
- token={invitationToken}
- onClose={() => setInvitationToken(null)}
- isSignedIn={isSignedIn}
- onSignIn={() => {
- setInvitationToken(null);
- }}
- />
+ {WORKSPACES_ENABLED && (
+ <AcceptInvitationModal
+ token={invitationToken}
+ onClose={() => setInvitationToken(null)}
+ isSignedIn={isSignedIn}
+ onSignIn={() => {
+ setInvitationToken(null);
+ }}
+ />
+ )}
{showSearch && (
<Suspense fallback={null}>
diff --git a/src/components/ControlPanelSidebar.tsx b/src/components/ControlPanelSidebar.tsx
index a3bca5e0d..51902b838 100644
--- a/src/components/ControlPanelSidebar.tsx
+++ b/src/components/ControlPanelSidebar.tsx
@@ -23,6 +23,7 @@ import WorkspaceSwitcher from "./WorkspaceSwitcher";
import InviteTeammateDialog from "./InviteTeammateDialog";
import CreateWorkspaceDialog from "./CreateWorkspaceDialog";
import { useWorkspace } from "../hooks/useWorkspace";
+import { WORKSPACES_ENABLED } from "../lib/features";
const platform = getCachedPlatform();
@@ -105,7 +106,7 @@ export default function ControlPanelSidebar({
style={{ WebkitAppRegion: "drag" } as React.CSSProperties}
/>
- {isSignedIn && (
+ {WORKSPACES_ENABLED && isSignedIn && (
<div className="px-2 pt-1 pb-1">
<WorkspaceSwitcher userName={userName} />
</div>
@@ -333,7 +334,7 @@ export default function ControlPanelSidebar({
</div>
</div>
- {activeWorkspace && (
+ {WORKSPACES_ENABLED && activeWorkspace && (
<InviteTeammateDialog
open={inviteOpen}
onOpenChange={setInviteOpen}
@@ -341,7 +342,9 @@ export default function ControlPanelSidebar({
workspaceName={activeWorkspace.name}
/>
)}
- <CreateWorkspaceDialog open={createWorkspaceOpen} onOpenChange={setCreateWorkspaceOpen} />
+ {WORKSPACES_ENABLED && (
+ <CreateWorkspaceDialog open={createWorkspaceOpen} onOpenChange={setCreateWorkspaceOpen} />
+ )}
</div>
);
}
diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx
index 14cda8589..8eee86cd2 100644
--- a/src/components/SettingsModal.tsx
+++ b/src/components/SettingsModal.tsx
@@ -13,6 +13,7 @@ import {
} from "lucide-react";
import SidebarModal, { type SidebarItem } from "./ui/SidebarModal";
import SettingsPage, { SettingsSectionType } from "./SettingsPage";
+import { WORKSPACES_ENABLED } from "../lib/features";
export type { SettingsSectionType };
@@ -67,13 +68,17 @@ export default function SettingsModal({ open, onOpenChange, initialSection }: Se
description: t("settingsModal.sections.plansBilling.description"),
group: t("settingsModal.groups.account"),
},
- {
- id: "workspace",
- label: t("settingsModal.sections.workspace.label"),
- icon: Users,
- description: t("settingsModal.sections.workspace.description"),
- group: t("settingsModal.groups.account"),
- },
+ ...(WORKSPACES_ENABLED
+ ? [
+ {
+ id: "workspace" as const,
+ label: t("settingsModal.sections.workspace.label"),
+ icon: Users,
+ description: t("settingsModal.sections.workspace.description"),
+ group: t("settingsModal.groups.account"),
+ },
+ ]
+ : []),
{
id: "general",
label: t("settingsModal.sections.general.label"),
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsx
index 19dc846c4..d06c2388d 100644
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@ -97,6 +97,7 @@ import { formatBytes } from "../utils/formatBytes";
import { useSettingsStore } from "../stores/settingsStore";
import { canManageSystemAudioInApp } from "../utils/systemAudioAccess";
import WorkspaceSection from "./settings/WorkspaceSection";
+import { WORKSPACES_ENABLED } from "../lib/features";
const formatAmount = (cents: number, currency: string) =>
(cents / 100).toLocaleString(undefined, { style: "currency", currency });
@@ -2249,7 +2250,7 @@ export default function SettingsPage({
);
case "workspace":
- return <WorkspaceSection initialSubTab={initialSubTab} />;
+ return WORKSPACES_ENABLED ? <WorkspaceSection initialSubTab={initialSubTab} /> : null;
case "general":
return (
diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsx
index 16dcefe7b..2ec45cd00 100644
--- a/src/components/notes/NoteEditor.tsx
+++ b/src/components/notes/NoteEditor.tsx
@@ -17,6 +17,7 @@ import {
} from "lucide-react";
import ShareNoteDialog from "./ShareNoteDialog";
import { useShareCacheEntry } from "../../stores/noteStore";
+import { SHARING_ENABLED } from "../../lib/features";
import { RichTextEditor } from "../ui/RichTextEditor";
import type { Editor } from "@tiptap/react";
import { MeetingTranscriptChat, SelectionBar } from "./MeetingTranscriptChat";
@@ -784,7 +785,7 @@ export default function NoteEditor({
)}
</div>
)}
- {note.cloud_id && (
+ {SHARING_ENABLED && note.cloud_id && (
<button
type="button"
onClick={() => setShareDialogOpen(true)}
@@ -978,7 +979,7 @@ export default function NoteEditor({
onNewChat={embeddedChat.startNewChat}
/>
)}
- {note.cloud_id && (
+ {SHARING_ENABLED && note.cloud_id && (
<ShareNoteDialog
open={shareDialogOpen}
onOpenChange={setShareDialogOpen}
diff --git a/src/hooks/useWorkspace.ts b/src/hooks/useWorkspace.ts
index 7c2eb1724..534205e51 100644
--- a/src/hooks/useWorkspace.ts
+++ b/src/hooks/useWorkspace.ts
@@ -1,5 +1,6 @@
import { useEffect } from "react";
import { useWorkspaceStore } from "../stores/workspaceStore";
+import { WORKSPACES_ENABLED } from "../lib/features";
import type { Workspace, WorkspaceRole } from "../types/electron";
interface UseWorkspaceResult {
@@ -19,7 +20,7 @@ export function useWorkspace(): UseWorkspaceResult {
const setActive = useWorkspaceStore((s) => s.setActiveWorkspaceId);
useEffect(() => {
- if (!loaded) {
+ if (WORKSPACES_ENABLED && !loaded) {
void refresh();
}
}, [loaded, refresh]);
diff --git a/src/lib/features.ts b/src/lib/features.ts
new file mode 100644
index 000000000..3a221a391
--- /dev/null
+++ b/src/lib/features.ts
@@ -0,0 +1,5 @@
+export const WORKSPACES_ENABLED =
+ import.meta.env.VITE_WORKSPACES_ENABLED === "true";
+
+export const SHARING_ENABLED =
+ import.meta.env.VITE_SHARING_ENABLED === "true";