Skip to content

feat(miner-ui): add portfolio queue release and requeue controls - #5632

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jsdevninja:feat/miner-ui-portfolio-queue-actions
Jul 13, 2026
Merged

feat(miner-ui): add portfolio queue release and requeue controls#5632
JSONbored merged 1 commit into
JSONbored:mainfrom
jsdevninja:feat/miner-ui-portfolio-queue-actions

Conversation

@jsdevninja

@jsdevninja jsdevninja commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • npm run ui:test (128 tests, including new portfolio-queue-actions coverage)
  • npm run ui:typecheck
  • CI green on fork PR

Closes #4857

Wire release/requeue actions on the portfolio page to the same store methods the CLI uses, completing the queue half of JSONbored#4857.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsdevninja
jsdevninja requested a review from JSONbored as a code owner July 13, 2026 15:56
@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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 13, 2026
@loopover-orb

loopover-orb Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Tip

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

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-13 18:40:54 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds authenticated GET/POST routes for listing and releasing/requeuing portfolio-queue items, wired to the existing CLI store methods (reclaimStuckItem/requeueItem), plus a matching UI section on the portfolio page with Release/Requeue buttons. The implementation mirrors the already-merged governor pause/resume pattern closely (same route-matcher/handler/plugin shape, same fresh-install fast path for GET), and the previously-noted blocker in vite-governor-api.ts's header comment (identifiers can't be safely exposed) is now resolved by gating the write routes behind the existing auth middleware, which is a reasonable and explicitly justified design call. Tests are thorough and exercise the real handler/plugin/store wiring (including 409 not-in-progress/not-requeuable paths and the fresh-install empty-list fast path) rather than fabricating unreachable states. This closes the linked issue #4857 and stays scoped to it.

Nits — 5 non-blocking
  • apps/gittensory-miner-ui/vite-portfolio-queue-actions-api.ts uses bare status-code literals (200/400/409/500) throughout respondToPortfolioQueueActionRoute; consider named constants for readability, matching whichever convention the sibling vite-governor-api.ts eventually adopts.
  • apps/gittensory-miner-ui/src/routes/portfolio.tsx:157 — `loadSummary`/`refreshItems` list `refreshKey` in their useCallback deps purely to force a new function identity on action completion; a one-line comment would help a future reader understand why an unused-looking dependency is there.
  • apps/gittensory-miner-ui/vite-portfolio-queue-actions-api.ts:101 and portfolio-queue-actions.ts:50 have moderately deep nesting (route dispatch + try/finally + status checks); could be flattened slightly but not urgent.
  • Consider extracting the repeated `{ status, body: JSON.stringify(...) }` response-building pattern in vite-portfolio-queue-actions-api.ts into a small helper, since it's repeated 4+ times with only the status/payload varying.
  • The client-side `postPortfolioQueueAction` in portfolio-queue-actions.ts could share more code with `fetchPortfolioQueueItems`'s error-handling try/catch shape for consistency.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4857
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low 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: 232 registered-repo PR(s), 141 merged, 39 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jsdevninja; Gittensor profile; 232 PR(s), 39 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
Review context
  • Author: jsdevninja
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 232 PR(s), 39 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
[BETA] Chat with Gittensory

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

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory 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/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/portfolio desktop before /portfolio after /portfolio
/portfolio mobile before /portfolio (mobile) after /portfolio (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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 13, 2026
@JSONbored
JSONbored merged commit 74d5ffc into JSONbored:main Jul 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add real actions to the miner-ui

2 participants