Skip to content

UI-SP5b — Executors SSE follow-on (view-free)#23

Merged
l17728 merged 6 commits into
mainfrom
feat/ui-sp5b-executors-sse
May 20, 2026
Merged

UI-SP5b — Executors SSE follow-on (view-free)#23
l17728 merged 6 commits into
mainfrom
feat/ui-sp5b-executors-sse

Conversation

@l17728
Copy link
Copy Markdown
Owner

@l17728 l17728 commented May 20, 2026

Summary

Small follow-on to UI-SP5 (PR #22 8c77ca1). Validates the view-free single-seam SSE architecture against a SECOND consumer.

  • Backend (1 additive endpoint, zero migration, zero new dep): GET /api/v1/executors/stream — hand-rolled text/event-stream mirroring tasks_stream.py. Reuses SP3's list_executors_for_principal (tenant filter + system_admin/is_service bypass — same RBAC as the existing GET /executors). 5 s default tick (env DLW_EXECUTORS_STREAM_INTERVAL_SECONDS, clamped [0.5, 60.0]). Same ?max_ticks=N testability hatch (httpx ASGITransport buffering).
  • Frontend: useExecutors opts in via the SP5-added streamUrl+applyEvent seam options. Signature/return-shape UNCHANGED.
  • View-free proof: pages/Executors.vue NOT modified; SP3's ExecutorsPage.spec.ts + the sp3Composables.spec.ts::useExecutors wires key + status query + interval test both pass UNCHANGED. The second consumer ships without touching ANY view code — exactly as the SP1/SP2/SP3 promise foretold.

Verification

  • Backend: 455 pytest (451 prior + 4 new SP5b: unauth/tenant-filter/multi-snapshot/status-filter).
  • Frontend: 147 vitest (144 prior + 3 new SP5b: streamUrl+applyEvent wired, streamUrl reactive to filter, applyEvent parses JSON).
  • vue-tsc strict 0 errors; eslint --max-warnings=0; vite build success. spectral/swagger/invariant/status-write all green.
  • Live headed Playwright smoke: /api/v1/executors/stream SSE request observed in DevTools network on the /executors page; zero real console errors.
  • 2-opus pre-execution gate: 0 BLOCKER, 0 IMPORTANT — first "all clear" pre-review across 10 sub-projects, reflecting how well-grooved the architecture is.

Known follow-ups (non-blocking, record-and-accept)

  • Status-filter changes mid-stream: the SSE URL is captured once at first snapshot; a later el-select mutation re-renders the page from vue-query's fresh fetch (correct UI), but the old-URL stream keeps pushing until component unmount. Cosmetic; ~1 tick of potentially-stale items before user navigates. Future enhancement: have useLiveResource watch(() => toValue(opts.streamUrl), ...) and reopen on URL change — out of scope here (touches the SP5 seam).
  • Vestigial _KEEPALIVE_EVERY_TICKS dead branch (inherited from SP5; harmless).
  • OpenAPI text/event-stream block lacks an explicit 401 response (precedent from SP5 — flag for a docs sweep).

Test plan

  • CI green
  • Squash-merge with --delete-branch

🤖 Generated with Claude Code

l17728 and others added 6 commits May 20, 2026 18:51
Mirror SP5: 1 additive SSE endpoint GET /api/v1/executors/stream + opt-in
useExecutors via existing seam. Reuses SP3's list_executors_for_principal
(tenant filter, system_admin bypass). 5s default tick. Pages and SP3 test
unchanged. Validates the view-free architecture against a 2nd consumer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@l17728 l17728 merged commit af48a0a into main May 20, 2026
12 checks passed
@l17728 l17728 deleted the feat/ui-sp5b-executors-sse branch May 20, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant