Repository navigation
apps dashboard analytics
Active contributors: Vassiliy Kuzenkov
Overview and Analytics present server aggregates without turning missing observations into zero cost, complete coverage or a quality guarantee. Repository and time filters are shared through the URL; the server remains responsible for visibility and aggregation.
Scope: web/src/modules/Overview/ and web/src/modules/Analytics/ contain 12 source files, 2 test files, a 16.7% test/source file ratio and 1 unique nonbot author on origin/main. Counts exclude their route pages and common formatters; see the counting method.
web/src/pages/index.vue and web/src/pages/analytics/index.vue read repository and days from the URL. They offer 7, 30 or 90 days and default to 30. With no repository ID the server aggregates only repositories the caller can read, not every repository on the instance.
| View | Request family | Query source |
|---|---|---|
| Overview totals |
/v1/summary with repository and rolling Unix-second since
|
web/src/modules/Overview/queries.ts |
| Daily usage |
/v1/usage with inclusive UTC from/to dates |
web/src/modules/Overview/queries.ts |
| Usefulness |
/v1/analytics/quality with repository and since
|
web/src/modules/Analytics/queries.ts |
| Honesty |
/v1/analytics/honesty with repository and since
|
web/src/modules/Analytics/queries.ts |
| Cost |
/v1/analytics/cost with repository and since
|
web/src/modules/Analytics/queries.ts |
| Latency |
/v1/analytics/latency with repository and since
|
web/src/modules/Analytics/queries.ts |
Keys include the repository and day refs, so changing filters selects a different cached query. Each panel has its own loading/error state rather than requiring every aggregate to succeed. No periodic analytics refresh is configured in these query files; see cache semantics.
web/src/modules/Overview/ui/SummaryTiles.vue derives six tiles from the summary response:
- Runs, with completed/failed counts.
- Incomplete coverage, combining PARTIAL and UNAVAILABLE.
- Required unknown obligations.
- Finding event counts for opened, resolved and dismissed.
- Known model cost, with unknown-cost calls stated separately.
- Current queue size and oldest wait, or uncertain-publication count when the queue is empty.
web/src/modules/Overview/ui/CostByDay.vue renders known charges per UTC day. web/src/modules/Overview/days.ts fills missing dates with zero-usage rows so a busy day does not stretch across a sparse timeline. Unknown-cost calls are disclosed outside the bars; subscription fees are listed separately rather than folded into daily known model charges.
web/src/pages/index.vue builds a filtered CSV link for daily usage using the response's actual date range and web/src/common/utilities/csvHref.ts.
web/src/modules/Analytics/ui/QualityView.vue shows:
| Display | Interpretation |
|---|---|
| Addressed share | RESOLVED findings among settled findings on merged/closed pull requests; the UI explains that resolution means a later run checked the fix |
| False-positive share | False-positive judgements among each person's latest judgement per finding |
| Merged with open findings | Pull requests grouped by severity left open, for findings updated in the selected period |
| Judgement table | Counts grouped by rule ID, category, severity or repository |
| Noisy rules | Named rules with at least five judgements and one false positive, ordered by false-positive share |
Grouping and ordering live in web/src/modules/Analytics/judgements.ts: a missing dimension is unknown; groups sort by judgement count then key. Noisy-rule ranking is a separate view over those groups, not an automatic policy change.
web/src/common/utilities/formatShare.ts suppresses a percentage below five outcomes and otherwise rounds to a whole percent. Counts remain visible. These are descriptive feedback ratios, not measured model precision, statistical confidence or a merge-safety score. web/src/pages/analytics/index.vue repeats the five-outcome threshold so readers see it before the panels.
Noisy-rule copy tells maintainers to fix or drop a rule through a pull request to .sych/rules.yaml; the browser does not switch rules off. See feedback-derived suggestions for a related decision workflow.
web/src/modules/Analytics/ui/HonestyView.vue plots finished runs per day with the incomplete part of each bar highlighted. It separately lists run outcomes, unreviewed paths by gap reason and unknown obligations by reason.
Historical runs that predate reason recording are disclosed as unrecorded_runs and excluded from those reason tables. An empty table therefore does not prove that all historical runs were fully recorded. Coverage remains independent of execution success, as explained in the review reader.
web/src/modules/Analytics/ui/CostView.vue shows known cost, unknown-cost attempt counts, cost on superseded revisions and known cost per finding someone called useful. It also renders breakdowns by repository, model and purpose and links to the most expensive changes.
The tenant-budget card appears only if the API returns budget. The query description in web/src/modules/Analytics/queries.ts limits this tenant-wide view to a caller with access to all of it; the component must not reconstruct tenant spend from a scoped repository list. The card displays monthly forecast, daily/monthly spend and caps, including held reservations.
Unknown monetary values are never coerced to zero: web/src/common/utilities/formatMicroUsd.ts prints unknown for null/undefined amounts and formats integer micro-USD as dollars. The cost view warns that settled model calls are retained 90 days by default, so a longer window can understate historical spending. Provider accounting and budgets are described in models and the server, not recomputed by the browser.
web/src/modules/Analytics/ui/LatencyView.vue displays sample size, median and p90 for:
- Run creation to first delivered comment.
- Run creation to completion.
- Job creation to first claim.
Missing percentiles render as a dash. The queue-wait note states that jobs are kept 30 days, so a 90-day selection does not imply 90 days of retained queue samples. These panels define observed durations, not an SLO.
web/src/pages/analytics/index.vue links to /v1/reports/weekly?format=markdown, optionally filtered by repository. This weekly report has its own server-defined period; the selected days value is not sent in that link. For export and visibility contracts see the API reference.
| File | Responsibility |
|---|---|
web/src/pages/index.vue |
Overview filters, per-panel states and usage CSV |
web/src/pages/analytics/index.vue |
Analytics composition, period and weekly-report link |
web/src/modules/Overview/queries.ts |
Rolling summary and UTC usage ranges |
web/src/modules/Overview/days.ts |
Inclusive missing-day fill |
web/src/modules/Overview/ui/SummaryTiles.vue |
Overview tile semantics |
web/src/modules/Analytics/queries.ts |
Four independently cached aggregate reads |
web/src/modules/Analytics/judgements.ts |
Grouping, missing dimensions and noisy-rule ordering |
web/src/modules/Analytics/ui/QualityView.vue |
Outcome denominators and feedback presentation |
web/src/modules/Analytics/ui/HonestyView.vue |
Partial coverage and unrecorded-history disclosures |
web/src/modules/Analytics/ui/CostView.vue |
Known/unknown cost, budget and retention notices |
web/src/modules/Analytics/ui/LatencyView.vue |
Percentiles and sample-size display |
For a new aggregate, change the server DTO/endpoint and API schema, regenerate types, add a query keyed by every filter and compose its own error/loading state in the route page. Do not infer a new metric from an unrelated count without defining its population.
For presentation changes, preserve the five-outcome threshold, unknown-price disclosure, historical-reason gap and retention notes. Extend web/src/modules/Analytics/__tests__/judgements.spec.ts for grouping/ranking or web/src/modules/Overview/__tests__/days.spec.ts for UTC timeline behavior; shared money/share contracts are described in frontend tests.