fix(TimestampResolver): Use Time.current in publishable?#3866
Open
fix(TimestampResolver): Use Time.current in publishable?#3866
Conversation
The publishable? predicate was delegating to still_public_for? without passing an explicit time, so it defaulted to Current.preview_time. When an editor selected a future preview time and then published the page, elements whose public_until was in the future relative to now but before the previewed moment were treated as already expired and were excluded from the public version.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3866 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 323 323
Lines 8582 8582
=======================================
Hits 8417 8417
Misses 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3 tasks
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.
What is this pull request for?
TimestampResolver#publishable?was delegating tostill_public_for?without an explicitat:argument, so the check defaulted toCurrent.preview_time. When an editor selected a future preview time and then hit Publish, any element whosepublic_untilwas in the future relative to now but before the previewed moment was treated as already expired and was silently excluded from the public version of the page.Checklist