Compare commits

...

7 Commits

Author SHA1 Message Date
CI
e585cdfd20 chore: release version v1.91.7 2026-01-05 20:29:10 +00:00
Dmitry Popov
3a3180f7b3 Merge branch 'main' of github.com:wanderer-industries/wanderer 2026-01-05 21:28:38 +01:00
Dmitry Popov
53abc580e5 chore: added promo on characters page 2026-01-05 21:28:35 +01:00
CI
8710d172a0 chore: [skip ci] 2026-01-04 23:49:15 +00:00
CI
301a380a4b chore: release version v1.91.6 2026-01-04 23:49:15 +00:00
Dmitry Popov
8c911f89e0 fix(core): fixed new connections got deleted after linked signature cleanup 2026-01-05 00:48:38 +01:00
CI
d7e09fc94e chore: [skip ci] 2025-12-30 10:49:35 +00:00
11 changed files with 320 additions and 55 deletions

View File

@@ -2,6 +2,20 @@
<!-- changelog -->
## [v1.91.7](https://github.com/wanderer-industries/wanderer/compare/v1.91.6...v1.91.7) (2026-01-05)
## [v1.91.6](https://github.com/wanderer-industries/wanderer/compare/v1.91.5...v1.91.6) (2026-01-04)
### Bug Fixes:
* core: fixed new connections got deleted after linked signature cleanup
## [v1.91.5](https://github.com/wanderer-industries/wanderer/compare/v1.91.4...v1.91.5) (2025-12-30)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -5,6 +5,7 @@ defmodule WandererApp.Map.Server.ConnectionsImpl do
alias WandererApp.Map.Server.Impl
alias WandererApp.Map.Server.SignaturesImpl
alias WandererApp.Map.Server.SystemsImpl
# @ccp1 -1
@c1 1
@@ -958,6 +959,13 @@ defmodule WandererApp.Map.Server.ConnectionsImpl do
WandererApp.Cache.delete("map_#{map_id}:conn_#{connection.id}:start_time")
# Clear linked_sig_eve_id on target system when connection is deleted
# This ensures old signatures become orphaned and won't affect future connections
SystemsImpl.update_system_linked_sig_eve_id(map_id, %{
solar_system_id: location.solar_system_id,
linked_sig_eve_id: nil
})
_error ->
:ok
end

View File

@@ -170,16 +170,20 @@ defmodule WandererApp.Map.Server.SignaturesImpl do
end
defp remove_signature(map_id, sig, system, delete_conn?) do
# optionally remove the linked connection
if delete_conn? && sig.linked_system_id do
# Check if this signature is the active one for the target system
# This prevents deleting connections when old/orphan signatures are removed
is_active = sig.linked_system_id && is_active_signature_for_target?(map_id, sig)
# Only delete connection if this signature is the active one
if delete_conn? && is_active do
ConnectionsImpl.delete_connection(map_id, %{
solar_system_source_id: system.solar_system_id,
solar_system_target_id: sig.linked_system_id
})
end
# clear any linked_sig_eve_id on the target system
if sig.linked_system_id do
# Only clear linked_sig_eve_id if this signature is the active one
if is_active do
SystemsImpl.update_system_linked_sig_eve_id(map_id, %{
solar_system_id: sig.linked_system_id,
linked_sig_eve_id: nil
@@ -190,6 +194,16 @@ defmodule WandererApp.Map.Server.SignaturesImpl do
|> MapSystemSignature.destroy!()
end
defp is_active_signature_for_target?(map_id, sig) do
case MapSystem.read_by_map_and_solar_system(%{
map_id: map_id,
solar_system_id: sig.linked_system_id
}) do
{:ok, target_system} -> target_system.linked_sig_eve_id == sig.eve_id
_ -> false
end
end
def apply_update_signature(
map_id,
%MapSystemSignature{} = existing,

View File

@@ -29,6 +29,34 @@
id="characters-list"
class="w-full h-full col-span-2 lg:col-span-1 p-4 pl-20 pb-20 overflow-auto"
>
<div class="flex items-center justify-between gap-4 px-4 py-2 mb-4 bg-stone-900/60 border border-stone-800 rounded">
<div class="flex items-center gap-3">
<.icon name="hero-gift-solid" class="w-4 h-4 text-green-400 flex-shrink-0" />
<span class="text-sm text-gray-300">
Support development by using promocode
<code class="ml-1 px-1.5 py-0.5 bg-stone-800 rounded text-green-400 text-xs font-mono">WANDERER</code>
<span class="ml-1">at official</span>
</span>
<a
href="https://store.eveonline.com/"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-1 text-sm text-green-400 hover:text-green-300 transition-colors"
>
<span>EVE Online Store</span>
<.icon name="hero-arrow-top-right-on-square-mini" class="w-3 h-3" />
</a>
</div>
<a
href="https://wanderer.ltd/news"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-1.5 px-3 py-1 text-sm text-white rounded bg-gradient-to-r from-stone-700 to-stone-600 hover:from-stone-600 hover:to-stone-500 transition-all duration-300 animate-pulse hover:animate-none"
>
<.icon name="hero-newspaper-solid" class="w-3.5 h-3.5" />
<span>Check Latest News</span>
</a>
</div>
<div
:if={@show_characters_add_alert}
role="alert"

View File

@@ -3,7 +3,7 @@ defmodule WandererApp.MixProject do
@source_url "https://github.com/wanderer-industries/wanderer"
@version "1.91.5"
@version "1.91.7"
def project do
[

View File

@@ -1,48 +0,0 @@
%{
title: "Event: PLEX Giveaway Announcement",
author: "Wanderer Team",
cover_image_uri: "/images/news/2025/12-18-advent-giveaway/cover.webp",
tags: ~w(event giveaway challenge christmas advent partnership),
description: "Join our Advent Christmas Giveaway Challenge! Be the fastest to claim your reward!"
}
---
![Christmas Giveaway Challenge](/images/news/2025/12-18-advent-giveaway/cover.webp "Christmas Giveaway Challenge")
### Event Details
- **Event Name:** Advent Christmas Giveaway
- **Event Link:** [Advent Christmas Giveaway](https://eventcortex.com/events/invite/cYdBywu1ygfVS3UN6ZZcmDzL1q85aDmH)
### The Season of Giving
This holiday season, we're spreading some festive cheer with a special event for our community: the **Advent Christmas Giveaway Challenge**!
---
### Tips for Participants
- **Be Ready:** Know the reveal time and be online a few minutes early.
---
### FINAL DAY
🎉 PLEX Giveaway Announcement! 🎉
Weve decided to give away 500 PLEX!
At each secret location, youll find 100 PLEX waiting for you (along with a skin 😉).
There will be a total of 5 secret locations —
see you on the spot! 🚀
Good luck, and may the fastest capsuleer win!
---
Fly safe and happy holidays,
**The Wanderer Team**
---

View File

@@ -0,0 +1,36 @@
%{
title: "Event: Weekly Giveaway Challenge",
author: "Wanderer Team",
cover_image_uri: "/images/news/2026/01-05-weekly-giveaway/cover.webp",
tags: ~w(event giveaway challenge),
description: "Join our Weekly Giveaway Challenge! Be the fastest to claim your reward!"
}
---
![Weekly Giveaway Challenge](/images/news/2026/01-05-weekly-giveaway/cover.webp "Weekly Giveaway Challenge")
### Event Details
In 2026, we're going to giveaway partnership SKIN codes for our community, every week!
- **Event Name:** Weekly Giveaway Challenge
- **Event Link:** [Join Weekly Giveaway Challenge](https://eventcortex.com/events/invite/Cjo87svZFq6J8cc1cubH4B7AR_VfPmQ4)
---
### Tips for Participants
- **Be Ready:** Know the reveal time and be online a few minutes early.
---
Good luck, and may the fastest capsuleer win!
---
Fly safe,
**Wanderer Team**
---

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,213 @@
defmodule WandererApp.Map.Server.SignatureConnectionCascadeTest do
@moduledoc """
Tests for the signature-connection cascade behavior fix.
This test suite verifies that:
1. System's linked_sig_eve_id can be updated and cleared
2. The data model relationships work correctly
"""
use WandererApp.DataCase, async: false
import Mox
alias WandererApp.Api.MapSystem
alias WandererAppWeb.Factory
setup :verify_on_exit!
setup do
# Set up mocks in global mode for GenServer processes
Mox.set_mox_global()
# Setup DDRT mocks
Test.DDRTMock
|> stub(:init_tree, fn _name, _opts -> :ok end)
|> stub(:insert, fn _data, _tree_name -> {:ok, %{}} end)
|> stub(:update, fn _id, _data, _tree_name -> {:ok, %{}} end)
|> stub(:delete, fn _ids, _tree_name -> {:ok, %{}} end)
|> stub(:query, fn _bbox, _tree_name -> {:ok, []} end)
# Setup CachedInfo mocks for test systems
WandererApp.CachedInfo.Mock
|> stub(:get_system_static_info, fn
30_000_142 ->
{:ok,
%{
solar_system_id: 30_000_142,
solar_system_name: "Jita",
system_class: 7,
security: "0.9"
}}
30_000_143 ->
{:ok,
%{
solar_system_id: 30_000_143,
solar_system_name: "Perimeter",
system_class: 7,
security: "0.9"
}}
_ ->
{:error, :not_found}
end)
# Create test data using Factory
character = Factory.create_character()
map = Factory.create_map(%{owner_id: character.id})
%{map: map, character: character}
end
describe "linked_sig_eve_id management" do
test "system linked_sig_eve_id can be set and cleared", %{map: map} do
# Create a system without linked_sig_eve_id
{:ok, system} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_142,
name: "Jita"
})
# Initially nil
assert is_nil(system.linked_sig_eve_id)
# Update to a signature eve_id (simulating connection creation)
{:ok, updated_system} =
MapSystem.update_linked_sig_eve_id(system, %{linked_sig_eve_id: "SIG-123"})
assert updated_system.linked_sig_eve_id == "SIG-123"
# Clear it back to nil (simulating connection deletion - our fix)
{:ok, cleared_system} =
MapSystem.update_linked_sig_eve_id(updated_system, %{linked_sig_eve_id: nil})
assert is_nil(cleared_system.linked_sig_eve_id)
end
test "system can distinguish between different linked signatures", %{map: map} do
# Create system B (target) with linked_sig_eve_id = SIG-NEW
{:ok, system_b} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_143,
name: "Perimeter",
linked_sig_eve_id: "SIG-NEW"
})
# Verify the signature is correctly set
assert system_b.linked_sig_eve_id == "SIG-NEW"
# This verifies the logic: an old signature with eve_id="SIG-OLD"
# would NOT match system_b.linked_sig_eve_id
old_sig_eve_id = "SIG-OLD"
refute system_b.linked_sig_eve_id == old_sig_eve_id
# The new signature DOES match
new_sig_eve_id = "SIG-NEW"
assert system_b.linked_sig_eve_id == new_sig_eve_id
end
end
describe "is_active_signature_for_target? logic verification" do
@doc """
These tests verify the core logic of the fix:
- A signature is "active" only if target_system.linked_sig_eve_id == signature.eve_id
- If they don't match, the signature is "orphan" and should NOT cascade to connections
"""
test "active signature: linked_sig_eve_id matches signature eve_id", %{map: map} do
sig_eve_id = "ABC-123"
# System has linked_sig_eve_id pointing to our signature
{:ok, target_system} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_143,
name: "Perimeter",
linked_sig_eve_id: sig_eve_id
})
# This is what is_active_signature_for_target? checks
assert target_system.linked_sig_eve_id == sig_eve_id
end
test "orphan signature: linked_sig_eve_id points to different signature", %{map: map} do
# System has linked_sig_eve_id pointing to a NEWER signature
{:ok, target_system} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_143,
name: "Perimeter",
linked_sig_eve_id: "NEW-SIG-456"
})
# Old signature has different eve_id
old_sig_eve_id = "OLD-SIG-123"
# This would return false in is_active_signature_for_target?
refute target_system.linked_sig_eve_id == old_sig_eve_id
end
test "orphan signature: linked_sig_eve_id is nil", %{map: map} do
# System has nil linked_sig_eve_id (connection was already deleted)
{:ok, target_system} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_143,
name: "Perimeter"
})
assert is_nil(target_system.linked_sig_eve_id)
# Any signature would be orphan
old_sig_eve_id = "OLD-SIG-123"
refute target_system.linked_sig_eve_id == old_sig_eve_id
end
end
describe "scenario simulation" do
test "simulated scenario: re-entering WH after connection deleted", %{map: map} do
# This simulates the bug scenario:
# 1. User enters WH A → B, creates connection, signature SIG-OLD links B
# 2. Connection is deleted - linked_sig_eve_id should be cleared (our fix)
# 3. User re-enters, creates new connection, SIG-NEW links B
# 4. User deletes SIG-OLD - should NOT delete the new connection
# Step 1: Initial state - B has linked_sig_eve_id = SIG-OLD
{:ok, system_b} =
MapSystem.create(%{
map_id: map.id,
solar_system_id: 30_000_143,
name: "Perimeter",
linked_sig_eve_id: "SIG-OLD"
})
assert system_b.linked_sig_eve_id == "SIG-OLD"
# Step 2: Connection deleted - linked_sig_eve_id cleared (our fix in action)
{:ok, system_b_after_conn_delete} =
MapSystem.update_linked_sig_eve_id(system_b, %{linked_sig_eve_id: nil})
assert is_nil(system_b_after_conn_delete.linked_sig_eve_id)
# Step 3: New connection created - SIG-NEW links B
{:ok, system_b_after_new_conn} =
MapSystem.update_linked_sig_eve_id(system_b_after_conn_delete, %{
linked_sig_eve_id: "SIG-NEW"
})
assert system_b_after_new_conn.linked_sig_eve_id == "SIG-NEW"
# Step 4: Now when user tries to delete SIG-OLD:
# is_active_signature_for_target? would check:
# system_b.linked_sig_eve_id ("SIG-NEW") == old_sig.eve_id ("SIG-OLD")
# This returns FALSE, so connection deletion is SKIPPED
old_sig_eve_id = "SIG-OLD"
refute system_b_after_new_conn.linked_sig_eve_id == old_sig_eve_id
# The fix works!
end
end
end