mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 09:26:41 +02:00
chore(mana): citycorners + food + wardrobe aus unified-App entfernen
Citycorners-Reste vom vorherigen Sprint mit committet. food → Nutriphi,
wardrobe → Werdrobe sind als Standalone-Apps live; die mana.how-unified-
App trägt die Modul-Surfaces nicht mehr.
Gelöscht / abgebaut:
- Module: apps/mana/.../modules/{food,wardrobe} + Routen + Locales
- Landing-Apps: apps/{food,citycorners}/ Top-Level
- Backend: apps/api/src/modules/{food,wardrobe} + MCP-Tools log_meal /
nutrition_summary, picture-routes verifyMediaOwnership-Allowlist
- shared-branding: APP_BRANDING, APP_ICONS, MANA_APPS, Logos, Onboarding
- shared-ai, mana-tool-registry, credits, shared-types/spaces,
shared-utils/analytics, spiral-db/MANA_APP_INDEX, website-blocks
- Cross-Module: Body-CalorieWeightChart, Comic-CharacterPicker-Wardrobe,
website-Embed wardrobe.outfits, DaySnapshot.nutrition, FoodEventType,
MealLogged/Meal*-Streaks/Goals/Companion/Trigger, AI-Agent-Policy,
GoalEditor MealLogged, MyDay/RitualRunner/Rules nutrition-Refs,
Crypto-Registry meals/wardrobeGarments/wardrobeOutfits
- Generic: PlaceCategory 'food' (places + geocoding + Locales),
spaces.ts 'food'/'wardrobe' Modul-IDs
- Infrastruktur: cloudflared, docker-compose CORS, nginx-Landing,
prometheus-Probe, load-tests, package.json dev-Scripts,
generate-env, mac-mini/build-landings, dependabot
Dexie v62 Migration:
- droppt meals, goals, foodFavorites, mealTags, wardrobeGarments,
wardrobeOutfits Tabellen
- entfernt wardrobeOutfitId / wardrobeGarmentId aus images-Index
- Upgrade-Callback strippt die toten FK-Properties aus alten image-Rows
Test/Doku:
- module-registry.test.ts: Snapshot refresht auf aktuellen Stand mit
56 Modulen (vorher 32, statisch eingefroren pre-refactor). Plus
LEGACY_TABLES-Exclusion für nicht-mehr-registrierte Tabellen aus
cards/citycorners/moodlit/rituals/wishes/who.
- streaks.test.ts: MealLogged-Test in TaskCompleted-Test umgebaut
- apps/mana/CLAUDE.md: food-Refs in AI-Tool-Tabelle und
AiProposalInbox-Liste entfernt
- validate-i18n-keys.mjs + validate-no-recursive-turbo.mjs:
existsSync-Guard, damit die Skripte mit gestaged-aber-rm'ten Dateien
klarkommen
mana-web svelte-check 0 errors / 7436 files, betroffene Tests grün
(streaks, dashboard, module-registry), validate:pg-schema,
validate:turbo, validate:i18n-parity grün.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
932bd98d84
commit
ae04c9e194
260 changed files with 234 additions and 21506 deletions
|
|
@ -529,44 +529,6 @@ register('undo_drink', async (_args, userId) => {
|
|||
return ok(`Letzter Drink-Eintrag (${last.name}) rückgängig gemacht.`);
|
||||
});
|
||||
|
||||
// ── Food tools ────────────────────────────────────────────────
|
||||
|
||||
register('log_meal', async (args, userId) => {
|
||||
const mealId = crypto.randomUUID();
|
||||
const now = nowIso();
|
||||
const today = now.split('T')[0];
|
||||
const data = {
|
||||
id: mealId,
|
||||
userId,
|
||||
mealType: args.mealType as string,
|
||||
description: args.description as string,
|
||||
calories: (args.calories as number) ?? null,
|
||||
protein: (args.protein as number) ?? null,
|
||||
date: today,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
};
|
||||
await writeRecord(userId, 'food', 'meals', mealId, 'insert', data, fieldTs(Object.keys(data)));
|
||||
return ok(`${args.mealType}: "${args.description}" geloggt.`, { id: mealId });
|
||||
});
|
||||
|
||||
register('nutrition_summary', async (_args, userId) => {
|
||||
const records = await readLatestRecords(userId, 'food', 'meals');
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
const todayMeals = records.filter((r) => r.date === today);
|
||||
let totalCal = 0,
|
||||
totalProtein = 0;
|
||||
for (const m of todayMeals) {
|
||||
totalCal += (m.calories as number) ?? 0;
|
||||
totalProtein += (m.protein as number) ?? 0;
|
||||
}
|
||||
return ok(`Heute: ${todayMeals.length} Mahlzeiten, ${totalCal} kcal, ${totalProtein}g Protein`, {
|
||||
meals: todayMeals.length,
|
||||
calories: totalCal,
|
||||
protein: totalProtein,
|
||||
});
|
||||
});
|
||||
|
||||
// ── Journal tools ─────────────────────────────────────────────
|
||||
|
||||
register('create_journal_entry', async (args, userId) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue