Skip to content

feat(insights): add export - #122

Merged
GaganSD merged 5 commits into
mainfrom
feat/insights-markdown-export
Nov 7, 2026
Merged

GaganSD merged 5 commits into
mainfrom
feat/insights-markdown-export

Conversation

@GaganSD

@GaganSD GaganSD commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner
  • Adds an Export dropdown to the Insights header with an 'As Markdown' action

Build a portable report from the compact dashboard with exact token counts and no rescan. Cover the report shape, cache scope, empty data, and table escaping.
Put Export between Refresh and Settings with As Markdown as its first action. The menu sizes to its content from shared layout tokens, and export writes the prepared dashboard through the folder picker.
@GaganSD GaganSD changed the title feat(insights): add Markdown export feat(insights): add export Nov 7, 2026
@GaganSD
GaganSD marked this pull request as ready for review November 7, 2026 00:32
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR reaches the local Insights dashboard and its export workflow.

The PR appears safe to merge, with a non-blocking issue where export can use the previous selection.

Findings

  1. P2 Export uses the previous selection ▶

Summary

Adds Markdown export from the prepared Insights dashboard.

  • Insights saves the current dashboard as a Markdown file.
  • Unused Insights helpers are removed without changing dashboard behavior.

Reviews (1) · Last reviewed commit: "chore(insights): remove unused helpers a..." · Reviewed by Greptile

Comment thread herdr-insights/mods/insights/main.js Outdated
Comment on lines +1071 to +1073
if (this.closed || !this.dashboard || this.exporting || this.busy()) return;
const now = new Date();
const markdown = dashboardMarkdown(this.dashboard, { now });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Export uses the previous selection

After a user changes the period, provider, model, or selected day, scheduleDashboard keeps the old dashboard until the new report is ready. busy() stays false during that wait, so export can save the previous selection while the controls show the new one.

Disable export while an update is pending or queued, and check that dashboardKey matches the current options before exporting.

@GaganSD
GaganSD merged commit bbd9996 into main Nov 7, 2026
3 checks passed
@GaganSD
GaganSD deleted the feat/insights-markdown-export branch November 7, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant