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'