feat: complete server-backed six-lesson app and trial tooling
Frontend CI / unit (test, type-check, build) (push) Successful in 1m11s
Frontend CI / browser E2E (frontend + pinned backend) (push) Failing after 2m48s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-12 14:40:37 +03:30
co-authored by Cursor
parent 653f1b0c5a
commit e3f0457dc9
73 changed files with 3792 additions and 395 deletions
@@ -0,0 +1,28 @@
import { api } from '@/api/client'
import { StaleSessionError } from '@/api/errors'
import type { GoldLandProgressResponse } from '../types/goldLand.types'
/** Monotonic seq so an older in-flight progress response cannot overwrite a newer one (same session). */
let progressRequestSeq = 0
let lastCommittedProgressSeq = 0
let progressEpoch = 0
export function resetGoldLandProgressSync(): void {
progressRequestSeq = 0
lastCommittedProgressSeq = 0
progressEpoch += 1
}
export async function fetchGoldLandProgress(): Promise<GoldLandProgressResponse> {
const epochAtStart = progressEpoch
const seq = ++progressRequestSeq
const data = await api.getGoldLandProgress()
if (epochAtStart !== progressEpoch) {
throw new StaleSessionError()
}
if (seq < lastCommittedProgressSeq) {
throw new StaleSessionError()
}
lastCommittedProgressSeq = seq
return data
}