Skip to content

Fixes 38200: Show when an asset was last updated at its source in the entity header - #38201

Merged
sweta1308 merged 8 commits into
mainfrom
ui-show-source-updated-time
Nov 19, 2026
Merged

sweta1308 merged 8 commits into
mainfrom
ui-show-source-updated-time

Conversation

@sweta1308

@sweta1308 sweta1308 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38200

I added "Updated at source" to the data asset header because users want to see when an asset last changed at its source without OpenMetadata reading its contents. Metadata ingestion already stores this as lifeCycle.updated, but the UI only showed the source creation time, so the value was reachable only through the API.

The header now shows the relative time (e.g. "2 hours ago") to the left of the follow and vote stats, with the exact date and time in a tooltip. It appears on any asset whose lifeCycle.updated is set and is hidden otherwise, including for the year-0001 placeholder older ingestion clients stored.

Type of change:

  • Improvement

High-level design:

  • Where: one new renderSourceUpdatedAt() in DataAssetsHeader.component.tsx, rendered at the start of the top-right stats row. Every page that uses the shared header gets it; there is no per-entity wiring.
  • Data: reads lifeCycle.updated.timestamp from the entity the page already has. lifeCycle is stored in the entity JSON and returned by default, so no fields= change and no backend change.
  • Guard: reuses isRecordedLifeCycleTimestamp, the same check "Created time" uses, so a missing value or a pre-epoch placeholder renders nothing.
  • Display: core Box and Typography, with color="secondary" for the label, the inherited text colour for the value, and the date through Typography's tooltip prop (no className colour, per ADR:2026-10-11-migrated-antd-components-adopt-core-styling); getRelativeTime for the value and formatDateTime in a core Tooltip. triggerClassName is set so the tooltip wraps the text in a focusable trigger; without it a component child never opens the tooltip. Semantic tokens only, so it follows dark mode.
  • Copy: one new key, label.updated-at-source, translated in all 21 locales.
  • Alternatives: a life cycle card in the right panel (already dense), or waiting for the customisable header (planned later; this item can move into it). Scoped to the API value, so ingestion can fill lifeCycle.updated for more connectors without UI changes.

Tests:

Use cases covered

  • Table, dashboard and pipeline with a source update time show "Updated at source" and the relative time; focusing the time shows the exact date in a tooltip.
  • An asset with only a source creation time shows nothing.
  • An asset whose update time is the year-0001 placeholder shows nothing.

Unit tests

  • I added unit tests for the new/changed logic.
  • Updated src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.test.tsx: shown with relative time and tooltip; hidden with created time only; hidden for the placeholder. The utils mock binds the real isRecordedLifeCycleTimestamp.
  • yarn test src/components/DataAssets/DataAssetsHeader: 63 passed; with src/utils/DataAssetsHeader, 128 passed.
  • Every suite that renders or mocks the header (73 suites: the entity detail components and pages, DataAssetsHeader.utils, RetentionPeriod, AlertDetailsPage): 1073 passed.
  • Coverage %: not measured.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • I added Playwright E2E tests for UI changes.
  • Added playwright/e2e/Pages/SourceUpdatedTime.spec.ts (table, dashboard, pipeline, and the no-update-time case). The spec creates and deletes its own entities.
  • Ran locally against a local server: 4 passed, then 8 passed with --repeat-each=2; 4 passed again after the review fix.
  • .github/playwright/impact-map.json: added an entry routing the header's Jest file to SourceUpdatedTime.spec.ts and TableCreationTime.spec.ts under the chromium project (checked with select_playwright_tests.py and build_playwright_shards.py: one chromium shard, 7 tests), so a test-only change doesn't escalate to the full suite. Regenerated impact-map.generated.json; it only adds the new spec.
  • Pending: the other impacted specs from make playwright_affected (36 more, e.g. Entity.spec.ts, Table.spec.ts, Dashboards.spec.ts, TableCreationTime.spec.ts) have not been run locally.

SourceUpdatedTime.spec.ts HTML report (chromium, 4 passed):

Playwright report: 4 passed

Visual regression baselines

  • Not applicable (no rendering change in the visual scenes). No OpenMetadata or Collate visual scene opens an asset details page, so no baseline shows the header.

Manual testing performed

  1. Started the local server and UI.
  2. Created a table, a dashboard and a pipeline through the API with lifeCycle.updated set to 2 hours, 3 days and 10 minutes ago, and a table with only lifeCycle.created.
  3. Opened each asset page: the header showed "Updated at source" with the matching relative time, and hovering showed the exact date. The table without an update time showed nothing.

UI screen recording:

