tickets
All repositories: gitoria
2.4 KB
# w6 — tickets#26 event stream for programs (branch w6-events, worktree ../tickets-w6) — not deployed, not pushed- Commit 0e8a41c `w6 (ticket #26): event stream for programs — GET /api/events (Server-Sent Events)` on w6-events (base main bb64d57).- Tests: tests/events.mjs **48/48** (browser comment + state change by real clicks/keys arrive in 14–21 ms; filters; key = own project only; Last-Event-ID / ?after= resume exactly once; 2-min idle stream: 25 keep-alives, gap ≤ 6 s, still delivers; Python + Hybriel clients); the same through nginx 1.27 with Byrodin's tickets.conf `location /` block **48/48**; gate tests/browser.mjs **315/315**. connect.mjs not run (Chrome ports 8703–8709 hardcoded).- Endpoint: `curl -N -H "Authorization: Bearer $TOKEN" 'https://tickets.worldapi.org/api/events?project=routger¬Mine=1'` (+ `assignee=<name|id|me>`, `after=<id>` or header `Last-Event-ID`). Frames `data: {id,at,project,ticket,ref,number,kind,actor,state,assignee,text≤300,href}` + `id: n`. 401 no/bad token, 400 bad filter, 403 key outside its project.- Byrodin nginx vhost: nothing to change — `proxy_http_version 1.1` is already there, the app sends `X-Accel-Buffering: no` (no buffering for this response) and a `:` comment every 5 s (< proxy_read_timeout 60 s). Optional: `location = /api/events { …; proxy_buffering off; proxy_read_timeout 1h; proxy_set_header Connection ""; }` (README).- Missing: no stream ids for history before the deploy (no backfill; ticket GETs have it). "User without access" = only project keys today: reading is public (CONCEPT 1), so every user token sees every project; `stream.hl subscriptionOf` is where private projects would plug in.- Hybriel issues (for Anton): hl:http1's SSE family (sse_start / sse_send / sse_alive) works but has no .hl wrapper; a static cannot call `__native`, and hl:web's browser build compiles what a component's server face reaches, so a lib class method with `__native` breaks the page ("hlJs … UnsupportedJsConstruct"). Repro: Loreana `/media/STORAGE/projects/tickets.worldapi.org/.scratch/w6/repro-native-browser/` (README inside; control without the line → 200). Workaround: project.hl root passes the 3 calls into `useTransport`. Also: `from` is reserved, `"\n"` is no escape (known).- Deploy note: the first start creates `storage/mpackdb/stream.*` empty; no migration. This report file is NOT in the branch (it would block the merge as an untracked file).
Branches
Latest commits
- 5d144817Merge branch 'records-t40' into mainTickets
- 44ee6f06|||PR records: #43 #45 livemre
- b8fdeee9Merge branch 'p39-routes' into mainTickets
- a0187a0a|||PR Remove redundant route-order loopmre
- 369e4b9cMerge branch 'k40-lists' into mainTickets
- 9af8e780|||PR Use keyed list mutations for live ticket updatesmre
- 610d8e8aMerge branch 'records-t39' into mainTickets
- 32bcdf24|||PR records: GO P39 K40mre
- 4123c6d1Merge branch 'records-t38' into mainTickets
- cd3641a1|||PR records: day72 deploy live, tickets closedmre
- 7d44d852Merge branch 'records-t37' into mainTickets
- 926f7061|||PR records: merges, D36 deploymre
- bf58534eMerge branch 'l33-final' into mainTickets
- 759a9ac3|||PR thin login (tickets#46, #45): merge main, route entry cleanupmre
- 239436d8Merge remote-tracking branch 'origin/main' into l33-finalmre
- 5822cb3aMerge branch 'o34-clean' into mainTickets
- 0870653c|||PR offline note from __hlOnline, no polling (tickets#41)mre
- 14cf96b4Merge branch 'records-t36' into mainTickets
- 07749fa1|||PR records: day72 + #40 mergedmre
- ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre