fix(api): audit registered-vs-installed dashboard/digest copy - #5776
Conversation
…red#5026) Repos that opt out of the gittensor plugin now legitimately show 0 registered repos, so wording that implied something was broken or missing at that count was misleading. The digest headline now leads with installed repos and only mentions the registered count when it's nonzero; the operator dashboard's "registry missing" delta is replaced with an accurate "gittensor plugin not enabled" when no registry snapshot has ever been persisted. No functional/logic change to how isRegistered or isInstalled are computed.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5776 +/- ##
=======================================
Coverage 95.07% 95.07%
=======================================
Files 582 582
Lines 46217 46219 +2
Branches 14821 14822 +1
=======================================
+ Hits 43941 43943 +2
Misses 1516 1516
Partials 760 760
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 14:32:13 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
registeredRepos: 0is the normal, expected state for most self-host operators and must not read as broken.buildDigestItems(src/api/routes.ts) now leads its summary item withinstalledrepos — the correct "repos this instance operates on" signal — and only mentions the registered count when it's nonzero, instead of headlining0 registered repositories tracked.buildOperatorDashboardPayload(src/services/operator-dashboard.ts) replaces the"registry missing"delta (implies something is broken) with"gittensor plugin not enabled"(accurately describes why no registry snapshot has been persisted) whenregistryisnull.src/services/weekly-value-report.tswas audited too and needs no change — its "Coverage: N registered repo(s)..." copy is already neutral at zero.isRegistered/isInstalledcomputation and every other metric are untouched — wording only.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Fixes #5026
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAll ran via
npm run test:ci(the full local gate) plusnpm audit --audit-level=moderate, both clean.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Not applicable: this is a backend JSON copy change (digest/dashboard API response strings), not a rendered UI change — the generic
Stattile component that displays these fields is untouched.Notes
test/integration/api.test.ts) covering both branches for each changed conditional: no registry snapshot / zero registered repos, and a persisted registry snapshot / nonzero registered repos, asserting the exact copy on both/v1/app/digestand/v1/app/operator-dashboard."registry missing"string to match the new wording.