Skip to content

feat: added report generation - #3

Merged
magnusgp merged 1 commit into
mainfrom
005-insight-layer
Nov 6, 2025
Merged

magnusgp merged 1 commit into
mainfrom
005-insight-layer

Conversation

@magnusgp

@magnusgp magnusgp commented Nov 6, 2025

Copy link
Copy Markdown
Owner

This pull request introduces a major new analytics feature called the "Insight Layer," which aggregates analysis data into actionable summaries and trends, and adds a mechanism for securely sharing these insights via read-only links. The implementation includes new backend models, API endpoints, and service logic for generating, caching, and sharing insight snapshots. Documentation has been updated to reflect these new capabilities.

Insight Layer Feature and API:

  • Added the "Insight Layer" feature to the platform, providing trend-aware analytics, temporal summaries, and automatic explanations powered by Hafnia's Vision-Language Model. Insights can now be shared via read-only links for stakeholders.
  • Implemented a new /api/insights API with endpoints for retrieving, regenerating, and sharing insight snapshots, including error handling for invalid parameters and share tokens.

Backend Models and Services:

  • Introduced new Pydantic models and a SQLAlchemy table (InsightShareModel) for insight snapshots and share tokens, supporting aggregate metrics, chart series, top labels, and share metadata.
  • Added the InsightService and supporting aggregator logic to compute insight payloads, cache results, and manage share tokens. [1] [2]

API Integration and Dependency Injection:

  • Registered the insights router with the main API, and set up dependency injection for the new service, including configuration for cache TTL and share token salt. [1] [2] [3]

Documentation Updates:

  • Updated the README.md with details about the Insight Layer and new endpoints for sharing insights, including error handling and cache refresh behavior for shared links.

These changes collectively enable operators to generate, view, and securely share summarized analytics and trends from clip analyses, with robust backend support for aggregation, caching, and access control.

@vercel

vercel Bot commented Nov 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clipnotes Ready Ready Preview Comment Nov 6, 2025 2:54pm

@magnusgp
magnusgp merged commit e27d2b4 into main Nov 6, 2025
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0e56a7fe Deployed Nov 6, 2025 by vercel[bot]
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