Commit Graph
2247 Commits
Author SHA1 Message Date
CI 36ced18c8f chore: [skip ci] 2026-08-17 10:44:12 +00:00
CI ce9ac6245e chore: release version v1.101.13 v1.101.13 2026-08-17 10:44:12 +00:00
Dmitry Popov a8fe4c4b65 Merge pull request #657 from guarzo/fix/restore-location-tracking-on-map-entry
fix(tracker): random loss of tracking, only fixed by relogging in EVE
2026-08-17 12:43:41 +02:00
CI 76ced2ead2 chore: [skip ci] 2026-08-16 21:58:41 +00:00
CI 1ad02af474 chore: release version v1.101.12 v1.101.12 2026-08-16 21:58:41 +00:00
Dmitry Popov 1abfe80194 Merge pull request #659 from SzesciennaGeometria/lazydelete-coloring-bug
fix(signatures): lazydelete rows coloring on signatures removal
2026-08-16 23:58:10 +02:00
SzesciennaGeometria 44459ae8f8 Merge branch 'wanderer-industries:main' into lazydelete-coloring-bug 2026-08-16 15:34:52 +02:00
szesciennageometria 29d289555d missed cleanup 2026-08-16 14:52:11 +02:00
szesciennageometria 309a0a9427 fixed re-paste bug while lazy delete is in-progress + code cleanup 2026-08-16 14:48:55 +02:00
szesciennageometria 37f3b29d2f fixed coloring two systems red with same signature when removing sigs from one of them 2026-08-16 14:09:58 +02:00
Guarzo af2a265c71 fix(tracker): characters stop moving on the map after a browser disconnect
maybe_start_location_tracking/2 matched %{track_location: true} in the
track_settings argument. No caller passes that key -- all five call sites
send %{map_id: _, track: true | false} -- so the clause never matched and
the function could not turn location tracking on. maybe_start_ship_tracking/2
had the identical defect.

Match on the state's active_maps instead: a character on at least one map
should be polling their location.

Without this, a character is stranded by an event they never initiated. When
a browser's presence lapses past the grace period the character is untracked
server-side, active_maps empties, and maybe_stop_tracking/2 clears
track_location. The character is still online in EVE throughout, and the only
other writer -- update_online/1 -- is gated on an online-status transition
that a character who stays logged in never produces. So the browser
reconnecting cannot restore it. update_location/1 then falls through to its
catch-all on every tick, and the character stops moving on the map while
every liveness signal keeps reporting healthy.

This is why #620 reports that toggling tracking off and on does not help but
relogging in EVE does: toggling routes through the dead clause, while
relogging produces the online transition that restores the flag as a side
effect.

Fixes #620
2026-08-11 19:56:05 +00:00
CI f1c1988e29 chore: [skip ci] 2026-08-11 09:33:03 +00:00
CI 7939b8e99f chore: release version v1.101.11 v1.101.11 2026-08-11 09:33:03 +00:00
Dmitry Popov f64d34ff95 Merge pull request #637 from guarzo/fix/map-character-location-tracking
fix(test): repair 8 never-passing character location tracking tests
2026-08-11 11:32:25 +02:00
CI e5f577d93a chore: [skip ci] 2026-08-10 21:40:25 +00:00
CI 592f3149de chore: release version v1.101.10 v1.101.10 2026-08-10 21:40:25 +00:00
Dmitry Popov e1b722a391 Merge pull request #643 from guarzo/devcontainer-improvements
chore(devcontainer): fix broken dev container and modernize the setup
2026-08-10 23:39:34 +02:00
CI e606c76241 chore: [skip ci] 2026-08-10 21:35:34 +00:00
CI b0c45ba08d chore: release version v1.101.9 v1.101.9 2026-08-10 21:35:34 +00:00
Dmitry Popov 22d79a9c33 Merge pull request #636 from guarzo/worktree-ci-fork-pr-comment
ci: post PR test comment via workflow_run to fix fork PR failures
2026-08-10 23:34:56 +02:00
CI 3a463458e4 chore: [skip ci] 2026-08-10 21:33:26 +00:00
CI 6daa80cce6 chore: release version v1.101.8 v1.101.8 2026-08-10 21:33:26 +00:00
Dmitry Popov 0f947a323d Merge pull request #627 from ryanrolds/include_no_passage_chars_in_activity
Include characters that haven't passaged in user activity API
2026-08-10 23:28:46 +02:00
Guarzo d30fce4dc4 review: make the devcontainer work on a clean checkout
Track an empty no-op docker-compose.override.yml (with a .gitignore negation)
so devcontainer.json's compose file list resolves without the initializeCommand
hack, which is removed. Add USER_UID/USER_GID build args and drop the sudo
chown from setup.sh. Correct the Elixir pin comment: the OTP suffix pins only
the major, so the Erlang patch may still differ from .tool-versions.
2026-08-08 17:05:42 -04:00
Guarzo 2c5164229e review: address pre-submit checklist findings
Corrections from the upstream pre-submit review pass.
2026-08-08 17:05:42 -04:00
Guarzo a3777b390a fix(test): address upstream review findings
- correct the Jita/Hek comment to match the systems the tests actually use
- document the sandbox contract on IntegrationCase and make shared mode an
  explicit opt-in that is reverted on exit
