Skip to content

miner-ui: implement the hosted-mode flag (#5229's decided follow-up, now unblocked) #9195

Description

@JSONbored

Context

Part of the hosted AMS chat platform epic. #5229 decided: reuse apps/loopover-miner-ui with a hosted-mode flag, deferring mobile/desktop. The decision comment explicitly deferred the flag's implementation as follow-up work blocked on #7180#7180 (tenant Container+Postgres provisioning core) has since closed, so this is now unblocked. #5963 (deploy miner-ui as a demo Cloudflare Worker) is the open prototype informing the deployment mechanics; use its findings, don't duplicate its scope.

Requirements

  1. Introduce a single hosted-mode switch (build-time or runtime — decide and record which, with the reason) that partitions the app's assumptions:
    • Local mode (default, unchanged): filesystem-backed state, local config discovery, single implicit operator — byte-identical behavior to today with the flag off.
    • Hosted mode: all state via the API with session identity (the tenant-auth sub-issue supplies it), no filesystem assumptions, no local-config reads.
  2. Audit and enumerate every local-only assumption in the app (filesystem paths, local config reads, process-local caches, single-user globals) — the enumeration is a deliverable, and each item gets a mode-appropriate implementation or an explicit hosted-mode error state.
  3. The flag is structural, not cosmetic: hosted mode with no backend reachable fails with defined states, never by silently exercising local-mode code paths.
  4. CI builds and tests both modes from the same codebase.

Deliverables

  • The flag + the local-assumption audit (as a checklist in the PR/issue) + mode-appropriate implementations.
  • Tests: both modes built and exercised in CI; a regression guard that local-mode snapshots/behavior are unchanged with the flag off.

Expected outcome

One loopover-miner-ui codebase that is simultaneously today's local dashboard and the deployable hosted client — the foundation every other sub-issue in this epic builds on.

References

Advances the #5229 decision. Relates to #5963, #7180.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions