mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
Core authoring loop works end-to-end: create a draft, filter an audience from contacts, write content in a rich-text editor, save. Send is still stubbed (M4 gets mana-mail's bulk endpoint). Dependencies - @tiptap/core + starter-kit + image + link + placeholder (3.22.4) - shared-auth/tsconfig: allowImportingTsExtensions + rewriteRelativeImportExtensions so tsc accepts shared-types' explicit .ts imports. Was blocking EVERY pnpm install postinstall hook in the repo — fixing it here unblocks everyone, not just broadcast. Module - queries.ts: useAllCampaigns / useAllTemplates with scoped-db + crypto, computeStats (counts + open/click rates per year), formatRate helper - stores/settings.svelte.ts: singleton with ensure/get/update, same pattern as invoices settings - stores/campaigns.svelte.ts: createCampaign (pulls sender defaults from settings), updateCampaign / updateContent / updateAudience (draft-only edit guard), schedule / cancel / duplicate / deleteCampaign, plus an applyServerStatus hook for M4's orchestrator to write back progress Audience - audience/segment-builder.ts: pure matchContact / filterAudience / countAudience / describeAudience. AND semantics across filters. Drops contacts without a usable email so estimatedCount never inflates. - audience/AudienceBuilder.svelte: tag-chip UI with live count, dedup (same tag twice toggles op instead of stacking), greys out already- referenced tags in the picker Editor - editor/Editor.svelte: Tiptap wrapper with onMount / onDestroy, toolbar (bold/italic/H1/H2/lists/link/image), bind on content (Tiptap JSON + derived HTML/plaintext). Image upload reuses invoices' mana-media uploader pragmatically; extract to @mana/shared-uload later. Compose wizard - views/ComposeView.svelte: 4-step stepper (Audience → Content → Preflight → Send). Steps 3+4 stubbed pragmatically. Autosave on step change so content survives navigation. Step 3/4 gated on earlier readiness so the user can't skip. Routes - /broadcasts/new: bootstraps a draft + redirects to edit - /broadcasts/[id]/edit: guarded on status=='draft' - ListView: working "+ Neue Kampagne" button, rows open edit Tests - 17 unit tests for segment-builder covering tag has/not-has/AND, email eq/contains case-insensitivity, no-email filtering, no-mutation, describeAudience resolver + fallback Plan: docs/plans/broadcast-module.md §M2. Next: M3 HTML-render with email-safe inlining + preview. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| credits | ||
| eslint-config | ||
| feedback | ||
| help | ||
| local-llm | ||
| local-store | ||
| local-stt | ||
| notify-client | ||
| qr-export | ||
| shared-ai | ||
| shared-auth | ||
| shared-auth-ui | ||
| shared-branding | ||
| shared-drizzle-config | ||
| shared-error-tracking | ||
| shared-go | ||
| shared-hono | ||
| shared-i18n | ||
| shared-icons | ||
| shared-landing-ui | ||
| shared-links | ||
| shared-llm | ||
| shared-logger | ||
| shared-pwa | ||
| shared-python/manacore_auth | ||
| shared-research | ||
| shared-rss | ||
| shared-storage | ||
| shared-stores | ||
| shared-tags | ||
| shared-tailwind | ||
| shared-theme | ||
| shared-theme-ui | ||
| shared-types | ||
| shared-ui | ||
| shared-uload | ||
| shared-utils | ||
| shared-vite-config | ||
| spiral-db | ||
| test-config | ||
| wallpaper-generator | ||