Skip to content

chore(trends): cover weekday bucket alignment - #34

Open
lordspline wants to merge 1 commit into
masterfrom
capy/cover-weekday-bucket-alignment
Open

chore(trends): cover weekday bucket alignment#34
lordspline wants to merge 1 commit into
masterfrom
capy/cover-weekday-bucket-alignment

Conversation

@lordspline

@lordspline lordspline commented Aug 19, 2026

Copy link
Copy Markdown

Problem

Trends contributors lacked regression coverage proving weekday exclusions preserve populated days after the most recent weekend.

PostHog#61782 no longer reproduces because hideWeekends is ignored and dateRange.daysOfWeek owns weekday filtering.

Changes

  • Adds query-runner coverage for every range end, multiple weekends, week starts, timezones, DST, comparisons, breakdowns, and incomplete periods.
  • Proves the deprecated hideWeekends field produces the same response when disabled or enabled.
  • Preserves a truly empty weekday as zero while populated Monday-through-Thursday buckets retain 3, 3, 3, 12.
  • Adds chart-transform coverage and deterministic Storybook stories for all days and weekdays only.
  • Leaves production behavior unchanged.

No product UI changes. The Storybook stories provide deterministic visual fixtures for the response shapes.

How did you test this code?

  • Ran the targeted Trends pytest matrix to guard response bucket and value alignment.
  • Ran the Trends chart-transform Jest suite to guard the response-to-chart boundary.
  • Ran frontend formatting, lint fixes, and the full frontend TypeScript check.
  • Ran hogli ci:preflight --fix with no failures.
  • Rendered both deterministic stories in Storybook with Chromium and verified only Saturday and Sunday disappear.

Automatic notifications

  • Publish to changelog?

Docs update

None. This PR adds regression evidence without changing user-facing behavior.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Capy traced the historical issue and current query-to-chart path before editing. The investigation found the production fix and later retirement already landed, so this PR adds evidence instead of another behavior patch.

Skills invoked: /writing-ui-components, /writing-tests, /writing-user-facing-copy, /qa-frontend, /setting-feature-flags-in-storybook, /running-ci-preflight, and /writing-pr-descriptions.

All committed fixture data is invented and contains no customer material.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦔 Hogbox preview · ❌ build failed

The preview didn't come up for commit cdea0f3. See the build log for the failing step. It'll retry on the next push.

Previews are optional and never block merging. A failure here is often a hogland or tailnet hiccup rather than anything in your PR, so the check stays green and this comment is the status.

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