fix(web-studio): drop client-side heatmap tz rebucket (post-#2178/#2190 double-shift)#2194
Merged
Merged
Conversation
…er-side PR #2178 (4e94734) shipped a `shiftBucketToLocal` helper that re-bucketed the commit heatmap from UTC to viewer-local. PR #2190 (0d63f0e) landed right after and added the equivalent shift server-side: backend now accepts ?timezone= and returns rows already bucketed in the requested tz. Keeping the client-side shift double-shifts every row by the viewer's tz offset (e.g. UTC+8 ends up at UTC+16), so today's bucket displays under the wrong local date. This was supposed to be reverted on the #2178 branch before merge but the revert commit (37e0450) was pushed after the PR had already been merged, so it never reached main. Apply the same revert directly here. normalizeCommitHeatmapData now keys the aggregation map by item.date as the server returns it (already in viewer tz post-#2190).
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Collaborator
Author
|
Production verification for the reported post-#2190 issue:
Local validation from my side: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hotfix: remove the client-side `shiftBucketToLocal` helper added in PR #2178.
PR #2190 (merge 0d63f0e) introduced server-side UTC→viewer-tz re-bucketing for the commit heatmap. The earlier PR #2178 (merge 4e94734) already shipped a client-side equivalent. With both in place every row gets shifted twice — today's bucket lands under tomorrow's local date for UTC+ viewers.
The revert was prepared on PR #2178's branch (commit 37e0450) but pushed after the PR had merged, so it never made it onto main. This PR applies the same revert directly to main.
Plan
`web-studio/src/routes/home/-lib/normalize.ts`:
Test plan