Commit graph

39 commits

Author SHA1 Message Date
Erik
dc7b26676d fix: tighten mana panel layout and icon sizing
Adjust the inventory mana panel to fit beside the backpack column without overlap, prevent the panel from scrolling, shrink composite icons correctly, and refine mana-state derivation using existing item spell data.
2026-03-12 07:54:56 +01:00
Erik
63ea242167 refactor: tighten inventory mana panel layout
Move the Mana panel to the right of the backpack column, widen the inventory window, and switch to a smaller Mag-Tools-style row layout with compact icons and status dots.
2026-03-11 20:09:05 +01:00
Erik
0e8186b8e5 feat: add mana tracker panel to inventory
Derive equipped item mana state and time-remaining data in inventory-service, then render a Mana panel inside the inventory window with live icon, state, mana, and countdown display.
2026-03-11 20:02:52 +01:00
erik
fc557ab1d5 feat: update inventory frontend and services to current production state 2026-03-07 08:37:32 +00:00
erik
973c3722bc fix: address code review findings for inventory delta feature
- Fix remaining f-string SQL injection in process_inventory (same pattern
  as single-item endpoints: parameterized ANY(:ids) queries)
- Add null guard for item_id in backend delta remove handler
- Add response status logging for inventory service HTTP calls
- Fix frontend ID fallback consistency in updateInventoryLive
- Replace debug print() with logger.debug()
- Add comment for Decal Slot_Decal magic number

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:58:10 +00:00
erik
f145e6e131 feat: fix inventory service SQL injection, add slot population, and live frontend updates
- Replace f-string SQL interpolation with parameterized ANY(:ids) queries
- Populate slot column from IntValues[231735296] (Decal Slot key)
- Add startup migration to add container_id/slot columns to existing DB
- Extract createInventorySlot() for reuse by initial load and live deltas
- Add updateInventoryLive() handler for WebSocket inventory_delta messages
- Add inventory_delta case to browser WebSocket message dispatcher

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:51:20 +00:00
erik
176fb020ec Redesign character window to match TreeStats layout and style
Replace the AC stone-themed single-scroll character window with a TreeStats-
style tabbed interface. Two side-by-side tab containers: left (Attributes,
Skills, Titles) and right (Augmentations, Ratings, Other), plus an Allegiance
section below. Exact TreeStats color palette (#000022 bg, #af7a30 gold
borders, purple specialized, teal trained). Backend accepts new properties
and titles fields in character_stats message for JSONB storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:39:20 +00:00
erik
a545a8b920 Add full character window with live stats, vitals, skills, and allegiance display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:10:48 +00:00
erik
e71dfb4ec3 Add Char button to player list with stub character window
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:07:37 +00:00
erik
40198fa0cf Add centralized error handling with UI toast for user-facing errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:33:57 +00:00
erik
16861ba88a Remove redundant .slice() before .sort() in renderList
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:31:57 +00:00
erik
6f121e2a90 Optimize renderTrails to build SVG point strings directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:31:03 +00:00
erik
982bdb77e2 Add requestAnimationFrame batching for pan/zoom updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:29:40 +00:00
erik
a82e6f4856 Extract createWindow helper to deduplicate window setup code
Refactor showStatsWindow, showInventoryWindow, and showChatWindow to use
a shared createWindow() helper that handles existence checks, z-index
management, header/close button creation, and makeDraggable setup. Each
function now only contains its unique content creation logic.

Added .window-content CSS class to style.css, style-ac.css, and the
christmas theme to maintain flex layout through the new wrapper div.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:26:06 +00:00
erik
a0698753c5 Fix highlightRareFinder to use element pool instead of DOM query
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:19:13 +00:00
erik
395b7fb7ec Fix polling interval memory leak - store all interval IDs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:17:31 +00:00
erik
230f08fab8 Replace magic numbers with named constants
Add POLL_RARES_MS, POLL_KILLS_MS, POLL_HEALTH_MS, NOTIFICATION_DURATION_MS,
GLOW_DURATION_MS, MAX_HEATMAP_POINTS, and HEATMAP_HOURS constants to replace
hardcoded values throughout script.js for better maintainability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:14:56 +00:00
erik
d025e2623f Add DEBUG flag and gate console.log behind debugLog helper
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:05:41 +00:00
erik
a6fafb018a Add DOM optimization with element pooling and reuse
- Implement element pooling system for dots and list items
- Reuse DOM elements instead of recreating on each render
- Add performance tracking for element creation/reuse stats
- Change window behavior to always show (no toggle)
- Add user interaction tracking to defer renders during clicks
- Optimize render loop with O(1) player name lookup via Maps

Achieves ~5ms render time and 100% element reuse after initial render.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:00:28 +00:00
erik
4e0306cd01 Fetch total kills from API instead of calculating from online players
Total kills now comes from the /total-kills/ API endpoint which includes
ALL characters in the database, not just currently online players.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:54:34 +00:00
erik
4d19e29847 major fixes for inventory 2025-07-02 10:29:36 +00:00
erik
7ff94b59a8 fixed portals 2025-06-24 19:13:31 +00:00
erik
dffd295091 added portals, quest tracking, discord monitor etc etc 2025-06-23 19:26:44 +00:00
erik
ca12f4807b added server tracking plus server metrics 2025-06-20 07:17:01 +00:00
erik
80a0a16bab Debug and inventory 2025-06-19 17:46:19 +00:00
erik
57a2384511 added inventory service for armor and jewelry 2025-06-12 23:05:33 +00:00
erik
09a6cd4946 added epic counters 2025-06-11 08:20:57 +00:00
erik
10c51f6825 added inventory, updated DB 2025-06-10 19:21:21 +00:00
erik
f218350959 Major overhaul of db -> hypertable conversion, updated GUI, added inventory 2025-06-08 20:51:06 +00:00
erik
09404da121 new comments 2025-05-24 18:33:03 +00:00
erik
b2f649a489 New version with grafana 2025-05-23 08:11:11 +00:00
erik
c418221575 Working version with new streaming and DB 2025-05-22 15:30:45 +00:00
erik
d396942deb Chat window is now movable 2025-05-18 11:14:43 +00:00
erik
b94f064118 Alex ville ha färger på metastate för att han är en fisk 2025-05-14 09:21:19 +00:00
erik
73ae756e5c ws version with nice DB select 2025-05-09 22:35:41 +00:00
Johan Lundberg
b19568b1ab add online time and deaths to player card 2025-05-02 20:55:54 +02:00
erik
66ed711fec Alex got his trails 2025-04-30 22:04:06 +00:00
erik
39d618e0b8 Added KPH sorting 2025-04-29 23:01:04 +00:00
erik
a2089efa02 Overlord sees all 2025-04-29 22:23:34 +00:00