- drop the blanket rescue around Sandbox.allow/4: it returns
  {:already, :owner | :allowed} rather than raising, so the rescue only
  masked genuine infrastructure faults
- use Cache.insert/3 and document the :online option
2026-08-08 16:56:57 -04:00
Guarzo 4c9935ad7e chore(devcontainer): fix broken dev container and modernize the setup
The dev container did not come up cleanly. This fixes the correctness
problems and fills in the missing developer ergonomics.

Correctness fixes:

* Erlang/OTP: base image was elixir:1.17-otp-27, but .tool-versions
  pins erlang 26.2.5.5 / elixir 1.17.3-otp-26. Switched to
  elixir:1.17-otp-26 so container builds match CI and local asdf.
* Postgres: bumped 13-alpine -> 16-alpine. AshPostgres declares
  min_pg_version 15 in lib/wanderer_app/repo.ex, so 13 was below the
  supported floor; 16 also matches production. The data volume is
  renamed db-new -> db-pg16 because a PG13 data directory is not
  readable by a PG16 server, so reusing the name would fail to start
  rather than upgrade.
* host.docker.internal: replaced the common-utils feature's
  networkArgs (which only applies at feature install time) with a
  plain compose extra_hosts entry.
* Dropped `apt --fix-broken install` and the duplicated
  jakebecker.elixir-ls extension id.
* setup.sh: the assets block was indented as if inside the ecto
  conditional and never ran `yarn build`. Fixed and added an explicit
  build step.
* setup.sh: chown deps/ and _build/ to the container user; they come
  from the bind mount and carry host ownership.

Non-root user:

Added a `developer` user (uid/gid 1000, passwordless sudo) instead of
running as root, so files created in the bind-mounted workspace are
owned by the host user rather than root.

Build artifacts:

Removed the elixir-artifacts named volume. A named volume mounted
inside the bind mount masks the repo's own deps/ and _build/, and only
for the main working tree — git worktrees came up empty and recompiled
from scratch. Host and container now share _build; after changing the
OTP version, `rm -rf _build` once.

Database seeding:

setup.sh now runs priv/repo/seeds.exs only when the SDE reference data
is missing, checked with `mix run --no-start` so the check does not
boot the supervision tree and its outbound pollers.

Developer experience:

* zsh + oh-my-zsh with autosuggestions/syntax highlighting, persistent
  shell history in a named volume, and mix/git aliases.
* gh CLI, ripgrep, tree, htop, lsof, git-lfs, inotify-tools.
* en_US.UTF-8 locale generated.
* post-start.sh prints environment info and checks Postgres.
* More VS Code extensions (Phoenix, Credo, GitLens, dotenv, Docker)
  and _build/deps excluded from search.
* docker-compose.override.yml.example for host-specific mounts (SSH
  keys, gh auth). The override is gitignored and auto-created empty by
  initializeCommand, so it is optional.
* .devcontainer/ added to .dockerignore so it does not invalidate
  production image build cache.
