feat: poll server for exploration claimability instead of client-side check #127

Closed
opened 2026-03-24 11:04:09 -07:00 by hikari · 0 comments
Owner

Enhancement

Description

Currently, the client determines whether an exploration is claimable by comparing the local clock against the stored endsAt timestamp. This can cause a desync where the "Collect Results" button appears before the server considers the exploration complete, resulting in a 400 error.

Proposed Solution

Replace the client-side claimability check with server polling:

  1. Client continues to use endsAt for the countdown display timer as normal
  2. Once timeRemaining <= 0, the client begins polling the server on each tick to check if the exploration is claimable
  3. The "Collect Results" button only appears after the server confirms the exploration is ready to claim

This makes the server the single source of truth for claimability and eliminates the client/server desync entirely.

Notes

  • Polling should only begin after timeRemaining <= 0 to avoid unnecessary server requests during active countdowns
  • A new lightweight endpoint (or an additional field on an existing one) may be needed for the claimability check

Related

User feedback: "Collect Results" button shows but clicking returns 400 — Exploration is not yet complete.


This issue was created with help from Hikari~ 🌸

## Enhancement ### Description Currently, the client determines whether an exploration is claimable by comparing the local clock against the stored `endsAt` timestamp. This can cause a desync where the "Collect Results" button appears before the server considers the exploration complete, resulting in a 400 error. ### Proposed Solution Replace the client-side claimability check with server polling: 1. **Client continues to use `endsAt`** for the countdown display timer as normal 2. **Once `timeRemaining <= 0`**, the client begins polling the server on each tick to check if the exploration is claimable 3. **The "Collect Results" button only appears** after the server confirms the exploration is ready to claim This makes the server the single source of truth for claimability and eliminates the client/server desync entirely. ### Notes - Polling should only begin after `timeRemaining <= 0` to avoid unnecessary server requests during active countdowns - A new lightweight endpoint (or an additional field on an existing one) may be needed for the claimability check ### Related User feedback: "Collect Results" button shows but clicking returns `400 — Exploration is not yet complete`. --- ✨ This issue was created with help from Hikari~ 🌸
naomi closed this issue 2026-03-24 13:20:37 -07:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#127