Add time column to website#765
Conversation
There was a problem hiding this comment.
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.
7910d23 to
3041db9
Compare
3041db9 to
29c3325
Compare
| {{ range .Payloads }} | ||
| <tr> | ||
| <td style="text-align: right;"> | ||
| <span title="{{.InsertedAt | formatUTC}}">{{.InsertedAt | relativeTime}}</span> |
There was a problem hiding this comment.
Is insertedAt reliable for this? Probably yes. Alternatively could use slot too. I think it's fine tho.
There was a problem hiding this comment.
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.
4668e8e to
a7d8e4f
Compare
a7d8e4f to
23b8baa
Compare
📝 Summary
This adds a time column to website main page, and makes block hash monospace.
Example from
scripts/website-staticgen/main.go:⛱ 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 lintmake test-racego mod tidyCONTRIBUTING.md