From 873946a1a66fec955f34f577d75544682bc1db3e Mon Sep 17 00:00:00 2001 From: guarzo Date: Fri, 5 Sep 2025 01:15:18 +0000 Subject: [PATCH 1/5] fix: removed wormhole only logic error --- .../widgets/WSystemKills/WSystemKills.tsx | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx index 82a56575..0b8f6566 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx @@ -17,8 +17,6 @@ const SystemKillsContent = () => { const [systemId] = selectedSystems || []; - const systemStaticInfo = getSystemStaticInfo(systemId)!; - const { kills, isLoading, error } = useSystemKills({ systemId, outCommand, @@ -30,15 +28,26 @@ const SystemKillsContent = () => { const showLoading = isLoading && kills.length === 0; const filteredKills = useMemo(() => { - if (!settingsKills.whOnly || !settingsKills.showAll) return kills; - return kills.filter(kill => { - if (!systemStaticInfo) { - console.warn(`System with id ${kill.solar_system_id} not found.`); - return false; + if (!settingsKills.whOnly) return kills; + + const whBySystem = new Map(); + const wormholeKills = kills.filter(kill => { + const id = Number(kill.solar_system_id); + let isWH = whBySystem.get(id); + if (isWH === undefined) { + const info = getSystemStaticInfo(id); + if (!info || info.system_class == null) { + isWH = false; + } else { + isWH = isWormholeSpace(Number(info.system_class)); + } + whBySystem.set(id, isWH); } - return isWormholeSpace(systemStaticInfo.system_class); + return isWH; }); - }, [kills, settingsKills.whOnly, systemStaticInfo, settingsKills.showAll]); + + return wormholeKills; + }, [kills, settingsKills.whOnly]); if (!isSubscriptionActive) { return ( From cf1c103a46513f4fe3b39a198ce7b7b751cbe6aa Mon Sep 17 00:00:00 2001 From: guarzo Date: Wed, 17 Sep 2025 15:50:26 +0000 Subject: [PATCH 2/5] fix: pr feedback --- .../widgets/WSystemKills/WSystemKills.tsx | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx index 0b8f6566..8d6b00fd 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx @@ -16,6 +16,21 @@ const SystemKillsContent = () => { } = useMapRootState(); const [systemId] = selectedSystems || []; + const whCacheRef = useMemo(() => new Map(), []); + + const isWormholeSystem = useCallback( + (systemId: number): boolean => { + const cached = whCacheRef.get(systemId); + if (cached !== undefined) return cached; + + const info = getSystemStaticInfo(systemId); + const isWH = info?.system_class != null ? isWormholeSpace(Number(info.system_class)) : false; + + whCacheRef.set(systemId, isWH); + return isWH; + }, + [whCacheRef], + ); const { kills, isLoading, error } = useSystemKills({ systemId, @@ -30,24 +45,10 @@ const SystemKillsContent = () => { const filteredKills = useMemo(() => { if (!settingsKills.whOnly) return kills; - const whBySystem = new Map(); - const wormholeKills = kills.filter(kill => { - const id = Number(kill.solar_system_id); - let isWH = whBySystem.get(id); - if (isWH === undefined) { - const info = getSystemStaticInfo(id); - if (!info || info.system_class == null) { - isWH = false; - } else { - isWH = isWormholeSpace(Number(info.system_class)); - } - whBySystem.set(id, isWH); - } - return isWH; - }); + const wormholeKills = kills.filter(kill => isWormholeSystem(Number(kill.solar_system_id))); return wormholeKills; - }, [kills, settingsKills.whOnly]); + }, [kills, settingsKills.whOnly, isWormholeSystem]); if (!isSubscriptionActive) { return ( From ab7e47b91fcb3479f46b66e14536e56815d5a4ac Mon Sep 17 00:00:00 2001 From: guarzo Date: Thu, 18 Sep 2025 06:18:23 +0000 Subject: [PATCH 3/5] pr feedback --- .../mapInterface/widgets/WSystemKills/WSystemKills.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx index 8d6b00fd..f9be34df 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx @@ -44,10 +44,7 @@ const SystemKillsContent = () => { const filteredKills = useMemo(() => { if (!settingsKills.whOnly) return kills; - - const wormholeKills = kills.filter(kill => isWormholeSystem(Number(kill.solar_system_id))); - - return wormholeKills; + return kills.filter(kill => isWormholeSystem(Number(kill.solar_system_id))); }, [kills, settingsKills.whOnly, isWormholeSystem]); if (!isSubscriptionActive) { From cf20be8a77500e451a0212fadb526f53d05097c4 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 24 Sep 2025 16:38:54 +0000 Subject: [PATCH 4/5] chore: release version v1.78.1 --- CHANGELOG.md | 11 +++++++++++ mix.exs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e5f6c..59875928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ +## [v1.78.1](https://github.com/wanderer-industries/wanderer/compare/v1.78.0...v1.78.1) (2025-09-24) + + + + +### Bug Fixes: + +* pr feedback + +* removed wormhole only logic error + ## [v1.78.0](https://github.com/wanderer-industries/wanderer/compare/v1.77.19...v1.78.0) (2025-09-23) diff --git a/mix.exs b/mix.exs index 0a95f63b..31be0a79 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule WandererApp.MixProject do @source_url "https://github.com/wanderer-industries/wanderer" - @version "1.78.0" + @version "1.78.1" def project do [ From e69a8fece583655170650739ae1d1242b75f68b9 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 24 Sep 2025 16:38:54 +0000 Subject: [PATCH 5/5] chore: [skip ci]