aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.ts
AgeCommit message (Collapse)Author
5 daysReplace cookies with localStorageOsmium Sorcerer
Cookies's use case is to store persistent data and send it to the server in subsequent requests, such as to remember logged-in sessions. WebAO is using them to store site settings like ad-hoc hash tables that require parsing and serialization. As a nasty side-effect of how cookies work, clients send all their settings every time they connect to the server. Server has absolutely no use for them, but each client sends them anyway, which is an uncalled-for privacy leak. Remove this mechanism entirely, switch to localStorage which serves exactly the purpose of per-origin store with data that never leaves the browser.
5 daysGuess WSS, not WS, if the schema isn't setOsmium Sorcerer
5 daysChange image extension priorityOsmium Sorcerer
Sometimes, WebP icons won't load despite extensions.json clearly defining it as the only extension used for all image data. I suspect there's a race condition between fetching extensions.json, parsing it into client, and checking what extension we should use to get character icons during loading. Sometimes it correctly loads images, sometimes it falls back and starts requesting PNG instead. I couldn't precisely identify where it happens and what's the root cause. As a workaround, this commit instead makes WebP the first-priority extension and a fallback.
5 daysRemove CH-sending timerOsmium Sorcerer
CH is an application-level keepalive packet that clients periodically send for two reasons: 1. It tells the server they're still connected, preventing timeouts. 2. By measuring latency between sending CH and receiving CHECK, a client can display ping. Keepalive is redundant because WebSocket can handle that via PING frames on a transport layer. WebAO also completely ignores CHECK and sends CH every five seconds, which is superfluous (AO2 Client sends it once every 45 seconds, in comparison). Sending CH via `setInterval` was also problematic: browsers seem to throttle it when the tab becomes inactive, preventing periodic pings and leading to the server disconnecting inactive browser clients.
2026-04-06Merge pull request #298 from AttorneyOnline/reconnectstonedDiscord
Add reconnect UI
2026-04-01Enable auto pick area and charDavid Skoland
2026-03-28remove UI related changesDavid Skoland
2026-03-24Add Connected and Disconnected noticesDavid Skoland
2026-03-24Add reconnect UI, disconnect button, and visual cleanupDavid Skoland
- Redesign disconnect overlay as a full-screen modal with dark backdrop - Add working Reconnect button that properly re-establishes WebSocket connection - Add Disconnect button in Settings for testing - Separate disconnect and ban/kick codepaths (no reconnect on ban) - Log disconnect notice in IC log using hrtext style - Refactor area list rendering from client state (renderAreaList) - Extract appendICNotice for reusable IC log notices - Clean up charselect: hide during loading, simplify toolbar layout - Freshen loading screen and charselect styling - Remove loading progress text updates (just show "Loading...") - Guard against undefined client.chars and client.serv Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10Refactor playerlist to state-driven rendering with renderPlayerListDavid Skoland
handlePR and handlePU now only update client.playerlist state, and renderPlayerList handles all DOM rendering from that state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Prefetch char.ini for characters present in area via playerlistDavid Skoland
Store player data (charId, area) in an in-memory Map on the client, updated by PR/PU packet handlers. Use this to eagerly load char.ini when a player's character appears in our area or when switching areas, eliminating the lazy-load delay on first IC message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2025-09-28move extension fetch after ASSstonedDiscord
2025-09-03remove failed manifestostonedDiscord
2025-09-03defaults needed to pass teststonedDiscord
2025-09-03move upstonedDiscord
2025-09-03also get backgroundsstonedDiscord
2025-09-03emotionsstonedDiscord
2025-09-03fetch emstonedDiscord
2025-09-03get list of extensions to try from hoststonedDiscord
2025-06-26kinda annoyingstonedDiscord
2024-12-24get rid of loggingstonedDiscord
2024-12-24Prettified Code!stonedDiscord
2024-12-24fix connection errorsstonedDiscord
2024-11-20Prettified Code!stonedDiscord
2024-08-31hide out of area playersstonedDiscord
2024-08-08more off by onestonedDiscord
2024-02-01make https error easier to understandstonedDiscord
not that it's gonna help much....
2023-12-08remove close()stonedDiscord
2023-12-06fix singleplayerstonedDiscord
2023-12-02Merge pull request #203 from Troid-Tech/adjust-connect-timeoutstonedDiscord
Add connect timeout
2023-11-29merge master into masterstonedDiscord
2023-11-22Also log the error itself on errorDavid Skoland
2023-11-22Set timeout to connecting to server to 5 secondsDavid Skoland
2023-11-22Add client stateDavid Skoland
It's very useful to know the state of client, whether it's connected or properly joined.
2023-11-22Add clause for checking ws in httpsDavid Skoland
2023-11-20somewhat backward compatibleDavid Skoland
2023-11-20Change client to use connection stringDavid Skoland
2023-11-13Add serverName to queryParamsDavid Skoland
2023-11-13Remove unused things in client.tsDavid Skoland
2023-11-13FormattingDavid Skoland
2023-11-13Use URLSearchParams and set default directlyDavid Skoland
2023-09-20autoformat with eslintstonedDiscord
2023-04-10spammy loggingstonedDiscord
2023-04-10Merge branch 'master' into packet-handlerstonedDiscord
2023-04-10send ID after IDstonedDiscord
2023-04-10new packet handlerstonedDiscord
2023-04-10split multipacket messagesstonedDiscord
2023-02-01stop loading 25mb on every joinstonedDiscord
2022-12-11store manifest in clientstonedDiscord
2022-11-13populate the liststonedDiscord