Surface merge time on the changelog page and in the feeds - #260
Merged
Conversation
The merge instant (mergedAt) was used only for sorting; nothing displayed it, and both feeds derived their timestamp from the entry id — which is malformed for slugged ids (`2026-06-24-foo` → `…-fooT00:00:00Z`, and "Invalid Date" in RSS). - changelog page: show each entry's merge time-of-day (UTC, deterministic for a static build) next to its date, with a machine-readable `<time datetime>` and a "Merged …" tooltip. - feeds: new `entryInstant()` helper → JSON `date_published` and RSS `pubDate` use the real merge time (falling back to a well-formed midnight-UTC of the id date prefix), and expose `mergedAt` in the `_xnet` extension for the in-app What's New. - apps/web feed consumer parses the new `mergedAt` field (+ test). Verified against a real `astro build`: page renders "· HH:MM UTC", JSON date_published is a full instant, RSS pubDate is valid RFC-822. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
🖼️ UI changes in this PRNo UI changes detected in this PR. |
Contributor
|
Preview removed for PR #260. |
| * fallback well-formed for a slugged id — `2026-06-24-foo` → | ||
| * `2026-06-24T00:00:00Z`, not the malformed `2026-06-24-fooT00:00:00Z`. | ||
| */ | ||
| export function entryInstant(entry: ChangelogEntry): string { |
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.
Follow-up to #259 (which sorts the changelog by real merge time). That made the order correct but nothing actually showed the merge time, so the page looked unchanged. This surfaces it.
What changed
Changelog page (index.astro) — each entry now shows its merge time-of-day next to the date:
Rendered in UTC so the statically-built output is deterministic across build environments, with a machine-readable
<time datetime="2026-06-25T02:22:28Z">and atitle="Merged …"tooltip carrying the full instant. Entries without a resolved merge time render date-only (no fake00:00).Feeds (changelog-feed.ts) — both feeds previously built their timestamp from the entry id:
For slugged ids this produced a malformed JSON
date_publishedand "Invalid Date" in RSS. NewentryInstant()helper uses the realmergedAt(falling back to a well-formed midnight-UTC of the date prefix), so:date_published→ full merge instant, plus_xnet.mergedAtfor the in-app surfacepubDate→ valid RFC-822 (Thu, 25 Jun 2026 02:22:28 GMT)In-app What's New (feed.ts) — parses the new
mergedAtfield (+ test).Verification
Ran a real
astro build(89 pages) and inspected the output:<time datetime="2026-06-25T02:22:28Z" …>June 24, 2026<span> · 02:22 UTC</span></time>"date_published": "2026-06-25T02:22:28Z"+"_xnet": { "mergedAt": "2026-06-25T02:22:28Z" }<pubDate>Thu, 25 Jun 2026 02:22:28 GMT</pubDate>feed.test.ts10/10 pass;validate:changelog87 fragments OK; prettier clean on the format-checkedapps/**files.Note: the human date label (e.g. "June 24") is the author-local release label and
mergedAtis UTC, so a near-midnight merge can show a UTC time on the "next" day — the explicitUTCsuffix + tooltip keep that unambiguous.🤖 Generated with Claude Code