Skip to content

feat(miner-ui): demo-mode Cloudflare Worker prototype#7190

Closed
RealDiligent wants to merge 3 commits into
JSONbored:mainfrom
RealDiligent:feat/miner-ui-demo-worker-5963-v2
Closed

feat(miner-ui): demo-mode Cloudflare Worker prototype#7190
RealDiligent wants to merge 3 commits into
JSONbored:mainfrom
RealDiligent:feat/miner-ui-demo-worker-5963-v2

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Adds VITE_DEMO_MODE (vite build --mode demo) so client fetchers serve synthetic sample data with no /api/* / SQLite backend — safe for a public static Worker.
  • Ships wrangler.jsonc (loopover-miner-ui-demo) + .github/workflows/miner-ui-demo-deploy.yml (workflow_dispatch only).
  • Extends CI UI build + Codecov bundle analysis to @loopover/ui-miner.

Prototype for the AMS miner-ui demo Worker (issue 5963). Prior attempt #7189 was CI-green but auto-closed because that issue is maintainer-assigned — this PR does not auto-close the issue so it can sit for manual review (also touches guardrailed workflow paths).

Before / after

before-after

Test plan

  • npm --workspace @loopover/ui-miner run test
  • npm --workspace @loopover/ui-miner run typecheck
  • npm --workspace @loopover/ui-miner run build:demo
  • CI green
  • Maintainer manual review (workflows + optional issue 5963 link)

Bake VITE_DEMO_MODE synthetic fixtures so the SPA runs without SQLite APIs,
add workflow_dispatch deploy + CI build/Codecov bundle analysis for ui-miner.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 18, 2026 09:28
@superagent-security

Copy link
Copy Markdown
Contributor

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

RealDiligent and others added 2 commits July 18, 2026 17:32
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.77%. Comparing base (e2ea2d2) to head (d872e74).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7190   +/-   ##
=======================================
  Coverage   93.77%   93.77%           
=======================================
  Files         694      694           
  Lines       68975    68975           
  Branches    18799    18799           
=======================================
  Hits        64679    64679           
  Misses       3302     3302           
  Partials      994      994           
Flag Coverage Δ
rees 88.56% <ø> (ø)
shard-1 43.88% <ø> (ø)
shard-2 37.14% <ø> (ø)
shard-3 33.10% <ø> (ø)
shard-4 34.54% <ø> (ø)
shard-5 32.21% <ø> (ø)
shard-6 45.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

loopover-orb Bot commented Jul 18, 2026

Copy link
Copy Markdown

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-18 09:36:27 UTC

25 files · 1 AI reviewer · 2 blockers · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This adds a demo-mode build path (VITE_DEMO_MODE) that swaps every /api/* client fetcher for synthetic in-memory fixtures, plus a workflow_dispatch-only Cloudflare Worker deploy, CI build/bundle-analysis wiring for @​loopover/ui-miner, and matching test updates. The demo/live branching is consistent and mechanical (one `if (isDemoMode()) return demo...()` per fetcher), the deploy workflow correctly gates on secrets before running `wrangler deploy`, and existing codecov-policy/ci-ui-build tests were updated to match the new build command rather than being weakened. The PR description explicitly acknowledges it touches guardrailed workflow paths and needs manual review, and per repo convention it must close/link an eligible issue (#5963) — it references but does not auto-close it, which the description says is intentional.

Nits — 5 non-blocking
  • apps/loopover-miner-ui/wrangler.jsonc has no `route`/custom domain, which is intentional per the comment, but worth a maintainer sanity check that `workers_dev: true` with no auth in front of it is acceptable for a public prototype serving synthetic AMS-flavored data.
  • apps/loopover-miner-ui/src/lib/demo-data.ts:94 hardcodes `oldestQueuedAgeMs: 3_600_000` — a named constant (e.g. `ONE_HOUR_MS`) would read better than a bare millisecond literal.
  • The new `@​codecov/bundle-analyzer` dependency lacks a build provenance attestation per the external inventory check; same class of risk as the existing `@​loopover/ui` devDependency already carries, so likely fine to accept the same way.
  • apps/loopover-miner-ui/src/lib/demo-data.ts's `buildQueueSummary` hardcodes `queued: 1` per repo (line ~78) independent of `queuedExtra`, so the two repo `queued` counts plus the top-level `queuedExtra` don't reconcile arithmetically — harmless for demo fixtures but worth a comment noting the numbers are illustrative, not summed.
  • Confirm issue Prototype: deploy loopover-miner-ui as a demo Cloudflare Worker (informs #5229's web-dashboard reuse decision) #5963 is maintainer-authorized/eligible per the issue-scope policy before merging, since the PR body notes a prior auto-close due to maintainer-assignment.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.

Decision drivers

  • ❌ Code review — 2 blockers (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 407 registered-repo PR(s), 209 merged, 35 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 407 PR(s), 35 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 407 PR(s), 35 issue(s).
  • Related work: Titles/paths share 5 meaningful terms. (issue #5963)
Contributor next steps
  • Start here: Explain no-issue PR.
  • Then work through the remaining 4 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://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (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 commented Jul 18, 2026

Copy link
Copy Markdown

LoopOver is closing this pull request on the maintainer's behalf (No linked issue detected; Maintainer requires a linked issue). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 18, 2026
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.

1 participant