Commit graph

90 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
4e73a5d07d docs: add suitbuilder algorithm documentation
Describes the full search pipeline, item loading, bucket creation,
armor reduction, scoring weights, and constraint satisfaction logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:01:25 +00:00
erik
ede333ed2e feat: add Healing and Summoning cantrip constraints to suitbuilder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:57:11 +00:00
erik
fc557ab1d5 feat: update inventory frontend and services to current production state 2026-03-07 08:37:32 +00:00
erik
7050cfb8b7 feat: add missing legendary cantrips to suitbuilder
Add Dual Wield, Recklessness, Deception, Sneak Attack, and Dirty Fighting cantrips to both the HTML checkbox UI and the COMMON_CANTRIPS JS array for lock form dropdowns.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-04 16:16:52 +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
749652d534 feat: add single-item upsert/delete endpoints and container/slot columns
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:43:58 +00:00
erik
664bd50388 feat: handle inventory_delta messages and broadcast to browsers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:41:02 +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
45cedd0ec9 Add plugin character stats streaming implementation plan
4-task plan covering WebSocket send method, CharacterStats.cs data
collection class, PluginCore wiring (ServerDispatch, timer, login),
and end-to-end testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:32:41 +00:00
erik
9c91ed0afb Add plugin character stats streaming design document
Design for adding character_stats event to MosswartMassacre plugin,
covering data collection from CharacterFilter API, network message
interception for allegiance/luminance, and 10-minute timer send.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:30:37 +00:00
erik
10bb6c30dd Add AC game UI replica styling for character stats window
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:12:45 +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
ab9f86d7a6 Add character_stats table for persistent character data storage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:59:49 +00:00
erik
a824451365 Add character stats window implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:57:07 +00:00
erik
7d52ac2fe4 Add character stats window design document
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:52:32 +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
3d0a0b33a3 Add script.js cleanup implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:58:30 +00:00
erik
87bf7b7189 Add script.js code review and cleanup design document
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:55:06 +00:00
erik
850cd62d7b Update suitbuilder documentation to reflect production-ready status
- Replace outdated CLAUDE.md suitbuilder section with concise production-ready summary
- Remove incorrect claims about spell system not being implemented
- Create detailed architecture document at docs/plans/2026-02-09-suitbuilder-architecture.md
- Document spell bitmap system, locked slots, suit summary, and SSE streaming
- Add future enhancement roadmap (spell improvements, new builders, advanced features)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:44:00 +00:00
erik
e0265e261c Add suitbuilder backend improvements and SSE streaming fix
- Add dedicated streaming proxy endpoint for real-time suitbuilder SSE updates
- Implement stable sorting with character_name and name tiebreakers for deterministic results
- Refactor locked items to locked slots supporting set_id and spell constraints
- Add Mag-SuitBuilder style branch pruning tracking variables
- Enhance search with phase updates and detailed progress logging
- Update design document with SSE streaming proxy fix details

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 19:14:07 +00:00
erik
8e70f88de1 Add suitbuilder UI improvements for locked slots and suit summary
- Expand locked item spell selection to include weapon skills, magic skills, and defenses
- Preserve locked slot configuration when selecting different suits
- Add clear button (x) to individual equipment slots for granular control
- Add suit summary section below equipment slots with copy-to-clipboard functionality

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 19:11:37 +00:00
erik
0fd539bedf Fix suitbuilder early termination and add armor level scoring
Bug fixes:
- Remove "TEMPORARY FIX" that stopped search after finding first suit
- Add armor level as lowest-priority tiebreaker in scoring

Scoring formula now:
- Set completion: +1000 per complete set
- Missing pieces: -200 penalty each
- Crit damage: +10/20 per item
- Damage rating (clothes): +10/20/30
- Spell coverage: +100 per fulfilled spell
- Base item score: +5 per item
- Armor level: +1 per 100 AL (tiebreaker)

Updated design doc with audit findings - most features were already
working correctly. The magsuitalgo.md analysis was outdated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:04:22 +00:00
erik
45987cfc39 Add suitbuilder design document for structured implementation
Design doc covers:
- Problem statement and priority order (sets > spells > armor)
- Algorithm overview (bucket-based search with backtracking)
- Current implementation state (what works, what's broken)
- Step-by-step implementation plan with verification criteria

This document enables consistent progress across multiple sessions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:58:52 +00:00
erik
25e5dd32a4 Remove unused scripts and add missing modules to inventory-service
Removed from git (moved to unused/inventoryservice locally):
- extract_*.py scripts (one-time enum extraction tools)
- init_db.py, debug_ratings.py, test_suitbuilder*.py
- Old JSON outputs superseded by comprehensive_enum_database_v2.json

Added previously untracked required files:
- helpers.py (shared enum state for suitbuilder)
- suitbuilder.py (equipment optimization router)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:47:51 +00:00
erik
8cae94d87d Add client-side spell column sorting and improve inventory search
- Implement client-side sorting for all columns including spell_names
- Add computed_spell_names CTE for server-side sort fallback
- Add resizable columns with localStorage persistence
- Add Cloak slot detection by name pattern
- Increase items limit to 50000 for full inventory loading
- Increase proxy timeout to 60s for large queries
- Remove pagination (all items loaded at once for sorting)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:32:54 +00:00
erik
25980edf99 Add CSS styles for DOM optimization and adjust sidebar layout
- Widen sidebar from 340px to 400px for better readability
- Increase player item gap and padding for improved spacing
- Add .grid-content and .buttons-container styles for element pooling

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:11:51 +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
42d5dab319 fixed correct counting of kills 2026-01-20 21:43:21 +00:00
erik
c7ba4f18bc fixed dual messages in discord 2026-01-20 21:41:33 +00:00
erik
6adb88e0b1 fixed DB issue 2025-09-25 19:32:59 +00:00
erik
e6db0f094c Fixed error portal insert 2025-09-23 20:13:35 +00:00
erik
fbb6f61705 Updated README.md 2025-09-22 18:25:07 +00:00
erik
6c646719dd reduced duplicate insert errors of portals, still present because of two players disovering the same portal at the same time, other changes to inventory 2025-09-22 18:21:04 +00:00
erik
e7ca39318f Fix score-based ordering in suitbuilder frontend
Updated JavaScript to maintain score ordering during streaming search:
- Replace addSuitToResults() with insertSuitInScoreOrder()
- Add regenerateResultsDisplay() to maintain proper DOM ordering
- Medal assignment (🥇🥈🥉) now based on score ranking, not arrival order
- Suits with highest scores now always appear at top during live search
- Updated displaySuitResults() to sort by score before displaying

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 20:02:01 +00:00
erik
4d19e29847 major fixes for inventory 2025-07-02 10:29:36 +00:00
erik
00ef1d1f4b Now with sawato life chat 2025-06-25 08:50:08 +00:00