This repository was archived by the owner on May 26, 2026. It is now read-only.
feat(KR-P2-SEA-PANEL): Sea_Tickets-assigned-to-Kora viewer panel against stub endpoint#31
Merged
Merged
Conversation
…nst stub endpoint
Read-only diagnostic panel for what Kora's consumer loop is currently
working on: in-progress, queued (priority-ordered), recently resolved
(collapsed by default), and failed/blocked. Pairs with CC#1's KR-P2-E
(consumer loop) but goes in ahead of the runtime wire-in — the data
source is a hardcoded stub returning sample tickets for each section
with ``stub: true`` so the frontend renders a banner making it obvious
to operators that values are not real assignments. When KR-P2-E lands
and IsoKronMemoryProvider grows a ``get_assigned_sea_tickets(actor_id)``
helper, the endpoint body flips to a projection of that read; the page
itself doesn't change.
Backend (kora_cli/web_server.py):
GET /api/sea-tickets/kora-assigned — read-only stub returning 4
status-grouped lists. No POST/PUT/DELETE: operator interventions on
blocked tickets happen via cockpit's blocked_needs_operator action
set (unblock / reassign / force_retry / cancel), not here. The
internal ``claim_fence_token`` idempotency token is intentionally
never exposed in the API shape (test guards against future drift).
Frontend:
- SeaTicketsPage.tsx — 4 sections by operational priority:
* In progress: prominent cards with pulsing live indicator, claim
counters, claimed-at relative time.
* Queued: sorted criticality desc + assigned_at asc (matches G-8
priority). Table view with deferred-until call-out when
next_eligible_at is set.
* Recently resolved: collapsible (default-collapsed). Resolution
badge + model-tier badge (opus/sonnet/haiku).
* Failed or blocked: always visible with quiet styling when empty.
Failure-reason chips with counts. Static text reminding operator
that interventions happen cockpit-side.
- api.ts — typed Criticality / ModelTier / Resolution enums + 4
section interfaces + KoraAssignedSeaTicketsResponse so a future
Python-side enum drift surfaces at compile time.
- App.tsx — /sea-tickets route + nav entry (Waves icon) between
/operational-state and /analytics per spec §3.
- Manual reload only; no auto-refresh (matches OPS-PANEL pattern).
Tests: tests/kora_cli/test_web_server_sea_tickets.py — 10 tests
covering all six §5 scenarios plus a non-scope guard
(claim_fence_token never in payload). 57/57 across full web_server
test suite pass. tsc -b + vite build clean.
§8 pre-push grep checks: STUB banner present, endpoint registered,
zero write-side routes leaked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 21, 2026
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Read-only operator-side diagnostic panel for Sea_Tickets assigned to the Kora actor. Pairs with KR-P2-E (consumer loop, CC#1 — in flight) and goes in ahead of the wire-in so the UI is ready when E lands.
Endpoint (kora_cli/web_server.py)
GET /api/sea-tickets/kora-assigned— returns 4 status-grouped lists withstub: true:in_progressqueuednext_eligible_atset ⇒ deferredrecently_resolvedfailed_or_blockedfailed_terminalorblocked_needs_operator— operator intervention happens cockpit-sideNo write-side endpoints — operator interventions on blocked tickets live in the cockpit's
blocked_needs_operatoraction set (unblock / reassign / force_retry / cancel), not here.Internal
claim_fence_tokenidempotency token is intentionally never in the API shape (test guards against future drift).Frontend (web/)
pages/SeaTicketsPage.tsxnext_eligible_atis in the futurestub: true— non-negotiable so a real outage never gets masked as sample datalib/api.ts— typedCriticality/ModelTier/Resolutionenums + 4 section interfaces +KoraAssignedSeaTicketsResponseApp.tsx—/sea-ticketsroute + nav entry (Waves icon) between/operational-stateand/analyticsFlip-over plan
When KR-P2-E lands and
IsoKronMemoryProvidergrows aget_assigned_sea_tickets(actor_id) -> AssignedSeaTicketshelper, swapget_kora_assigned_sea_ticketsbody to project from that read and drop thestubflag. The page itself doesn't change — the stub banner disappears the momentstubis gone.Test plan
tests/kora_cli/test_web_server_sea_tickets.py— 10/10 green, covers all six §5 scenarios + non-scope guard (claim_fence_token never in payload)test_web_server_{operational_state,cron_profiles,host_header,mcp,gateway_identity}.py— 47/47 still green (regression sanity, 57 total in suite)npx tsc -bonweb/— cleannpx vite buildonweb/— clean/sea-tickets, verify STUB banner renders, verify all 4 sections render with sample data, verify resolved section collapsibleDependency notes
IsoKronMemoryProvider.get_assigned_sea_tickets(actor_id)is the small helper PR that flips this from stub to real (after E)🤖 Generated with Claude Code