feat(miner-ui): portfolio-queue summary cards over the local queue store - #4641
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-10 09:03:52 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
Visual preview
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.
|



Closes #4306
What
Portfolio/queue summary cards in
apps/gittensory-miner-ui/: read-only counts by status (queued/in_progress/done) over the localminer_portfolio_queuestore, with a per-repo breakdown table when the local queue spans multiple repos — the cross-repo shapeportfolio-queue.js's schema already supports.Design, per the issue's guidance
vite-portfolio-queue-api.ts) servesGET /api/portfolio-queuethroughportfolio-queue.js's EXISTING exports (resolvePortfolioQueueDbPath/listQueue) — no SQL and no new queue-store methods.summarizePortfolioQueueinsrc/lib/portfolio-queue.ts), exactly as the issue suggests: a read + aggregate over whatlistQueue()already returns, unit-tested independently of rendering. The middleware serves raw rows and duplicates no aggregation.listQueue()lazily initializes the default store (which would CREATE the SQLite file), so the handler probes the resolved DB path first and serves{ rows: [] }without touching the store when no DB exists yet — asserted in tests (nolistQueuecall happens on that path), matching the run-state endpoint's contract.src/routes/portfolio.tsx, mounted in the shell's nav) renders four states: loading, error (inline alert, never a crash), the fresh-install empty state, and the populated cards — with the per-repo table appearing only for multi-repo queues so a single-repo install stays uncluttered.routeTree.gen.tsregenerated and committed via the router plugin.Testing
15 new cases: pure-aggregation tests (multi-repo counts + sorted breakdown, empty queue), component tests for all four view states plus the multi-repo/single-repo table rendering split, fetch-client tests (happy path, non-2xx, malformed payloads, thrown fetch), and middleware-handler tests (rows via existing exports, the no-write fresh-install path, fall-through, store-failure → 500). Workspace
test(29/29) /typecheck/lint/buildall green locally; the diff is confined toapps/gittensory-miner-ui/**.