Watchface now syncs with the Nine Hazes idle task system via its own
pkjs client — the three-artifact architecture is operational.
Wire side:
- pkjs fetches GET /v1/queue on launch, applies clock offset, converts
epoch-ms to seconds for AppMessage, resolves task name from the
cached dictionary (refetch on version drift)
- GameSnapshot persisted at key 0x30 (protocol-specified); task name
at 0x32 (face-local nicety)
- AppMessage inbox widened to 256 bytes to carry the full snapshot
dictionary in a single logical message
Display side:
- Task strip renders two lines: countdown-to-completion + used/36 +
task count, then task name with "(+)" pending-rewards cue
- Status states render distinctly: FROZEN / ABORTED(code) / LOCKED /
No hero yet (EMPTY)
- serverDown sentinel key: oxblood "!" icon on failed check; absence
on successful sync clears it; volatile — never persisted
- Countdown math is server-clock corrected (clock_off), computed
locally from bound_sec — zero radio to stay fresh
Also:
- ES5-normalized pkjs for SDK webpack 1.15/acorn parser
- Replaced face_packet.{h,c} with snapshot.{h,c} (PACKET_KEY 101
retired; old blob orphaned harmlessly)
- Mock Task API server seeded with 3-task queue (in-memory)
Verified: seeded queue renders "0:xx 16/36 seg 3 tasks / Gather (+)";
server kill → cached strip + offline icon, no error surface.
26 lines
684 B
JSON
26 lines
684 B
JSON
{
|
|
"name": "nine-hazes-face",
|
|
"author": "Artimidorus",
|
|
"version": "1.0.1",
|
|
"license": "Apache-2.0",
|
|
"keywords": ["pebble-app"],
|
|
"private": true,
|
|
"dependencies": {},
|
|
"pebble": {
|
|
"displayName": "nine-hazes-face",
|
|
"uuid": "cc8b7604-d956-4c6c-a0be-f33bec671181",
|
|
"sdkVersion": "3",
|
|
"enableMultiJS": true,
|
|
"targetPlatforms": ["emery"],
|
|
"watchapp": {
|
|
"watchface": true
|
|
},
|
|
"messageKeys": ["taskName", "syncTime", "clockOff", "boundSec", "used",
|
|
"taskCount", "curType", "curRem", "status", "abortCode",
|
|
"pendItems", "pendXp", "dictV", "serverDown"],
|
|
"resources": {
|
|
"media": []
|
|
}
|
|
}
|
|
}
|