-
Notifications
You must be signed in to change notification settings - Fork 0
Add progress and refactor iavlviewer #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 enhances the Tendermint dashboard UI with a block progress bar and utility components, updates application metadata and theming, and performs a major refactor of the IAVL viewer script into both CLI and web‐API modes.
- Added
timeAgoutil,CopyButtoncomponent, and block‐step progress animation inpage.tsx - Updated site metadata (SEO, OpenGraph, Twitter) and added favicon in
layout.tsx - Adjusted dark‐mode CSS variables in
globals.css(potential issue) - Fully refactored
scripts/iavlviewer/main.gofor CLI, JSON output, and HTTP API - Added placeholder
favicon.icoand updated contact links inREADME.md
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/page.tsx | UI: progress bar, copy buttons, timeAgo util, and fetch logic cleanup |
| src/app/layout.tsx | Metadata updates (title, description, OpenGraph, Twitter) and favicon link |
| src/app/globals.css | Dark‐mode CSS vars changed |
| scripts/iavlviewer/main.go | Major refactor: CLI/Server modes, API handlers, diff helpers |
| public/favicon.ico | Added placeholder favicon file |
| README.md | Updated contact & support links |
Comments suppressed due to low confidence (4)
README.md:45
- The displayed email (
hello@vitwit.com) doesn't match themailto:link (contact@vitwit.com). Align the link target and display text.
- Email: [hello@vitwit.com](mailto:contact@vitwit.com)
README.md:47
- The display handle
@vitwitdiffers from the linked profile@vitwit_. Update the display or link to match.
- Twitter: [@vitwit](https://twitter.com/vitwit_)
scripts/iavlviewer/main.go:637
SampleData.KeyCountis never set, so it remains zero. Track the number of keys during iteration and assign it toKeyCountbefore returning.
s1 := ms1.GetStoreByName(storeName)
| --background: #fff; | ||
| --foreground: #000; |
Copilot
AI
Jun 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dark‐mode background is set to #fff (white), matching the light theme. This likely isn't intended; restore a darker background for dark mode.
| --background: #fff; | |
| --foreground: #000; | |
| --background: #121212; | |
| --foreground: #e0e0e0; |
| setCopied(true); | ||
| setTimeout(() => setCopied(false), 1200); | ||
| }} | ||
| className="ml-1 p-1 rounded hover:bg-gray-200 focus:outline-none" |
Copilot
AI
Jun 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the default focus outline can impair keyboard navigation. Consider adding a visible focus ring (e.g., focus:ring) rather than fully disabling it.
| className="ml-1 p-1 rounded hover:bg-gray-200 focus:outline-none" | |
| className="ml-1 p-1 rounded hover:bg-gray-200 focus:ring-2 focus:ring-blue-500" |
| func decodeHexInLine(line string) string { | ||
| re := regexp.MustCompile(`([0-9a-fA-F]{4,})`) | ||
| return re.ReplaceAllStringFunc(line, func(hexStr string) string { |
Copilot
AI
Jun 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiling the regex on every call can be costly. Consider moving regexp.MustCompile to a package-level var so it's compiled only once.
| func decodeHexInLine(line string) string { | |
| re := regexp.MustCompile(`([0-9a-fA-F]{4,})`) | |
| return re.ReplaceAllStringFunc(line, func(hexStr string) string { | |
| var hexRegex = regexp.MustCompile(`([0-9a-fA-F]{4,})`) | |
| func decodeHexInLine(line string) string { | |
| return hexRegex.ReplaceAllStringFunc(line, func(hexStr string) string { |
No description provided.