Skip to content

feat(control-ui): relative commit age + hover-only copy button on About - #111495

Merged
steipete merged 1 commit into
mainfrom
claude/copy-button-commit-dates-48f8f4
Jul 19, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/copy-button-commit-dates-48f8f4

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

On Settings → About, the commit row's copy button is a full-size bordered icon button that visually dominates the commit hash, and there is no way to tell how old the running artifact's commit is without resolving the hash manually.

Why This Change Was Made

Requested by the maintainer: make the copy affordance small, borderless, and hover-revealed, and show a relative commit date ("1h ago", "3d ago") with the exact timestamp on hover.

  • The build identity now embeds commitAt (committer time of the exact embedded commit, read via git show -s --format=%ct <commit> at build time). It is advisory like branch/dirty: null never blocks a build (e.g. GITHUB_SHA-only builds without a checkout), and the row simply omits the age.
  • The About page renders the age with the shared formatRelativeTimestamp helper (always relative, matching the rest of Control UI) inside a <time> element whose title carries the exact localized date+time.
  • The copy button drops btn btn--icon for a compact borderless about-commit__copy style; it is hover/focus-revealed only where hover exists (@media (hover: hover) and (pointer: fine)), so touch devices keep it visible and keyboard users get it via :focus-within.

User Impact

The About commit row shows f8e35afecc67 · 3d ago with a tiny copy icon appearing on hover; hovering the age shows the exact commit timestamp. No config or API surface changes; ControlUiBuildInfo gains one nullable field that normalizes to null for older injected payloads.

Before / after (idle) / after (hover):

before
after idle
after hover

Evidence

  • node scripts/run-vitest.mjs ui/src/pages/about/view.test.ts ui/src/build-info.test.ts ui/src/app/vite-config.node.test.ts ui/src/components/sidebar-build-chip.node.test.ts — 37 tests pass, including new coverage for the age element, missing-commitAt fallback, normalizer rejection of non-UTC timestamps, and the vite resolver wiring.
  • Live-verified in the Control UI mock-dev harness (screenshots above): age renders "9d ago" for the mock's Jul 10 commit, copy button hidden at rest and revealed on hover.
  • Codex autoreview clean on the final diff.

… on About

The About page commit row now embeds the commit's committer timestamp
(commitAt, advisory like branch/dirty) and renders it as an always-relative
age with the exact localized date-time on hover. The copy button becomes a
compact borderless icon revealed on hover/focus only where hover exists;
touch keeps it visible.
@steipete
steipete marked this pull request as ready for review July 19, 2026 17:50
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: S maintainer Maintainer-authored PR labels Jul 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 19, 2026, 1:55 PM ET / 17:55 UTC.

Summary
The branch adds nullable commitAt build metadata, renders a relative commit age in Control UI Settings → About, and replaces the prominent commit-copy button with a compact hover/focus-revealed control.

PR surface: Source +103, Tests +37, Other +1. Total +141 across 12 files.

Reproducibility: not applicable. This PR adds a Settings → About enhancement rather than fixing a reported current-main failure. The supplied mock-dev scenario is relevant implementation proof, not bug reproduction.

Review metrics: none identified.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Ensure the linked before/after/hover artifacts are accessible from the PR and visibly show the exact-head About row.
  • Confirm a release-style or SHA-only build still renders the commit hash without failing when the selected Git object is unavailable.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body reports a real mock-dev run and links before/after/hover screenshots, but the linked artifacts were not independently retrievable in this review environment; attach accessible redacted screenshots, recording, or live output if final review cannot open them. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P2] The new commitAt value depends on the selected commit being available to the build's local Git object store; final review should retain the tested null fallback for archive and SHA-only builds.
  • [P1] The PR supplies visual proof links, but the linked images were not independently retrievable here; a maintainer should confirm they show the final exact-head behavior before merging.

Maintainer options:

  1. Decide the mitigation before merge
    Land the compact About-page affordance only after confirming the exact-head build preserves the nullable Git-metadata fallback and the submitted before/after/hover evidence visibly matches the resulting UI.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The protected maintainer label and final UI/build-contract judgment require owner review; there is no discrete mechanical repair finding for an automated worker.

Maintainer decision needed

  • Question: Does the Control UI owner approve adding advisory commitAt metadata and this hover-only copy affordance after final CI and visual-proof review?
  • Rationale: The PR is explicitly maintainer-labeled and introduces a user-visible build-identity field plus interaction change; implementation quality does not replace the owner’s UI and release-build judgment.
  • Likely owner: steipete — The PR states the change was maintainer-requested and steipete is the only concrete routing signal available in the supplied context.
  • Options:
    • Approve after final verification (recommended): Confirm the exact head keeps SHA-only builds non-blocking and that the linked visual proof matches the final About row.
    • Keep the age but change interaction: Request a different copy-button discoverability treatment if hover-only presentation is not the desired Control UI convention.
    • Defer metadata expansion: Keep the existing commit display if maintainers do not want additional build identity fields in the injected Control UI contract.

