| 1 | { |
| 2 | "description": "Admin app event vectors: the update stream (release notes posted into the Admin thread in place of the retired Announcer bot). Ensures the fold + chat projection stay consistent. Source of truth: web/static/apps/admin.js", |
| 3 | "app": "admin", |
| 4 | "source": "web/static/apps/admin.js", |
| 5 | "state_shape": { "seen": ["string (changelog entry id)"] }, |
| 6 | "notes": [ |
| 7 | "admin.note posts one release note as a bubble from Admin; `seen` (posted ids) is the cross-device watermark.", |
| 8 | "admin.baseline marks every current entry seen WITHOUT posting — the first-run 'no backlog blast' rule.", |
| 9 | "The Chat view is read-only (chatReadOnly): the app posts, members never do. Native renders this thread via the webview, so there is no native fold to keep in sync — these vectors pin the web contract." |
| 10 | ], |
| 11 | "vectors": [ |
| 12 | { |
| 13 | "name": "admin_note", |
| 14 | "description": "A release note is posted: its id joins `seen`, and it projects as a message bubble from Admin (not an action line).", |
| 15 | "event": { |
| 16 | "type": "admin.note", |
| 17 | "id": "2026-07-08-read-sync", |
| 18 | "text": "Unread dots now sync across your devices.", |
| 19 | "name": "Paul", |
| 20 | "ts": 1700000000000 |
| 21 | }, |
| 22 | "initial_state": { "seen": [] }, |
| 23 | "expected_state_update": { "seen": ["2026-07-08-read-sync"] }, |
| 24 | "expected_chat_projection": { |
| 25 | "text": "Unread dots now sync across your devices.", |
| 26 | "action": false |
| 27 | } |
| 28 | }, |
| 29 | { |
| 30 | "name": "admin_note_duplicate", |
| 31 | "description": "Re-folding a note whose id is already seen leaves state unchanged (idempotent — two devices may race the same entry).", |
| 32 | "event": { |
| 33 | "type": "admin.note", |
| 34 | "id": "2026-07-08-read-sync", |
| 35 | "text": "Unread dots now sync across your devices." |
| 36 | }, |
| 37 | "initial_state": { "seen": ["2026-07-08-read-sync"] }, |
| 38 | "expected_state_update": { "seen": ["2026-07-08-read-sync"] } |
| 39 | }, |
| 40 | { |
| 41 | "name": "admin_baseline", |
| 42 | "description": "First-run baseline: every current entry id is recorded as seen, nothing is posted, and the projection is silent (null).", |
| 43 | "event": { |
| 44 | "type": "admin.baseline", |
| 45 | "ids": ["2026-07-07-member-apps", "2026-07-08-read-sync"] |
| 46 | }, |
| 47 | "initial_state": { "seen": [] }, |
| 48 | "expected_state_update": { "seen": ["2026-07-07-member-apps", "2026-07-08-read-sync"] }, |
| 49 | "expected_chat_projection": null |
| 50 | }, |
| 51 | { |
| 52 | "name": "admin_baseline_merge", |
| 53 | "description": "A second baseline merges (set union, order-preserving) rather than duplicating ids.", |
| 54 | "event": { |
| 55 | "type": "admin.baseline", |
| 56 | "ids": ["2026-07-08-read-sync", "2026-07-08-text-size"] |
| 57 | }, |
| 58 | "initial_state": { "seen": ["2026-07-08-read-sync"] }, |
| 59 | "expected_state_update": { "seen": ["2026-07-08-read-sync", "2026-07-08-text-size"] } |
| 60 | } |
| 61 | ] |
| 62 | } |
| 63 | |