refactor(monitoring): simplify brand dashboard and harden citation rendering

- drop brand_time_buckets and sparkline/coverage UI; dashboard now returns a single day
- compute mention rate from total actual samples instead of averaging per-platform rates
- canonicalize ai_platform_id across services and aggregate platform-overview snapshots
- strip mojibake and non-answer noise from callback payloads and question detail answers
- keep Kimi citations panel-only; still store raw search_results for audit
- render linked [n] inline citations for qwen/yuanbao answers with scroll-to-source behavior
- restrict立即采集 to today's business date with a clear i18n hint
- refresh content-citations into an ant-design table with truncation and hover styling

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 09:11:53 +08:00
parent ce028c56bf
commit 4f4f063200
13 changed files with 1469 additions and 744 deletions
+1 -17
View File
@@ -1085,22 +1085,6 @@ export interface MonitoringPlatformBreakdownItem {
last_sampled_at: string | null;
}
export interface MonitoringTimeBucket {
date: string;
sample_status: string;
metric_value: number | null;
mention_rate: number | null;
top1_mention_rate: number | null;
first_recommend_rate: number | null;
positive_mention_rate: number | null;
citation_rate: number | null;
planned_sample_count: number;
actual_sample_count: number;
coverage_rate: number | null;
trigger_source: string | null;
snapshot_updated_at: string | null;
}
export interface MonitoringHotQuestion {
question_id: number;
question_hash: string;
@@ -1134,7 +1118,6 @@ export interface MonitoringDashboardCompositeResponse {
overview: MonitoringOverview;
runtime: MonitoringDashboardRuntime;
platform_breakdown: MonitoringPlatformBreakdownItem[];
brand_time_buckets: MonitoringTimeBucket[];
hot_questions: MonitoringHotQuestion[];
citation_ranking: MonitoringCitationRankingItem[];
cited_articles: MonitoringCitedArticle[];
@@ -1163,6 +1146,7 @@ export interface MonitoringQuestionDetailPlatform {
brand_mentioned: boolean | null;
brand_mention_position: string | null;
citations: MonitoringQuestionDetailCitation[];
inline_citations?: MonitoringSourceItem[];
}
export interface MonitoringQuestionCitationAnalysisItem {