feat(web): ask before sending analytics, drop team screens, hide v1-absent memory features (P1.3a)
- Analytics are opt-in (decision Q7, ADR-0006). PostHog does not start or capture anything until the user clicks Allow in a first-run dialog that says what is sent. Escape or closing stores nothing and asks again. The existing Privacy & Telemetry toggle in Settings withdraws consent at once. Builds without VITE_POSTHOG_KEY show no dialog and send nothing. - Remove the remaining upsell copy: the /team page with its per-seat price, Stripe and Teams wording in the erase-data dialog, Teams/Enterprise hints. - Remove team screens (decision Q3): Waggle Dance, team presence in chat, team storage and sharing in workspace creation, storage and files. - Hide memory features that are not in v1 (decision Q2) behind one map in lib/memory-features.ts: the knowledge graph, import history, wiki, agent memory hooks and Room launches. The map is the seam P1.5 fills from the memory store's capabilities. - Say Windows, macOS and Linux instead of "Linux soon". - Update the e2e specs for the removed and hidden screens. Also logs UF-029: the Settings "Import Data" button has no handler.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useCallback, useEffect, useRef } from 'react';
|
||||
import {
|
||||
X, Plus, Users, Cloud, HardDrive, Server, FolderOpen, Folder,
|
||||
X, Plus, Users, Cloud, HardDrive, FolderOpen, Folder,
|
||||
FolderPlus, ChevronRight, Home, Check, Loader2, LayoutTemplate,
|
||||
Sparkles, Info, Wand2, Target, Microscope, Code, Megaphone,
|
||||
Rocket, Scale, Building, FileText, Laptop, PenLine, BarChart3,
|
||||
@@ -43,7 +43,7 @@ interface CreateWorkspaceDialogProps {
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
onCreate: (data: {
|
||||
name: string; group: string; persona?: string; agentGroupId?: string; shared?: boolean;
|
||||
name: string; group: string; persona?: string; agentGroupId?: string;
|
||||
storageType?: StorageType; storagePath?: string; templateId?: string;
|
||||
}) => void;
|
||||
}
|
||||
@@ -54,7 +54,6 @@ const GROUPS = [...STANDARD_GROUPS];
|
||||
const STORAGE_OPTIONS: { type: StorageType; label: string; desc: string; icon: React.ElementType; color: string }[] = [
|
||||
{ type: 'virtual', label: 'Virtual', desc: 'Server-managed storage', icon: Cloud, color: 'text-violet-400' },
|
||||
{ type: 'local', label: 'Local', desc: 'Local disk directory', icon: HardDrive, color: 'text-emerald-400' },
|
||||
{ type: 'team', label: 'Team', desc: 'Remote S3/MinIO storage', icon: Server, color: 'text-sky-400' },
|
||||
];
|
||||
|
||||
/** Icon map for known template IDs */
|
||||
@@ -730,7 +729,6 @@ const CreateWorkspaceDialog = ({ open, onClose, onCreate }: CreateWorkspaceDialo
|
||||
const [name, setName] = useState('');
|
||||
const [group, setGroup] = useState('Personal');
|
||||
const [selectedPersona, setSelectedPersona] = useState<string | undefined>();
|
||||
const [shared, setShared] = useState(false);
|
||||
const [storageType, setStorageType] = useState<StorageType>('virtual');
|
||||
const [storagePath, setStoragePath] = useState('');
|
||||
const [showFolderPicker, setShowFolderPicker] = useState(false);
|
||||
@@ -801,11 +799,10 @@ const CreateWorkspaceDialog = ({ open, onClose, onCreate }: CreateWorkspaceDialo
|
||||
name: name.trim(), group,
|
||||
persona: agentMode === 'single' ? selectedPersona : undefined,
|
||||
agentGroupId: agentMode === 'group' ? selectedGroupId : undefined,
|
||||
shared,
|
||||
storageType, storagePath: storagePath.trim() || undefined,
|
||||
templateId: selectedTemplate || undefined,
|
||||
});
|
||||
setName(''); setGroup('Personal'); setSelectedPersona(undefined); setShared(false);
|
||||
setName(''); setGroup('Personal'); setSelectedPersona(undefined);
|
||||
setStorageType('virtual'); setStoragePath(''); setSelectedTemplate(null);
|
||||
setShowTemplateOptions(false); setTemplateSearch(''); setCategoryFilter('all'); setShowAgentOptions(false);
|
||||
setAgentMode('single'); setSelectedGroupId(undefined);
|
||||
@@ -1105,7 +1102,7 @@ const CreateWorkspaceDialog = ({ open, onClose, onCreate }: CreateWorkspaceDialo
|
||||
{/* ── Storage Type ── */}
|
||||
<div>
|
||||
<label className="text-xs text-muted-foreground block mb-1.5">Storage Type</label>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
{STORAGE_OPTIONS.map(opt => (
|
||||
<button key={opt.type} onClick={() => setStorageType(opt.type)}
|
||||
className={`flex flex-col items-center gap-1 p-3 rounded-xl transition-colors ${
|
||||
@@ -1156,7 +1153,6 @@ const CreateWorkspaceDialog = ({ open, onClose, onCreate }: CreateWorkspaceDialo
|
||||
<p className="text-[11px] text-muted-foreground/60 mt-1">
|
||||
{storageType === 'virtual' && 'Managed automatically — files stored in server-managed storage.'}
|
||||
{storageType === 'local' && 'Select or type the local directory where workspace files will be stored.'}
|
||||
{storageType === 'team' && 'Browse or type the S3/MinIO bucket and prefix for shared storage.'}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1267,22 +1263,6 @@ const CreateWorkspaceDialog = ({ open, onClose, onCreate }: CreateWorkspaceDialo
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
{/* Share toggle */}
|
||||
<div className="flex items-center justify-between mx-6 mb-3 p-3 rounded-xl bg-secondary/30 border border-border/30">
|
||||
<div className="flex items-center gap-2">
|
||||
<Users className="w-4 h-4 text-sky-400" />
|
||||
<div>
|
||||
<p className="text-xs font-display text-foreground">Share with team</p>
|
||||
<p className="text-[11px] text-muted-foreground">Make visible to all team members</p>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onClick={() => setShared(!shared)}
|
||||
aria-label={shared ? 'Stop sharing workspace with team' : 'Share workspace with team'}
|
||||
className={`w-10 h-5 rounded-full transition-colors ${shared ? 'bg-sky-500' : 'bg-muted'}`}>
|
||||
<div className={`w-4 h-4 rounded-full bg-foreground transition-transform mx-0.5 ${shared ? 'translate-x-5' : ''}`} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end gap-2 px-6 py-4 border-t border-border/30">
|
||||
<button type="button" onClick={onClose} className="px-4 py-2 text-xs font-display rounded-lg text-muted-foreground hover:text-foreground transition-colors">Cancel</button>
|
||||
<button type="button" onClick={handleCreate} disabled={!name.trim() || (storageType === 'local' && !storagePath.trim())} aria-label="Create workspace"
|
||||
|
||||
Reference in New Issue
Block a user