Skip to content

fix: make catalog previews independent of host timezone - #230

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/deterministic-preview-timezone
Oct 14, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/deterministic-preview-timezone

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

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.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f3dfd92

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

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

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 39869d8 and f3dfd92.

⛔ 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 name Status Explanation Resolution
Docstring Coverage Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing host-timezone dependence from catalog previews.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check 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.

@nx-cloud

nx-cloud Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f3dfd92

Command Status Duration Result
nx run charts-workspace:ci-distributed ✅ Succeeded 58s View ↗
nx run charts-workspace:package-check ✅ Succeeded <1s View ↗
nx run charts-workspace:benchmark-check ✅ Succeeded <1s View ↗

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

@tannerlinsley
tannerlinsley merged commit 6a16f87 into main Oct 14, 2026
13 checks passed
piecyk added a commit to piecyk/charts that referenced this pull request Oct 14, 2026
Bring in TanStack#230, which pins catalog preview generation to UTC. Resolve the
preview manifest by regenerating previews from the merged source and
mark F-316 resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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