feat(admin-ui): Operate pages — Query Playground, Ingest, Chat (7.9b) - #188
Merged
officialCodeWork merged 1 commit intoJun 11, 2026
Merged
Conversation
The console can now drive the request path, not just observe it. Closes the three High-priority no-UI gaps from the v2 API-coverage analysis, built to the Operate design brief (apps/admin-ui/design/claude-design-prompt-operate.md), 1:1 on the real wire types (rag_core.gateway_types / rag_core.openai_types). - Query Playground (/playground, new Operate nav group): full QueryRequest control rail (corpus multiselect, top_k, rerank/pack/generate, advanced pack_budget / generate_max_tokens / generate_temperature / filters editor); Run query → POST /v1/query, Retrieve only → POST /v1/retrieve. Results: decision strip (shape, bm25 fallback, corpus strategy, packed tokens, experiment tag), answer with clickable [n] citation chips + guard verdict, citations list, ranked-chunks table (trust badges, detail sheet), stacked per-stage timings with skipped-stage markers, and a feedback bar (thumbs / 1-5 stars / copy / regenerate / PII-redacted comment → POST /v1/feedback, exact signal enum). "View full trace" deep-links to /trace?rid=… (trace page now reads the rid param; seeded runs reuse DEMO_REQUEST_ID so the demo resolves end-to-end). - Ingest (/ingest, Knowledge group): drag-and-drop multipart POST /v1/ingest/document; staged queue with progress, IngestResult chunk/embedding badges + View-in-Corpora on success, error + Retry on failure; parse → chunk → enrich → PII-redact → embed → index explainer. - Chat (/chat): OpenAI-compatible playground — streaming SSE thread with the non-standard rag annotations per reply (shape, chunks_n, citations, guard, finish_reason, usage; RAG on by default), Embeddings tab (one input per line, float/base64, dim + L2 norm + sparkline), Models tab (GET /v1/models). Live→seed hybrid as everywhere: action surfaces simulate without a gateway (deterministic worked query, token-streamed replies, prefers-reduced-motion honoured). New Slider + Tabs primitives; CorpusMultiSelect / GuardBadge / CitedText shared components; api.ts gains runQuery / retrieveOnly / submitFeedback / ingestDocument / streamChat (SSE reader) / chatComplete / createEmbeddings / fetchModels. Identity body-carried on /v1/query, /v1/retrieve, /v1/feedback; header-driven elsewhere. Documentation: docs/reference/admin-ui.md (Operate pages + hybrid + config). Gates: tsc clean, eslint clean, 46/46 vitest (12 new), next build 17 static routes; browser-verified light + dark, all three pages + trace deep-link. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The console can now drive the request path, not just observe it. This closes the three High-priority "no UI yet" gaps from the v2 API-coverage analysis, built to the Operate design brief and 1:1 on the real wire types (
rag_core.gateway_types/rag_core.openai_types) — no invented shapes.Query Playground (
/playground, new Operate nav group)QueryRequestcontrol rail: corpus multiselect,top_kslider, Rerank / Pack / Generate switches, an Advanced disclosure (pack_budget,generate_max_tokens,generate_temperature, key→valuefilters).POST /v1/query; Retrieve only →POST /v1/retrieve(ChunkRef view).[n]citation chips + hallucination-guard verdict, citations list, ranked chunks table (trust badges, row → detail sheet), and a stacked per-stage timings bar (skipped stages marked).POST /v1/feedbackwith the exact 9-signal enum; toasts echo theFeedbackAckscore./trace?rid=<request_id>(the trace page now acceptsrid); the seeded run reusesDEMO_REQUEST_ID, so the demo resolves end-to-end.Ingest (
/ingest, Knowledge group)POST /v1/ingest/document(10 parser types advertised), staged queue with per-file progress →IngestResultchunk/embedding count badges + "View in Corpora" on success, error + Retry on failure.Chat (
/chat)ragoptions, RAG on by default; every reply surfaces the terminal chunk'sragannotations — shape, chunks_n, citations, guard,finish_reason, usage), Embeddings (one input per line, float/base64, dim + L2 norm + sparkline per vector), Models (GET /v1/models— the wired backends, not a catalog).Plumbing
prefers-reduced-motionhonoured).Slider+Tabsprimitives;CorpusMultiSelect/GuardBadge/CitedTextshared components.api.ts:runQuery,retrieveOnly,submitFeedback,ingestDocument(multipart),streamChat(SSE reader → terminal chunk),chatComplete,createEmbeddings,fetchModels. Identity body-carried on/v1/query·/v1/retrieve·/v1/feedback, header-driven elsewhere — matching the gateway.Verification
tsc --noEmitclean ·next lintclean · 46/46 vitest (12 new across the three pages) ·next build— all 17 routes static (the/traceSuspense boundary keeps it prerenderable)./trace?rid=…deep link (resolves to the signed demo trace).Documentation
🤖 Generated with Claude Code