chore: drop context module — registry refs, schema, AI route, AppId

The context module's UI + Dexie tables + i18n bundle were already
removed in d3e2e73ca. This follow-up cleans up everything else that
still referenced it:

- API: rename POST /api/v1/context/import-url → /api/v1/kontext/import-url
  (the kontext singleton was the only consumer); drop the unused
  /ai/generate + /ai/estimate endpoints; rename the credit-op label
  AI_CONTEXT_IMPORT_URL → KONTEXT_IMPORT_URL; drop AI_CONTEXT_GENERATION
  from packages/credits.
- Web: drop registerApp + File icon import from app-registry/apps.ts;
  drop contextModuleConfig from data/module-registry.ts (+ snapshot test);
  drop useRecentDocuments + useSpaces from cross-app-queries.ts; drop
  ContextDocsWidget from widget-registry + dashboard.svelte.ts +
  types/dashboard{,.test}.ts; drop dashboard.widgets.context from all 5
  dashboard locales; drop context entries from hooks.server allowlist,
  splitscreen registry, observatory mockData, spiral collect, crypto
  registry + plaintext-allowlist.
- Dexie: remove documents/contextSpaces/documentTags from v1, v31, v53
  stores blocks; add v57 dropping the three tables on local dev DBs
  that already ran an earlier schema.
- Shared-branding: drop 'context' from AppId union, APP_BRANDING,
  MANA_APPS, APP_ICONS (+ contextSvg), ContextLogo.svelte (+ logos
  barrel re-export).
- Spiral-DB: drop context: 10 from MANA_APP_INDEX (slot now free).
- i18n hardcoded-string baseline: drop 5 context routes/files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-28 20:57:14 +02:00
parent 8fbdc6db77
commit 1815139dc1
20 changed files with 11 additions and 96 deletions

View file

