2026-03-18 21:01:13 -04:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8" />
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
|
|
|
|
<title>The Workshop — Timmy</title>
|
2026-03-18 21:01:13 -04:00
|
|
|
|
|
2026-03-18 21:20:51 -04:00
|
|
|
|
<link rel="manifest" href="/tower/manifest.json" />
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<meta name="theme-color" content="#0a0610" />
|
2026-03-18 21:01:13 -04:00
|
|
|
|
|
|
|
|
|
|
<!-- iOS PWA -->
|
|
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<meta name="apple-mobile-web-app-title" content="The Workshop" />
|
2026-03-18 21:20:51 -04:00
|
|
|
|
<link rel="apple-touch-icon" href="/tower/icons/icon-192.png" />
|
2026-03-18 22:15:46 -04:00
|
|
|
|
|
2026-03-18 21:01:13 -04:00
|
|
|
|
<style>
|
2026-03-18 22:15:46 -04:00
|
|
|
|
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
|
|
body {
|
|
|
|
|
|
background: #080610;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
font-family: 'Courier New', monospace;
|
|
|
|
|
|
touch-action: none;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
}
|
2026-03-18 21:01:13 -04:00
|
|
|
|
canvas { display: block; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
/* ── HUD ─────────────────────────────────────────────────────────── */
|
2026-03-18 21:01:13 -04:00
|
|
|
|
#hud {
|
|
|
|
|
|
position: fixed; top: 16px; left: 16px;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
color: #5588bb; font-size: 11px; line-height: 1.7;
|
|
|
|
|
|
text-shadow: 0 0 6px #2244aa;
|
|
|
|
|
|
pointer-events: none; z-index: 10;
|
2026-03-18 21:01:13 -04:00
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#hud h1 {
|
|
|
|
|
|
font-size: 13px; letter-spacing: 3px; margin-bottom: 4px;
|
|
|
|
|
|
color: #7799cc; text-shadow: 0 0 10px #4466aa;
|
2026-03-18 21:01:13 -04:00
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#session-hud {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
color: #22aa66;
|
|
|
|
|
|
text-shadow: 0 0 6px #11663388;
|
|
|
|
|
|
letter-spacing: 1px;
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
pointer-events: all;
|
|
|
|
|
|
line-height: 1.9;
|
|
|
|
|
|
}
|
|
|
|
|
|
#session-hud-topup {
|
|
|
|
|
|
color: #22aa66; text-decoration: none; margin-left: 5px;
|
|
|
|
|
|
letter-spacing: 1px; text-shadow: 0 0 6px #11663388;
|
|
|
|
|
|
cursor: pointer;
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
#session-hud-topup:hover { color: #44dd88; text-decoration: underline; }
|
2026-03-18 22:15:46 -04:00
|
|
|
|
|
2026-03-18 21:01:13 -04:00
|
|
|
|
#connection-status {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
position: fixed; top: 16px; right: 16px;
|
|
|
|
|
|
font-size: 11px; color: #333355;
|
|
|
|
|
|
pointer-events: none; z-index: 10;
|
|
|
|
|
|
text-shadow: none;
|
2026-03-18 21:01:13 -04:00
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#connection-status.connected {
|
|
|
|
|
|
color: #5588bb;
|
|
|
|
|
|
text-shadow: 0 0 6px #3366aa;
|
2026-03-18 21:01:13 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
/* ── Event log ────────────────────────────────────────────────────── */
|
|
|
|
|
|
#event-log {
|
|
|
|
|
|
position: fixed; bottom: 80px; left: 16px;
|
|
|
|
|
|
width: 280px; max-height: 100px; overflow-y: auto;
|
|
|
|
|
|
color: #445566; font-size: 10px; line-height: 1.6;
|
|
|
|
|
|
pointer-events: none; z-index: 10;
|
2026-03-18 21:01:13 -04:00
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.log-entry { opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
/* ── Top button bar ───────────────────────────────────────────────── */
|
|
|
|
|
|
#top-buttons {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
display: flex; gap: 8px; z-index: 20;
|
|
|
|
|
|
}
|
|
|
|
|
|
#open-panel-btn {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
font-family: 'Courier New', monospace; font-size: 11px; font-weight: bold;
|
|
|
|
|
|
color: #000; background: #4466aa; border: none;
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
padding: 7px 18px; cursor: pointer; letter-spacing: 2px;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
box-shadow: 0 0 14px #2244aa66;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
transition: background 0.15s, box-shadow 0.15s;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
min-height: 36px;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#open-panel-btn:hover, #open-panel-btn:active {
|
|
|
|
|
|
background: #5577cc;
|
|
|
|
|
|
box-shadow: 0 0 20px #3355aa88;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#open-session-btn {
|
|
|
|
|
|
font-family: 'Courier New', monospace; font-size: 11px; font-weight: bold;
|
|
|
|
|
|
color: #d0ffe0; background: #0d3322; border: 1px solid #22aa66;
|
|
|
|
|
|
padding: 7px 18px; cursor: pointer; letter-spacing: 1px;
|
|
|
|
|
|
box-shadow: 0 0 14px #0a441a44;
|
|
|
|
|
|
transition: background 0.15s, box-shadow 0.15s, color 0.15s;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
min-height: 36px;
|
|
|
|
|
|
}
|
|
|
|
|
|
#open-session-btn:hover, #open-session-btn:active {
|
|
|
|
|
|
background: #1a4a30;
|
|
|
|
|
|
box-shadow: 0 0 20px #22aa6666;
|
|
|
|
|
|
color: #88ffcc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── Low balance notice ───────────────────────────────────────────── */
|
|
|
|
|
|
#low-balance-notice {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
position: fixed; bottom: 65px; left: 0; right: 0;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
background: rgba(120, 50, 10, 0.92);
|
|
|
|
|
|
color: #ffcc80;
|
|
|
|
|
|
font-size: 11px; letter-spacing: 1px;
|
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
|
z-index: 25;
|
|
|
|
|
|
border-top: 1px solid #aa6622;
|
|
|
|
|
|
}
|
|
|
|
|
|
#low-balance-notice button {
|
|
|
|
|
|
background: transparent; border: 1px solid #ffcc80;
|
|
|
|
|
|
color: #ffcc80; font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 11px; padding: 2px 10px; cursor: pointer;
|
|
|
|
|
|
margin-left: 8px; letter-spacing: 1px;
|
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
|
pointer-events: all;
|
|
|
|
|
|
}
|
|
|
|
|
|
#low-balance-notice button:hover { background: rgba(255,200,100,0.15); }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
/* ── Input bar ───────────────────────────────────────────────────── */
|
|
|
|
|
|
#input-bar {
|
|
|
|
|
|
position: fixed; bottom: 0; left: 0; right: 0;
|
|
|
|
|
|
display: flex; align-items: center; gap: 8px;
|
|
|
|
|
|
padding: 10px 16px;
|
|
|
|
|
|
background: rgba(8, 6, 16, 0.88);
|
|
|
|
|
|
border-top: 1px solid #1a1a2e;
|
|
|
|
|
|
z-index: 20;
|
|
|
|
|
|
backdrop-filter: blur(8px);
|
|
|
|
|
|
-webkit-backdrop-filter: blur(8px);
|
|
|
|
|
|
}
|
|
|
|
|
|
#visitor-input {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
background: rgba(20, 16, 36, 0.9);
|
|
|
|
|
|
border: 1px solid #2a2a44;
|
|
|
|
|
|
color: #aabbdd;
|
|
|
|
|
|
font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
min-height: 44px;
|
|
|
|
|
|
border-radius: 3px;
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
transition: border-color 0.2s, box-shadow 0.4s;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
#visitor-input::placeholder { color: #333355; }
|
|
|
|
|
|
#visitor-input:focus { border-color: #4466aa; }
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#visitor-input.session-active {
|
|
|
|
|
|
border-color: #22aa66;
|
|
|
|
|
|
box-shadow: 0 0 10px #22aa6630, inset 0 0 4px #22aa6618;
|
|
|
|
|
|
animation: session-pulse 3s ease-in-out infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
@keyframes session-pulse {
|
|
|
|
|
|
0%, 100% { box-shadow: 0 0 10px #22aa6630, inset 0 0 4px #22aa6618; }
|
|
|
|
|
|
50% { box-shadow: 0 0 22px #22aa6670, inset 0 0 8px #22aa6630; }
|
|
|
|
|
|
}
|
|
|
|
|
|
#visitor-input.session-active::placeholder { color: #226644; }
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#send-btn {
|
|
|
|
|
|
background: rgba(30, 40, 80, 0.9);
|
|
|
|
|
|
border: 1px solid #2a2a44;
|
|
|
|
|
|
color: #5577aa;
|
|
|
|
|
|
font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
width: 44px; height: 44px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
transition: background 0.15s, border-color 0.15s, color 0.15s;
|
|
|
|
|
|
display: flex; align-items: center; justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
#send-btn:hover, #send-btn:active {
|
|
|
|
|
|
background: rgba(50, 70, 140, 0.9);
|
|
|
|
|
|
border-color: #4466aa;
|
|
|
|
|
|
color: #88aadd;
|
|
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#send-btn:disabled { opacity: 0.35; cursor: not-allowed; }
|
2026-03-18 22:15:46 -04:00
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
/* ── Payment panel (right side) ───────────────────────────────────── */
|
2026-03-18 21:20:51 -04:00
|
|
|
|
#payment-panel {
|
|
|
|
|
|
position: fixed; top: 0; right: -420px;
|
|
|
|
|
|
width: 400px; height: 100%;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: rgba(5, 3, 12, 0.97);
|
|
|
|
|
|
border-left: 1px solid #1a1a2e;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
padding: 24px 20px;
|
|
|
|
|
|
overflow-y: auto; z-index: 100;
|
|
|
|
|
|
font-family: 'Courier New', monospace;
|
|
|
|
|
|
transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
2026-03-18 22:15:46 -04:00
|
|
|
|
box-shadow: -8px 0 32px rgba(40, 60, 120, 0.15);
|
2026-03-18 21:20:51 -04:00
|
|
|
|
}
|
|
|
|
|
|
#payment-panel.open { right: 0; }
|
|
|
|
|
|
#payment-panel h2 {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
font-size: 13px; letter-spacing: 3px; color: #6688bb;
|
|
|
|
|
|
text-shadow: 0 0 10px #2244aa;
|
|
|
|
|
|
margin-bottom: 20px; border-bottom: 1px solid #1a1a2e; padding-bottom: 10px;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
}
|
|
|
|
|
|
#payment-close {
|
|
|
|
|
|
position: absolute; top: 16px; right: 16px;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: transparent; border: 1px solid #1a1a2e;
|
|
|
|
|
|
color: #333355; font-family: 'Courier New', monospace;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
font-size: 16px; width: 28px; height: 28px;
|
|
|
|
|
|
cursor: pointer; transition: color 0.2s, border-color 0.2s;
|
|
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#payment-close:hover { color: #6688bb; border-color: #4466aa; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
/* ── Session panel (left side) ────────────────────────────────────── */
|
|
|
|
|
|
#session-panel {
|
|
|
|
|
|
position: fixed; top: 0; left: -420px;
|
|
|
|
|
|
width: 400px; height: 100%;
|
|
|
|
|
|
background: rgba(3, 8, 5, 0.97);
|
|
|
|
|
|
border-right: 1px solid #0e2318;
|
|
|
|
|
|
padding: 24px 20px;
|
|
|
|
|
|
overflow-y: auto; z-index: 100;
|
|
|
|
|
|
font-family: 'Courier New', monospace;
|
|
|
|
|
|
transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
|
|
|
box-shadow: 8px 0 32px rgba(10, 50, 25, 0.20);
|
|
|
|
|
|
}
|
|
|
|
|
|
#session-panel.open { left: 0; }
|
|
|
|
|
|
#session-panel h2 {
|
|
|
|
|
|
font-size: 13px; letter-spacing: 3px; color: #33bb77;
|
|
|
|
|
|
text-shadow: 0 0 10px #116633;
|
|
|
|
|
|
margin-bottom: 20px; border-bottom: 1px solid #0e2318; padding-bottom: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
#session-close {
|
|
|
|
|
|
position: absolute; top: 16px; right: 16px;
|
|
|
|
|
|
background: transparent; border: 1px solid #0e2318;
|
|
|
|
|
|
color: #226644; font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 16px; width: 28px; height: 28px;
|
|
|
|
|
|
cursor: pointer; transition: color 0.2s, border-color 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
#session-close:hover { color: #44dd88; border-color: #22aa66; }
|
|
|
|
|
|
|
|
|
|
|
|
/* Amount presets */
|
|
|
|
|
|
.session-amount-presets {
|
|
|
|
|
|
display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.session-amount-btn {
|
|
|
|
|
|
background: transparent; border: 1px solid #0e2318;
|
|
|
|
|
|
color: #226644; font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 11px; letter-spacing: 1px; padding: 5px 11px;
|
|
|
|
|
|
cursor: pointer; transition: all 0.15s; border-radius: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.session-amount-btn:hover { background: #0e2318; border-color: #22aa66; color: #44dd88; }
|
|
|
|
|
|
.session-amount-btn.active { background: #0e2318; border-color: #22aa66; color: #44dd88; }
|
|
|
|
|
|
|
2026-03-19 04:00:00 +00:00
|
|
|
|
/* QR placeholder */
|
|
|
|
|
|
.qr-placeholder {
|
|
|
|
|
|
display: flex; align-items: center; justify-content: center;
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
background: #020806; border: 1px solid #0e2318;
|
|
|
|
|
|
color: #1a4430; font-size: 11px; letter-spacing: 3px;
|
|
|
|
|
|
height: 80px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
/* Amount number inputs */
|
|
|
|
|
|
.session-amount-input {
|
|
|
|
|
|
background: #020806; border: 1px solid #0e2318;
|
|
|
|
|
|
color: #44dd88; font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 15px; font-weight: bold; letter-spacing: 1px;
|
|
|
|
|
|
padding: 6px 10px; width: 110px;
|
|
|
|
|
|
outline: none; border-radius: 2px;
|
|
|
|
|
|
transition: border-color 0.2s;
|
|
|
|
|
|
-moz-appearance: textfield;
|
|
|
|
|
|
}
|
|
|
|
|
|
.session-amount-input:focus { border-color: #22aa66; }
|
|
|
|
|
|
.session-amount-input::-webkit-outer-spin-button,
|
|
|
|
|
|
.session-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }
|
|
|
|
|
|
.session-amount-row {
|
|
|
|
|
|
display: flex; align-items: center; gap: 6px; margin: 8px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.session-amount-row span {
|
|
|
|
|
|
color: #226644; font-size: 11px; letter-spacing: 1px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
/* Active session balance tag */
|
|
|
|
|
|
.amount-tag.session-green { border-color: #22aa66; color: #44dd88; }
|
|
|
|
|
|
|
|
|
|
|
|
/* Session status / error lines */
|
|
|
|
|
|
#session-status-fund,
|
|
|
|
|
|
#session-status-invoice,
|
|
|
|
|
|
#session-status-active,
|
|
|
|
|
|
#session-status-topup {
|
|
|
|
|
|
font-size: 11px; margin-top: 8px; min-height: 16px; color: #22aa66;
|
|
|
|
|
|
}
|
|
|
|
|
|
#session-error {
|
|
|
|
|
|
font-size: 11px; margin-top: 8px; min-height: 16px; color: #994444;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── Shared panel primitives ──────────────────────────────────────── */
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.panel-label { font-size: 10px; letter-spacing: 2px; color: #334466; margin-bottom: 6px; margin-top: 16px; }
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#session-panel .panel-label { color: #1a4430; }
|
|
|
|
|
|
|
2026-03-18 21:20:51 -04:00
|
|
|
|
#job-input {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
width: 100%; background: #060310; border: 1px solid #1a1a2e;
|
|
|
|
|
|
color: #aabbdd; font-family: 'Courier New', monospace; font-size: 12px;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
padding: 10px; resize: vertical; min-height: 90px;
|
|
|
|
|
|
outline: none; transition: border-color 0.2s;
|
|
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#job-input:focus { border-color: #4466aa; }
|
|
|
|
|
|
#job-input::placeholder { color: #1a1a2e; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
|
|
|
|
|
.panel-btn {
|
|
|
|
|
|
width: 100%; margin-top: 12px;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: transparent; border: 1px solid #334466;
|
|
|
|
|
|
color: #5577aa; font-family: 'Courier New', monospace;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
font-size: 12px; letter-spacing: 2px; padding: 10px;
|
|
|
|
|
|
cursor: pointer; transition: all 0.2s;
|
|
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.panel-btn:hover:not(:disabled) { background: #334466; color: #aabbdd; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
.panel-btn:disabled { opacity: 0.35; cursor: not-allowed; }
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.panel-btn.primary { border-color: #4466aa; color: #7799cc; }
|
|
|
|
|
|
.panel-btn.primary:hover:not(:disabled) { background: #4466aa; color: #fff; }
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
.panel-btn.primary-green { border-color: #22aa66; color: #44dd88; }
|
|
|
|
|
|
.panel-btn.primary-green:hover:not(:disabled) { background: #22aa66; color: #000; }
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.panel-btn.danger { border-color: #663333; color: #995555; }
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
.panel-btn.muted { border-color: #0e2318; color: #226644; }
|
|
|
|
|
|
.panel-btn.muted:hover:not(:disabled) { background: #0e2318; color: #44dd88; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
#job-status { font-size: 11px; margin-top: 8px; color: #5577aa; min-height: 16px; }
|
|
|
|
|
|
#job-error { font-size: 11px; margin-top: 4px; min-height: 16px; color: #994444; }
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
|
|
|
|
|
.invoice-box {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: #060310; border: 1px solid #1a1a2e;
|
|
|
|
|
|
padding: 10px; margin-top: 8px; font-size: 10px; color: #334466;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
word-break: break-all; max-height: 80px; overflow-y: auto;
|
|
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#session-panel .invoice-box {
|
|
|
|
|
|
background: #020806; border-color: #0e2318; color: #1a4430;
|
|
|
|
|
|
}
|
2026-03-18 21:20:51 -04:00
|
|
|
|
.copy-row { display: flex; gap: 8px; margin-top: 6px; align-items: stretch; }
|
|
|
|
|
|
.copy-row .invoice-box { flex: 1; margin-top: 0; }
|
|
|
|
|
|
.copy-btn {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: transparent; border: 1px solid #1a1a2e; color: #334466;
|
|
|
|
|
|
font-family: 'Courier New', monospace; font-size: 10px;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
padding: 0 10px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
|
|
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.copy-btn:hover { border-color: #4466aa; color: #6688bb; }
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#session-panel .copy-btn { border-color: #0e2318; color: #1a4430; }
|
|
|
|
|
|
#session-panel .copy-btn:hover { border-color: #22aa66; color: #44dd88; }
|
|
|
|
|
|
|
2026-03-18 21:20:51 -04:00
|
|
|
|
.amount-tag {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
display: inline-block; background: #0a0820;
|
|
|
|
|
|
border: 1px solid #334466; color: #6688bb;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
font-size: 16px; font-weight: bold; letter-spacing: 2px;
|
|
|
|
|
|
padding: 6px 14px; margin-top: 8px;
|
|
|
|
|
|
}
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
#session-panel .amount-tag {
|
|
|
|
|
|
background: #020806; border-color: #22aa66; color: #44dd88;
|
|
|
|
|
|
}
|
2026-03-18 21:20:51 -04:00
|
|
|
|
#job-result {
|
2026-03-18 22:15:46 -04:00
|
|
|
|
background: #060310; border: 1px solid #1a1a2e;
|
|
|
|
|
|
color: #aabbdd; padding: 12px; font-size: 12px;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
line-height: 1.6; margin-top: 8px;
|
|
|
|
|
|
white-space: pre-wrap; max-height: 260px; overflow-y: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
.panel-link {
|
|
|
|
|
|
display: block; text-align: center; margin-top: 20px;
|
2026-03-18 22:15:46 -04:00
|
|
|
|
font-size: 10px; letter-spacing: 1px; color: #1a1a2e;
|
2026-03-18 21:20:51 -04:00
|
|
|
|
text-decoration: none; transition: color 0.2s;
|
|
|
|
|
|
}
|
2026-03-18 22:15:46 -04:00
|
|
|
|
.panel-link:hover { color: #5577aa; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ── WebGL recovery overlay ──────────────────────────────────────── */
|
|
|
|
|
|
#webgl-recovery-overlay {
|
|
|
|
|
|
display: none; position: fixed; inset: 0; z-index: 200;
|
|
|
|
|
|
background: rgba(5, 3, 12, 0.92);
|
|
|
|
|
|
justify-content: center; align-items: center;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
#webgl-recovery-overlay .recovery-text {
|
|
|
|
|
|
color: #5577aa; font-family: 'Courier New', monospace;
|
|
|
|
|
|
font-size: 15px; letter-spacing: 3px;
|
|
|
|
|
|
animation: ctx-blink 1.2s step-end infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
@keyframes ctx-blink {
|
|
|
|
|
|
0%, 100% { opacity: 1; }
|
|
|
|
|
|
50% { opacity: 0.2; }
|
|
|
|
|
|
}
|
2026-03-19 19:27:13 +00:00
|
|
|
|
|
|
|
|
|
|
/* ── Timmy identity card ──────────────────────────────────────────── */
|
|
|
|
|
|
#timmy-id-card {
|
|
|
|
|
|
position: fixed; bottom: 80px; right: 16px;
|
|
|
|
|
|
font-size: 10px; color: #334466;
|
|
|
|
|
|
pointer-events: all; z-index: 10;
|
|
|
|
|
|
text-align: right; line-height: 1.8;
|
|
|
|
|
|
}
|
|
|
|
|
|
#timmy-id-card .id-label {
|
|
|
|
|
|
letter-spacing: 2px; color: #223355;
|
|
|
|
|
|
text-transform: uppercase; font-size: 9px;
|
|
|
|
|
|
}
|
|
|
|
|
|
#timmy-id-card .id-npub {
|
|
|
|
|
|
color: #4466aa; cursor: pointer;
|
|
|
|
|
|
text-decoration: underline dotted;
|
|
|
|
|
|
font-size: 10px; letter-spacing: 0.5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
#timmy-id-card .id-npub:hover { color: #88aadd; }
|
|
|
|
|
|
#timmy-id-card .id-zaps { color: #556688; font-size: 9px; }
|
2026-03-18 21:01:13 -04:00
|
|
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<div id="hud">
|
|
|
|
|
|
<h1>THE WORKSHOP</h1>
|
|
|
|
|
|
<div id="fps">FPS: --</div>
|
|
|
|
|
|
<div id="active-jobs">JOBS: 0</div>
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<div id="session-hud">
|
|
|
|
|
|
<span id="session-hud-balance">Balance: -- sats</span>
|
|
|
|
|
|
<a href="#" id="session-hud-topup">⚡ Top Up</a>
|
|
|
|
|
|
</div>
|
2026-03-18 21:01:13 -04:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<div id="connection-status">OFFLINE</div>
|
|
|
|
|
|
<div id="event-log"></div>
|
|
|
|
|
|
|
2026-03-19 19:27:13 +00:00
|
|
|
|
<!-- ── Timmy identity card ────────────────────────────────────────── -->
|
|
|
|
|
|
<div id="timmy-id-card">
|
|
|
|
|
|
<div class="id-label">TIMMY IDENTITY</div>
|
|
|
|
|
|
<div class="id-npub" id="timmy-npub" title="Click to copy Timmy's Nostr npub">…</div>
|
|
|
|
|
|
<div class="id-zaps" id="timmy-zap-count">⚡ 0 zaps sent</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<!-- ── Top action buttons ─────────────────────────────────────────── -->
|
|
|
|
|
|
<div id="top-buttons">
|
|
|
|
|
|
<button id="open-panel-btn">⚡ SUBMIT JOB</button>
|
|
|
|
|
|
<button id="open-session-btn">⚡ FUND SESSION</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ── Low balance notice (above input bar) ───────────────────────── -->
|
|
|
|
|
|
<div id="low-balance-notice">
|
|
|
|
|
|
⚡ Low balance —
|
|
|
|
|
|
<button id="topup-quick-btn">Top Up</button>
|
|
|
|
|
|
</div>
|
2026-03-18 21:01:13 -04:00
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<!-- ── Input bar ──────────────────────────────────────────────────── -->
|
|
|
|
|
|
<div id="input-bar">
|
|
|
|
|
|
<input type="text" id="visitor-input" placeholder="Say something to Timmy…" autocomplete="off" autocorrect="off" spellcheck="false" />
|
|
|
|
|
|
<button id="send-btn" aria-label="Send">→</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<!-- ── Payment panel (right side) ────────────────────────────────── -->
|
2026-03-18 21:20:51 -04:00
|
|
|
|
<div id="payment-panel">
|
|
|
|
|
|
<button id="payment-close">✕</button>
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<h2>⚡ TIMMY — JOB SUBMISSION</h2>
|
2026-03-18 21:20:51 -04:00
|
|
|
|
|
|
|
|
|
|
<div data-step="input">
|
|
|
|
|
|
<div class="panel-label">YOUR REQUEST</div>
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<textarea id="job-input" maxlength="500" placeholder="Ask Timmy anything… (max 500 chars)"></textarea>
|
2026-03-18 21:20:51 -04:00
|
|
|
|
<button class="panel-btn primary" id="job-submit-btn">CREATE JOB →</button>
|
|
|
|
|
|
<a class="panel-link" href="/api/ui" target="_blank">Open full UI ↗</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div data-step="eval-invoice" style="display:none">
|
|
|
|
|
|
<div class="panel-label">EVAL FEE</div>
|
|
|
|
|
|
<div class="amount-tag" id="eval-amount">10 sats</div>
|
|
|
|
|
|
<div class="panel-label" style="margin-top:12px">LIGHTNING INVOICE</div>
|
|
|
|
|
|
<div class="copy-row">
|
|
|
|
|
|
<div class="invoice-box" id="eval-payment-request"></div>
|
|
|
|
|
|
<button class="copy-btn" onclick="_timmyCopy('eval-payment-request')">COPY</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span id="eval-hash" data-hash=""></span>
|
|
|
|
|
|
<button class="panel-btn primary" id="pay-eval-btn">⚡ SIMULATE PAYMENT</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div data-step="work-invoice" style="display:none">
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<div class="panel-label">WORK FEE</div>
|
2026-03-18 21:20:51 -04:00
|
|
|
|
<div class="amount-tag" id="work-amount">-- sats</div>
|
|
|
|
|
|
<div class="panel-label" style="margin-top:12px">LIGHTNING INVOICE</div>
|
|
|
|
|
|
<div class="copy-row">
|
|
|
|
|
|
<div class="invoice-box" id="work-payment-request"></div>
|
|
|
|
|
|
<button class="copy-btn" onclick="_timmyCopy('work-payment-request')">COPY</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span id="work-hash" data-hash=""></span>
|
|
|
|
|
|
<button class="panel-btn primary" id="pay-work-btn">⚡ SIMULATE PAYMENT</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div data-step="result" style="display:none">
|
|
|
|
|
|
<div class="panel-label" id="result-label">AI RESULT</div>
|
|
|
|
|
|
<pre id="job-result"></pre>
|
|
|
|
|
|
<button class="panel-btn" id="new-job-btn" style="margin-top:16px">← NEW JOB</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-18 22:15:46 -04:00
|
|
|
|
<div id="job-status"></div>
|
|
|
|
|
|
<div id="job-error"></div>
|
2026-03-18 21:20:51 -04:00
|
|
|
|
</div>
|
|
|
|
|
|
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<!-- ── Session panel (left side) ─────────────────────────────────── -->
|
|
|
|
|
|
<div id="session-panel">
|
|
|
|
|
|
<button id="session-close">✕</button>
|
|
|
|
|
|
<h2>⚡ TIMMY — SESSION</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step: fund — choose deposit amount -->
|
|
|
|
|
|
<div data-session-step="fund">
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<div class="panel-label">DEPOSIT AMOUNT (200–10,000 sats)</div>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<div class="session-amount-presets">
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="200">200</button>
|
|
|
|
|
|
<button class="session-amount-btn active" data-sats="500">500</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="1000">1000</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="2000">2000</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="5000">5000</button>
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<button class="session-amount-btn" data-sats="10000">10k</button>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
</div>
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<div class="session-amount-row">
|
|
|
|
|
|
<input type="number" id="session-amount-input" class="session-amount-input"
|
|
|
|
|
|
min="200" max="10000" value="500" step="1" />
|
|
|
|
|
|
<span>sats</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<button class="panel-btn primary-green" id="session-create-btn" style="margin-top:12px">START SESSION →</button>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<div id="session-status-fund"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step: invoice — pay the deposit -->
|
|
|
|
|
|
<div data-session-step="invoice" style="display:none">
|
|
|
|
|
|
<div class="panel-label">DEPOSIT AMOUNT</div>
|
|
|
|
|
|
<div class="amount-tag" id="session-invoice-amount">-- sats</div>
|
2026-03-19 04:00:00 +00:00
|
|
|
|
<div class="panel-label" style="margin-top:14px">SCAN OR COPY INVOICE</div>
|
|
|
|
|
|
<div class="qr-placeholder" id="session-invoice-qr">[ QR ]</div>
|
|
|
|
|
|
<div class="copy-row" style="margin-top:6px">
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<div class="invoice-box" id="session-invoice-pr"></div>
|
|
|
|
|
|
<button class="copy-btn" onclick="_timmyCopy('session-invoice-pr')">COPY</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span id="session-invoice-hash" data-hash="" style="display:none"></span>
|
|
|
|
|
|
<button class="panel-btn primary-green" id="session-pay-btn" style="margin-top:14px">⚡ SIMULATE PAYMENT</button>
|
|
|
|
|
|
<div id="session-status-invoice"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step: active — session running, show balance + topup -->
|
|
|
|
|
|
<div data-session-step="active" style="display:none">
|
|
|
|
|
|
<div class="panel-label">BALANCE</div>
|
|
|
|
|
|
<div class="amount-tag session-green" id="session-active-amount">-- sats</div>
|
|
|
|
|
|
<p style="font-size:10px;color:#1a4430;margin-top:14px;line-height:1.6;letter-spacing:1px">
|
|
|
|
|
|
TYPE IN THE INPUT BAR TO ASK TIMMY.<br>EACH REQUEST DEDUCTS FROM YOUR BALANCE.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<button class="panel-btn muted" id="session-topup-btn" style="margin-top:20px">⚡ TOP UP BALANCE</button>
|
|
|
|
|
|
<div id="session-status-active"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step: topup — choose topup amount and pay -->
|
|
|
|
|
|
<div data-session-step="topup" style="display:none">
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<div class="panel-label">TOPUP AMOUNT (200–10,000 sats)</div>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<div class="session-amount-presets">
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="200">200</button>
|
|
|
|
|
|
<button class="session-amount-btn active" data-sats="500">500</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="1000">1000</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="2000">2000</button>
|
|
|
|
|
|
<button class="session-amount-btn" data-sats="5000">5000</button>
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<button class="session-amount-btn" data-sats="10000">10k</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="session-amount-row">
|
|
|
|
|
|
<input type="number" id="session-topup-input" class="session-amount-input"
|
|
|
|
|
|
min="200" max="10000" value="500" step="1" />
|
|
|
|
|
|
<span>sats</span>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
</div>
|
Task #23: Workshop session mode UI — fund once, ask many (all review issues fixed)
## Changes
### the-matrix/js/session.js (new module)
- Full session lifecycle: create → invoice → deposit poll → active → request → topup → restore
- Presets + number input for deposit (200–10,000 sats) and topup amounts; reads from input on submit
- Input validation: 200–10,000 sats range enforced in JS before API call
- Auto-closes panel after deposit payment confirms (closePanel in _startDepositPolling success branch)
- Low-balance condition fixed: `isSessionActive()` (covers both 'active' and 'paused') not just `active`
- HUD: updates `#session-hud-balance` span with "Balance: X sats"; `#session-hud-topup` link clickable
- Topup reads from `#session-topup-input` number field, same validation
- localStorage restore: validates session via GET, restores macaroon + balance + UI state on reload
- Expired/401 sessions: clears storage, resets all UI
- Request in-flight guard prevents double-submit; send button disabled during request
### the-matrix/js/ui.js
- `setSessionSendHandler(fn)` — override input bar submit when session active
- `setInputBarSessionMode(active, placeholder)` — green border + placeholder swap
- `send()` routes to session handler when set, falls back to WS visitor_message
### the-matrix/index.html
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` with `#session-hud-balance` span + `#session-hud-topup` link (pointer-events: all)
- `#session-panel` (left slide-in): fund / invoice / active / topup steps
- Fund + topup steps each have preset buttons AND a number input (200–10k range)
- Added 10k preset button to both step grids
- `#visitor-input.session-active` green pulse border animation (3s keyframe)
- `#low-balance-notice` strip above input bar with inline Top Up button
- CSS: `.session-amount-input` green styled, spin buttons hidden; `.session-amount-row` flex layout
- CSS: `.primary-green` / `.muted` panel button variants for session panel theme
### the-matrix/js/main.js
- Import + call `initSessionPanel()` in firstInit block
## Verification
- npm run build: clean (0 errors, 15 modules)
- Testkit: 27/27 PASS (session tests 11–16, 22 all green)
2026-03-19 03:56:34 +00:00
|
|
|
|
<button class="panel-btn primary-green" id="session-topup-create-btn" style="margin-top:12px">CREATE TOPUP INVOICE →</button>
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
|
|
|
|
|
|
<div id="session-topup-pr-row" style="display:none">
|
2026-03-19 04:00:00 +00:00
|
|
|
|
<div class="panel-label" style="margin-top:14px">SCAN OR COPY INVOICE</div>
|
|
|
|
|
|
<div class="qr-placeholder" id="session-topup-qr">[ QR ]</div>
|
|
|
|
|
|
<div class="copy-row" style="margin-top:6px">
|
Task #23: Workshop session mode UI — fund once, ask many
## What was done
- **`the-matrix/js/session.js`** (new module): Full session mode UI lifecycle:
- Create session flow: amount presets → POST /api/sessions → deposit invoice step
- Deposit payment: stub simulate → 2s polling until state=active
- macaroon + sessionId stored in localStorage (`timmy_session_v1`)
- Request submission: intercepts input bar when session active → POST /api/sessions/:id/request
→ Timmy speech bubble shows result, balance updates in HUD
- Low-balance (< 50 sats): paused state, low-balance notice shown, topup quick-button
- Topup flow: preset amount → POST /api/sessions/:id/topup → topup invoice → stub pay → poll
- Restore from localStorage on page reload: validates session via GET, restores full UI state
- Session expiry / 401 macaroon rejection: clears storage, resets to unfunded state
- **`the-matrix/js/ui.js`**: Added `setSessionSendHandler(fn)` + `setInputBarSessionMode(active, placeholder)` exports; send() routes to session handler when active, falls back to WS visitor_message
- **`the-matrix/index.html`**:
- `#top-buttons` flex container: "⚡ SUBMIT JOB" (blue) + "⚡ FUND SESSION" (teal) side-by-side
- `#session-hud` balance line in HUD (green, hidden until session active)
- `#session-panel` left-side slide-in panel: fund / invoice / active / topup steps
- `.session-amount-btn` presets (200, 500, 1000, 2000, 5000 sats) with active state
- `#visitor-input.session-active` CSS: green border + 3s pulse keyframe animation
- `#low-balance-notice` strip above input bar with Top Up quick-button
- `.primary-green` / `.muted` panel button variants for session panel theme
- `#session-panel` inherits shared `.panel-btn`, `.invoice-box`, `.copy-btn` with green overrides
- **`the-matrix/js/main.js`**: Import + call `initSessionPanel()` in firstInit block
## Verification
- `npm run build` in the-matrix → clean build (0 errors)
- Full testkit: 27/27 PASS (all session tests 11–16, 22 still green)
2026-03-19 03:50:34 +00:00
|
|
|
|
<div class="invoice-box" id="session-topup-pr"></div>
|
|
|
|
|
|
<button class="copy-btn" onclick="_timmyCopy('session-topup-pr')">COPY</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span id="session-topup-hash" data-hash="" style="display:none"></span>
|
|
|
|
|
|
<button class="panel-btn primary-green" id="session-topup-pay-btn" style="margin-top:10px">⚡ SIMULATE TOPUP</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="session-status-topup"></div>
|
|
|
|
|
|
<button class="panel-btn muted" id="session-back-btn" style="margin-top:10px">← BACK</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="session-error"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-18 21:01:13 -04:00
|
|
|
|
<div id="webgl-recovery-overlay">
|
|
|
|
|
|
<span class="recovery-text">GPU context lost — recovering...</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="module" src="./js/main.js"></script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|