fix(telemetry): use generic period names for quarter and year tabs#504
fix(telemetry): use generic period names for quarter and year tabs#504
Conversation
Quarter and Year tabs were showing date range strings instead of stable period identifiers. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: tym83 <6355522@gmail.com>
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request manually updates the 'quarter' and 'year' labels in the telemetry data JSON file. Feedback highlights that these manual changes will be overwritten by the automated fetch script and recommends updating the generation logic in hack/fetch_telemetry.py to ensure the generic labels persist.
| }, | ||
| "quarter": { | ||
| "label": "March 2026 — April 2026", | ||
| "label": "Quarter", |
There was a problem hiding this comment.
This manual update to the telemetry data will be overwritten by the hack/fetch_telemetry.py script during its next scheduled run (via .github/workflows/fetch-telemetry.yml).
To ensure these generic labels persist, the logic in hack/fetch_telemetry.py should be modified to prioritize the generic labels for the quarter and year periods. This would also align the telemetry data generation with the approach used in hack/update_oss_health.py.
You can modify the build_payload function in hack/fetch_telemetry.py as follows:
for key in ("month", "quarter", "year"):
raw_p = periods_raw.get(key, {}) or {}
if key in ("quarter", "year"):
raw_p["label"] = key.title()
transformed = transform_period(raw_p, label_fallback=key.title())| }, | ||
| "year": { | ||
| "label": "March 2026 — April 2026", | ||
| "label": "Year", |
Summary
/oss-health/telemetry/) were showing date range strings (e.g. "March 2026 — April 2026") instead of stable period nameslabelvalues instatic/oss-health-data/telemetry.jsonto "Quarter" and "Year"What
Updated
periods.quarter.labelandperiods.year.labelin the telemetry snapshot data.Why
Date range strings make sense for the Month tab (which reflects the current month), but for Quarter and Year aggregates a static label is clearer and avoids showing a stale date range as data accumulates over time.
Preview
Tabs on https://cozystack.io/oss-health/telemetry/ will show:
Month · Quarter · YearSummary by CodeRabbit