Security
Cleared: The supplied diff changes local build metadata and Control UI rendering only; it adds no dependency, workflow, secret, permission, download, or package-resolution surface.

Review details

Best possible solution:

Land the compact About-page affordance only after confirming the exact-head build preserves the nullable Git-metadata fallback and the submitted before/after/hover evidence visibly matches the resulting UI.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds a Settings → About enhancement rather than fixing a reported current-main failure. The supplied mock-dev scenario is relevant implementation proof, not bug reproduction.

Is this the best way to solve the issue?

Unclear: the nullable field and no-build-failure fallback are a maintainable shape, but the final best-fit judgment depends on the Control UI owner approving the interaction and injected metadata contract.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against 8e0c50380c10.

Label changes

Label changes:

  • add P3: This is a small user-interface and build-identity polish change without evidence of an outage, data loss, or blocked workflow.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports a real mock-dev run and links before/after/hover screenshots, but the linked artifacts were not independently retrievable in this review environment; attach accessible redacted screenshots, recording, or live output if final review cannot open them. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a small user-interface and build-identity polish change without evidence of an outage, data loss, or blocked workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports a real mock-dev run and links before/after/hover screenshots, but the linked artifacts were not independently retrievable in this review environment; attach accessible redacted screenshots, recording, or live output if final review cannot open them. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +103, Tests +37, Other +1. Total +141 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 6 104 1 +103
Tests 5 37 0 +37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 12 142 1 +141

What I checked:

  • Protected review path: The PR has the maintainer label, which requires explicit maintainer handling rather than automated cleanup or closure. (ed6dff00f9a6)
  • Compatibility-preserving metadata shape: The diff adds commitAt as a nullable Control UI build-info field and normalizes invalid or absent injected values to null, so older payloads do not fail merely because they lack the new field. (ui/src/build-info-normalizers.ts:63, ed6dff00f9a6)
  • Advisory build-time lookup: The build resolver reads the timestamp for the exact selected commit and deliberately returns null when the local Git object is unavailable, avoiding a build failure for SHA-only environments. (ui/vite.config.ts:202, ed6dff00f9a6)
  • Focused validation and claimed live proof: The PR body reports 37 focused tests and a Control UI mock-dev run with before/after/hover screenshots; the linked image artifacts could not be independently opened in this review environment. (ui/src/pages/about/view.test.ts:93, ed6dff00f9a6)
  • Owner-history limitation: The review environment did not permit successful read-only repository commands, so feature-history attribution could not be independently established beyond the maintainer-request context in the PR body.

Likely related people:

  • steipete: The PR body states this exact UI change was maintainer-requested, and steipete authored the focused implementation; repository history could not be queried to identify additional current-main area owners. (role: requesting maintainer and recent Control UI proposer; confidence: low; commits: ed6dff00f9a6; files: ui/src/pages/about/view.ts, ui/vite.config.ts, ui/src/styles/about.css)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Addressing the Rank-up moves before landing:

  1. Artifact accessibility: all three screenshots live in the public repo steipete/openclaw-pr-assets and return HTTP 200 anonymously (about-commit-date-copy-hover/{before,after-idle,after-hover}.png). They were captured from this exact head (ed6dff0) via the deterministic Control UI mock-dev harness (scripts/control-ui-mock-dev.ts), which injects the fixture commit 0123456789ab… with commitAt Jul 10 — hence the "9d ago" age and the hover-revealed compact copy icon in the after shots; the before shot is the same harness with the pre-change files checked out from origin/main.

  2. SHA-only / archive builds: commitAt is advisory by construction. readGitCommitTimestamp wraps git show -s --format=%ct <commit> in try/catch and returns null on any failure; resolveControlUiBuildInfo only ever normalizes that value and never throws for it (unlike the strict commit-SHA env validation). ui/src/app/vite-config.node.test.ts covers the null path ("falls back to Git and the current UTC time only when inputs are absent" with readGitCommitTimestamp: () => null), and ui/src/pages/about/view.test.ts proves the About row still renders the hash with no age element when commitAt is null.

Owner approval: this change was requested by @steipete (Control UI owner) with an explicit ask to land it.

@steipete
steipete merged commit 40d31f3 into main Jul 19, 2026
252 of 268 checks passed
@steipete
steipete deleted the claude/copy-button-commit-dates-48f8f4 branch July 19, 2026 18:13
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 20, 2026
… on About (openclaw#111495)

The About page commit row now embeds the commit's committer timestamp
(commitAt, advisory like branch/dirty) and renders it as an always-relative
age with the exact localized date-time on hover. The copy button becomes a
compact borderless icon revealed on hover/focus only where hover exists;
touch keeps it visible.
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
… on About (openclaw#111495)

The About page commit row now embeds the commit's committer timestamp
(commitAt, advisory like branch/dirty) and renders it as an always-relative
age with the exact localized date-time on hover. The copy button becomes a
compact borderless icon revealed on hover/focus only where hover exists;
touch keeps it visible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant