Skip to content

Make World Observer practical at full population - #84

Merged
pmbstyle merged 1 commit into
mainfrom
agent/world-observer-map
Aug 6, 2026
Merged

Make World Observer practical at full population#84
pmbstyle merged 1 commit into
mainfrom
agent/world-observer-map

Conversation

@pmbstyle

@pmbstyle pmbstyle commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • show the full persisted bot population instead of silently capping cold bots at 700
  • replace overlapping map points with interactive clusters, viewport drill-down, search, phase filters, and a scoped roster
  • add a detailed bot inspector for current activity, vitals, equipment, combat stats, build guidance, party state, nearby actors, trade state, and runtime signals
  • preserve PK and dead-state presentation when opening bot details
  • surface Bot Info refresh failures with a retry action instead of silently falling back to stale compact data
  • refresh the Observer layout and responsive styling for the denser operational workflow

Why

The previous Observer stopped being useful at the current population size: it reported only 735 bots, points overlapped, and selecting a bot no longer exposed enough runtime context. Large cluster clicks were also blocked by the selection card overlay even though keyboard activation worked.

This change removes the snapshot cap, makes clusters explicitly drillable, keeps the roster synchronized with the opened area, and restores actionable per-bot context without adding broad telemetry streams.

Validation

  • npm test
  • npm run check (782 JavaScript files)
  • node tests/test_world_observer_pk.js
  • node --check src/WorldObserver/public/app.js
  • git diff --check
  • live browser verification with 1,766 bots: opened a 525-bot cluster by mouse, confirmed the scoped roster, and opened Bot Info with equipment, current action, and runtime signals

Summary by CodeRabbit

  • New Features

    • Added searchable, filterable actor data with clustered map points and category counts.
    • Introduced live bot details, population metrics, roster views, combat information, equipment, and responsive inspector panels.
    • Added map legends, usage hints, keyboard shortcuts, live-state indicators, and improved zoom and dragging behavior.
    • Expanded bot details with personas, builds, vitals, plans, decisions, and combat profiles.
  • Bug Fixes

    • Improved display safety, timestamp formatting, selection handling, loading states, and dead-bot status indicators.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 32211ec3-8b43-4c77-afb2-a75adce36b36

📥 Commits

Reviewing files that changed from the base of the PR and between b286c81 and 5e6f462.

📒 Files selected for processing (5)
  • src/WorldObserver/WorldObserverServer.js
  • src/WorldObserver/public/app.js
  • src/WorldObserver/public/index.html
  • src/WorldObserver/public/styles.css
  • tests/test_world_observer_pk.js

📝 Walkthrough

Walkthrough

The observer server now exposes detailed hot and cold bot data. The client adds searchable, filterable, clustered map actors, asynchronous bot inspection, population metrics, roster views, refreshed controls, and responsive styling. Tests cover PK status, cold combat data, equipment, and dead-bot state.

Changes

Observer bot details and UI

Layer / File(s) Summary
Bot detail serialization and API
src/WorldObserver/WorldObserverServer.js, tests/test_world_observer_pk.js
The server serializes expanded hot and cold bot state, exposes character-based detail lookup, returns route errors, increases snapshot retrieval, and preserves PK and dead-bot details in tests.
Map actor filtering and clustering
src/WorldObserver/public/app.js
The client adds actor normalization, search and phase filtering, scale-aware viewport handling, clustered markers, marker precedence, and accessible map interactions.
Population and bot inspector flow
src/WorldObserver/public/app.js
The client renders population metrics, rosters, actor details, cluster summaries, loading and error states, refresh updates, selection changes, keyboard actions, and scale-aware dragging.
Observer layout and responsive presentation
src/WorldObserver/public/index.html, src/WorldObserver/public/styles.css
The page adds branded controls, filters, map guidance, legends, population panels, inspector states, roster styling, combat and equipment views, and responsive layouts.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ObserverBrowser
  participant ObserverRoute
  participant botDetail
  participant HotSessions
  participant ColdPopulation
  ObserverBrowser->>ObserverRoute: GET /observer/api/bot/:characterId
  ObserverRoute->>botDetail: validate characterId and load detail
  botDetail->>HotSessions: check active hot bot
  botDetail->>ColdPopulation: load cold population state when no hot bot exists
  botDetail-->>ObserverRoute: compactHotDetail or compactColdDetail
  ObserverRoute-->>ObserverBrowser: JSON detail or not-found response
Loading

Possibly related PRs

  • pmbstyle/L2Solo#80: Exposes and serializes overlapping bot party, combat, population, and equipment state.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/world-observer-map

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/WorldObserver/public/styles.css

Parsing error: Unexpected token :


Comment @coderabbitai help to get the list of available commands.

@pmbstyle pmbstyle self-assigned this Aug 6, 2026
@pmbstyle
pmbstyle marked this pull request as ready for review August 6, 2026 21:41
@pmbstyle
pmbstyle merged commit 2520fc6 into main Aug 6, 2026
2 of 3 checks passed
@pmbstyle
pmbstyle deleted the agent/world-observer-map branch August 6, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant