Repository navigation
feat: 支持深度洞察报告导出(按时间段:日报/周报/月报/季报/年报) #29
Description
Activity
[English Version] Feature Request: Export Deep Insight (Radar Report) with Time-Period Aggregation (Daily/Weekly/Monthly/Quarterly/Yearly)
Problem:
The current Data Hub export feature only exports raw captured content (text snippets, links, images as Markdown files). The AI-generated Deep Insight (Radar Report) — which is the most valuable output of OpenWiki — cannot be exported. Raw material exports without the AI analysis layer have limited practical value for knowledge management.Requested Feature:
Add the ability to export the Deep Insight (Radar Report) as structured documents, with time-period aggregation:Period Description Daily AI insight summary of the day's captured content Weekly Full Radar attention analysis for the week Monthly Monthly theme review and trend analysis Quarterly Quarterly deep interest pattern analysis Yearly Annual knowledge-trajectory panoramic review Technical Context (from codebase analysis):
The
RadarReportstruct (insrc-tauri/src/.../radar.rs) already contains well-defined sections ideal for export:Section Field Description At a Glance at_a_glance: Vec<Glance>Key overview points Info Diet info_diet: InfoDietSource distribution analysis Subconscious subconscious: Vec<SubconsciousItem>Latent interests/themes Graveyard graveyard: GraveyardForgotten but valuable content Blind Spots blind_spots: Vec<BlindSpot>Cognitive blind spots Actions actions: Vec<Action>Suggested next steps Heatmap heatmap: Vec<HeatmapDay>Activity heatmap Topic Cloud topic_cloud: Vec<TopicItem>Topic distribution Verdict verdict: VerdictOverall conclusion Footer footer: FooterStats summary Existing Infrastructure to Leverage:
src-tauri/src/export/markdown.rs— complete Markdown export pipeline withexport_day,export_all,export_date_range, single-file variantssrc/features/data-hub/ExportPanel.tsx— frontend export panel UI- The export directory selection, file writing, and Finder/Explorer opening logic can all be reused
Data Storage:
Radar analysis results are stored as JSON strings in theanalysis_jsoncolumn of the SQLiteattention_insightstable, accessed viaget_attention_insights()andtrigger_attention_analysis()commands.Suggested Implementation:
Rust Backend:
- Add
src-tauri/src/export/report.rswith:export_report_markdown(report: &RadarReport) -> String— serialize RadarReport to structured Markdownexport_report_json(report: &RadarReport) -> String— optional JSON export for further processing
- Add new Tauri commands:
export_report_range(start, end, period)where period controls aggregation granularity - Query
attention_insightstable filtered bywindow_start/window_endfor time-range selection
TypeScript/React Frontend:
- Add export entry point in
RadarVieworExportPanel - Provide a period selector: Daily/Weekly/Monthly/Quarterly/Yearly
- Show success notification and open export directory
Why This Matters:
OpenWiki's value proposition is "You decide what to keep. AI makes sense of it." Currently the "makes sense of it" part (the Deep Insight report) is locked inside the app. Export capability would let users:- Share weekly reports with teams or their future selves
- Archive yearly insights into personal knowledge bases
- Further process in Obsidian, Notion, or other tools
- Print or generate PDFs for long-term preservation
感谢这个非常清晰的需求,也谢谢把现有数据结构和导出链路都梳理出来。
这个方向我们会采纳,不过会先拆成两步做,避免第一版范围过大:
- 第一阶段先支持导出「当前/最新一份深度洞察报告」为 Markdown,入口会放在深度洞察报告页面本身,方便直接归档、分享或交给 Obsidian / Notion / AI 工具继续处理。
- 第二阶段再考虑按时间范围导出历史报告,以及更完整的日报/周报/月报/季报/年报能力。
这里有个产品边界需要稍微谨慎一下:月报、季报、年报不应该只是把几份已有报告拼在一起,否则会变成“历史记录导出”,不是真正的周期洞察。更理想的做法是针对选定时间范围重新跑一次聚合分析,生成新的周期报告。所以这部分会放到后续单独设计。
第一版 MVP 我们会先落到 Markdown 导出,尽快把最核心的“AI 整理后的洞察可以带走”这件事补上。
回复思路很清晰,两步走确实是这个功能最稳健的路径。
Phase 1 先做「当前报告 → Markdown」,快速打通「AI 洞察能带走」这个闭环,MVP 就该这么切。
关于 Phase 2 的周期报告,我理解你的产品判断——月报/季报/年报不应该只是已有报告的拼接,否则跟「历史记录导出」没区别。更准确的类比是财务分析报告:年报不是把 12 张月报粘在一起,而是拉取全年的原始流水重新做一次聚合、归因、趋势分析,最后生成一份独立完整的报告。你提到的「针对时间窗口重新跑聚合分析」正是这个逻辑。
这个思路很关键,也意味着数据层的设计从一开始就要区分两种能力:展示已有报告 vs 按时间段重新聚合生成。这部分确实值得单独设计,后面如果有了初步方案我可以一起参与讨论。
整体方向很认同,期待 Phase 1 落地,OpenWiki 的洞察力就真正能带出去了 💪
Great breakdown, the two-phase approach is the right call.
Phase 1 — exporting the current Radar Report to Markdown — is the most pragmatic first step. It closes the core loop ("AI insights can be taken out") quickly without over-scoping.
Regarding Phase 2, I fully agree that monthly/quarterly/yearly reports shouldn't be a simple concatenation of existing reports — otherwise it's just "history export" rebranded. A better analogy is financial reporting: an annual report isn't 12 monthly reports stapled together. Instead, you pull the full year's raw data and run a fresh aggregation, attribution, and trend analysis to produce a standalone, independent report. Your instinct to "re-run aggregation analysis for the selected time window" is exactly that logic.
This distinction also has architectural implications — the data layer needs to support two separate paths from the start: rendering an existing report vs. aggregating from scratch over a time range. Definitely worth a dedicated design phase.
Looking forward to Phase 1 landing — once the Radar Report can walk out of the app, OpenWiki's full value proposition finally becomes portable 🚀
Thanks, this is exactly the distinction I want to keep clear.
Phase 1 is now implemented and will ship in the next release: the latest completed Deep Insight / Radar Report can be exported directly to Markdown from the insight report section. This keeps the first version focused on making the current AI-generated report portable without turning it into a larger reporting system too early.
For Phase 2, I agree with your framing. Daily / monthly / quarterly / yearly reports should be generated from the raw captured content over the selected time window, not stitched together from existing reports. That means we should treat it as a separate aggregation/report-generation path in the data and product design.
I’ll keep this issue open to track the broader period-based reporting work, while the Phase 1 Markdown export goes out first.
需求描述
当前 OpenWiki 的 Data Hub 导出功能仅支持导出原始捕获内容(clipboard 保存的文本/链接/图片),但 AI 生成的深度洞察雷达报告(Radar Report) 无法导出。对于知识管理用户来说,真正有价值的是 AI 整合后的洞察报告,而非零散的原始素材。
希望能增加深度洞察报告的导出功能,并支持按时间段聚合导出,覆盖以下场景:
参考现有架构
深度洞察数据结构(Rust 侧)
当前
RadarReport已定义完整的数据结构(src-tauri/src/.../radar.rs),包含以下章节,非常适合导出为结构化文档:at_a_glance: Vec<Glance>info_diet: InfoDietsubconscious: Vec<SubconsciousItem>graveyard: Graveyardblind_spots: Vec<BlindSpot>actions: Vec<Action>heatmap: Vec<HeatmapDay>topic_cloud: Vec<TopicItem>verdict: Verdictfooter: Footer已有导出基础设施
src-tauri/src/export/markdown.rs— 已实现完整的 Markdown 导出管道(export_day、export_all、export_date_range、export_all_single_file、export_range_single_file)src/features/data-hub/ExportPanel.tsx— 前端导出面板 UI数据存储方式
深度洞察分析结果存储在 SQLite
attention_insights表的analysis_json字段(JSON 字符串),通过get_attention_insights()和trigger_attention_analysis()命令操作。前端已有RadarView和InsightDetail组件渲染报告。建议实现方案
后端(Rust)
src-tauri/src/export/下新增report.rs,实现:export_report_markdown(report: &RadarReport) -> String— 将RadarReport序列化为结构化 Markdownexport_report_json(report: &RadarReport) -> String— 可选:JSON 格式导出,便于二次处理src-tauri/src/commands/或lib.rs):export_report_today()— 导出今日洞察export_report_weekly()— 自动聚合本周生成的最新报告export_report_range(start, end)— 时间段内的洞察聚合export_date_range_markdown模式的多个粒度命令attention_insights表,按window_start/window_end字段筛选对应时间范围内的报告,合并输出前端(TypeScript/React)
src/features/digest/或src/features/data-hub/新增导出入口:RadarView添加导出按钮ExportPanel添加"导出深度洞察报告"区域为何需要此功能
OpenWiki 的本质是"你决定留什么,AI 帮你理清楚"。当前"理清楚"的这一步(深度洞察报告)只能在 App 内部阅读,无法沉淀为可分享、可存档、可二次处理的文档。增加报告导出能力后,用户可以:
相关信息