You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(stats): finish scrubbing development-process references from comments
The earlier comment cleanup swept server/ and webapp/src/ but missed
webapp/e2e/, the plik client tests, and task numbers written as words.
Comments now carry their rationale inline instead of referencing decision
IDs, task numbers, or review-finding codes that exist only in uncommitted
planning documents. Also drops a stale mention of a deleted retry symbol
and the registry's removed add closures.
Copy file name to clipboardExpand all lines: webapp/ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -579,7 +579,7 @@ Extracted so the current/lifetime stats dashboard is defined once and reused per
579
579
| `StatsUsagePanel` | Composite. Given the canonical `usage` object it renders the current/lifetime tile columns, one merged **Activity** card, and the six side-by-side distribution cards (feature / TTL / file-size). The Activity card has a 4-metric segmented selector — Downloads / Uploads / Downloaded data / Uploaded data — that drives BOTH the window tiles (Today / 7 days / 30 days / **Lifetime**) and the `ActivityChart` for the selected metric. Count-metric windows come from the `usage` object (`downloads`/`uploads` today/last7Days/last30Days + total); byte-metric windows are summed from `dailySeries` (Lifetime from `usage.*.bytes`), so a null series leaves byte windows at 0 while Lifetime still renders. Scope-specific bits are props/slots: `currentTiles`/`lifetimeTiles`, `showActivity` (scopes without windows/series), a `#storage` slot (admin-only), and `dailySeries` (the 30-day activity series; `null`/empty omits the chart but keeps the tiles). The "since {date}" is printed once, in the lifetime column title. |
580
580
|`ActivityChart`| Presentational 30-day activity column chart. It is **controlled** by the panel: the measure is a `metric`prop (`downloads` \|`uploads` \|`downloadedBytes` \|`uploadedBytes`) — the segmented selector lives on the Activity card, not inside the chart. Props:`series` (`[{day, downloads, downloadedBytes, uploads, uploadedBytes}]`) and `metric`. Bars use a single accent token, axis/tooltip text use `surface-*` ink, gridlines a recessive surface token; y-axis starts at 0with~3 gridlines, x-axis labels every 7thUTC day, values humanized per metric — counts (`1.2k`) for download/upload metrics, byte sizes (`1.5 MB`) for the `*Bytes`metrics. Per-column hover shows a day+value tooltip (edge-flipped so it never clips); all-zero data draws the axis + a quiet empty-state line; the grow-in animation respects `prefers-reduced-motion`. Pure scale/tick/label helpers live in`chart-utils.js` (unit-tested), including `isByteMetric()` which classifies the four metric keys. |
581
581
582
-
>`StatsUsagePanel` owns the `statsPanel.*` i18n namespace (period titles, the Activity metric-selector labels, window-tile labels, distribution labels, and the `ActivityChart` empty/aria strings). Distribution bar colours are intentionally a single accent token pending the colour-finalisation task.
582
+
>`StatsUsagePanel` owns the `statsPanel.*` i18n namespace (period titles, the Activity metric-selector labels, window-tile labels, distribution labels, and the `ActivityChart` empty/aria strings). Distribution bar colours are intentionally a single accent token; per-category tinting is a possible future refinement.
583
583
>
584
584
>`ActivityChart` is a hand-rolled SVGin a Vue SFCwith**no charting dependency** — a bar chart this small needs only `<rect>`/`<path>` plus a handful of pure geometry helpers, so adding a library (and its bundle/theming/maintenance cost) would not pay for itself; theme reactivity comes for free from the `--color-*` tokens the SVG references.
0 commit comments