step 7.3: done
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
> - Keep Session Log entries to one or two lines.
|
||||
|
||||
## Current Focus
|
||||
- **Phase:** 7
|
||||
- **Step:** 7.3
|
||||
- **Phase:** 8
|
||||
- **Step:** 8.1
|
||||
- **Blocked?** No
|
||||
- **Last verified working command:** `npm test` — 151/151 passing (85 unit + 66 integration), 2026-10-21 step 7.2
|
||||
- **Last verified working command:** `npm test` — 153/153 passing (85 unit + 68 integration), 2026-10-21 step 7.3
|
||||
|
||||
## Project Health
|
||||
| Item | State |
|
||||
@@ -94,8 +94,9 @@
|
||||
## Phase 7 — Expeditions (Offline Progress) (docs: GAME_DESIGN §Time, §Expeditions)
|
||||
- [x] **7.1** Migration `005_expeditions.sql`. Expedition definitions in seed data.
|
||||
- [x] **7.2** `POST /api/expeditions/start`, `GET /api/expeditions/active`, `POST /api/expeditions/claim`. Only one active expedition per hero. Claim rejected before `ends_at`.
|
||||
- [ ] **7.3** UI: start panel, progress bar, claim button.
|
||||
- [x] **7.3** UI: start panel, progress bar, claim button.
|
||||
*Acceptance:* start → close browser → return after duration → claim → rewards granted exactly once.
|
||||
*Verified:* expedition tab in game.html; game.js has renderExpeditionDefs, renderActiveExpedition, handleStartExpedition, handleClaimExpedition, startExpeditionSync; CSS styles for expedition UI; GET /api/expeditions/defs endpoint added.
|
||||
|
||||
## Phase 8 — Leaderboards & Social-lite (docs: GAME_DESIGN §Leaderboards)
|
||||
- [ ] **8.1** `GET /api/leaderboard?type=level|gold|kills` top 50, with pagination param.
|
||||
@@ -149,11 +150,12 @@ Severity: `blocker` / `major` / `minor` / `cosmetic`. Status: `open` / `fixing`
|
||||
## Test Summary
|
||||
| Suite | Passing | Failing | Last run |
|
||||
|---|---|---|---|
|
||||
| unit | 85 | 0 | 2026-10-21 step 7.1 |
|
||||
| integration | 66 | 0 | 2026-10-21 step 7.2 |
|
||||
| unit | 85 | 0 | 2026-10-21 step 7.3 |
|
||||
| integration | 68 | 0 | 2026-10-21 step 7.3 |
|
||||
|
||||
## Session Log
|
||||
_Format:_ `YYYY-MM-DD | step | what changed | result`
|
||||
- 2026-10-21 | 7.3 | Added expedition UI: GET /api/expeditions/defs endpoint (expeditionService.listDefinitions + expeditions route), CSS styles for expedition elements, game.html expedition tab, game.js expedition UI (renderExpeditionDefs, renderActiveExpedition, handleStartExpedition, handleClaimExpedition, startExpeditionSync), 2 integration tests for defs endpoint | 153/153 tests pass
|
||||
- 2026-10-21 | 7.2 | Created `src/services/expeditionService.js` (start, getActive, claim), `src/routes/expeditions.js` (3 endpoints), integrated into app.js; 11 integration tests covering start, active, claim, error paths, double-claim, cross-user rejection, time-based finish | 151/151 tests pass
|
||||
- 2026-10-21 | 7.1 | Created migration `005_expeditions.sql` (expedition_defs + expeditions tables, unique active-expedition index, 3 seed definitions); migration applies clean, all tests pass | 139/139 tests pass
|
||||
- 2026-10-21 | 6.3 | Added 2 integration tests to shop.test.js (sell equipped item rejection, concurrent double-buy safety); moved equipped check before material type check in sellItem so equipped items are rejected regardless of type | 139/139 tests pass
|
||||
|
||||
Reference in New Issue
Block a user