From c573e58e0fd027def03373c06c7d50631df5fb4f Mon Sep 17 00:00:00 2001 From: Dione Date: Wed, 10 Jun 2026 07:10:24 +0000 Subject: [PATCH] feat: add neon color picker for wallet management - Replace muted Tailwind palette with 16-color neon palette - Add clickable color dot in sidebar that opens a popup swatch grid - Allow color override for all wallets (including embedded) - Fix getColorForWallet to respect localStorage override - Fix duplicate renameWallet in wallets.js - Update Dockerfile to serve ESM modules via nginx --- AGENTS.md | 66 +++++++++++++++++++++++++++++++++++++- Dockerfile | 3 ++ index.html | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++---- wallets.js | 18 +++++++++++ 4 files changed, 173 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3007da9..c4e2f34 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,11 +10,24 @@ docker build -t cbBTC-dashboard . && docker run -p 8080:80 cbBTC-dashboard Or just open `index.html` in a browser (without the `/api/` proxy, only the Kraken BTC price chart will work). +## Architecture + +The codebase is split into three vanilla ESM modules plus the single-page dashboard: + +| Module | Purpose | +|---|---| +| `wallets.js` | **`WalletManager`** — localStorage state, chain-specific address validation, verification lifecycle | +| `verifier.js` | **`WalletVerifier`** — EIP-712 typed-data signing via `window.ethereum`, user rejection handling | +| `stream.js` | **`WalletStreamManager`** — single WebSocket with BroadcastChannel leader election, exponential backoff + jitter | + ## File layout | File | Purpose | |---|---| -| `index.html` | Everything. Frontend, embedded chart data, inline JS logic. Edit here. | +| `index.html` | Dashboard UI. Embedded chart data, ApexCharts, TailwindCSS. Loads modules via `