fix(intelligence): code review fixes — TODO annotations for data durability
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- Add TODO to PainAggregator documenting in-memory-only data limitation
- Remove unused `use serde::Serialize` import from a2a.rs (already clean)
- ProposalsSection: trigger refresh on error instead of silent catch
- useButlerInsights: collect all errors instead of overwriting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-07 09:56:26 +08:00
parent 2e5f63be32
commit 58703492e1

View File

@@ -118,6 +118,10 @@ pub struct PainAnalysisResult {
/// Aggregates pain points across conversations, merging similar ones
/// and escalating confidence as evidence accumulates.
///
/// TODO: Data is in-memory only (OnceLock + RwLock<Vec>). On app restart,
/// all accumulated pain points and evidence are lost. Persist to SQLite
/// (e.g. via zclaw-growth::SqliteStorage) for cross-session durability.
pub struct PainAggregator {
pain_points: Arc<RwLock<Vec<PainPoint>>>,
}