[architect] refactor: delete dead trust-tier render helpers (trustTierColor, trustTierBadgeCSS, rankDisplay in pkg/dashboard/api_contribute.go) - #6214
Open
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
…rColor, trustTierBadgeCSS, rankDisplay) golang.org/x/tools/cmd/deadcode at fe34da5 marks all three helpers in src/pkg/dashboard/api_contribute.go unreachable from every binary. They are server-side HTML/CSS renderers for leaderboard badges, leftovers from before the leaderboard rendered client-side; their tier→colour tables and medal-emoji HTML can silently drift from real styling. Only callers were assertions in api_contribute_test.go and api_contribute_more_coverage_test.go, removed here. agentTierLabel and buildAgentLeaderboardEntries stay (live). Disjoint from PR #6156 (api_leaderboard_style.go) and PR #6095 (contribute_ws.go) — different files. Fixes #6210 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor
Deletes three production-dead server-side leaderboard render helpers from
src/pkg/dashboard/api_contribute.go:trustTierColor— tier→hex colour map for badgestrustTierBadgeCSS— tier→Tailwind-style bg/text/border classesrankDisplay— medal-emoji/rank HTML snippetsgolang.org/x/tools/cmd/deadcode ./...at fe34da5 marks all three unreachable from every binary — leftovers from before leaderboard badges rendered client-side. Their styling tables can silently drift from the real client-side styling while coverage tests pin behavior no user can reach. Only callers were assertions inapi_contribute_test.goandapi_contribute_more_coverage_test.go(removed here).agentTierLabelandbuildAgentLeaderboardEntriesstay — both live.Files claimed: src/pkg/dashboard/api_contribute.go, src/pkg/dashboard/api_contribute_test.go, src/pkg/dashboard/api_contribute_more_coverage_test.go, changelog.d/changed-6210-trusttier-render-helpers.md. Disjoint from open hold-gated PRs #6156 (api_leaderboard_style.go), #6132 (server.go constructors), and #6095 (contribute_ws.go) — different files and functions.
Verified:
go vet ./pkg/dashboard/passes; targetedgo test ./pkg/dashboard/ -run 'TestCovK2|TestIsValidUsername|TestContributeLeaderboard'passes.Fixes #6210
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6