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:
shumeiko.it
2026-10-23 14:51:29 +02:00
parent 0325c4eb11
commit f3eb6b6652
66 changed files with 934 additions and 1126 deletions

View File

@@ -217,21 +217,6 @@ const PERSONAS: PersonaBundle[] = [
],
expected: /360 events|Used bulk_tool_000/i,
},
{
id: 'wiki-export-obsidian-failure',
path: '/memory?tab=wiki',
action: 'wiki-export-obsidian-failure',
mocks: [
{ url: '**/api/wiki/pages', status: 200, body: wikiPages() },
{
url: '**/api/wiki/export/obsidian',
status: 500,
body: { error: 'Disk permission denied for C:/Research Vault' },
},
],
expected: /Export Failed|Disk permission denied for C:\/Research Vault/i,
expectedConsoleErrors: [/Failed to load resource: the server responded with a status of 500/i],
},
],
},
{
@@ -366,7 +351,6 @@ const PERSONAS: PersonaBundle[] = [
nonMainGateDecisions: ['T13/T14/T15 evidenced or explicitly deferred for launch, desktop, and admin/utility paths.'],
routes: [
{ id: 'vault', path: '/settings/vault', expected: /vault|secret|encrypted|key/i },
{ id: 'team', path: '/team', expected: /team|governance|permission|member|upgrade/i },
{ id: 'approvals', path: '/approvals', expected: /approval|pending|risk|agent/i },
],
failureProbes: [
@@ -696,19 +680,6 @@ function largeMemoryList(count = 200): unknown {
};
}
function wikiPages(): unknown[] {
return [{
slug: 'research-guide',
pageType: 'entity',
name: 'Research Guide',
contentHash: 'hash-research-guide',
markdown: '# Research Guide\n\nField notes for the Researcher judge export-failure lane.',
frameIds: 'memory-1',
compiledAt: '2026-07-09T12:00:00.000Z',
sourceCount: 3,
}];
}
function approvalGrants(): unknown[] {
return [{
id: 'grant-send-email',