Recorded on 1c9585ee449 (table tooltip screenshot re-taken on c9c5f5a1012) against a local server and dev UI (the UI is the Collate build, which includes this OpenMetadata code; the header code it served is identical to this PR's). Not yet a Docker build with sample data. Test assets were created through the API with lifeCycle.updated set: a table 2 hours ago, a dashboard 3 days ago, a pipeline 10 minutes ago, and a table with only lifeCycle.created.

Steps shown: open each asset, then focus the time to show the exact date. The table without a source update time shows nothing.

updated-at-source.webm

Table: relative time, with the exact date in the tooltip

Table header with Updated at source and its tooltip

Dashboard

Dashboard header with Updated at source 3 days ago

Pipeline

Pipeline header with Updated at source and its tooltip

Table with no source update time: nothing shown

Table header without Updated at source

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: Not applicable — no schema changes.
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    Reviewed 8dd00708250: no 🔴; fixed the 🟡 in 693645a7e83 (placeholder test; mock binds the real guard). Second pass on 693645a7e83: no 🔴; fixed both 🟡 in 6082661b058 (comments now say ingestion sets the value from source metadata or the usage query log; unit test asserts the full tooltip date). The e2e tooltip check stays on the year, because a full string would depend on the browser time zone. Third pass on 7a0873e8fe1 (colour through Typography's color prop, per review): no 🔴 or 🟡. Fourth pass on 1c9585ee449 (impact-map entry runs under chromium, per review): no 🔴 or 🟡. Fifth pass on c9c5f5a1012 (Box wrapper and Typography's tooltip prop, per review): no 🔴; one 🟡 accepted: the tooltip now opens above the time, Typography's default placement.
  • Decision check: Not applicable — a display change with no cross-component contract, default or limit.
  • I have added tests around the new logic.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The reviewed changes appear safe to merge.

Summary

Adds the source update time to the shared asset header, with relative time and an exact-date tooltip.

  • Asset pages show when an asset was last updated at its source.

No new actionable issues found.

Reviews (10) · Last reviewed commit: "ui: lay out the source update time with ..." · Reviewed by Greptile

The data asset header shows lifeCycle.updated, the time the asset last changed at its source as read by metadata ingestion, next to the follow and vote stats. It shows as relative time with the exact date in a tooltip, and is hidden when the source reported no update time.
@sweta1308
sweta1308 marked this pull request as ready for review November 19, 2026 09:58
@sweta1308
sweta1308 requested a review from a team as a code owner November 19, 2026 09:58
Comment thread .github/playwright/impact-map.json Resolved
@chirag-madlani chirag-madlani added the To release Will cherry-pick this PR into the release branch label Nov 19, 2026
@gitar-bot

gitar-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk 1 closed / 1 findings

The shared asset header adds a read-only source-update timestamp and tooltip; it changes presentation only, not access or stored data.

Adds an "Updated at source" label to the data asset header showing the relative time of lifeCycle.updated, with the exact date in a tooltip and hidden when unset or the year-0001 placeholder. Text colour now comes through Typography's color prop, addressing the finding about setting it via className against the styling ADR. No open issues found.

✅ 1 closed
✅ Quality: Text colour set by className on core Typography, against the styling ADR

📄 openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:826-838
renderSourceUpdatedAt colours both core Typography elements through className (tw:text-tertiary on the label, tw:text-primary on the value). The Accepted record ADR:2026-10-11-migrated-antd-components-adopt-core-styling forbids a caller className that sets text colour on a core component. The repository styling rules also say Typography gets its colour from the color prop. Core Typography already has color="secondary", which maps to exactly tw:text-tertiary. The value needs no override because it can use the default text colour. If a primary colour is really needed, it belongs in core Typography as a new color value, not in this caller. As written, this blocks under the decision-record check: either change the code as below, or have the PR add a record that supersedes the ADR.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sweta1308
sweta1308 merged commit b4590f6 into main Nov 19, 2026
61 checks passed
@sweta1308
sweta1308 deleted the ui-show-source-updated-time branch November 19, 2026 12:16
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.0 failed. The conflict could not be resolved, so this change is not on that branch. Resolver run.

sweta1308 added a commit that referenced this pull request Nov 24, 2026
…in the entity header (#38593)

* [2.0] Fixes 38200: Show when an asset was last updated at its source in the entity header

Backport of #38201 and #38268 to 2.0 as one change.

The header metadata row shows lifeCycle.updated as "Updated at source" after the
other header fields, as relative time with the exact time on hover, and hides it
when the source reported no update time or stored the year-0001 placeholder.
Spreadsheet Created Time shows without its UTC offset; the full time shows on hover.

* Left-align header field values inside the 2.0 Typography tooltip trigger

2.0's Typography wraps an ellipsis tooltip in a button, which centres its text, so
a value narrower than its label (Updated at source) sat off the label's left edge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show when an asset was last updated at its source in the entity header

3 participants