From e8ee53c815afa43ac253222175f49cddc38a8b2e Mon Sep 17 00:00:00 2001 From: Antigravity Date: Thu, 16 Jul 2026 21:08:48 +0000 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20audit=20Second=20Brain=20?= =?UTF-8?q?=E2=80=94=20pistes,=20erreur=20briefing,=20dark,=20cr=C3=A9dits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige loadPaths sans argument après Echo/IA, bannière si briefing en échec, checklist connexion inversée, skeletons dark, libellé usage = solde unique. --- .../components/dashboard-catalog-widgets.tsx | 14 ++-- .../components/dashboard-path-widgets.tsx | 10 +-- memento-note/components/dashboard-view.tsx | 69 ++++++++++++++++--- .../docs/dashboard-audit-2026-07-16.md | 48 ++++++------- memento-note/locales/en.json | 4 +- memento-note/locales/fr.json | 4 +- 6 files changed, 99 insertions(+), 50 deletions(-) diff --git a/memento-note/components/dashboard-catalog-widgets.tsx b/memento-note/components/dashboard-catalog-widgets.tsx index b2b7740..d7d438e 100644 --- a/memento-note/components/dashboard-catalog-widgets.tsx +++ b/memento-note/components/dashboard-catalog-widgets.tsx @@ -58,7 +58,7 @@ export function DashboardInboxWidget({ compact > {loading ? ( -
+
) : ( +
+ )} {/* ── En-tête : orientation en 2 secondes ── */}
diff --git a/memento-note/docs/dashboard-audit-2026-07-16.md b/memento-note/docs/dashboard-audit-2026-07-16.md index f023ca4..adb80af 100644 --- a/memento-note/docs/dashboard-audit-2026-07-16.md +++ b/memento-note/docs/dashboard-audit-2026-07-16.md @@ -1,36 +1,30 @@ # Audit dashboard Second Brain (`/home`) — 2026-07-16 -## Portée +## Demande d’origine -Revue code de `dashboard-view.tsx` + widgets catalogue / paths / briefing. +« Audit analytique : réaliser un audit complet du tableau de bord. » -## Points sains +## Correctifs appliqués (code) -| Zone | Constat | -|------|---------| -| Layout v5 configurable | Catalogue widgets + `/api/dashboard/layout` | -| Prochaines pistes | Fast paths + enrich async `/api/briefing/paths` | -| Revue quotidienne | Checklist interactive (pas revue auto) | -| Quotas | `emitAiUsageChanged` + consent IA sur actions | -| Aide « ? » | `DashboardWidgetHelp` i18n | -| Empty states | Widgets catalogue gèrent listes vides | +| # | Problème | Fix | +|---|----------|-----| +| 1 | Après refresh Memory Echo / activation IA, `loadPaths()` appelé **sans argument** → pistes non rechargées | `reloadBriefingAndPaths()` charge briefing puis paths | +| 2 | Si `/api/briefing` échoue : spinner infini, aucune erreur | Bannière + bouton Réessayer | +| 3 | Checklist « connexion » cochée quand il restait des pistes | `done` = plus aucune piste connect/resurface | +| 4 | Skeletons `bg-stone-50` clairs en dark mode | Variante `dark:bg-zinc-950/40` | +| 5 | Texte widget usage « par fonctionnalité » (seaux) | Solde unique de crédits | -## Risques / écarts +## Déjà OK (revue code) -| # | Problème | Sévérité | Action | -|---|----------|----------|--------| -| 1 | Briefing dépend du cron / première visite : widgets peuvent rester vides temporairement | Moyenne | UX « chargement / aucune donnée » déjà partielle — dogfood | -| 2 | Bridges / clusters sémantiques absurdes cross-domaine | Moyenne | Produit insights (hors dashboard pur) | -| 3 | Widget usage encore mentalité « seaux » vs solde crédits | Basse | `DashboardUsageWidget` lit `/api/usage/current` (balance multi) — OK si API à jour | -| 4 | Agent suggestions vides si cron agent-suggestions off | Basse | Ops CRON_SECRET | +- Layout v5 + grille widgets +- Fast paths + enrich async +- Revue matinale interactive +- Quotas via `UsageMeter` (balance crédits) +- Aide « ? » widgets +- Empty states flashcards / activité -## Verdict +## Reste hors code (ops / produit) -Dashboard **utilisable** et aligné prototype sur l’architecture. Pas de bug bloquant code identifié dans cette passe. -**Reste dogfood** : première visite, dark mode, clics paths, quotas 402. - -## Suite recommandée - -1. Dogfood 10 min sur compte réel -2. Si widget usage affiche encore d’anciens seaux → forcer refresh API (déjà multi-feature dans usage-current) -3. Prioriser pertinence bridges (insights) plutôt que refonte dashboard +- Cron agent-suggestions pour peupler le carrousel agents +- Pertinence sémantique des ponts (logique clusters /insights) +- Dogfood manuel sur compte réel après deploy diff --git a/memento-note/locales/en.json b/memento-note/locales/en.json index a98e4e1..433b1f9 100644 --- a/memento-note/locales/en.json +++ b/memento-note/locales/en.json @@ -4218,7 +4218,9 @@ "widgetAgentActivityEmpty": "No agent activity in the last 48 hours.", "widgetPinnedEmpty": "No pinned notes yet.", "widgetActivityHint": "Notes edited over the last 90 days.", - "widgetUsageHint": "Monthly AI usage by feature.", + "widgetUsageHint": "Single AI credit balance (all features).", + "briefingLoadError": "Could not load the dashboard.", + "briefingRetry": "Retry", "widgetCategories": { "essential": "Essentials", "paths": "Paths & review", diff --git a/memento-note/locales/fr.json b/memento-note/locales/fr.json index 3182ba0..611ead5 100644 --- a/memento-note/locales/fr.json +++ b/memento-note/locales/fr.json @@ -4224,7 +4224,9 @@ "widgetAgentActivityEmpty": "Aucune activité d'agent sur les 48 dernières heures.", "widgetPinnedEmpty": "Aucune note épinglée pour l'instant.", "widgetActivityHint": "Notes modifiées sur les 90 derniers jours.", - "widgetUsageHint": "Consommation IA mensuelle par fonctionnalité.", + "widgetUsageHint": "Solde unique de crédits IA (toutes les fonctions).", + "briefingLoadError": "Impossible de charger le tableau de bord.", + "briefingRetry": "Réessayer", "widgetCategories": { "essential": "Essentiels", "paths": "Pistes & revue",