diff --git a/HANDOFF.md b/HANDOFF.md index e5cc757..9e028ec 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -48,6 +48,7 @@ Against local open-oscar-server 0.25.0 with `DISABLE_AUTH=true`, TOC listener 98 ## Current blockers / environment notes - **TOC 980 root cause (fixed 2026-12-02):** `src/toc.js` `roastPassword` incorrectly prepended `00 02` before XORing. open-oscar-server `wire.RoastTOCPassword` XORs the full payload with `Tic/Toc` and does not strip a prefix, so the extra bytes corrupted the cleartext and caused 980 on real-auth servers. Fixed by removing the prefix. Verified: local auth-enabled oscar-server and remote `oscar.claytonia.net:9898` both sign on with `steve/please` (`SIGN_ON:TOC2.0`). +- **UI overhaul (initial, 2026-12-02):** dark theme, sidebar sections as cards, conversations moved to tabs above chat window, message style toggle (Bubbles/Classic AIM-IRC) persisted in localStorage. Local static assets only, no build step. - **Web API chat unavailable on 0.25.0:** do not rely on `/chat/*` Web API endpoints on this server. TOC is the working transport for chat/invites. - **TOC is HTTP-mixed on 9898:** normal HTTP clients get 404; TOC clients must send `FLAPON\r\n\r\n` first. Any proxy in front of 9898 must pass raw TCP. - **No reliable all-users list:** Management API not exposed; `memberDir/search` returned empty. UI has direct "Start IM by screen name" flow. @@ -84,13 +85,12 @@ Against local open-oscar-server 0.25.0 with `DISABLE_AUTH=true`, TOC listener 98 ## Needs to be done next -1. **Unblock remote auth:** clear/unlock `8520258` sessions on OSCAR server; re-verify Web API and TOC login. -2. **Remote TOC e2e:** after auth fixed, test IM, chat join, invite, accept, chat send against `oscar.claytonia.net:9898` from web UI. -3. **Harden TOC client:** handle reconnect/backoff, keepalive timeout, parse CONFIG2 buddy list properly, handle TOC1/TOC2 variants, handle chat errors/room not found. -4. **Decide Web API vs TOC responsibility:** currently TOC preferred for IM/chat when connected; Web API still used for buddylist/presence/profile where it works. Make this explicit and test fallback. +1. **UI polish follow-up:** refine dark theme/tabs/cards as needed, add tab close buttons, unread indicators, chat room membership/leave/invite-send UI, better mobile layout. +2. **Harden TOC client:** handle reconnect/backoff, keepalive timeout, parse CONFIG2 buddy list properly, handle TOC1/TOC2 variants, handle chat errors/room not found. +3. **Chat UX:** show chat room membership, leave button, invite-send UI, better system messages, error states. +4. **Web API vs TOC responsibility:** currently TOC preferred for IM/chat when connected; Web API still used for buddylist/presence/profile where it works. Make this explicit and test fallback. 5. **User list UX:** no management API. Keep direct screen-name open; consider caching known buddies/recent contacts locally in browser. -6. **UI polish:** show chat room membership, leave button, invite-send UI, better system messages, error states. -7. **M5:** systemd service, env file permissions, nginx/certbot review, CSP/rate-limit review. +6. **M5:** systemd service, env file permissions, nginx/certbot review, CSP/rate-limit review. ## Files of interest diff --git a/planning.md b/planning.md index 128cfd3..29f46e2 100644 --- a/planning.md +++ b/planning.md @@ -13,6 +13,7 @@ Plan for a small browser chat client for our Open OSCAR Server, built on Node 20 - **Implementation pivot:** added `src/toc.js` (FLAP/TOC2 client) and `src/toc-session.js` (SSE bridge). Auth can log in via Web API, TOC, or both; messages/chat prefer TOC when connected. - **Remote blocker:** temp account `8520258`/`please` currently rejected by both Web API (3011) and TOC (980). Needs server-side session clear/unlock before remote e2e. - **User list:** no Management API exposed; `memberDir/search` not a reliable all-users source. UI provides direct "Start IM by screen name". +- **UI overhaul requested:** dark theme; conversations as tabs on top of chat window; left sidebar sections as cards; message style toggle (bubbles vs old-school AIM/IRC). Local static assets only, no build step. ## 1. Goal and scope diff --git a/public/app.js b/public/app.js index 327a95d..0927f58 100644 --- a/public/app.js +++ b/public/app.js @@ -264,6 +264,12 @@ document.getElementById('logoutBtn').addEventListener('click', async () => { ui.showLogin(); }); +document.getElementById('styleToggleBtn').addEventListener('click', () => { + const next = ui.getMessageStyle() === 'classic' ? 'bubbles' : 'classic'; + ui.setMessageStyle(next); + ui.renderMessages(state); +}); + document.getElementById('messageForm').addEventListener('submit', async (e) => { e.preventDefault(); ui.setChatError(''); @@ -363,6 +369,7 @@ async function loadBuddies() { async function afterLogin(screenName) { state.screenName = screenName; ui.showChat(screenName); + ui.setMessageStyle(ui.getMessageStyle()); ui.setTocStatus(false); ui.renderConversations(state); ui.renderMessages(state); diff --git a/public/index.html b/public/index.html index 99551e6..1307277 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Web OSCAR Chat - +
@@ -12,7 +12,10 @@
Web OSCAR Chat
- +
+ + +
@@ -30,13 +33,8 @@