334 Commits (master)
 

Author SHA1 Message Date
oabrivard 7835725fe8 docs: merge algorithm.md into technical_specs.md Section 5
The full pipeline algorithm is now in technical_specs.md with added
details: preferred source ordering, windowed waves, is_article filter,
date fallback, "Articles sans date" category, cancellation support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 381b479047 docs: remove old documentation (superpowers, audit, team-analysis, implementation-plan)
Replaced by 7 consolidated docs: requirements, functional_specs,
architecture, technical_specs, dev_guidelines, qa_guidelines, deployment.
algorithm.md retained as pipeline reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 337ddbe7ce docs: update CLAUDE.md for consolidated documentation and current features
Updated project structure, features list, documentation links, database
tables, testing commands, and environment variables to reflect the
current state (multi-theme, scheduling, preferred sources, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard f07e91ba11 docs: add consolidated architecture.md and technical_specs.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard d3a4d2c577 docs: add consolidated dev_guidelines.md, qa_guidelines.md, deployment.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 116189d11b docs: add consolidated requirements.md and functional_specs.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard fa793de8bf test: add scheduler unit test and find_due_schedules integration tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 3dea7bf286 fix: replace hardcoded French strings with i18n keys in SynthesisDetail
Replace "Lire la suite" and "Reduire" with t('synthesis.readMore')
and t('synthesis.collapse'). Adds both keys to fr.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 7f647bc656 refactor: extract JobStore to services/job_store.rs
Moves JobEntry, JobStore, ProgressEvent, JOB_TTL, and emit_progress
to a dedicated module. Updates imports in synthesis.rs, generation.rs,
scheduler.rs, and app_state.rs. synthesis.rs re-exports for backward
compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 1ab9c817e4 refactor: extract scrape_and_classify_batch from synthesis pipeline
Replaces ~200 duplicated lines in Phase 1 (personalized sources) and
Phase 2 (Brave Search) with a shared scrape_and_classify_batch function.
Uses ScrapeClassifyCtx to bundle shared parameters. Also prepares
synthesis.rs for JobStore extraction by re-exporting from job_store.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 381e11a5e4 refactor: delete dead Sources.tsx, move URL utils to utils/url.ts
normalizeUrl and isValidUrl are now in ~/utils/url. ThemeManager
and sources-utils tests import from the new location. The /sources
route redirect to /themes is preserved in App.tsx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard c51a99051f fix: update failing frontend tests for multi-theme migration
Settings tests now reference fields that exist in the current UI
(max articles per source instead of removed theme field). Generate
tests now mock the themes API and use current pipeline step names.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard b30d04c6c5 docs: add v2 code audit reports from 5-agent team
Architect, Frontend Expert, Rust Expert, Tech Lead, and QA Engineer
analyzed the codebase post multi-theme/scheduling features. Key findings:
synthesis.rs God Module (2010 lines), ThemeManager.tsx (935 lines),
scheduler untested, 15 test coverage gaps identified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 1b20d38bbd fix: add TechCrunch source and increase retries for flaky generation test
The live generation test depends on real OpenAI + web scraping.
Adding a second source improves chances of finding articles.
Retries increased from 1 to 2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 7d58b6e019 fix: enable article history in preferred sources test
article_history_days=0 disables "used" trace entries, so the test
found 0 entries. Changed to 90 to enable tracing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 9ee372aef3 docs: add test coverage gap report v2 3 months ago
oabrivard c16c588752 test: add stop generation, LLM logs, and preferred ordering tests (GAP-1,2,3)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard e97b01c819 test: add schedule CRUD integration tests and E2E
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard f989f592a9 feat: add schedule UI — day picker, time, emails in theme management
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard a068d04fa8 feat: add background scheduler for automated synthesis generation
Spawns a tokio task that checks for due schedules every 60 seconds,
runs generation via run_generation_inner, and sends emails to configured
recipients before marking each schedule as run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 384649b2b6 feat: add theme schedules — model, DB, CRUD handler, routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 848a25235e docs: add implementation plan for scheduled synthesis generation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 96f138bd61 docs: add spec for scheduled synthesis generation with email delivery
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard e43a4d2180 feat: add preferred sources — prioritized during synthesis generation
Users can mark sources as preferred via star buttons on the theme page.
Preferred sources are processed first in the pipeline (ordered before
non-preferred in waves, shuffled separately then merged).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 48b5e77e7e docs: add spec for preferred sources feature
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 78844c4ebe chore: remove unused test_settings() function from prompts.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 885af2d147 fix: update E2E tests for multi-theme migration (settings, sources, generation)
- settings.spec.ts: test batch_size instead of removed theme field
- settings-export.spec.ts: test batch_size export/import, open collapsed details section
- sources.spec.ts: convert to API-based test since sources now belong to themes
- generation-live.spec.ts: already updated (no changes needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 6f3e6883c9 feat: add stop generation button — saves partial synthesis on cancel
Adds Arc<AtomicBool> cancellation flag to JobStore/JobEntry. The pipeline
checks the flag before each wave and after each batch, then saves whatever
articles have been collected. A new POST /syntheses/generate/:job_id/stop
endpoint sets the flag. The frontend shows a red stop button during generation
and POSTs to the stop endpoint on click.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 7ba1da4d92 fix: use batch_size=1 for diversity test + rename Autre to Divers in overflow test
Diversity filter works across batches (source_counts updated after classify).
With batch_size=5, all 3 articles fit in one batch, bypassing the filter.
batch_size=1 forces per-article processing so the filter triggers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard e444f79c0b fix: mock provider returns today's date in classify response
Without a date, articles are routed to "Articles sans date" instead
of their classified category, breaking pipeline tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 20b298b926 fix: update syntheses tests for theme_id requirement in generate endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 4923a8c355 test: add E2E test for themes CRUD (GAP-06)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard da602d850d test: add pipeline tests for source diversity and history dedup (GAP-05, GAP-07)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 14908cf603 test: add themes CRUD, article history, and assign_category tests
Covers GAP-01 (themes API), GAP-02 (article history API), and
GAP-04 (assign_category unit tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard d2f98dc66f feat: Phase 4 — theme badge on synthesis cards + sort by date/theme
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard ed29e74b1b feat: Phase 3 — add theme dropdown to Generate page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard d9bfed7ff5 feat: Phase 2 — theme management page with content settings + per-theme sources
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 196005a27b feat: multi-theme Phase 1 — settings split, sources/syntheses theme_id, pipeline theme-aware
Remove content settings from settings table (moved to themes).
Add theme_id to sources and syntheses. Pipeline loads content
settings from the selected theme. Generate endpoint requires theme_id.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 10b8d950b9 feat: add themes CRUD endpoints
Implements GET/POST/PUT/DELETE /api/v1/themes handlers following the same patterns as sources.rs, registers the module, and wires up routes in the router.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 467ad550a5 feat: add Theme model and DB queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard cad61fadfc feat: create themes table and migrate content settings from settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
oabrivard 0ab9a99906 docs: add implementation plan for multi-theme Phase 1 (data model + API)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 4dc18a4e72 docs: add spec for multi-theme synthesis support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 3fa0156f52 fix: default display level to 3 (half summary) 3 months ago
oabrivard 44606ca3eb feat: add per-article expand/collapse button when display is compact
When the slider is not at full (level < 4), each truncated article
shows a "Lire la suite" button to expand its summary inline.
A "Reduire" button collapses it back. Expansion is per-card and
independent of the global slider.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 2650356c01 feat: add display density slider to synthesis detail view
4 levels: Compact (title+date only) → 2 lines → half summary → full.
Slider in a gray bar above sections. Card spacing tightens at level 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 6b84c335d0 feat: improve synthesis list cards with time, all categories, and uniform height
- Add generation time below date in synthesis cards
- Show all categories with article count in parentheses
- Use flex-col layout for uniform card height
- Add sections_summary to SynthesisListItem API response
- Add formatTime utility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 03f2660163 refactor: redesign settings page with clear section grouping
5 sections organized by purpose:
1. Contenu — theme, categories, summary length
2. Sources — per-source limits, Brave Search
3. Intelligence Artificielle — provider + API keys merged in one visual card
4. Performance — batch size, history, rate limits
5. Import/Export — collapsed by default

Sticky save button, smaller number inputs, integrated API key status
badge in the AI provider card.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard 70865a68b3 refactor: redesign settings page with clear section grouping and merged AI section
Reorganize settings into 5 logical sections (Content, Sources, AI,
Performance, Import/Export) with visual cards. Merge AI provider
selection with API key management into one cohesive section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago
oabrivard a89c61c5b6 feat: add "Articles sans date" category for articles without publication date
Articles where neither the scraper nor the LLM could extract a date
are now placed in a separate "Articles sans date" section instead of
their classified category. This makes undated articles visible without
mixing them with properly dated content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 months ago