Skip to content

Implement "Governance Health Check" on User Profiles

Feature Description:

This feature introduces a Governance Health Check on the user profile page. This can be as a stats card on the main card and will provide a simple, clear status of the user's witness votes, transforming a hard-to-find piece of data into an actionable insight.

Through investigation, it came to our attention that we are not currently using the governance_vote_expiration_ts data point from the user's account details. This timestamp indicates when a user's witness votes will expire due to inactivity. By leveraging this data, we can build a highly valuable and proactive feature.

Location & UI Implementation:

Location: A new stats card in the account main card

Behavioral States:

The widget will have three distinct states based on the governance_vote_expiration_ts relative to the current date:

  1. State: Active

    • Condition: The expiration date is far in the future (e.g., more than 3 months away).
    • UI: A green checkmark icon.
    • Text: Witness votes are active.
  2. State: Expiring Soon

    • Condition: The expiration date is approaching (e.g., within the next 3 months).
    • UI: A yellow warning/clock icon.
    • Text: Witness votes will expire soon.
  3. State: Expired

    • Condition: The expiration date has already passed.
    • UI: A red error/warning icon.
    • Text: Witness votes have expired due to inactivity.

Background Context (For Developer Reference):

The governance_vote_expiration_ts field represents the expiration date of a user's witness votes, not their DHF proposal votes. This is a mechanism to ensure the witness list is governed by active accounts. Performing almost any governance action (including voting on a DHF proposal) refreshes this timer.