Commit 68af1ce
* Initial plan
* fix: normalize 1-day flat ReportDayTotals in downloadReport to fix sync-date error
Agent-Logs-Url: https://github.com/github-copilot-resources/copilot-metrics-viewer/sessions/90497913-2ed4-4b1a-9a3a-26c22511765a
Co-authored-by: karpikpl <3539908+karpikpl@users.noreply.github.com>
* fix: honor SYNC_DAYS_BACK env var in syncBulk via new daysBack parameter
Agent-Logs-Url: https://github.com/github-copilot-resources/copilot-metrics-viewer/sessions/697cd2bc-3055-4d55-818c-c74a19f96c64
Co-authored-by: karpikpl <3539908+karpikpl@users.noreply.github.com>
* fix: bump version to 3.1.1 (bugfix patch release)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: pass daysBack as correct positional arg to syncBulk
SYNC_DAYS_BACK env var was being passed as the 4th argument (teamSlug)
instead of the 5th (daysBack), so it had no effect. Pass undefined for
teamSlug explicitly so daysBack lands in the correct position.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: remove unused variable in sync-storage test
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: document admin sync API actions in DEPLOYMENT.md
Add Admin Sync API section explaining POST /api/admin/sync with
all four actions (sync-date, sync-bulk, sync-range, sync-gaps),
their required parameters, and curl examples.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: parse JSON body even when Content-Type header is missing
When curl (or any client) posts JSON without Content-Type: application/json,
H3's readBody returns the raw string. Spreading a string gives per-character
keys so 'action' is never found and the endpoint silently defaults to sync-date.
Now explicitly JSON.parse the body if readBody returns a string, making
all sync actions work without requiring the Content-Type header.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: sync-gaps now reports gapsDetected and outsideWindow counts
Previously sync-gaps returned {gapsFilled:0, results:[]} with no indication
of why nothing was filled. Now returns:
- gapsDetected: total missing dates in the requested range
- gapsFilled: dates successfully stored
- outsideWindow: gaps that exist but fall outside the 28-day API window
This makes it clear when gaps are genuinely absent vs when they exist but
cannot be backfilled because the GitHub API only provides the last 28 days.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: sync-gaps now backfills historical dates via 1-day endpoint
The 28-day bulk download only covers the last 28 days, so gaps older
than that were silently skipped. Now syncGaps uses the bulk download
for in-window gaps (efficient) and falls back to the 1-day endpoint
for out-of-window gaps (one API call per date). This means sync-gaps
can fill any historical date the API has data for.
Also update DEPLOYMENT.md: clarify that sync-date/sync-range/sync-gaps
all support historical backfill, Content-Type header is optional, and
Authorization header is not needed when NUXT_GITHUB_TOKEN is configured.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* rename: sync-bulk → sync-last-28 (keep sync-bulk as alias)
The name 'sync-last-28' makes the behavior obvious — it downloads the
latest 28-day bulk report. 'sync-bulk' is kept as a backward-compatible
alias so any existing scripts continue to work.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(user-metrics): clickable user badges with drill-down charts
- User badges in the table are now clickable; clicking toggles
selection (highlighted in indigo) and filters the 4 new charts
- Added 'User Insights' section between the table and history:
1. Language Distribution (Doughnut) — from totals_by_language_feature
2. Feature Usage by Category (horizontal Bar) — completions/chat/agent
3. Top Models by Interactions (horizontal Bar) — from totals_by_model_feature
4. Activity Over Time (Line) — auto-loads user history on selection
- Selection cleared via closable chip or clicking the badge again
- Warning chip shown when selected user is hidden by activity filter
- Race guard prevents stale trend data from earlier fetches
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: karpikpl <3539908+karpikpl@users.noreply.github.com>
Co-authored-by: Piotr Karpala <piotrkarpala@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 57aa700 commit 68af1ce
11 files changed
Lines changed: 526 additions & 38 deletions
File tree
- app/components
- e2e-tests
- server
- api/admin
- services
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
284 | 338 | | |
285 | 339 | | |
286 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
204 | 205 | | |
205 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
272 | 373 | | |
273 | 374 | | |
274 | 375 | | |
| |||
324 | 425 | | |
325 | 426 | | |
326 | 427 | | |
327 | | - | |
| 428 | + | |
328 | 429 | | |
329 | 430 | | |
330 | 431 | | |
| |||
372 | 473 | | |
373 | 474 | | |
374 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
375 | 487 | | |
376 | 488 | | |
377 | 489 | | |
| |||
478 | 590 | | |
479 | 591 | | |
480 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
481 | 737 | | |
482 | 738 | | |
483 | 739 | | |
| |||
775 | 1031 | | |
776 | 1032 | | |
777 | 1033 | | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
778 | 1050 | | |
779 | 1051 | | |
780 | 1052 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments