Skip to content

Whitelist: color and sort "Active by Greylist Override" as active - #451

Merged
barton2526 merged 1 commit into
gridcoin-community:masterfrom
jamescowens:dynamic-whitelist
Jun 2, 2026
Merged

barton2526 merged 1 commit into
gridcoin-community:masterfrom
jamescowens:dynamic-whitelist

Conversation

@jamescowens

Copy link
Copy Markdown
Member

Summary

  • Status badge for Active by Greylist Override was rendering red — it fell through projectStatus()'s default branch (empty cssClass) and the badge-color check routed anything not literally Active or Excluded to danger. Override projects are in the superblock and earning rewards, so they should read as active, not greylisted.
  • projectStatus() now returns cssClass: "status-active" for the override status (keeping the distinct display label so the override is still visible under the project name). The badge-color check now keys off cssClass rather than the raw display text, so the semantic category drives the color.
  • sortOrder gains an entry between Active and Excluded so override rows sort with the active group, ahead of greylisted rows.
  • Drive-by: sortOrder[x] || 9 collapsed 0 (Active's ordinal) to 9 via JS falsiness — ?? instead. Not visible today because every active project on the live whitelist is currently flagged as override, but would surface as soon as any plain-Active project appeared.

Test plan

  • Local preview at http://jco-linux.jcowens.net:81/whitelist.htm: override rows render with a green bg-success badge and sort within the active group, ahead of greylisted rows.
  • Greylisted and excluded rows unchanged (red and yellow badges respectively).
  • Spot-check after merge that the live site renders override rows green.

🤖 Generated with Claude Code

The status column previously fell through projectStatus()'s default
branch for "Active by Greylist Override", which left cssClass empty
and routed the badge to the danger (red) case — visually grouping
override rows with greylisted ones even though they are in the
superblock and earning rewards.

Treat the override status as a member of the active category:

  - projectStatus() returns cssClass "status-active" for it (keeping
    the distinct display label so the override is still visible).
  - The badge-color check now keys off cssClass rather than the raw
    display text, so the semantic category drives the color.
  - sortOrder gains an entry between "Active" and "Excluded" so
    override rows sort with the active group, not at the bottom.

Drive-by: sortOrder[x] || 9 collapsed 0 (Active's ordinal) to 9 via
JS falsiness, so plain-Active rows were also sorting to the bottom.
Use ?? instead. Not visible today because every active project on
the live whitelist is currently flagged as override.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@barton2526
barton2526 merged commit 8c9a2d4 into gridcoin-community:master Jun 2, 2026
1 check passed
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.

2 participants