Skip to content

fix(miner-ui): align demo portfolio-queue items with the summary, fleet-wide and per repo#7286

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
shin-core:fix/demo-portfolio-queue-items-7227-v2
Jul 19, 2026
Merged

fix(miner-ui): align demo portfolio-queue items with the summary, fleet-wide and per repo#7286
JSONbored merged 1 commit into
JSONbored:mainfrom
shin-core:fix/demo-portfolio-queue-items-7227-v2

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

What

In apps/loopover-miner-ui/src/lib/demo-data.ts (the VITE_DEMO_MODE=1 fixture layer), two fixtures describing the same portfolio queue disagreed: DEMO_PORTFOLIO_QUEUE_SUMMARY.byStatus reports in_progress: 3, done: 15 (18 actionable items), but DEFAULT_DEMO_PORTFOLIO_QUEUE_ITEMS listed only 4. A demo visitor saw status cards claiming "In progress: 3, Done: 15" directly above a table with only 4 rows.

How

Expand DEFAULT_DEMO_PORTFOLIO_QUEUE_ITEMS to 18 items that match the summary both fleet-wide and per repo:

Repo in_progress done
acme/widgets 1 6
acme/api-gateway 1 4
acme/docs-site 0 3
northwind/inventory 1 2
fleet 3 15

Every per-repo in_progress/done split equals that repo's DEMO_PORTFOLIO_QUEUE_SUMMARY.repos[].byStatus (only the summary's queued rows, which PortfolioQueueActionItem can't represent, are absent). Entirely synthetic — only the four existing demo repos and the established wgt-/gw-/docs-/inv- identifier style.

Validation

A test added to demo-data.test.ts's portfolio-queue block asserts the items' in_progress/done counts match DEMO_PORTFOLIO_QUEUE_SUMMARY fleet-wide and for every repo, plus a guard that every item references only the four synthetic repos. Confirmed the check fails against the old 4-item fixture; ui:lint/ui:typecheck and the demo-data suite pass; resetDemoDataForTest continues to restore the expanded fixture.

Closes #7227

…et-wide and per repo

DEFAULT_DEMO_PORTFOLIO_QUEUE_ITEMS listed only 4 actionable items while
DEMO_PORTFOLIO_QUEUE_SUMMARY declares 3 in_progress + 15 done, so
VITE_DEMO_MODE showed status cards above a table that visibly disagreed
with them.

Expand the fixture to 18 items whose in_progress/done split matches the
summary both fleet-wide (3/15) AND per repo (widgets 1/6, api-gateway 1/4,
docs-site 0/3, inventory 1/2) -- only the summary's `queued` rows, which an
actionable item can't represent, are absent. Uses only the four synthetic
demo repos and the existing identifier style. A test asserts the fleet-wide
and per-repo counts agree so the fixtures can't drift again.

Closes JSONbored#7227
@shin-core
shin-core requested a review from JSONbored as a code owner July 19, 2026 12:36
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 19, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 19, 2026
@loopover-orb

loopover-orb Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-19 12:40:44 UTC

2 files · 1 AI reviewer · no blockers · CI green · unstable

⏸️ Suggested Action - Manual Review

Review summary
This PR expands the demo portfolio-queue fixture from 4 to 18 items so it matches DEMO_PORTFOLIO_QUEUE_SUMMARY's byStatus counts (3 in_progress, 15 done) both fleet-wide and per repo. I traced the math myself: widgets (1/6), api-gateway (1/4), docs-site (0/3), inventory (1/2) sum to 3 in_progress + 15 done = 18, matching the fleet total exactly, and each item's repoFullName is one of the four existing synthetic repos. The added tests directly assert this parity (fleet-wide and per-repo) plus a repo-allowlist guard, and the PR closes the linked issue #7227.

Nits — 4 non-blocking
  • demo-data.ts:107 duplicates the `"https:​//forge.example.com"` literal as a new `FORGE` const while DEMO_RUN_STATES above still inlines the same string — consider hoisting one shared constant for the whole file.
  • The 18 synthetic identifiers (wgt-2451..2288, gw-118..76, etc.) are hand-picked descending numbers with no assertion on ordering/uniqueness beyond the two new tests — fine for a fixture, but worth a one-line comment noting they're arbitrary decreasing IDs, not meaningful sequence data.
  • demo-data.test.ts: the `count` helper's `status: string` param could be typed as `PortfolioQueueActionItem["status"]` for tighter type-safety, matching the imported type used elsewhere in the file.
  • Consider asserting `getDemoPortfolioQueueItems()` has exactly length 18 in the new test block for a clearer failure message if the fixture count ever drifts again.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7227
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
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: 74 registered-repo PR(s), 47 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 74 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff expands DEFAULT_DEMO_PORTFOLIO_QUEUE_ITEMS to exactly 3 in_progress + 15 done = 18 items using only the four existing synthetic repos and matching identifier patterns, and adds regression tests in demo-data.test.ts asserting fleet-wide (and per-repo) counts match DEMO_PORTFOLIO_QUEUE_SUMMARY.byStatus, directly satisfying all stated deliverables.

Review context
  • Author: shin-core
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Solidity, Dart, Python, CSS, PHP, Rust
  • Official Gittensor activity: 74 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step in the Signals table above.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@JSONbored
JSONbored merged commit bf7a459 into JSONbored:main Jul 19, 2026
7 of 8 checks passed
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:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

demo-data.ts's DEFAULT_DEMO_PORTFOLIO_QUEUE_ITEMS (4 rows) contradicts DEMO_PORTFOLIO_QUEUE_SUMMARY's in_progress/done counts (3/15)

2 participants