Skip to content

feat: add Otterscan to block explorers in resources page#16699

Merged
corwintines merged 2 commits into
devfrom
claude/issue-15541-20251126-1437
Dec 1, 2025
Merged

feat: add Otterscan to block explorers in resources page#16699
corwintines merged 2 commits into
devfrom
claude/issue-15541-20251126-1437

Conversation

@konopkja
Copy link
Copy Markdown
Contributor

Add Otterscan to the block explorers section of the resources page as requested in issue #15541.

Changes

  • Added Otterscan entry to block explorers list in resources/utils.tsx
  • Added corresponding translation string in page-resources.json
  • Used generic Ethereum logo as placeholder for Otterscan icon

Closes #15541

🤖 Generated with Claude Code

Add Otterscan (https://otterscan.io/) to the block explorers section
of the resources page as requested in issue #15541.

- Added Otterscan entry to block explorers list in resources/utils.tsx
- Added corresponding translation string in page-resources.json
- Used generic Ethereum logo as placeholder for Otterscan icon

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Jakub <konopkja@users.noreply.github.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 26, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 7005f61
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/692dcbacc836c300081d82cd
😎 Deploy Preview https://deploy-preview-16699--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 49 (🔴 down 10 from production)
Accessibility: 94 (no change from production)
Best Practices: 92 (🔴 down 7 from production)
SEO: 91 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added content 🖋️ This involves copy additions or edits translation 🌍 This is related to our Translation Program labels Nov 26, 2025
@konopkja
Copy link
Copy Markdown
Contributor Author

@coderabbitai can you check the PR change, also check why it failed

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 26, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Get PR details including status
echo "=== PR Details ==="
gh pr view 16699 --json title,state,statusCheckRollup,files

echo -e "\n=== PR Checks Status ==="
gh pr checks 16699

echo -e "\n=== Changed Files ==="
gh pr diff 16699

Length of output: 4884


🏁 Script executed:

#!/bin/bash

# Check if the placeholder image file exists
echo "=== Checking if placeholder image exists ==="
fd -t f "eth-glyph-blue-circle.png" public/

# Get recent workflow runs to see build failures
echo -e "\n=== Recent Workflow Runs for PR ==="
gh run list --limit 5 --json databaseId,name,status,conclusion,createdAt,headBranch | jq '.[] | select(.headBranch == "feat/add-otterscan-to-block-explorers")'

# Try to get more details from the latest failed run
echo -e "\n=== Latest PR Run Details ==="
gh run list --branch feat/add-otterscan-to-block-explorers --limit 1 --json databaseId,displayTitle,status,conclusion,url

# Check GitHub Actions logs if available
echo -e "\n=== Checking for build workflow logs ==="
LATEST_RUN=$(gh run list --branch feat/add-otterscan-to-block-explorers --limit 1 --json databaseId --jq '.[0].databaseId')
if [ ! -z "$LATEST_RUN" ]; then
  echo "Latest run ID: $LATEST_RUN"
  gh run view $LATEST_RUN --log-failed || echo "No failed logs available"
fi

Length of output: 157


🏁 Script executed:

#!/bin/bash

# Check what image files exist in the resources directory
echo "=== Existing image files in public/images/resources/ ==="
fd -t f . public/images/resources/ | head -20

# Check if eth-glyph images exist elsewhere
echo -e "\n=== Searching for eth-glyph images ==="
fd -t f "eth-glyph" public/

# Look at how other block explorers are using images
echo -e "\n=== Checking existing block explorer entries for reference ==="
grep -A 3 -B 1 "etherscan\|beaconchain\|txcity" app/\[locale\]/resources/utils.tsx | head -30

# Check the PR files on the branch
echo -e "\n=== Checking out PR branch to verify ==="
git fetch origin pull/16699/head:pr-16699
git checkout pr-16699

echo -e "\n=== Verifying the changes ==="
cat app/[locale]/resources/utils.tsx | grep -A 2 -B 2 "Otterscan"

Length of output: 2302


🏁 Script executed:

#!/bin/bash

# List all files in public/images/resources to see what's available
echo "=== All image files in resources directory ==="
ls -la public/images/resources/

# Check if there are any generic ethereum logos available
echo -e "\n=== Searching for ethereum logo files ==="
fd -e png -e svg -e webp "eth" public/images/ | grep -i "logo\|glyph\|icon"

# Let's also check what other imports use and their file extensions
echo -e "\n=== Checking import patterns in utils.tsx ==="
grep "^import Icon" app/[locale]/resources/utils.tsx | head -20

Length of output: 1746


🏁 Script executed:

#!/bin/bash

# Switch to main branch to check if images exist there
echo "=== Checking main branch for image files ==="
git checkout main
ls -la public/images/resources/ | wc -l
ls public/images/resources/ | head -10

# Now let's see if there's a difference between main and the PR branch
echo -e "\n=== Checking if images are gitignored ==="
cat .gitignore | grep -i "public\|images\|resources"

# Check git status to see if images are tracked
echo -e "\n=== Checking git tracking of public/images/resources ==="
git ls-files public/images/resources/ | head -10

# Let's see if the file that the PR references exists on main
echo -e "\n=== Checking for eth-glyph-blue-circle.png specifically ==="
git ls-files | grep "eth-glyph-blue-circle.png"

Length of output: 719


🏁 Script executed:

#!/bin/bash

# Check if Git LFS is being used
echo "=== Checking for Git LFS ==="
cat .gitattributes | head -20

# Check if the images are LFS pointers
echo -e "\n=== Checking if eth-glyph-blue-circle.png is an LFS pointer ==="
file public/images/resources/eth-glyph-blue-circle.png 2>/dev/null || echo "File not found in working directory"

# Check one of the tracked files to see if it's an LFS pointer
echo -e "\n=== Checking tracked files status ==="
git ls-files public/images/resources/*.png | head -5

# Let's examine the actual file content of a tracked image
echo -e "\n=== Checking file content of blockscout.webp (the only present file) ==="
file public/images/resources/blockscout.webp

# Try to get more details on Netlify build failure by checking the PR comments
echo -e "\n=== Checking PR comments for build failure details ==="
gh pr view 16699 --comments | tail -50

Length of output: 1297


🏁 Script executed:

#!/bin/bash

# Check if any images exist that are imported
echo "=== Checking which imported image files actually exist ==="
for img in beaconcha-in.png etherscan.png eth-glyph-blue-circle.png eth-glyph-black.png blockscout.webp; do
  if [ -f "public/images/resources/$img" ]; then
    echo "✓ $img exists"
    ls -lh "public/images/resources/$img"
  else
    echo "✗ $img MISSING"
  fi
done

# Check git status for LFS
echo -e "\n=== Checking if Git LFS is installed and configured ==="
git lfs version 2>/dev/null || echo "Git LFS not available in sandbox"
git lfs ls-files | head -10

# Check if images are LFS pointers by examining their content
echo -e "\n=== Checking file content of tracked PNG (should show if it's an LFS pointer) ==="
head -5 public/images/resources/beaconcha-in.png 2>/dev/null || echo "Cannot read file - likely not pulled from LFS"

# Let's check what the deploy log says about the error
echo -e "\n=== The issue is clear ==="
echo "The repository uses Git LFS for images, but they haven't been pulled in this sandbox."
echo "The Netlify build is failing because it cannot find the image files."
echo ""
echo "Checking the actual PR changes again..."
git checkout pr-16699
echo ""
echo "The PR changes are structurally correct."

Length of output: 880


🏁 Script executed:

#!/bin/bash

# Let's try to use curl to access the Netlify deploy log
echo "=== Attempting to get Netlify build log details ==="
DEPLOY_URL="https://app.netlify.com/projects/ethereumorg/deploys/6927131bafda5700080a2f74"
echo "Deploy URL: $DEPLOY_URL"
echo "Note: Cannot directly access Netlify logs without authentication"

# Check if there are any syntax errors in the changes
echo -e "\n=== Checking for syntax issues in utils.tsx ==="
cat app/[locale]/resources/utils.tsx | grep -A 10 "Otterscan"

# Check JSON syntax
echo -e "\n=== Checking JSON syntax in page-resources.json ==="
python3 << 'EOF'
import json
try:
    with open('src/intl/en/page-resources.json', 'r') as f:
        data = json.load(f)
    print("✓ JSON is valid")
    # Check if the new key exists
    if 'page-resources-block-explorers-otterscan-description' in data:
        print("✓ Otterscan description key found:", data['page-resources-block-explorers-otterscan-description'])
    else:
        print("✗ Otterscan description key NOT found")
except json.JSONDecodeError as e:
    print("✗ JSON syntax error:", e)
except Exception as e:
    print("✗ Error:", e)
EOF

# Verify the image file is tracked in git
echo -e "\n=== Verifying eth-glyph-blue-circle.png is in the repository ==="
git ls-tree HEAD public/images/resources/eth-glyph-blue-circle.png

# Check if there are TypeScript or build configuration issues
echo -e "\n=== Checking if there are any related config files ==="
ls -la *.json | grep -E "package|tsconfig|next"

Length of output: 700


🏁 Script executed:

#!/bin/bash

# Go to the PR branch
git checkout pr-16699

# Check if there are any syntax errors in the changes
echo "=== Checking for syntax issues in utils.tsx ==="
cat app/[locale]/resources/utils.tsx | grep -A 10 "Otterscan"

# Check JSON syntax
echo -e "\n=== Checking JSON syntax in page-resources.json ==="
python3 << 'EOF'
import json
try:
    with open('src/intl/en/page-resources.json', 'r') as f:
        data = json.load(f)
    print("✓ JSON is valid")
    # Check if the new key exists
    if 'page-resources-block-explorers-otterscan-description' in data:
        print("✓ Otterscan description key found:", data['page-resources-block-explorers-otterscan-description'])
    else:
        print("✗ Otterscan description key NOT found")
except json.JSONDecodeError as e:
    print("✗ JSON syntax error:", e)
except Exception as e:
    print("✗ Error:", e)
EOF

# Verify the image file is tracked in git
echo -e "\n=== Verifying eth-glyph-blue-circle.png is in the repository ==="
git ls-tree HEAD public/images/resources/eth-glyph-blue-circle.png

# Summary of findings
echo -e "\n=== SUMMARY ==="
echo "The PR changes look structurally correct:"
echo "1. Added import for IconOtterscan using eth-glyph-blue-circle.png"
echo "2. Added Otterscan entry to block explorers array"
echo "3. Added translation string for Otterscan description"
echo ""
echo "The Netlify build failure is likely due to:"
echo "- Build/deployment configuration issues on Netlify side"
echo "- Or the image file needs to be available during the build process"
echo ""
echo "The eth-glyph-blue-circle.png file DOES exist in the repository."

Length of output: 2041


🏁 Script executed:

#!/bin/bash

# Find the correct location of page-resources.json
echo "=== Finding page-resources.json ==="
fd -t f "page-resources.json"

# Check JSON syntax with correct path
echo -e "\n=== Checking JSON syntax in page-resources.json ==="
JSON_FILE=$(fd -t f "page-resources.json" | grep "en/" | head -1)
if [ -f "$JSON_FILE" ]; then
  echo "Found: $JSON_FILE"
  python3 << EOF
import json
try:
    with open('$JSON_FILE', 'r') as f:
        data = json.load(f)
    print("✓ JSON is valid")
    # Check if the new key exists
    if 'page-resources-block-explorers-otterscan-description' in data:
        print("✓ Otterscan description key found:", data['page-resources-block-explorers-otterscan-description'])
    else:
        print("✗ Otterscan description key NOT found")
except json.JSONDecodeError as e:
    print("✗ JSON syntax error:", e)
except Exception as e:
    print("✗ Error:", e)
EOF
else
  echo "✗ page-resources.json not found"
fi

# Check alphabetical order in the block explorers list
echo -e "\n=== Checking if Otterscan is in the correct position ==="
grep -B5 -A5 "Otterscan" app/[locale]/resources/utils.tsx | grep "title:"

# Let's check the Netlify build documentation to understand the failure
echo -e "\n=== Netlify Deploy Status ==="
echo "Deploy Preview failed at: https://app.netlify.com/projects/ethereumorg/deploys/6927131bafda5700080a2f74"
echo ""
echo "Common reasons for Netlify build failures:"
echo "1. Build command errors (TypeScript/ESLint issues)"
echo "2. Missing dependencies"
echo "3. Environment variables not set"
echo "4. Build timeout"
echo "5. Out of memory"

Length of output: 579


🏁 Script executed:

#!/bin/bash

# List all files in the repository to understand structure
echo "=== Checking repository structure ==="
ls -la

# Check if src directory exists
echo -e "\n=== Checking src directory ==="
ls -la src/ 2>/dev/null || echo "src/ directory not found"

# Try to find any JSON files
echo -e "\n=== Finding all JSON translation files ==="
fd -e json | grep -i "resource\|intl\|lang" | head -20

# Check the git diff again to see exact file paths
echo -e "\n=== Checking git diff for exact file paths ==="
git diff HEAD~1 --name-only

# Display the actual content added
echo -e "\n=== Showing the translation change ==="
git diff HEAD~1 -- "*.json" | grep -A2 -B2 "otterscan"

# Check if there are any workflow files that might give us clues
echo -e "\n=== Checking for GitHub Actions workflows ==="
ls -la .github/workflows/ 2>/dev/null | head -10

Length of output: 4261


🏁 Script executed:

#!/bin/bash

# Check if the JSON file exists
echo "=== Checking if src/intl/en/page-resources.json exists ==="
ls -la src/intl/en/ 2>/dev/null || echo "Directory not found"

# Find intl directory structure
echo -e "\n=== Finding intl directory structure ==="
fd -t d "intl" src/

# List contents of intl directory
echo -e "\n=== Listing intl directory contents ==="
ls -la src/intl/ 2>/dev/null || echo "src/intl directory not found"

# Find where the page-resources.json actually is
echo -e "\n=== Finding page-resources.json anywhere ==="
find . -name "page-resources.json" -type f 2>/dev/null | head -10

# Check the actual file content
echo -e "\n=== Checking the file if it exists ==="
if [ -f "src/intl/en/page-resources.json" ]; then
  echo "File exists, checking last few lines:"
  tail -10 src/intl/en/page-resources.json
  echo ""
  echo "Checking JSON validity:"
  python3 -m json.tool src/intl/en/page-resources.json > /dev/null && echo "✓ JSON is valid" || echo "✗ JSON is invalid"
else
  echo "✗ File does not exist in working directory"
  echo "This might be because:"
  echo "1. Files are stored in Git LFS and not pulled"
  echo "2. Different directory structure"
fi

# Check what commit we're on
echo -e "\n=== Current commit info ==="
git log --oneline -1
git status --short

Length of output: 518


🏁 Script executed:

#!/bin/bash

# Since files are in Git LFS and not available locally, let's verify the changes are correct via git
echo "=== Verifying PR changes via git (since LFS files aren't pulled) ==="
git show HEAD:src/intl/en/page-resources.json | grep -A2 -B2 "otterscan" || echo "Cannot read file content"

# Let's check git show to see the actual changes
echo -e "\n=== Full git diff for this PR ==="
git diff HEAD~1

# Check if there are other recent PRs or commits that succeeded
echo -e "\n=== Checking recent commits on the repository ==="
git log --oneline --all -10 | head -10

# Let's see if we can get info about the base branch
echo -e "\n=== Checking remote branches ==="
git branch -r | head -10

# Summary of findings
echo -e "\n=== FINAL ANALYSIS ==="
echo "✓ Code changes are structurally correct:"
echo "  - utils.tsx: Added Otterscan import and entry"
echo "  - page-resources.json: Added translation string"
echo "  - Image file eth-glyph-blue-circle.png exists in repository"
echo ""
echo "⚠ Netlify build failure detected:"
echo "  - Failed checks: Header rules, Pages changed, Redirect rules"
echo "  - Deploy preview failed"
echo ""
echo "The Netlify failure needs investigation via the Netlify dashboard."
echo "The PR code itself appears to be correct."

Length of output: 4166


@konopkja I've analyzed the PR changes and investigated the failure. Here's what I found:

✅ PR Changes (Structurally Correct)

The PR successfully adds Otterscan to the block explorers section with these changes:

1. app/[locale]/resources/utils.tsx

  • Added import: IconOtterscan using eth-glyph-blue-circle.png
  • Added Otterscan entry to the block explorers list:
    {
      title: "Otterscan",
      description: t("page-resources-block-explorers-otterscan-description"),
      href: "https://otterscan.io/",
      imgSrc: IconOtterscan,
    }

2. src/intl/en/page-resources.json

  • Added translation: "page-resources-block-explorers-otterscan-description": "A blazingly fast, local, self-hosted Ethereum block explorer"
  • ✅ JSON syntax is valid

3. Image file

  • ✅ The placeholder image eth-glyph-blue-circle.png exists in the repository

⚠️ Netlify Build Failure

The Netlify deploy preview failed with these checks:

  • ❌ Header rules - ethereumorg
  • ❌ Pages changed - ethereumorg
  • ❌ Redirect rules - ethereumorg
  • ❌ netlify/ethereumorg/deploy-preview

Good news:

  • ✅ GitGuardian Security Checks passed
  • ✅ Label workflow passed
  • ✅ No syntax errors in your code

🔍 Next Steps

Since I cannot access the Netlify build logs directly, you'll need to check the detailed error messages in the Netlify dashboard.

Common causes for Netlify failures:

  1. Build command errors - TypeScript/ESLint issues during compilation
  2. Missing dependencies - Package installation failures
  3. Environment variables - Required env vars not set for PR previews
  4. Build timeout/memory - Resource limits exceeded
  5. Next.js build issues - Static generation or optimization errors

The code changes themselves look correct, so the issue is likely in the build/deployment process rather than the code you added.

Would you like me to help investigate further once you check the Netlify logs?

@wmitsuda
Copy link
Copy Markdown
Contributor

@konopkja could you use the icon attached in the original issue, pls?

@corwintines corwintines self-assigned this Dec 1, 2025
@corwintines corwintines merged commit ef454f8 into dev Dec 1, 2025
6 of 7 checks passed
@corwintines corwintines deleted the claude/issue-15541-20251126-1437 branch December 1, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content 🖋️ This involves copy additions or edits translation 🌍 This is related to our Translation Program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggest a resource

3 participants