Skip to content

Commit 983a1af

Browse files
feat: visual eval trend dashboard (agent-strace dashboard --trend) (#74)
Extends dashboard with --trend mode: reads per-session eval scores from eval.json, computes error/retry/cost time-series, and renders a self-contained HTML report with inline SVG charts. - TrendPoint, TrendReport, EvalScorePoint data structures - build_trend_report(): extracts metrics from events + eval.json - format_trend_terminal(): terminal summary with pass-rate deltas - render_html_trend(): self-contained HTML, no CDN, no JS libraries, inline SVG sparklines with annotation markers - save_annotation() / load_annotations(): persist timeline markers - CLI: --trend, --since Nd, --html FILE flags on dashboard subcommand - dashboard annotate --date --note subcommand - 25 new tests covering SVG rendering, annotation storage, trend builder, terminal formatting, and HTML output Closes #68 Co-authored-by: Ona <no-reply@ona.com>
1 parent b97d8c5 commit 983a1af

3 files changed

Lines changed: 836 additions & 3 deletions

File tree

src/agent_trace/cli.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,16 @@ def build_parser() -> argparse.ArgumentParser:
592592
p_dash.add_argument("--limit", type=int, default=50, help="max sessions to show (default: 50)")
593593
p_dash.add_argument("--agent", default="", help="filter by agent name")
594594
p_dash.add_argument("--output", "-o", help="write HTML dashboard to this file")
595+
p_dash.add_argument("--trend", action="store_true",
596+
help="show quality and behavioral metrics over time")
597+
p_dash.add_argument("--since", metavar="Nd",
598+
help="limit trend to sessions from the last N days (e.g. 30d)")
599+
p_dash.add_argument("--html", metavar="FILE",
600+
help="write self-contained HTML trend report to FILE")
601+
dash_sub = p_dash.add_subparsers(dest="dash_command")
602+
p_dash_ann = dash_sub.add_parser("annotate", help="add a timeline annotation")
603+
p_dash_ann.add_argument("--date", required=True, help="date in YYYY-MM-DD format")
604+
p_dash_ann.add_argument("--note", required=True, help="annotation text")
595605

596606
# annotate
597607
p_ann = sub.add_parser("annotate", help="attach notes, labels, and bookmarks to trace events")

0 commit comments

Comments
 (0)