2026-08-02 15:29:52 +00:00
Guarzo 6d6029b7bf ci: pin artifact actions to Node 24 majors
The upload/download-artifact steps added in the previous commit were pinned
to @v4, which declares `runs.using: node20` and would emit the same Node 20
deprecation warning this repo is trying to clear.

Verified against upstream action.yml rather than release notes, which are
misleading here: download-artifact v5 and v6 are still node20 despite v6
being labeled a breaking "supports Node v24" release. node24 begins at
download-artifact v7 and upload-artifact v6.

upload@v4 -> v7, download@v4 -> v8 (current majors, both node24). Checked
that every input we pass still exists, and that the intervening breaking
changes do not apply: v5's path change affects downloads by artifact-id
(we download by name), v7 upload's `archive` defaults to true (we upload a
directory), and v8 download's `digest-mismatch: error` default is desirable.
2026-08-01 19:39:34 +00:00
GuarzoandClaude Opus 5 33acc374b4 fix(map): match Ash-wrapped NotFound in MapRepo.get/2
Review of the previous commit found that Ash returns NotFound wrapped
inside Ash.Error.Invalid, not as a bare struct. Verified against a live
query: `Api.Map.by_id(<missing uuid>)` returns

    {:error, %Ash.Error.Invalid{errors: [%Ash.Error.Query.NotFound{}]}}

so the bare-NotFound clause never matched. A genuinely missing map would
have propagated as a generic error and logged a spurious error line.

Match the wrapped shape as well. Confirmed `MapRepo.get/2` now returns
{:error, :not_found} for a missing map with no error log. No caller
depends on the :not_found atom specifically (all use wildcard or
with/else), so propagation of real faults is unaffected.

Also make track_character_on_map/2 clear stale per-map location caches,
mirroring TrackingUtils.track_character/4, which the helper claimed to
mirror but did not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:29:25 +00:00
Guarzo b73f9f31fe ci: post PR test comment via workflow_run to fix fork PR failures
PRs from forks receive a read-only GITHUB_TOKEN for pull_request events
regardless of the workflow's `permissions:` block, so the comment step in
test.yml failed with 403 "Resource not accessible by integration" and took
the whole job down with it. Every fork PR was red despite the test run
itself succeeding.

Split the reporting: test.yml now renders the comment body and uploads it
as an artifact, and a new pr-comment.yml posts it via workflow_run, which
runs in the base repo context with a writable token.

The render step interpolates tool output from env vars in the shell rather
than through Actions expression substitution, so tool output can no longer
inject workflow syntax. pr-comment.yml never checks out or executes PR code,
re-validates the PR number as numeric, and passes the body via body-path.

Also mirrors the report to $GITHUB_STEP_SUMMARY so it stays visible if the
follow-up workflow does not run, and fixes the empty "Updated:" timestamp
(github.event.head_commit.timestamp is unset on pull_request events).
2026-08-01 19:23:33 +00:00
GuarzoandClaude Opus 5 887769402b test(map): fix 8 failing character location tracking tests
Four independent causes, each confirmed by instrumentation rather than
inference.

1. Sandbox access. MapPool GenServers are spawned dynamically and load
   map state from the DB during init (six Task.async loaders in
   do_init_state/1). IntegrationCase's one-shot supervision-tree grant
   runs before any pool exists, and its polling monitor granted only
   mock ownership, never Ecto sandbox access -- and would lose the race
   regardless. Every loader died with DBConnection.OwnershipError.

   Fixed with an opt-in @moduletag :shared_sandbox. Shared mode is the
   only mechanism covering a process that queries immediately upon
   spawn. It is opt-in rather than a global flip because Ecto shared
   mode is node-global, and it is now reverted to :manual on exit --
   not reverting is why an earlier global-flip attempt broke
   CommonAPIControllerTest.

2. Characters were never tracked. update_characters/1 iterates
   get_tracked_character_ids/1, which needs the character in
   map.characters AND a tracking_start_time cache key. The tests set
   only presence_character_ids, which that path never reads, so the
   tracked list was empty and the whole body was a no-op. Added
   track_character_on_map/2.

3. Characters were offline. With online: false the :character_online
   handler deletes the solar_system_id cache key that
   check_location_update just wrote, so no movement was ever observed.

