fix: make catalog previews independent of host timezone #230
main fromtaren/deterministic-preview-timezone·merged by tannerlinsley 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 validatepasses 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 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.svgis excluded by!**/*.svgbenchmarks/conformance/previews/190-shadcn-tooltip-default.svgis excluded by!**/*.svgbenchmarks/conformance/previews/191-shadcn-tooltip-formatter.svgis excluded by!**/*.svgbenchmarks/conformance/previews/192-shadcn-tooltip-icons.svgis excluded by!**/*.svgbenchmarks/conformance/previews/193-shadcn-tooltip-indicator-line.svgis excluded by!**/*.svgbenchmarks/conformance/previews/194-shadcn-tooltip-indicator-none.svgis excluded by!**/*.svgbenchmarks/conformance/previews/195-shadcn-tooltip-label-custom.svgis excluded by!**/*.svgbenchmarks/conformance/previews/196-shadcn-tooltip-label-formatter.svgis excluded by!**/*.svgbenchmarks/conformance/previews/197-shadcn-tooltip-label-none.svgis excluded by!**/*.svg
📒 Files selected for processing: 3
-
benchmarks/conformance/previews/manifest.jsonscripts/catalog-preview.mjsscripts/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.jsonThe 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:
4 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Docstring Coverage 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 checks: 4 passed-
Check name Status Explanation Description Check Check skipped - CodeRabbit’s high-level summary is enabled. Title check The title clearly and concisely describes the main change: removing host-timezone dependence from catalog previews. Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check 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.
Comment `@coderabbitai help` to get the list of available commands.-
View your CI Pipeline Execution ↗ for commit f3dfd9294729fec5eb4ece01216b5591e52324cf
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:37UTCtannerlinsley merged this6a16f87
tannerlinsley closed this
Sign in to join this conversation.
⚠️ 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