Skip to content
Source
Sign inSign up
TanStack/charts

fix: make catalog previews independent of host timezone #230

Mergedtannerlinsleymerged 1 commit intomain fromtaren/deterministic-preview-timezonemerged by tannerlinsley

tannerlinsleycommented

Fix

Pin the catalog preview browser to UTC, alongside the existing en-US locale. Without a fixed timezone, ISO date labels change with the machine running pnpm catalog:previews.

Thanks to @piecyk for reporting the regeneration difference while working on #229. This is a separate tooling fix, not the print-width fix.

The normal preview generator updated nine SVGs from Sun–Fri to Mon–Sat. All other SVG content is unchanged, and the other 179 previews are byte-identical. The generated manifest was refreshed by the generator.

Verification

  • The strengthened existing regression test fails before the fix and passes afterward, all 20 preview tests pass.
  • Chromium checks with Denver, Warsaw and UTC host timezones reproduce the old difference and confirm the pinned context reports UTC and the same weekday in each case.
  • Reviewed the rendered before/after previews and checked all nine SVG differences are text-only.
  • Maintained example builds pass.
  • pnpm validate passes all 19 tasks, including 2,237 main tests, bundle policy, comparison provenance and all 188 preview checks.

No published source, dependencies, bundle budgets or CI jobs change. The existing CI classifier selects static validation only, with comparison and stress partitions disabled. No package release is needed.

Summary by CodeRabbit

  • Improvements
    • Catalog previews now use the UTC time zone and the en-US locale. Dates and times in previews are therefore displayed consistently across environments, making it easier to compare preview results.
    • Preview assets have been updated to match the current catalog output.
    1. ⚠️ No Changeset found

      Latest commit: f3dfd9294729fec5eb4ece01216b5591e52324cf

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 4ea5965c-afc1-448b-8ab4-50c124299aaf
      📥 Commits

      Reviewing files that changed from the base of the PR and between 39869d866f5385563eacdf03fd6d971ac87f5a8e and f3dfd9294729fec5eb4ece01216b5591e52324cf.

      ⛔ Files ignored due to path filters: 9
      • benchmarks/conformance/previews/132-shadcn-tooltip-advanced.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/190-shadcn-tooltip-default.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/191-shadcn-tooltip-formatter.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/192-shadcn-tooltip-icons.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/193-shadcn-tooltip-indicator-line.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/194-shadcn-tooltip-indicator-none.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/195-shadcn-tooltip-label-custom.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/196-shadcn-tooltip-label-formatter.svg is excluded by !**/*.svg
      • benchmarks/conformance/previews/197-shadcn-tooltip-label-none.svg is excluded by !**/*.svg
      📒 Files selected for processing: 3
      • benchmarks/conformance/previews/manifest.json
      • scripts/catalog-preview.mjs
      • scripts/catalog-preview.test.mjs

      Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

      📝 Walkthrough

      The catalog preview browser context now uses the UTC timezone, and its test checks that setting. The preview manifest has updated source and asset hashes; asset IDs and byte counts are unchanged.

      Changes: Catalog preview timezone and manifest

      Layer / File(s)Summary
      UTC preview context and refreshed manifest
      scripts/catalog-preview.mjs, scripts/catalog-preview.test.mjs, benchmarks/conformance/previews/manifest.json
      The preview context sets the timezone to UTC, and the test checks it alongside locale en-US. The manifest has updated source and asset hashes; asset IDs and byte counts remain unchanged.

      Priority: ⬇️ Low

      Estimated code review effort: 2 (Simple) | ~5 minutes

      Change: Bug fix

      Merge Risk: ⚪ Minimal · up to f3dfd

      Catalog previews now use UTC, and the refreshed manifest matches the checked-in preview assets. No actionable merge risk remains.

      Pre-merge checks: Passed 4 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …Write docstrings for the functions missing them to satisfy the coverage threshold.
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title clearly and concisely describes the main change: removing host-timezone dependence from catalog previews.
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Docstring Coverage

      Explanation

      Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

      • Fix all pre-merge checks with AI
      ✨ Finishing Touches: 💡 1
      📝 Generate docstrings: 💡
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit f3dfd9294729fec5eb4ece01216b5591e52324cf

      CommandStatusDurationResult
      nx run charts-workspace:ci-distributed✅ Succeeded58sView ↗
      nx run charts-workspace:package-check✅ Succeeded<1sView ↗
      nx run charts-workspace:benchmark-check✅ Succeeded<1sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-10-14 11:22:37 UTC

    4. tannerlinsley merged this6a16f87

    5. tannerlinsley closed this

Sign in to join this conversation.