Skip to content

Conversation

@anilcse
Copy link
Contributor

@anilcse anilcse commented Jun 25, 2025

No description provided.

@anilcse anilcse requested a review from Copilot June 25, 2025 16:21
Copy link

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 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 timeAgo util, CopyButton component, and block‐step progress animation in page.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.go for CLI, JSON output, and HTTP API
  • Added placeholder favicon.ico and updated contact links in README.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 the mailto: 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 @vitwit differs from the linked profile @vitwit_. Update the display or link to match.
- Twitter: [@vitwit](https://twitter.com/vitwit_)

scripts/iavlviewer/main.go:637

  • SampleData.KeyCount is never set, so it remains zero. Track the number of keys during iteration and assign it to KeyCount before returning.
	s1 := ms1.GetStoreByName(storeName)

Comment on lines +17 to +18
--background: #fff;
--foreground: #000;
Copy link

Copilot AI Jun 25, 2025

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.

Suggested change
--background: #fff;
--foreground: #000;
--background: #121212;
--foreground: #e0e0e0;

Copilot uses AI. Check for mistakes.
setCopied(true);
setTimeout(() => setCopied(false), 1200);
}}
className="ml-1 p-1 rounded hover:bg-gray-200 focus:outline-none"
Copy link

Copilot AI Jun 25, 2025

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.

Suggested change
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"

Copilot uses AI. Check for mistakes.
Comment on lines +988 to +990
func decodeHexInLine(line string) string {
re := regexp.MustCompile(`([0-9a-fA-F]{4,})`)
return re.ReplaceAllStringFunc(line, func(hexStr string) string {
Copy link

Copilot AI Jun 25, 2025

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.

Suggested change
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 {

Copilot uses AI. Check for mistakes.
@anilcse anilcse merged commit 3e16510 into main Jun 25, 2025
@anilcse anilcse deleted the anil/api branch June 25, 2025 19:24
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.

1 participant