You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ab2f677
Browse filesBrowse the repository at this point in the historyBrowse files
Add staff player movement, session by session, on the map (#94)
* Add staff movement history from CoreProtect pings
Admins and the owner can read where a player went, or where everyone went,
in a window of up to 7 days (one player) or 24 hours (everyone), from
co_session's logins, logouts and once-a-minute pings. Reads are batched
newest first so no statement holds CoreProtect's read lock for long; a
window too big for one answer says from when it is complete. Every view is
audited as player.movement.view, without positions.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Show player movement on the map in the staff panel
A Movement panel on each player's profile draws their path on the live
map's tiles over a chosen window, with a slider (and play) for where they
were at a moment, and /admin/movement shows everyone at once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Document movement in the CoreProtect README
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Hold online players' last sighting and draw paths in map-contrasting colours
At the newest moment the latest ping can be up to a minute old, so the map
showed everyone as not seen. A player now stays at their last sighting for
two ping intervals unless they logged out. Paths fade violet to orange, hues
the terrain does not use, over a dark edge.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Count only the window, keep the slider in it, and pick everyone's lead-in per player
The row before the window now only places the player as it opens: paths,
framing and totals are clipped to the window. A refresh that moves the window
past the slider's moment clamps it. Everyone's row before the window is
chosen per player across all their CoreProtect ids, so a logout under one id
is not undone by an older ping under another.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Match CoreProtect UUIDs in any case and keep half-edited end dates out of live mode
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Let the staff movement maps zoom in to single blocks
The site map stops at 16 times its fitted scale, about one screen pixel per
block in the staff panel. useMapViewport takes an optional maxDisplayScale
that raises the cap for one viewport; the movement maps allow 12 screen
pixels per block. The site map is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Give sessions ids and serve one session's movement
/sessions rows carry an opaque id (their login row) and the last observed
point. GET /admin/players/{uuid}/sessions/{id}/movement returns that session
and its rows from login through logout, or up to the next login, or now
while it is open; an id that is not the player's, or no longer found, is
404 session_gone. Movement answers carry as_of.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Rebuild staff movement around sessions, clear time ranges and an inspected moment
Agreed with Astra over two design rounds. Each player gets a full movement
page, linked from a card on their profile:
- Sessions (default) or a time range. Session rows say only what the
record shows: Logged out, Probably online · last observed, Last observed ·
logout not recorded, End unknown.
- From and To are always filled in and applied together, with quick
ranges, an explicit Keep up to date, and the span and time zone spelled out.
Local times the clocks skip or repeat are refused.
- The map labels where the trail starts and ends (Logged in / First
observation shown, Logged out / Last observation shown), marks direction,
dims what comes after the inspected moment, shows recorded positions solid
and estimates hollow, and has a legend, a scale bar, an incident pin and
buttons to fit the trail or go to the inspected position. It frames a new
selection once, not on refresh.
- A timeline shows observed bands, unobserved gaps and the span before any
observations; the inspected moment can be typed, dragged, clicked on a dot,
or stepped between observations, with wording for recorded, estimated,
unobserved, last-seen and not-observed moments, and a teleport command to
copy for recorded ones.
- The whole view lives in the URL, and Copy link freezes a live range.
The everyone page gets the same controls, a searchable player list with
selection, positions as of the inspected moment, and links that carry the
range, moment and pin to a player's page. The distance figure is gone: the
pings cannot support it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep the movement views' query in the URL without navigating; scroll long session lists
Ticking a player or dragging the timeline went through the Next.js router,
a navigation per change that lagged by up to half a second. The query now
changes through the native history API, which Next.js keeps useSearchParams
in step with. Long session lists scroll on their own, and the everyone
timeline gives each of up to eight drawn players their own row.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Fix framing, following, stepping and accessibility in the movement views
From Astra's review of the rebuilt pages:
- A new selection is framed only once its own answer is in, not against the
previous trail.
- Following an open session stops on a new selection or a recorded end;
following a range no longer overwrites From and To while they are edited.
- Previous/next observation steps only between recorded rows; the point
made up where a clipped path meets the range's edge is never a dot or an
observation label.
- Only selected is kept in the URL, so copied links show the same players.
- The timeline shows keyboard focus and reads out its moment; controls and
checkboxes keep 44 px targets.
- Local times that repeat when the clocks change are caught for any size of
change, and day ticks stay on local midnight across one.
- On phones the scale bar sits clear of the legend and labels near the
right edge turn to the left.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep a row on a range's edge as recorded, and hourly ticks on the hour after a half-hour clock change
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Stop Safari's date boxes running into the buttons beside them
Safari draws a date and time box at its own width, past a narrow box, so
Inspect time ran under Previous observation. Date boxes drop the native
appearance so they keep to the width given, and the inspect box has its own
row with the step buttons together below it. Checked in WebKit at phone,
tablet and desktop widths.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Sort the players list by character name, and give its search box a row of its own
The search box shared a row with the sort buttons and was squeezed to a few
letters on narrower screens. It now spans the page with a search icon and a
clear button, and the sort buttons sit below it under "Sort by". Players
can be sorted by character name (their first alphabetically; those without
one last), and on narrow screens their characters show under their name.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Show both a player's Discord handle and their server nickname
Links made before handles were checked stored the server nickname in
discord_username ("Justin"), which the staff panel showed as a handle. The
nickname now has its own column, discord_nickname:
- On upgrade, a stored name that is not shaped like a handle moves there and
the handle is cleared, so the bot's fill or the player's next sign-in
stores the real one.
- Website sign-in stores the nickname from the member record Discord
already returns, and the bot may send discord_nickname with usernames.
- The profile shows Discord (the handle) and Server nickname; the players
list shows both, searches both, and sorts by handle, else nickname.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Say what could not be logged without naming chat, now that movement is audited too
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Skip a nickname that is not valid instead of clearing the stored one
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0 commit comments