@ -96,6 +96,7 @@ const RESOURCE_MODULES = [
'chat',
'food',
'guides',
'kontext',
'news-research',
'notes',
'picture',

View file

@ -160,7 +160,6 @@ const APP_SUBDOMAINS = new Set([
'times',
'uload',
'memoro',
'context',
'questions',
'moodlit',
]);

View file

@ -42,7 +42,6 @@ export const PLAINTEXT_ALLOWLIST: readonly string[] = [
'customQuotes', // TODO: audit
'dashboardConfigs', // TODO: audit
'deckTags', // TODO: audit
'documentTags', // TODO: audit
'dreamTags', // TODO: audit
'entryTags', // TODO: audit
'eventInvitations', // TODO: audit

View file

@ -237,13 +237,6 @@ export const ENCRYPTION_REGISTRY: Record<string, EncryptionConfig> = {
presiDecks: { enabled: true, fields: ['title', 'description'] },
slides: { enabled: true, fields: ['content'] },
// ─── Context ─────────────────────────────────────────────
// LocalDocument has `title` + `content` (no `body` column on the
// schema). DocumentType (text/context/prompt) and the spaceId
// foreign key stay plaintext so the workspace tree still groups
// documents per space without a key.
documents: { enabled: true, fields: ['title', 'content'] },
// ─── Storage ─────────────────────────────────────────────
// `name` IS indexed but no .where('name') call site exists in the
// app — encryption is safe, the index just becomes a no-op for

View file

@ -1269,7 +1269,6 @@ db.version(53)
songs: 'id, artist, album, genre, favorite, title, _updatedAtIndex',
mukkePlaylists: 'id, name, _updatedAtIndex',
presiDecks: 'id, isPublic, _updatedAtIndex',
documents: 'id, contextSpaceId, type, pinned, title, [contextSpaceId+type], _updatedAtIndex',
playgroundConversations: 'id, model, isPinned, _updatedAtIndex',
journalEntries: 'id, entryDate, mood, isPinned, isArchived, isFavorite, _updatedAtIndex',
dreams: 'id, dreamDate, mood, isLucid, isPinned, isArchived, _updatedAtIndex',
@ -1297,7 +1296,6 @@ db.version(53)
'songs',
'mukkePlaylists',
'presiDecks',
'documents',
'playgroundConversations',
'journalEntries',
'dreams',
@ -1457,6 +1455,16 @@ db.version(58).stores({
kontextDoc: null,
});
// v59 — Drop the legacy context module's Dexie tables (no users, no
// data). Cleans up any orphan tables left in local dev IndexedDB
// instances that ran an earlier schema. The module's UI + registry
// refs were removed in this same commit; v59 is the schema-side drop.
db.version(59).stores({
contextSpaces: null,
documents: null,
documentTags: null,
});
// ─── Sync Routing ──────────────────────────────────────────
// SYNC_APP_MAP, TABLE_TO_SYNC_NAME, TABLE_TO_APP, SYNC_NAME_TO_TABLE,
// toSyncName() and fromSyncName() are now derived from per-module

View file

@ -111,14 +111,6 @@
"create": "Deck erstellen",
"open": "Presi öffnen"
},
"context": {
"title": "Context",
"description": "Deine Dokumente & Spaces",
"spaces": "Spaces",
"documents": "Dokumente",
"empty": "Keine Dokumente",
"open": "Context öffnen"
},
"contacts_recent": {
"title": "Letzte Kontakte",
"description": "Kürzlich aktualisierte Kontakte"

View file

@ -111,14 +111,6 @@
"create": "Create deck",
"open": "Open Presi"
},
"context": {
"title": "Context",
"description": "Your documents & spaces",
"spaces": "Spaces",
"documents": "Documents",
"empty": "No documents",
"open": "Open Context"
},
"contacts_recent": {
"title": "Recent Contacts",
"description": "Recently updated contacts"

View file

@ -111,14 +111,6 @@
"create": "Crear deck",
"open": "Abrir Presi"
},
"context": {
"title": "Context",
"description": "Tus documentos y espacios",
"spaces": "Espacios",
"documents": "Documentos",
"empty": "Sin documentos",
"open": "Abrir Context"
},
"contacts_recent": {
"title": "Contactos recientes",
"description": "Contactos actualizados recientemente"

View file

@ -111,14 +111,6 @@
"create": "Créer un deck",
"open": "Ouvrir Presi"
},
"context": {
"title": "Context",
"description": "Tes documents et espaces",
"spaces": "Espaces",
"documents": "Documents",
"empty": "Aucun document",
"open": "Ouvrir Context"
},
"contacts_recent": {
"title": "Contacts récents",
"description": "Contacts mis à jour récemment"

View file

@ -111,14 +111,6 @@
"create": "Crea deck",
"open": "Apri Presi"
},
"context": {
"title": "Context",
"description": "I tuoi documenti e spazi",
"spaces": "Spazi",
"documents": "Documenti",
"empty": "Nessun documento",
"open": "Apri Context"
},
"contacts_recent": {
"title": "Contatti recenti",
"description": "Contatti aggiornati di recente"

View file

@ -22,7 +22,6 @@ const SPLIT_APP_ID_LIST = [
'skilltree',
'citycorners',
'times',
'context',
'questions',
'food',
'plants',

View file

@ -51,7 +51,6 @@ describe('WIDGET_REGISTRY', () => {
'storage',
'music',
'presi',
'context',
'mana-auth',
'food',
'plants',

View file

@ -130,7 +130,6 @@ export interface WidgetMeta {
| 'storage'
| 'music'
| 'presi'
| 'context'
| 'times'
| 'food'
| 'plants'

View file

@ -72,9 +72,6 @@ const timesSvg = `<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="
// Calc icon (calculator with pink gradient)
const calcSvg = `<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="130" y="130" width="764" height="764" rx="382" fill="url(#calcGrad)"/><rect x="320" y="260" width="384" height="504" rx="32" fill="white"/><rect x="360" y="300" width="304" height="100" rx="16" fill="#ec4899" fill-opacity="0.2"/><rect x="380" y="330" width="200" height="16" rx="4" fill="#ec4899" fill-opacity="0.5"/><rect x="380" y="358" width="120" height="24" rx="4" fill="#ec4899" fill-opacity="0.7"/><rect x="360" y="440" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="440" y="440" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="520" y="440" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="600" y="440" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.3"/><rect x="360" y="508" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="440" y="508" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="520" y="508" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="600" y="508" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.3"/><rect x="360" y="576" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="440" y="576" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="520" y="576" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="600" y="576" width="64" height="120" rx="12" fill="#ec4899"/><rect x="360" y="644" width="144" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><rect x="520" y="644" width="64" height="52" rx="12" fill="#ec4899" fill-opacity="0.15"/><defs><linearGradient id="calcGrad" x1="130" y1="130" x2="894" y2="894" gradientUnits="userSpaceOnUse"><stop stop-color="#ec4899"/><stop offset="1" stop-color="#db2777"/></linearGradient></defs></svg>`;
// Context icon (document/knowledge with sky blue gradient)
const contextSvg = `<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="130" y="130" width="764" height="764" rx="382" fill="url(#contextGrad)"/><rect x="300" y="240" width="424" height="544" rx="24" fill="white"/><path d="M400 400H624" stroke="#0ea5e9" stroke-width="24" stroke-linecap="round"/><path d="M400 480H580" stroke="#0ea5e9" stroke-width="24" stroke-linecap="round" stroke-opacity="0.6"/><path d="M400 560H540" stroke="#0ea5e9" stroke-width="24" stroke-linecap="round" stroke-opacity="0.4"/><path d="M400 640H600" stroke="#0ea5e9" stroke-width="24" stroke-linecap="round" stroke-opacity="0.3"/><path d="M620 240V380H760" stroke="white" stroke-width="24" stroke-linecap="round" stroke-linejoin="round"/><path d="M620 240L760 380" stroke="#0ea5e9" stroke-width="16" stroke-linecap="round" stroke-opacity="0.3"/><circle cx="680" cy="620" r="100" fill="#0ea5e9" fill-opacity="0.2" stroke="white" stroke-width="16"/><path d="M660 620L680 640L720 600" stroke="white" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="contextGrad" x1="130" y1="130" x2="894" y2="894" gradientUnits="userSpaceOnUse"><stop stop-color="#0ea5e9"/><stop offset="1" stop-color="#0284c7"/></linearGradient></defs></svg>`;
// Comic icon — speech bubble with a lightning-bolt panel marker on
// orange→red gradient. Sits warm between Picture (green) and Wardrobe
// (rose) so the Mana launcher reads as a coherent creative family.
@ -124,7 +121,6 @@ export const APP_ICONS = {
comic: svgToDataUrl(comicSvg),
augur: svgToDataUrl(augurSvg),
questions: svgToDataUrl(questionsSvg),
context: svgToDataUrl(contextSvg),
citycorners: svgToDataUrl(citycornersSvg),
times: svgToDataUrl(timesSvg),
calc: svgToDataUrl(calcSvg),

View file

@ -302,19 +302,6 @@ export const APP_BRANDING = {
logoStroke: true,
logoStrokeWidth: 1.5,
},
context: {
id: 'context',
name: 'Context',
tagline: 'Knowledge Management',
primaryColor: '#0ea5e9',
secondaryColor: '#38bdf8',
// Document/brain icon for knowledge management
logoPath:
'M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z',
logoViewBox: '0 0 24 24',
logoStroke: true,
logoStrokeWidth: 1.5,
},
} satisfies Record<string, AppBranding>;
/** Derived from `APP_BRANDING` keys — single source of truth. */

View file

@ -36,7 +36,6 @@ export {
PlantsLogo,
LightWriteLogo,
MusicLogo,
ContextLogo,
CitycornersLogo,
} from './logos';

View file

@ -23,5 +23,4 @@ export { default as SkillTreeLogo } from './SkillTreeLogo.svelte';
export { default as PlantsLogo } from './PlantsLogo.svelte';
export { default as LightWriteLogo } from './LightWriteLogo.svelte';
export { default as MusicLogo } from './MusicLogo.svelte';
export { default as ContextLogo } from './ContextLogo.svelte';
export { default as CitycornersLogo } from './CitycornersLogo.svelte';

View file

@ -444,23 +444,6 @@ export const MANA_APPS: ManaApp[] = [
status: 'beta',
requiredTier: 'guest',
},
{
id: 'context',
name: 'Context',
description: {
de: 'Wissensmanagement',
en: 'Knowledge Management',
},
longDescription: {
de: 'AI-gestütztes Dokumenten- und Wissensmanagement mit Spaces, Kontextreferenzen und KI-Generierung.',
en: 'AI-powered document and knowledge management with spaces, context references, and AI generation.',
},
icon: APP_ICONS.context,
color: '#0ea5e9',
comingSoon: false,
status: 'beta',
requiredTier: 'guest',
},
{
id: 'times',
name: 'Times',

View file

@ -185,7 +185,6 @@ export const MANA_APP_INDEX: Record<string, number> = {
storage: 7,
music: 8,
presi: 9,
context: 10,
cards: 11,
photos: 12,
skilltree: 13,

View file

@ -92,7 +92,6 @@
"apps/mana/apps/web/src/lib/modules/contacts/components/pages/ContactPage.svelte": 2,
"apps/mana/apps/web/src/lib/modules/contacts/ListView.svelte": 1,
"apps/mana/apps/web/src/lib/modules/contacts/views/DetailView.svelte": 4,
"apps/mana/apps/web/src/lib/modules/context/ListView.svelte": 2,
"apps/mana/apps/web/src/lib/modules/core/widgets/ActiveTimerWidget.svelte": 2,
"apps/mana/apps/web/src/lib/modules/core/widgets/NutritionProgressWidget.svelte": 5,
"apps/mana/apps/web/src/lib/modules/core/widgets/PlantWateringWidget.svelte": 3,
@ -200,10 +199,6 @@
"apps/mana/apps/web/src/routes/(app)/comic/new/+page.svelte": 1,
"apps/mana/apps/web/src/routes/(app)/companion/+page.svelte": 2,
"apps/mana/apps/web/src/routes/(app)/contacts/[id]/+page.svelte": 1,
"apps/mana/apps/web/src/routes/(app)/context/documents/[id]/+page.svelte": 3,
"apps/mana/apps/web/src/routes/(app)/context/documents/+page.svelte": 5,
"apps/mana/apps/web/src/routes/(app)/context/spaces/[id]/+page.svelte": 3,
"apps/mana/apps/web/src/routes/(app)/context/spaces/+page.svelte": 5,
"apps/mana/apps/web/src/routes/(app)/food/add/+page.svelte": 2,
"apps/mana/apps/web/src/routes/(app)/food/goals/+page.svelte": 1,
"apps/mana/apps/web/src/routes/(app)/gifts/redeem/+page.svelte": 1,