Skip to content

fix(frontend): clarify channel period timeline#1848

Merged
riderx merged 3 commits into
mainfrom
codex/clarify-channel-adoption-stats-v2
Mar 24, 2026
Merged

fix(frontend): clarify channel period timeline#1848
riderx merged 3 commits into
mainfrom
codex/clarify-channel-adoption-stats-v2

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Mar 24, 2026

Summary (AI generated)

  • replace the selected-period cards with a clearer start / latest / movement timeline
  • remove the percentage-points presentation that made the adoption cards harder to interpret
  • make the 1-day filter compare today versus yesterday instead of showing a single day only

Motivation (AI generated)

After the first channel adoption PR, the selected-period cards were still easy to misread. Users could see 100% in the latest snapshot while the period-start card showed 0%, and the use of points versus percentages made that look inconsistent instead of chronological.

Business Impact (AI generated)

This makes Capgo's rollout analytics easier to trust and reduces customer confusion on a key update-adoption page, which should lower support overhead and improve confidence in the dashboard.

Test Plan (AI generated)

  • Open channel statistics and verify the selected-period row reads as start, latest, and movement across the range
  • Select 1 day and verify the UI says Today vs yesterday while the chart shows two points
  • Confirm the latest snapshot cards remain unchanged and still match the status banner
  • Note: automated validation was limited in this worktree because repo-local eslint and vue-tsc are not installed

Generated with AI

Summary by CodeRabbit

  • New Features

    • Updated adoption metrics to describe movement from start to end of the selected period (range view).
    • Added a "today vs yesterday" label for single-day comparisons.
    • Replaced "best day" with "latest day in selected period" and added explicit start-of-period labels.
  • Bug Fixes / UI Copy

    • Revised channel adoption chart and overview card copy/labels to reflect timeline-focused wording and new percent-range display.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b35b2139-3960-4e2f-8029-e9be6bfffaf8

📥 Commits

Reviewing files that changed from the base of the PR and between 6a48c1f and f529e5a.

📒 Files selected for processing (1)
  • supabase/functions/_backend/triggers/cron_email.ts

📝 Walkthrough

Walkthrough

Updates localization and UI copy to describe adoption as a range (start → latest) instead of point/peak comparisons; refactors the statistics Vue component to use range formatting and simplified period logic; removes email from a cron email payload/logs in a Supabase trigger.

Changes

Cohort / File(s) Summary
Translation keys
messages/en.json
Removed keys referencing period-start/peak (adoption-at-period-start, best-day-in-period, points-short, etc.); added range-focused keys (adoption-over-selected-period, today-vs-yesterday, latest-day-in-selected-period, start-of-selected-period) and adjusted channel-stats-period-help.
Statistics component (UI & logic)
src/pages/app/[app].channel.[channel].statistics.vue
Replaced formatSignedPoints() with formatPercentRange(); introduced requestedDays mapping and today-vs-yesterday label for 1-day views; simplified periodSummary (removed peak computation) and updated the three overview cards to show start-of-period, latest-day, and adoption-over-selected-period with new translation keys and adjusted display/conditional styling.
Backend trigger (cron email)
supabase/functions/_backend/triggers/cron_email.ts
Removed email from the payload passed to handleDailyFailRatio and removed email from two error log metadata entries; control flow unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 I hopped through keys and charts today,
Swapped peaks for ranges, start→latest play,
Removed a stray email on the way,
Cleaner cards now lead the display—
Little changes, big bright day ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: clarifying the channel period timeline UI by reordering cards and changing how periods are displayed.
Description check ✅ Passed The description covers the Summary and Test Plan sections, though Test Plan items lack checkmarks and the Checklist section is missing. The description adequately explains the changes and testing approach.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/clarify-channel-adoption-stats-v2

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@riderx riderx merged commit 55662cb into main Mar 24, 2026
14 of 15 checks passed
@riderx riderx deleted the codex/clarify-channel-adoption-stats-v2 branch March 24, 2026 18:15
@coderabbitai coderabbitai Bot mentioned this pull request Mar 25, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant