Skip to content

Dashboard: effective Tari status for UI display is computed but never surfaced (dead code found via #280) #295

Description

@VijitSingh97

Summary

While enabling ruff lint (#280), a block in build/dashboard/mining_dashboard/service/data_service.py was found that computes an effective Tari status for UI display and then discards it — both locals were assigned but never read (ruff F841):

# Determine effective Tari status for UI display
tari_active = tari_stats.get("active", False)
tari_status_str = (
    tari_stats.get("status", "Waiting...") if tari_active else "Waiting..."
)

The comment ("for UI display") strongly implies this status was meant to be surfaced in the dashboard's status/network payload, but the wiring appears to have been dropped. The dead block was removed in #280's lint pass; this issue tracks verifying the actual UI behaviour.

Why it might be a real bug

If nothing else derives the effective Tari status for the frontend, the dashboard may show a wrong or stale Tari status (e.g. stuck on "Waiting..." / missing the active-vs-inactive distinction).

Task

  • Trace how Tari sync/active status flows from tari_stats into the data the web layer serves (mining_dashboard/web/views.py, the status dict assembled in data_service.py) and into the frontend.
  • If the effective status is missing or mis-derived → fix the wiring and add a regression test.
  • If it is correctly derived via another path → confirm the removed block was genuinely redundant; no further action.

Context

Milestone set to v1.1 provisionally (dashboard correctness, relates to #170) — adjust during triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdashboardMining dashboard web UItariTari / merge-mining

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions