Files
hermes-webui/api
Nathan Esquenazi 698384ecbc fix(kanban): apply Opus advisor SHOULD-FIX (PATCH/DELETE routing + SSE id:)
Two SHOULD-FIX items from the Opus advisor pass on PR #1675:

1. **PATCH/DELETE handler routing asymmetry**. The /boards/<slug> path
   match was running AFTER ?board= resolution, so a stray ?board=ghost
   on a 'PATCH /api/kanban/boards/experiments?board=ghost' would 404 on
   the missing 'ghost' board instead of editing 'experiments'. POST
   already routed /boards first; PATCH/DELETE now mirror that structure.
   The ?board= query is still resolved for the task-scoped routes that
   actually need it.

2. **SSE event frames now emit 'id: <event_id>' lines**. EventSource
   stores Last-Event-ID and sends it on auto-reconnect; without an 'id:'
   field on each frame the browser couldn't resume cleanly across
   connection drops, forcing the server to re-stream up to
   _KANBAN_SSE_BATCH_LIMIT=200 events the client already had. The
   handler now (a) emits 'id: <cursor>' on every events frame, and
   (b) reads Last-Event-ID from the request headers as a fallback when
   ?since= is absent.

+4 regression tests:
- test_handle_kanban_patch_routes_boards_slug_before_board_query_param
- test_handle_kanban_delete_routes_boards_slug_before_board_query_param
- test_sse_emits_id_lines_so_browser_can_resume_via_last_event_id
- test_sse_honours_last_event_id_header_when_since_absent

Total kanban tests: 67 -> 68 (CSS-injection fix in 60874db) -> 72 (this).

Co-authored-by: ai-ag2026 <ai-ag2026@users.noreply.github.com>
2026-05-05 00:32:43 +00:00
..
2026-04-29 19:54:07 -07:00
2026-05-04 14:05:49 -07:00
2026-05-04 22:56:43 +00:00