hikari cfcf763ce3
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m8s
fix: use server-computed endsAt for exploration timer to prevent clock drift (#68)
## Summary

- Exploration timers showed more time than the area's stated duration when the server clock was ahead of the client's
- The timer was derived from `startedAt = endsAt - durationMs`, then computed as `durationSeconds - (clientNow - startedAt) / 1000` — any server/client clock skew directly inflated the result
- Now stores `endsAt` (the server-computed completion timestamp) directly in `ExplorationAreaState` and computes the timer as `(endsAt - Date.now()) / 1000`, which is immune to clock drift
- Old saves without `endsAt` fall back gracefully to the previous `startedAt`-based calculation

## Test plan

- [ ] Start a new exploration — timer should show exactly the area's stated duration (no more "1h area shows 1h15m")
- [ ] Refresh the page mid-exploration — timer should resume from the correct remaining time (using server-anchored `endsAt`)
- [ ] Old saves with `startedAt` but no `endsAt` should still display a timer via the fallback path

Closes #53

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #68
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-18 17:09:48 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00
2025-07-14 21:17:39 -07:00

New Repository Template

This template contains all of our basic files for a new GitHub repository. There is also a handy workflow that will create an issue on a new repository made from this template, with a checklist for the steps we usually take in setting up a new repository.

If you're starting a Node.JS project with TypeScript, we have a specific template for that purpose.

Readme

Delete all of the above text (including this line), and uncomment the below text to use our standard readme template.

S
Description
An Idle RPG in the browser
Readme 4.8 MiB
v0.5.0 Latest
2026-04-06 20:19:56 -07:00
Languages
TypeScript 95.2%
CSS 4.3%
JavaScript 0.4%