feat: publication IA (magazine/brief/essay) + fixes critique
Publication IA: - 4 templates (magazine, brief, essay, simple) avec CSS riche - Rewrite IA (article/exercises/tutorial/reference/mixed) - Modération avec timeout 12s + fallback safe - Quotas publish_enhance par tier (basic=2, pro=15, business=100) - Détection contenu stale (hash) - Migration DB publishedContent/publishedTemplate/publishedSourceHash Fixes: - cheerio v1.2: Element -> AnyNode (domhandler), decodeEntities cast - _isShared ajouté au type Note (champ virtuel serveur) - callout colors PDF export: extraction fonction pure testable - admin/published: guard note.userId null - Cmd+S fonctionne en mode dialog (pas seulement fullPage) i18n: - 23 clés publish* traduites dans les 15 locales - Extension Web Clipper: 13 locales mise à jour Tests: - callout-colors.test.ts (6 tests) - note-visible-in-view.test.ts (5 tests) - entitlements.test.ts + byok-entitlements.test.ts: mock usageLog + unstubAllEnvs - 199/199 tests passent Tracker: user-stories.md sync avec sprint-status.yaml
This commit is contained in:
@@ -62,7 +62,7 @@ This story transforms the admin console into a **production-ready management das
|
||||
- **When** I scroll below the metric cards
|
||||
- **Then** I see a 7-day area chart showing daily AI requests (sourced from `UsageLog` grouped by `periodStart` day)
|
||||
- **And** I see a user growth line chart (users created per day, last 30 days)
|
||||
- **And** charts use Recharts (already a dependency — verify) with the Momento color palette:
|
||||
- **And** charts use Recharts (already a dependency — verify) with the Memento color palette:
|
||||
- Line/area: `#ACB995` (sage) or `#D4A373` (ochre)
|
||||
- Grid: `border-border/40`
|
||||
- Labels: `text-[11px] text-muted-foreground`
|
||||
@@ -251,8 +251,8 @@ This story transforms the admin console into a **production-ready management das
|
||||
| `app/(admin)/admin/usage/page.tsx` | Usage analytics page |
|
||||
| `app/(admin)/admin/usage/usage-client.tsx` | Usage analytics client component (charts) |
|
||||
| `components/admin/user-detail-drawer.tsx` | Slide-in user detail panel |
|
||||
| `components/admin/charts/area-chart.tsx` | Recharts wrapper with Momento theme |
|
||||
| `components/admin/charts/bar-chart.tsx` | Recharts wrapper with Momento theme |
|
||||
| `components/admin/charts/area-chart.tsx` | Recharts wrapper with Memento theme |
|
||||
| `components/admin/charts/bar-chart.tsx` | Recharts wrapper with Memento theme |
|
||||
| `app/actions/admin-subscriptions.ts` | Server actions: getSubscriptions, cancelSubscription, getSubscriptionSummary |
|
||||
| `app/actions/admin-usage.ts` | Server actions: getUsageAggregate, getUsageByFeature, getTopUsers, getDailyUsage |
|
||||
| `app/actions/admin-feature-flags.ts` | Server actions: getFeatureFlags, createFeatureFlag, updateFeatureFlag, deleteFeatureFlag |
|
||||
|
||||
Reference in New Issue
Block a user