4. Map scopes. get_effective_scopes/1 prefers the scopes array over
   scope, and scopes defaults to [:wormholes]. The tests set only
   scope: :all, so hi-sec movement was rejected as an invalid
   connection.

Separately, these tests asserted that Jita is added to the map. Jita is
hardcoded in @prohibited_systems and can never be added, so those
assertions could never pass. Rather than weaken them, the start system
is now Hek (not prohibited), which preserves each test's intent, and a
new regression test pins the Jita prohibition itself.

Verified by set-diff against merge-base b7ddbc48 at full-suite scope
(two runs each, counts are unstable so sets were compared): zero new
failures, all 9 target failures fixed. Suite is 15 tests, 0 failures
across seeds 0, 1 and 42, with no OwnershipError and no map-start
timeout remaining.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:03:01 +00:00
GuarzoandClaude Opus 5 789d4fa884 fix(map): stop MapRepo.get/2 masking all errors as :not_found
MapRepo.get/2 flattened every error from Api.Map.by_id/1 into
{:error, :not_found}. That turned infrastructure faults into a
"map does not exist" signal: a DBConnection.OwnershipError in test
surfaced as "Failed to load map state" -> "map not loaded" ->
"Timeout waiting for map ... Check Map.Manager is running", pointing
at Map.Manager (which was running fine) instead of the real cause.

Keep the :not_found translation for a genuine Ash NotFound, and
propagate + log anything else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:03:01 +00:00
Ryan Olds 4125982936 Fixing build warning 2026-07-24 11:58:05 -07:00
Ryan R. Olds 9b9257bc95 Fixing warning 2026-07-23 12:00:47 -07:00
Ryan R. Olds 9d37cefcbe Include characters that haven't passaged in user activity API 2026-07-22 23:01:17 -07:00
CI b7ddbc486a chore: [skip ci] 2026-07-17 13:06:55 +00:00
CI 6c763a72c0 chore: release version v1.101.7 v1.101.7 2026-07-17 13:06:55 +00:00
Dmitry Popov 544467ab34 Merge pull request #609 from Drewsif/fix-dev-container
Fix: Update containers to successfully run
2026-07-17 15:06:21 +02:00
CI 14fb6dfc36 chore: [skip ci] 2026-07-17 13:05:27 +00:00
CI dbae287bdd chore: release version v1.101.6 v1.101.6 2026-07-17 13:05:27 +00:00
Dmitry Popov da5a93e498 Merge pull request #616 from guarzo/guarzo/idor-audit
fix: authorize client-supplied IDs in LiveView handlers (IDOR audit)
2026-07-17 15:04:46 +02:00
CI 09e8561a2c chore: [skip ci] 2026-07-17 13:04:14 +00:00
CI 30279e0245 chore: release version v1.101.5 v1.101.5 2026-07-17 13:04:14 +00:00
Dmitry Popov 3a40bae70b Merge pull request #619 from wanderer-industries/feat-colorblinded
Added theme for colorblinded and large theme
2026-07-17 15:03:38 +02:00
CI 1b0f8cb47d chore: [skip ci] 2026-07-09 11:28:38 +00:00
CI 61f7e90693 chore: release version v1.101.4 v1.101.4 2026-07-09 11:28:38 +00:00
Dmitry Popov dff82e8f49 Merge pull request #613 from Drewsif/fix-short-chain-hijacking
fix(mapper): Prioritize oldest parent signature time for chained bookmark indexes
2026-07-09 13:23:37 +02:00
Dmitry Popov a220d94050 Merge pull request #617 from starkythefox/fix_location_update_on_debug_logs_on
Recoverable crash on update location with debug logs on
2026-07-09 13:21:12 +02:00
Dmitry Popov 9fe27e83f5 Merge pull request #622 from Drewsif/allow-spaces-before-bookmark
fix(mapper): Preserve intentional leading spaces in bookmark name formats
2026-07-09 13:20:02 +02:00
Drew Bonasera d1c11d630e The formatBookmarkName helper function has been updated to preserve leading spaces from the input format string. The whitespace cleanup logic now extracts and retains original leading spaces, and handles whitespace-only format strings directly.
- fix(mapper): Preserve leading spaces in `formatBookmarkName` output
2026-07-06 20:31:14 -04:00