Skip to content

Custom Reports

A report-authoring app for source-aware KPI, chart, table and narrative sections, with saved reports and a read-only viewer.

The Problem

Report authors need each section to retain its effective source and query. A focused summary edit must still match the evidence it read, and generated text needs review before saving or publishing.

My Contribution

For K2POV, I am the sole technical builder across reporting and application development.

How It Works

  1. 01Build sections from registered defaults and schemas. Preset and agent-created sections share a factory; reordering changes presentation, not section settings or queries.
  2. 02Set report-wide source, period and filters, then apply section overrides. Keep each section's effective source, query and evidence with its authored settings; Data Engine owns query execution and result-window completeness.
  3. 03The edit_section action proposes a diff that Apply rechecks against current evidence before changing the draft. The generate_report action writes narrative directly to the live draft and reports failures for selected-section retries. Review generated text before saving or publishing.

Engineering Decisions

  • Keep section order separate from query execution

    The builder moves typed section nodes in the report document. Each section retains its own effective source and query, so moving a chart above a KPI changes presentation order without changing either section's request.

    Order alone does not make two section queries equivalent. Charts, KPIs and tables can use different grouping or result limits, and the rendered order says nothing about which query finished first.

  • Keep section settings distinct from hydration

    A chart title or layout change should not replace computed rows. Registered schemas separate editable settings from runtime data, while the hydrated source records the effective query.

    A saved section can contain rows or fixed evidence. That content is not the source file, a fresh query result or proof of current coverage. Device-only datasets remain unavailable to another browser unless shared separately.

  • Reuse a query only when its request matches

    Sections share an in-flight or cached result only when source, query and execution options match. A 20-row detail window cannot replace a complete result requested by another section.

    A report may need several queries. Reuse does not imply identical grain, metrics or coverage; each section needs an inspectable source.

  • Recheck a focused edit against the evidence it read

    If a chart first hydrates after a summary proposal, Apply can accept that new evidence when its settings and report scope stayed the same. If an already loaded chart's facts change, Apply reports a conflict and keeps the draft untouched.

    When revision tokens differ, the guard needs readable manifests for both states. Missing current evidence blocks Apply; propose again against the current report.

Outcome

Section settings, query results and saved content stay distinct. Focused edits recheck evidence before applying atomically; generated narrative remains a draft for review.