feat: analytics parity — tool cost, date ranges, budgets, query explorer, replay, snapshots (v2.4.0)

Analytics parity phases 2–7 (docs/plans/analytics-parity/), built on
138e706 and ported onto v2.3.1:
- Cost by AI tool (?tool= on cost/analytics/stats/workflows, by_tool,
  Codex fast/priority and flex tiers, agenthub_cost_usd_total{tool,model})
- Date ranges (from/to) on cost/analytics/workflows; Analytics range select
  with Today / This week (Monday) / This month (1st) / 7d / 30d / 90d / All /
  Custom; workflow filters carried into workflow-stats.js (read worker)
- Budgets and cost alerts as alert rule types (alert_rules rebuilt without
  its rule_type CHECK), GET /api/budgets/status, rule preview, spend pace,
  status-bar budget chip; rules stay editable in place
- Query Explorer (/query, allowlisted sort, CSV/JSON export) and scheduled
  reports (report_definitions/report_runs, Settings → Reports)
- Session Replay tab and immutable snapshots (session_snapshots, /snapshot/:token)
- Remote Codex sync, push ingest with a hashed token, privacy redaction and
  ignored folders (Settings → Data), Cursor sessions (no cost)
- Read-only MCP server, statusline, Grafana/Prometheus files

Also: resizable sidebar, pet run/wave animations, the workspace home keeps a
half-typed prompt, and the pre-commit hook runs only the related tests for a
small commit.
This commit is contained in:
2026-10-06 17:12:28 +07:00
parent 837da6e5de
commit 4aae61297f
146 changed files with 13565 additions and 537 deletions
+49
View File
@@ -53,6 +53,55 @@
"copyId": "Sao chép ID session",
"copyFolder": "Sao chép đường dẫn thư mục"
},
"replay": {
"tab": "Phát lại",
"loading": "Đang tải sự kiện…",
"label": "Phát lại phiên",
"truncated": "Đang phát lại {{shown}} sự kiện mới nhất trong {{total}}.",
"start": "Về đầu (Home)",
"back": "Lùi một bước (←)",
"play": "Phát (Space)",
"pause": "Tạm dừng (Space)",
"forward": "Tiến một bước (→)",
"end": "Đến cuối (End)",
"speed": "Tốc độ phát",
"position": "{{at}} / {{n}}",
"scrubber": "Vị trí sự kiện",
"minimap": "Mốc vòng đời",
"marker": {
"SessionStart": "Bắt đầu phiên",
"UserPromptSubmit": "Prompt",
"Compaction": "Nén ngữ cảnh",
"SubagentStop": "Subagent xong",
"APIError": "Lỗi API",
"Stop": "Kết thúc lượt"
},
"state": {
"status": "Trạng thái",
"tool": "Công cụ đang chạy",
"prompts": "Prompt",
"errors": "Lỗi",
"compactions": "Lần nén",
"elapsed": "Đã trôi qua",
"toolCounts": "Số lần gọi công cụ đến lúc này"
}
},
"snapshot": {
"create": "Snapshot",
"hint": "Đóng băng phiên này thành một bản chỉ đọc kèm liên kết chia sẻ",
"title": "Tạo snapshot",
"body": "Đóng băng phiên như hiện tại — agent, sự kiện, thống kê và chi phí — thành một bản chỉ đọc dưới một liên kết riêng. Hoạt động sau đó không làm nó thay đổi, và nó vẫn còn sau khi Xóa dữ liệu.",
"redactPaths": "Che đường dẫn (thư mục làm việc, transcript và đường dẫn tệp)",
"confirm": "Tạo và sao chép liên kết",
"cancel": "Hủy",
"open": "Mở snapshot",
"notFound": "Không tìm thấy snapshot",
"banner": "Snapshot chụp lúc {{date}}",
"bannerBody": "Bản chỉ đọc của phiên tại thời điểm đó. Không có gì ở đây được cập nhật.",
"redacted": "Đã che đường dẫn",
"openLive": "Mở phiên đang có",
"timeline": "Dòng thời gian ({{n}})"
},
"exportCsv": "CSV",
"exportJson": "JSON",
"exportCapped": "Tệp chỉ gồm {{shown}} trên {{total}} phiên (giới hạn xuất) — hãy thu hẹp bộ lọc để xuất phần còn lại.",