Repository navigation
fix: show release date as Updated on cards - #384
Merged
Merged
Conversation
Deploying nemar-website with
|
| Latest commit: |
083ccb7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8ddca086.nemar-website.pages.dev |
| Branch Preview URL: | https://fix-updated-badge-release-da.nemar-website.pages.dev |
6 tasks done
Contributor
Author
Review findings and handling (Sonnet-model review of 0a82055)No blocking issues in the production code.
|
This was referenced Sep 30, 2026
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
The "Updated" fact on a dataset card now shows the date of the latest release (the newest version row), not the catalog row's
updated_at.Dataset.latest_version_at(optional, nullable, SQLite UTC likefirst_published_at) is added to the type and to the search-hit fallback row.formatReleaseDateinsrc/lib/release-date.tsis the one place that picks the date. It parses the zoneless SQLite value as UTC, formats it in UTC, and returns an empty string when the row has none.DatasetCard.astrouses it. There is deliberately no fallback toupdated_at.Why
updated_atis bumped by any write to the row: an enrichment reindex, a DOI sync, a finalize. The catalog-wide enrichment sweep of 2026-09-29 therefore made cards read "Sep 29, 2026" for datasets released weeks earlier (for example nm000279: released 2026-09-16,updated_at2026-09-29 23:29). A release date moves only when a version ships.Dependency and promotion order
Needs the companion nemar-cli change that serves
latest_version_at(thecreated_atof the newestdataset_versionsrow) on the catalog list and onGET /datasets/:id. Until it ships, the field is absent and cards simply omit "Updated"; nothing breaks. Verified against the live API with the dev server:/discoverrenders 11 cards, Version facts appear, no Updated fact.stagingtomainuntil the nemar-cli change is deployed to production, or every production card loses its "Updated" fact.devbackends, so QA on test.nemar.org also needs the companion on dev first.GET /datasets/:idmatters because search results are hydrated from the detail endpoint (backfillSearchHit); if the companion change only covers the list, search cards keep omitting "Updated".Deliberate non-changes
MyDatasetCard.astro("Last updated"): the owner workspace, where drafts have no version yet and "when did my row last change" is the useful answer.sitemap.xml<lastmod>(sitemapLastmod): still readsupdated_at, so the sweep moved every dataset'slastmodto its date. That is a separate decision from the card badge and is not made here.provenance.publish_dateand the version switcher shows each version's owncreated_at; neither readsupdated_at.Tested
bun run lint,bun run typecheck(0 errors),bun run test(2645 passed, 111 files)release-date.test.ts: present value, row touched after release, null, field absent, undefined/empty/malformed, RFC3339 input, search-hit fallback rowprocess.env.TZper case (America/Los_Angeles, Pacific/Auckland), so they fail under the UTC-only CI runner if the helper parses or formats in local time (checked by removingtimeZone: "UTC"from the helper: 2 failures underTZ=UTC)api.test.ts:backfillSearchHitkeeps the detail row'slatest_version_attest/dataset-card-updated.test.ts: the card callsformatReleaseDate(dataset)and never readsupdated_at(source-level, like the other Astro wiring guards)