feat(miner-manage-ui): fold run-state into the manage-status panel - #4494
Conversation
Add listRunStates() to run-state.js and a new collectRunPortfolio / renderRunPortfolioTable pair in manage-status.js that folds each tracked repo's discover/plan/prepare run state alongside its managed PR rows into one row per repo, so a repo actively being worked with zero PRs yet still shows up. runManageStatus additively includes a runPortfolio key in --json output and appends the new table to text output; the existing rows key and PR table are unchanged. A real GUI dashboard (apps/gittensory-miner-ui/) is a later phase of the same roadmap and out of scope here. Closes JSONbored#4279
|
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 #4494 +/- ##
=======================================
Coverage 94.03% 94.03%
=======================================
Files 420 420
Lines 37521 37521
Branches 13701 13701
=======================================
Hits 35282 35282
Misses 1583 1583
Partials 656 656 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 22:15:03 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 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.
|
Summary
gittensory-miner manage statusonly ever showed PR-scoped rows (from the portfolio queue +manage_pr_updateevents), so a repo actively being discovered/planned/prepared with zero PRs yet was invisible in the panel. This adds a "run portfolio" view that folds each tracked repo's current discover/plan/prepare run state (run-state.js) alongside its managed PR rows into one row per repo.run-state.js: addslistRunStates()(store method + module-level default-store helper) returning every recorded repo's run state, sorted by repo full name. Read-only, mirrors the existinggetRunStatelegacy-row fail-closed behavior.manage-status.js: addscollectRunPortfolio(sources)— a pure aggregator that foldscollectManageStatusPR rows withlistRunStates()by repo, andrenderRunPortfolioTable(portfolio)for the compact per-repo companion table.runManageStatusnow also opens/owns a run-state store, and:--jsonoutput gains a newrunPortfoliokey additive only — the existingrowskey/shape is unchanged, so an existing consumer parsingrowsalone sees byte-identical output.manage status/manage pollcommand lines and the new run-portfolio behavior, with an explicit note that a real GUI dashboard (apps/gittensory-miner-ui/) is a later phase of the same roadmap and out of scope here.Closes #4279
Test plan
test/unit/miner-run-state.test.ts— added tests forlistRunStates(sorted output, legacy-row fail-closed drop, module-level default-store helper)test/unit/miner-manage-status.test.ts— added tests forcollectRunPortfolio(run-state-only repo, PR-only repo, multi-PR fold sorted by repo, invalid-store rejection) andrenderRunPortfolioTable(empty + null-state cases), plus rewrote therunManageStatusCLI test to assert both the unchangedrowsoutput and the new additiverunPortfoliooutputnpm run typechecknpm run test:ci(full local gate, green)