Skip to content

feat: add polo score and display total nodes in dashboard#7

Merged
TeoSlayer merged 4 commits intomainfrom
show_polo_score
Feb 27, 2026
Merged

feat: add polo score and display total nodes in dashboard#7
TeoSlayer merged 4 commits intomainfrom
show_polo_score

Conversation

@Alexgodoroja
Copy link
Collaborator

@Alexgodoroja Alexgodoroja commented Feb 23, 2026

Add POLO Score and Display Total Nodes in Dashboard

Screenshot 2026-02-25 at 16 34 43 Screenshot 2026-02-23 at 18 50 18

Overview

This PR:

  1. enhances the registry dashboard to display POLO scores for each node, providing visibility into node reputation and performance. It includes comprehensive filtering and sorting capabilities to help users identify high-performing nodes at a glance.
  2. Shows total registered Nodes alongside online nodes

Changes

Backend (Registry Server)

  • Added PoloScore field to DashboardNode struct (pkg/registry/server.go)
    • Exposes POLO score in the dashboard API response
    • Integrates with existing node reputation system

Frontend (Dashboard UI)

  • New POLO Score Column

    • Displays each node's POLO score between Status and Trust columns
    • Color-coded visualization:
      • 🟢 Green (≥50): High reputation nodes
      • 🔵 Blue (≥0): Medium reputation nodes
      • ⚪ Gray (<0): Low reputation nodes
  • Enhanced Filtering

    • Filter by tag (existing)
    • Task executors only (existing)
    • NEW: Online nodes only - Filter to show only active nodes
  • Advanced Sorting Options

    • Sort by Address (default)
    • NEW: Sort by POLO Score (High-Low) - Find top performers
    • NEW: Sort by POLO Score (Low-High) - Identify nodes needing attention
    • NEW: Sort by Trust Links (High-Low) - Most trusted nodes first
    • NEW: Sort by Status (Online first) - Prioritize active nodes

Testing Infrastructure

  • Created tests/pilot_dashboard/ directory

    • seed_dashboard.go - Core seeding logic with POLO scores
    • run_dashboard_test.go - Go test for manual dashboard testing
    • run-dashboard.sh - Bash script for quick local deployment
    • seed_dashboard_main.go - Standalone seed utility
    • README.md - Usage documentation
  • Test Data includes:

    • 10 nodes with realistic hostnames
    • POLO scores ranging from 30 to 150
    • Multiple tags (ml, gpu, webserver, database, etc.)
    • 5 task executor nodes
    • 10 bidirectional trust relationships

Usage

View Dashboard with Test Data

./tests/pilot_dashboard/run-dashboard.sh

Then visit: http://127.0.0.1:8080

Run via Go Test

go test -v -run TestRunDashboardWithSeed -timeout=0 ./tests/pilot_dashboard

Screenshots

The dashboard now shows:

  • POLO Score column with color-coded values
  • Dropdown menu for sorting by various criteria
  • Additional "Online only" filter checkbox
  • All existing functionality preserved

Benefits

  1. Transparency - POLO scores visible for all nodes
  2. Easy Discovery - Sort to find highest/lowest scoring nodes
  3. Better Monitoring - Quickly identify underperforming nodes
  4. Flexible Filtering - Combine multiple filters for precise queries
  5. Developer-Friendly - Simple test infrastructure for dashboard development

Breaking Changes

None. This is a backward-compatible enhancement.

Testing

  • ✅ All existing tests pass
  • ✅ Pre-commit hooks configured and running
  • ✅ Dashboard compiles and renders correctly
  • ✅ Seed script successfully populates test data
  • ✅ Filtering and sorting work as expected

Related Issues

Addresses the need for POLO score visibility in the dashboard UI.

@Alexgodoroja Alexgodoroja self-assigned this Feb 23, 2026
@Alexgodoroja Alexgodoroja added the enhancement New feature or request label Feb 23, 2026
@Alexgodoroja Alexgodoroja changed the title feat: Show polo score within polo dashboard feat: add polo score and display total nodes in dashboard Feb 25, 2026
Copy link
Owner

@TeoSlayer TeoSlayer left a comment

Choose a reason for hiding this comment

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

Looks ok to me.

@TeoSlayer TeoSlayer merged commit a049bc4 into main Feb 27, 2026
2 checks passed
@TeoSlayer TeoSlayer deleted the show_polo_score branch February 27, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants