Skip to content

Add time column to website#765

Merged
ilyaluk merged 3 commits into
mainfrom
ilya/website-time-column
Nov 5, 2025
Merged

Add time column to website#765
ilyaluk merged 3 commits into
mainfrom
ilya/website-time-column

Conversation

@ilyaluk
Copy link
Copy Markdown
Collaborator

@ilyaluk ilyaluk commented Nov 4, 2025

📝 Summary

This adds a time column to website main page, and makes block hash monospace.

Example from scripts/website-staticgen/main.go:

image

⛱ Motivation and Context

When testing updates of mev-boost-relay, it's useful to see when last block was landed to see if it still works.

✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@ilyaluk ilyaluk requested a review from Copilot November 4, 2025 23:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a time column to the website's main page to display when blocks were last landed, making it easier to monitor relay functionality during testing. The changes also make the block hash display more readable by using a monospace font.

Key Changes:

  • Added time display functionality with relative timestamps (e.g., "5m ago") and UTC tooltips
  • Applied monospace font styling to block hash display
  • Updated static site generator to include fake timestamps for template testing

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
services/website/website.html Added Time column header and cell with relative/UTC timestamp display; applied monospace styling to block hash
services/website/html.go Implemented relativeTime and formatUTC helper functions for timestamp formatting
scripts/website-staticgen/main.go Added fake timestamp generation for static site testing with increasing time intervals

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/website/html.go
@ilyaluk ilyaluk requested a review from metachris November 4, 2025 23:01
@ilyaluk ilyaluk force-pushed the ilya/website-time-column branch from 7910d23 to 3041db9 Compare November 4, 2025 23:03
@ilyaluk ilyaluk force-pushed the ilya/website-time-column branch from 3041db9 to 29c3325 Compare November 4, 2025 23:06
metachris
metachris previously approved these changes Nov 5, 2025
Copy link
Copy Markdown
Collaborator

@metachris metachris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing, thanks!

{{ range .Payloads }}
<tr>
<td style="text-align: right;">
<span title="{{.InsertedAt | formatUTC}}">{{.InsertedAt | relativeTime}}</span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is insertedAt reliable for this? Probably yes. Alternatively could use slot too. I think it's fine tho.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good call. It might be off by a couple of seconds (I'm not that familiar with the codebase). We probably can calc time from slot, but it will be more complicated.

If it's fine, we can ship it like this, those times are informative anyway and should not be used as API.

@ilyaluk ilyaluk force-pushed the ilya/website-time-column branch 4 times, most recently from 4668e8e to a7d8e4f Compare November 5, 2025 13:05
@ilyaluk ilyaluk force-pushed the ilya/website-time-column branch from a7d8e4f to 23b8baa Compare November 5, 2025 13:11
@ilyaluk ilyaluk requested a review from metachris November 5, 2025 13:12
@ilyaluk ilyaluk merged commit 0628bfa into main Nov 5, 2025
5 checks passed
@ilyaluk ilyaluk deleted the ilya/website-time-column branch November 5, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants