Skip to content

feat(ui): slop + duplicate trend card on maintainer dashboard (#2202)#4706

Closed
jimcody1995 wants to merge 7 commits into
JSONbored:mainfrom
jimcody1995:feat/slop-duplicate-trend-2202
Closed

feat(ui): slop + duplicate trend card on maintainer dashboard (#2202)#4706
jimcody1995 wants to merge 7 commits into
JSONbored:mainfrom
jimcody1995:feat/slop-duplicate-trend-2202

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Add weekly slop-flag and duplicate-flag rate trends from queue-health snapshots to the maintainer console, with band labels, freshness metadata, and Vitest coverage.

Summary

  • Extends buildQueueHealth / queue-health signal snapshots with slopFlaggedPullRequests and duplicateFlaggedPullRequests counts.
  • Adds buildMaintainerSlopDuplicateTrend to roll up an 8-week trend from historical snapshots plus the live queue-health point for the current week.
  • Exposes qualityDashboard.slopDuplicateTrend on GET /v1/app/maintainer-dashboard.
  • Adds SlopDuplicateTrendCard to the maintainer console: dual TrendChart series (slop flag rate, duplicate flag rate), shared legend, generatedAt, and stale/fresh pill.
  • Surfaces band labels only on the card — no raw slop-risk, trust, or credibility numbers.
  • Vitest coverage for service/UI branches (populated series, one-series-empty, no-data, legacy snapshots, duplicate clusters, maintainer panel wiring).
  • Guards buildQueueHealth when collision reports omit clusters.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Closes #2202
Part of #539

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥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:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • MCP / worker / actionlint checks are unchanged by this PR; CI runs the full matrix on push.
  • Local runs completed during development:
    • npm run ui:lint
    • npm test -- --run test/unit/maintainer-slop-duplicate-trend.test.ts
    • npm test -- --run test/unit/contributor-issue-draft.test.ts
    • npm --workspace @jsonbored/gittensory-ui test -- --run src/components/site/app-panels/slop-duplicate-trend-card.test.tsx
    • npm --workspace @jsonbored/gittensory-ui test -- --run src/components/site/app-panels/slop-duplicate-trend-card-model.test.ts
    • npm --workspace @jsonbored/gittensory-ui test -- --run src/components/site/app-panels/maintainer-panel.test.tsx

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section 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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

State / title JPG/PNG evidence
Before/app/maintainer loaded state (no trend card between StatCards and Install health) before
After/app/maintainer loaded state (new Slop + duplicate trend card with dual charts, legend, generatedAt, fresh pill) after

What changed: StatCards flow straight into Install health before; after, the new Slop + duplicate trend card sits between StatCards and Install health.

Notes

  • Trend rates are derived from existing queue-health signal snapshots; no new public GitHub surface is added.
  • Slop severity is shown as band labels (clean / low / elevated / high) only — raw slop-risk values are not rendered.

Made with Cursor

jimcody1995 and others added 6 commits July 10, 2026 14:23
…red#2202)

Add weekly slop-flag and duplicate-flag rate trends from queue-health snapshots to the maintainer console, with band labels, freshness metadata, and Vitest coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update maintainer and queue-health test fixtures for the new required
slopFlaggedPullRequests and duplicateFlaggedPullRequests counts, and drop
those fields from the engine-package predicted-gate coverage stub.

Co-authored-by: Cursor <cursoragent@cursor.com>
…e absent

buildQueueHealth now tolerates collision reports without a clusters array,
preventing contributor draft and other callers from crashing when only
summary counts are present.

Co-authored-by: Cursor <cursoragent@cursor.com>
…red#2202)

Format slop trend UI files for prettier, add model/panel coverage tests,
and exercise legacy snapshot, duplicate-cluster, and edge-case branches
in buildMaintainerSlopDuplicateTrend/buildQueueHealth.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995 jimcody1995 requested a review from JSONbored as a code owner July 10, 2026 15:22
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 10, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

superagent-security Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Superagent did not find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.80952% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.15%. Comparing base (af90fa9) to head (29ccff6).

Files with missing lines Patch % Lines
src/services/maintainer-slop-duplicate-trend.ts 98.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4706   +/-   ##
=======================================
  Coverage   94.14%   94.15%           
=======================================
  Files         437      438    +1     
  Lines       38551    38634   +83     
  Branches    14055    14081   +26     
=======================================
+ Hits        36294    36376   +82     
  Misses       1599     1599           
- Partials      658      659    +1     
Files with missing lines Coverage Δ
src/api/routes.ts 94.28% <100.00%> (+0.01%) ⬆️
src/services/maintainer-quality-dashboard.ts 100.00% <ø> (ø)
src/signals/engine.ts 97.46% <100.00%> (+0.01%) ⬆️
src/services/maintainer-slop-duplicate-trend.ts 98.50% <98.50%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gittensory-orb gittensory-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. label Jul 10, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-10 15:47:09 UTC

19 files · no blockers · readiness 82/100 · CI failing · unstable

🛑 Suggested Action - Fix Blockers

  • AI review already in progress for this PR head: Another Gittensory pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another Gittensory pass. Gittensory is holding this PR for manual review until that pass completes.

Nits — 1 non-blocking
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

CI checks failing

  • codecov/patch — 98.80% of diff hit (target 99.00%)
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers No AI review summary
Linked issue ✅ Linked #2202
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 89 registered-repo PR(s), 42 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 89 PR(s), 0 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: jimcody1995
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript
  • Official Gittensor activity: 89 PR(s), 0 issue(s).
  • Related work: Titles/paths share 3 meaningful terms. (issue #642, issue #2013)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@gittensory-orb

Copy link
Copy Markdown

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): slop + duplicate trend-over-time card (maintainer dashboard)

1 participant