feat: complete Phase 1 foundation hardening + three-mode UI design doc

Phase 1a — Gradient Removal:
- Replaced all gradient-button/gradient-card with glass-button/path-option-card
- Removed banned gradient CSS classes

Phase 1b — Security Hardening:
- SecretsManager: AES-256-GCM encryption (core/security)
- electrs_status: credentials from env vars instead of hardcoded
- port_manager: RwLock proper error handling (no unwrap)
- Pinned all 11 :latest manifest images to specific versions
- parmanode converter: pinned inferred image versions

Phase 1c — Code Quality:
- Split rpc.rs (1795 lines) into 6 handler modules (auth, node, container, package, peers)
- Removed sideload code (UI, store, RPC client, 3 doc files)
- Fixed body background flash on logout/refresh
- Replaced 30 TypeScript `any` types with proper types
- Deleted HelloWorld.vue, removed TODO comments
- Added set -euo pipefail to all shell scripts
- Made deploy script verbose with timestamps and elapsed time

Also adds:
- CLAUDE.md project guide
- docs/three-mode-ui-design.md — design spec for Easy/Pro/Chat UI modes
- OnlineStatusPill component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-04 05:23:42 +00:00
co-authored by Claude Opus 4.6
parent 62d6c13764
commit 486fc39249
58 changed files with 1902 additions and 2286 deletions
+4 -11
View File
@@ -2,7 +2,7 @@
export interface RPCOptions {
method: string
params?: any
params?: Record<string, unknown>
timeout?: number
}
@@ -11,7 +11,7 @@ export interface RPCResponse<T> {
error?: {
code: number
message: string
data?: any
data?: unknown
}
}
@@ -271,7 +271,7 @@ class RPCClient {
})
}
async getMetrics(): Promise<any> {
async getMetrics(): Promise<Record<string, unknown>> {
return this.call({
method: 'server.metrics',
params: {},
@@ -334,20 +334,13 @@ class RPCClient {
})
}
async getMarketplace(url: string): Promise<any> {
async getMarketplace(url: string): Promise<Record<string, unknown>> {
return this.call({
method: 'marketplace.get',
params: { url },
})
}
async sideloadPackage(manifest: any, icon: string): Promise<string> {
return this.call({
method: 'package.sideload',
params: { manifest, icon },
timeout: 120000, // 2 minutes for upload
})
}
}
export const rpcClient = new RPCClient()
+4 -4
View File
@@ -1,7 +1,7 @@
// WebSocket handler for real-time updates
import type { Update, PatchOperation } from '../types/api'
import { applyPatch } from 'fast-json-patch'
import { applyPatch, type Operation } from 'fast-json-patch'
type WebSocketCallback = (update: Update) => void
type ConnectionStateCallback = (connected: boolean) => void
@@ -336,7 +336,7 @@ function getWebSocketClient(): WebSocketClient {
}
// Check if we have a persisted instance from HMR
const existing = (window as any).__archipelago_ws_client
const existing = (window as unknown as Record<string, unknown>).__archipelago_ws_client
if (existing && existing instanceof WebSocketClient) {
// Check if the WebSocket is still valid
if (existing.isConnected()) {
@@ -350,7 +350,7 @@ function getWebSocketClient(): WebSocketClient {
if (!wsClientInstance) {
wsClientInstance = new WebSocketClient()
if (typeof window !== 'undefined') {
(window as any).__archipelago_ws_client = wsClientInstance
;(window as unknown as Record<string, unknown>).__archipelago_ws_client = wsClientInstance
}
if (import.meta.env.DEV) console.debug('[WebSocket] Created new client instance')
}
@@ -385,7 +385,7 @@ export function applyDataPatch<T>(data: T, patch: PatchOperation[]): T {
}
try {
const result = applyPatch(data, patch as any, false, false)
const result = applyPatch(data, patch as Operation[], false, false)
return result.newDocument as T
} catch (error) {
console.error('Failed to apply patch:', error, 'Patch:', patch)