fix: keep month-view bar end positions consistent within the rendered month bucket#611
Open
brandonetter wants to merge 5 commits intofrappe:masterfrom
Open
fix: keep month-view bar end positions consistent within the rendered month bucket#611brandonetter wants to merge 5 commits intofrappe:masterfrom
brandonetter wants to merge 5 commits intofrappe:masterfrom
Conversation
Collaborator
|
@brandonetter can you give me the exact code to test this before/after? Thanks for this. |
Author
Sure thing. Probably the easiest way to test without changing anything would be
Running that in the browser on Running that after building on this branch should show the fix: I could push an example into the |
Author
|
Added Should be easy now to use this math to put in the final changes on #607 |
prettier formatting issue
not relevant to current codebase or needs/style
Author
|
Removed prettier formatting changes and removed the test file- as it isn't really relevant or a big part of this repo and just introduced bulk to a PR |
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
The bug was reproducible with tasks that all ended on the same date but started on different month boundaries like
2025-07-31,2025-09-30,2025-10-31, and2024-02-29. In Month view, those bars did not share the same rendered right edge.Example Screenshot from Current:
Example fixed Screenshot:
Root Cause
Month-view bar rendering was mixing two different coordinate models:
That meant bars with the same end date could still land at different visual end positions.
Fix
For Month view only:
xwith a consistent month-bucket fractional positionxThis keeps the rendered end position stable and keeps dates like
2026-03-19inside the March bucket rather than spilling into April.Verification
Added focused regression coverage for Month view to verify:
2026-03-19end renders within the March bucketNotes
This PR intentionally is narrow to fix the month rendering issue without changing any other behavior.It does not change Month-view drag/resize date reverse-mapping, which remains approximate.Full changes could be made if the maintainer wants, but I really just needed this for something I'm working on and didn't want to start diving into the entire codebase here. LMK 👍PR Handles fix to x position math with helpers to make future month_view changes easier.