managarten/apps/mana/apps/web/src/lib/splitscreen/registry.ts
Till JS 1815139dc1 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>
2026-04-29 00:20:04 +02:00

51 lines
1 KiB
TypeScript

/**
* Split-Screen App Registry
*
* Delegates to the unified app registry for component loading and labels.
*/
import { getApp, getAllApps } from '$lib/app-registry';
const SPLIT_APP_ID_LIST = [
'todo',
'calendar',
'contacts',
'chat',
'picture',
'cards',
'quotes',
'music',
'storage',
'presi',
'inventory',
'photos',
'skilltree',
'citycorners',
'times',
'questions',
'food',
'plants',
'uload',
'calc',
'moodlit',
'memoro',
'places',
'automations',
'playground',
] as const;
export type SplitAppId = (typeof SPLIT_APP_ID_LIST)[number];
export const SPLIT_APP_IDS = SPLIT_APP_ID_LIST as readonly SplitAppId[];
/** Display names for each app (from unified registry). */
export const SPLIT_APP_LABELS: Record<SplitAppId, string> = Object.fromEntries(
SPLIT_APP_ID_LIST.map((id) => [id, getApp(id)?.name ?? id])
) as Record<SplitAppId, string>;
export async function loadAppComponent(appId: string) {
const app = getApp(appId);
if (!app) return null;
const module = await app.views.list.load();
return module.default;
}