Exploration reset per AreaHash / Loot labels in the entity list / Inspector actions#173
Merged
Merged
Conversation
The on-map explored-% reset to 0 on every terrain change, so leaving an in-progress Atlas map for town and returning wiped the progress. Coverage state (visited buffer, counters, reachability-region flood, coarse dims) is now cached keyed by the area instance hash (area["currentAreaHash"]) and restored on re-entry; navigation re-plans from the restored visited map. Keying by hash instead of dataSize also fixes a latent bug where two runs of the same map layout shared stale visited state. Cache is capped at 24 areas with insertion-order eviction. Co-Authored-By: Claude Opus 4.8 <[email protected]>
WorldItem rows (Metadata/MiscellaneousObjects/WorldItem) now display the drop's real, rarity-colored loot label (e.g. "Cannonade Crossbow", "Gold Circlet") in the Name column instead of the generic "WorldItem". New LrvWorldItemLabel() resolves the wrapper's inner item and composes the name via the same ComposeItemDisplayName the inventory tooltip uses (base + affixes for magic/rare, unique name via ItemVisualIdentity); currency is classified rarity 5 by the /Currency/ path. Results are cached per wrapper address and reset on area change. _BuildEntitiesJson overrides displayName + rarity for WorldItems and emits a "loot" flag; the UI colors the name span by rarity (loot-0..6) like the in-game label. Path/Type columns unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Four Entity-Inspector conveniences: - Copy the metadata path to the clipboard (📋 next to Path). - Open a component's memory address in the RE → Memory Dissector (🔬 per component, via switchTab + DissectGoto). - Add the entity's full metadata path to the global junk Custom terms (🚫 next to Copy JSON). - Add the entity's meta-group as a junk pattern under a category picked from the Category row: auto-targets a category named after the meta-category (created if new), or the user picks an existing one / creates a new one. Junk Filter is now user-extensible: g_junkCatCustom holds per-category custom patterns (built-in OR user categories), g_junkUserCats holds user-created categories. New SetJunk keys catadd/catpatdel/newcat/catdel (pipe-delimited value — no control char crosses the WebView bridge); cat: enable/disable-all also flips custom patterns. Header emits custom[]+user per category; custom pills render with a delete button and user categories with a "delete category" button. Persisted in [JunkFilter] catPatterns (RS/US), same scheme as StashMover. Verified: browser-preview drive-through (rendering + catadd payloads) and an offline AHK harness (parse, IsJunkEntity match, header JSON, Save/Load round-trip of the user category + per-category patterns). Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances PoEformance’s in-game UI and AHK backend by (1) persisting exploration coverage per area instance, (2) improving entity list fidelity for ground loot, and (3) adding Entity Inspector actions plus a user-extensible Junk Filter model/UI, with accompanying version bumps.
Changes:
- Cache exploration coverage per
currentAreaHash(with bounded eviction) so town/hideout round-trips restore progress. - Resolve and display real ground-loot item labels (with rarity coloring) in the Entities list.
- Add Entity Inspector actions (copy path, open dissector, junk helpers) and extend Junk Filter to support per-category custom patterns and user-created categories.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/index.html | Adds loot-name coloring, inspector action buttons, and Junk Filter UI for custom patterns/user categories. |
| ahk/ExplorationModule.ahk | Implements per-area exploration state caching keyed by area instance hash. |
| ahk/LootRadarValue.ahk | Adds WorldItem label resolution + per-area cache for Entities list display names/rarities. |
| ahk/SnapshotSerializers.ahk | Emits loot-specific name/rarity fields for WorldItem rows and a loot flag. |
| ahk/EntityJunkFilter.ahk | Extends Junk Filter model/settings/persistence to support user categories and per-category custom patterns. |
| InGameStateMonitor.ahk | Bumps POEFORMANCE_VERSION to 0.45.13.289. |
| README.md | Updates version badge to v0.45.13.289. |
| CLAUDE.md | Updates documented version and adds detailed notes for the shipped features. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function eiCopyText(ev, text) { | ||
| ev.stopPropagation(); | ||
| if (!text) return; | ||
| try { navigator.clipboard.writeText(text); } catch (e) {} |
Comment on lines
+12676
to
+12679
| // Strip the delimiter from a user-typed name so it can't split the field. | ||
| label = ((inp && inp.value.trim()) || '').split('|').join(''); | ||
| if (!label) { if (inp) inp.focus(); return; } | ||
| key = label.toLowerCase(); |
| // User categories are deletable as a whole (built-ins are permanent). | ||
| const delCatBtn = isUser ? `<button class="filter-pill junk-catdel" data-tip="Delete this whole category" onclick="junkDelCat('${escAttr(ck)}')">🗑 delete category</button>` : ""; | ||
| const emptyNote = (!hasAny && isUser) ? `<span class="junk-cat-empty">No patterns yet — add one from an entity's Category row.</span>` : ""; | ||
| return `<details class="junk-cat"${_junkOpenCats.has(ck) ? " open" : ""} ontoggle="junkCatToggle('${ck}', this.open)">` |
Comment on lines
+64
to
+71
| ; Resolves a built-in category's display label, or "" when unknown. | ||
| _JunkBuiltinLabel(key) | ||
| { | ||
| for _, cat in _JunkFilterCategoryDefs() | ||
| if (cat["key"] = key) | ||
| return cat["label"] | ||
| return "" | ||
| } |
Comment on lines
+177
to
+183
| g_junkCatCustom[ck] := kept | ||
| (g_junkPatDisabled.Has(pat) && g_junkPatDisabled.Delete(pat)) | ||
| if (kept.Length = 0 && g_junkUserCats.Has(ck)) | ||
| { | ||
| g_junkUserCats.Delete(ck) | ||
| g_junkCatCustom.Delete(ck) | ||
| } |
imm0r
added a commit
that referenced
this pull request
Jul 8, 2026
- ui: derive a strictly-safe slug key ([a-z0-9_-]) from user-typed junk category names and sanitize the label (drop the | " ' \ angle-bracket chars), so a name can neither split the catadd fields nor break out of the inline event-handler strings the category renders into. - ui: junkCatRow renders its category key through a render-layer safeCk sanitizer, so a hand-edited INI / API-set key can't inject into ontoggle or onclick either (defense-in-depth). - ui: eiCopyText attaches a .catch() to clipboard.writeText so a rejected write can't surface as an unhandled promise rejection. - EntityJunkFilter: catpatdel now deletes the g_junkCatCustom entry when its last custom pattern is removed (built-in AND user categories), so no empty catPatterns record is persisted (fixes slow INI growth). - EntityJunkFilter: remove the unused _JunkBuiltinLabel helper. Verified: AHK /validate + UI node --check clean; offline harness confirms the emptied built-in category persists no INI record and user categories still round-trip; JS harness confirms slug/label sanitization neutralizes injection. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-area exploration-coverage cache — survive a town round-trip
Summary — The on-map explored-% no longer resets to 0 when you leave an in-progress map for town and return; coverage is now cached per area-instance hash and restored on re-entry.
Changes
ahk/ExplorationModule.ahk:115— new statics_areaKey/_areaCache/_areaOrder/_AREA_CACHE_CAP(per-area coverage cache).ahk/ExplorationModule.ahk:126— area identity now keyed byarea["currentAreaHash"]("h"-prefixed; falls back to"sz"<dataSize>), replacing the rawdataSizechange trigger.ahk/ExplorationModule.ahk:133— on area change: bank the leaving area's state (visited buffer,_totalWalkable/_visitedWalkable, full region-flood state, coarse dims), then RESTORE the entered area's cached state when itsterrainSzmatches, else fresh-init (original logic unchanged). Cache capped at 24, insertion-order evicted.InGameStateMonitor.ahk:59,CLAUDE.md:4,README.md:7— version0.45.13.286→0.45.13.287.Advices
currentAreaHash == 0(with valid terrain) briefly flips the key to"sz…"and re-inits for one tick, then restores next tick — self-correcting, safe.Entities list: ground-item loot labels
Summary — The Entities tab now shows each ground drop's real, rarity-colored loot label (e.g. "Cannonade Crossbow") in the Name column instead of the generic "WorldItem".
Changes
ahk/LootRadarValue.ahk— newLrvWorldItemLabel(wrapperAddr, areaHash, &rarityId): resolves the wrapper's inner item and composes the name via the inventory tooltip'sComposeItemDisplayName(base + affixes / unique via IVI); currency classified rarity 5 by/Currency/path. Per-wrapper cache reset on area change (g_lrvNameCache/g_lrvNameCacheHash, seeded inLoadLootRadarValue).ahk/SnapshotSerializers.ahk:_BuildEntitiesJson— capturesnamesAreaHash; for WorldItem rows overrides the Name + rarity viaLrvWorldItemLabeland emits"loot":true/false; newitemRarityNamesmap (item ids, 5=Currency).ui/index.html—.ei-c-name-txt.loot-0..6in-game color classes;eiCardcolors the name span only for loot rows (e.loot).InGameStateMonitor.ahk/CLAUDE.md/README.md— version 0.45.13.287 → 0.45.13.288.Advices
Open / Next steps
Entity Inspector actions + user-extensible Junk Filter
Summary — Four Entity-Inspector conveniences: copy path, open a component's address in the Memory Dissector, add the full path to global junk terms, and add an entity's meta-group to a junk category (auto-targeting/creating a category named after its meta-category).
Changes
ahk/EntityJunkFilter.ahk— user-extensible model:g_junkCatCustom(per-category custom patterns) +g_junkUserCats(user categories); new_ApplyJunkSettingkeyscatadd/catpatdel/newcat/catdel(|-delimited value);cat:also flips custom patterns;BuildJunkFilterHeaderJson+_JunkCatJsonemitcustom[]+user; persistence via[JunkFilter] catPatterns(RS/US).ui/index.html— inspector: Path 📋 copy (eiCopyText), Category junk picker (eiJunkPickerHtml/eiJunkAdd/eiJunkSelChange), actions "🚫 Junk (full path)" (eiAddPathCustom), per-component 🔬 dissector button (eiOpenDissect); junk box: custom pills + ✕ (junkDelCatPat), user-category delete (junkDelCat);applyJunkFromHeaderexposes_junkCatList+ counts custom patterns; new CSS.InGameStateMonitor.ahk/CLAUDE.md/README.md— version 0.45.13.288 → 0.45.13.289.Advices
|(safe in paths/keys/labels); user-typed names are|-stripped.IsJunkEntitymatching is unchanged (case-insensitive substring), so added patterns hide entities across radar/list/trees/exports/AutoPilot.