Skip to content

fix(miner-ui): surface portfolio queue action failures to the operator - #6096

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-portfolio-queue-action-errors
Jul 15, 2026
Merged

fix(miner-ui): surface portfolio queue action failures to the operator#6096
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-portfolio-queue-action-errors

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Thread PortfolioQueueActionResult through runQueueAction instead of discarding it, mirroring runGovernorAction in the ledgers route.
  • Render {ok: false} action failures with the same role=alert / danger styling convention used elsewhere in miner-ui.
  • Only refresh the queue summary/items on {ok: true} — failed actions no longer silently re-fetch as if they succeeded.

Closes #6090

Test plan

  • npm run ui:kit:build && npx vitest run src/portfolio-queue-actions.test.tsx (19 tests pass)
  • CI green including miner-ui tests and codecov/patch

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 15, 2026 09:13
@superagent-security

Copy link
Copy Markdown
Contributor

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

Thread release/requeue results through runQueueAction instead of
discarding them, show a role=alert error on failure, and only refresh
the queue list when the action succeeds.

Closes JSONbored#6090

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 09:21:29 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR threads PortfolioQueueActionResult through runQueueAction so failed release/requeue actions render a role=alert error message and skip the summary/items re-fetch that previously ran unconditionally on both success and failure. The change is small, well-scoped to the linked issue (#6090), and the new tests exercise both the presentational component (actionResult prop) and the integration path (PortfolioPage) verifying loadPortfolioQueueItems is not called again after a failed release. The diff correctly mirrors the existing runGovernorAction convention referenced in the description.

Nits — 4 non-blocking
  • portfolio.tsx: actionResult is never cleared when a new action starts or succeeds, so a stale failure message from a prior action could theoretically persist visually until the next action resolves — consider resetting it to null at the start of runQueueAction.
  • portfolio.tsx: the alert message interpolates actionResult.error directly into JSX text (React-escaped, so no XSS risk), but confirm the queue action error strings are always safe, human-readable messages rather than raw stack traces.
  • Consider clearing actionResult when a new runQueueAction call starts, so an in-progress action doesn't display a leftover error from the previous attempt while pending.
  • The test file could also verify actionResult is cleared/updated on a subsequent successful action after a prior failure, to lock in intended UX around message lifecycle.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #6090
Related work ⚠️ 2 scoped overlaps 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: 352 registered-repo PR(s), 170 merged, 29 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 352 PR(s), 29 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff threads PortfolioQueueActionResult through runQueueAction instead of discarding it, renders the {ok:false} case with role="alert" styling matching the governor convention, gates refreshKey/refreshItems behind the ok:true branch, and extends the PortfolioPage-level test with a failing-action case asserting the error renders and items are not re-fetched.

Review context
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps 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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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://gittensory.aethereal.dev/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.

@loopover-orb
loopover-orb Bot merged commit 3312431 into JSONbored:main Jul 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(miner-ui): portfolio queue release/requeue action failures are silently swallowed

1 participant