已关闭
Add Web UI RAG Search Lab and release-quality gates #97
urandon创建于  17 天前关闭于  16 天前
urandon
urandon成员
17 天前 创建

Parent: #52
Depends on: read-only operator views; job supervision

Design: https://gitcode.com/urandon/gitcode-mcp/wiki/Admin-Web-UI-Design-2026-08-25.md

Goal

Add a RAG search experiment surface and finish the admin UI's dogfood, accessibility, packaging, and release quality gates.

Scope

  • Search Lab for the selected cache/repository with full-text and hybrid modes side by side.
  • Show requested/effective mode, typed fallback reason, corpus/RAG partial state, lexical/semantic/fusion scores, citations, namespace, and generation coverage.
  • Observation-only queries: search must not silently sync, set up a provider, or start indexing.
  • Provider smoke test and bounded RAG repair control when the capability is safe; explicit CLI handoff for provider install/start or model download.
  • Deep-linkable sanitized experiments suitable for issue/wiki dogfood evidence.
  • Complete keyboard/a11y audit, reduced-motion and contrast checks.
  • Browser E2E for all epic critical paths, generated-asset and license verification, release-size/startup-memory benchmarks, docs, and disable/upgrade behavior.

Acceptance criteria

  1. A user can explain why a semantic query improved or fell back, with citations and coverage state, without relying on internal commands.
  2. Exact/full-text behavior remains selectable and deterministic.
  3. Search never returns an embedding whose chunk hash/generation is no longer current.
  4. Provider-down/current-cache, no-namespace, partial, stale, failed-chunk, and full-text fallback states are tested.
  5. Critical UI flows meet WCAG AA expectations and are operable by keyboard at narrow and desktop widths.
  6. The single-binary release-size/startup overhead is measured and documented against the agreed foundation budget.
  7. go install ./..., go test ./..., frontend checks, Playwright, asset verification, and git diff --check pass.

Non-goals

  • Choosing or implementing a new ANN/vector backend.
  • Hosted sharing of search experiments.
likedislike
urandonurandon成员
17 天前 添加了label:enhancement
urandon
urandon成员
16 天前 评论:

Implementation plan (slice E):

  1. Add a CSRF-bound, observation-only admin compare endpoint over the existing cache/service/RAG use cases. It will run deterministic full-text and requested hybrid searches side by side, never sync, set up a provider, or enqueue indexing.
  2. Extend the source-search explanation contract with raw lexical/semantic scores alongside fusion/ranks, namespace id, eligible/embedded/missing/stale/failed chunks, and content/covered generation. Preserve filtering before semantic top-K and reject stale chunk hashes before display.
  3. Add explicit provider smoke and bounded RAG repair capabilities. Smoke is an operator-requested provider read; setup/start/model download remain CLI handoffs. Repair will have an exact plan, a bounded maximum chunk count, durable idempotency, coalescing, and a visible local-provider data boundary.
  4. Build the repository Search Lab in the existing Svelte shell: cache/repo target, deep-linkable bounded query and filters, full-text/hybrid result columns, requested/effective/fallback explanation, coverage/namespace/generation cards, score breakdown, citations, copyable sanitized experiment summary, and repair/smoke states.
  5. Finish epic quality gates: keyboard-only and narrow/desktop E2E, focus/modal restoration, reduced motion, Light/Dark/System and contrast audit, hidden-side-effect assertions, stale/partial/provider-down/no-namespace/failed-chunk fixtures, deterministic asset/license verification, binary-size and startup/RSS benchmark note, disable/upgrade docs.

Safety boundaries: no remote GitCode access from Search Lab; no hidden indexing; no browser cache paths; no provider installation/start/model download; no RAG purge/reset/rebuild-all. design-qa.md remains a local uncommitted QA artifact. Per current release policy, no tag/release or go install ./... will be done for an intermediate change; those are considered only after the whole epic converges.

likedislike
urandonurandon成员
16 天前 关联了pull request:Add admin RAG Search Lab
urandon
urandon成员
16 天前 评论:

Implementation is ready in !101.

Delivered:

  • observation-only full-text versus requested hybrid comparison for one managed cache/repository, including effective mode, typed fallback, RAG coverage/generation, raw lexical/semantic/fusion scores, ranks, locations, and bounded citations;
  • explicit provider metadata smoke that sends no cached source text;
  • stale-plan-safe bounded RAG repair with a confirmed max chunk count, provider data-boundary ledger, durable idempotent receipt, and background job;
  • deterministic bounded index slices and generation/failure coverage reporting;
  • frontend dependency license gate plus documented asset/binary/startup/RSS/release budgets.

Cross-tab design correction after dogfood feedback:

  • Overview, Caches, Jobs, Maintenance, Diagnostics, and Search Lab now share one typography/control/icon token layer;
  • page/section/card/micro roles are 54/22/14/11 px at the reference desktop viewport, controls are 40 px high with 13 px text, and no visible text is below 11 px;
  • Lucide is the only icon set, with documented navigation, inline, entity, effect, and readiness roles;
  • Light, Dark, and System share the same semantic surfaces; System remains the default;
  • desktop and 390 px QA report no document overflow;
  • changing RAG profile or repair cap invalidates the old plan and receipt before apply.

The durable rules are in docs/admin-ui-design-system.md and are linked from docs/admin-ui.md.

Verification: go test ./..., go vet ./..., Svelte check, Vitest, dependency license check, Playwright (9 passed; live-environment smoke skipped when no daemon is supplied), deterministic embedded asset rebuild, and git diff --check. No release tag or go install was made for this review unit.

likedislike
urandonurandon成员
16 天前 关闭了 issue
urandonurandon成员
16 天前 关联了里程碑:Admin Web UI
urandonurandon成员
16 天前 添加了label:admin-ui
urandonurandon成员
16 天前 添加了label:rag
urandonurandon成员
16 天前 添加了label:release
urandonurandon成员
16 天前 添加了label:ci
urandon
urandon成员
16 天前 评论:

Final design and release QA report

Correction to the earlier implementation note: design-qa.md was temporary agent working material, not a user-owned artifact. Its durable findings belong here; the local file has been removed.

Visual and responsive result

  • Overview, Caches, Jobs, Maintenance, Diagnostics, and Search Lab were reviewed together at the 1487 × 1058 reference viewport and at 390 px narrow width.
  • The views share one shell and one typography/control/icon hierarchy: consistent navigation, content inset, restrained surfaces, semantic status colors, 40 px controls, and no visible text below the documented minimum.
  • Light, Dark, and System preserve the same hierarchy; System remains the default. Narrow and desktop checks reported no document-level horizontal overflow.
  • Lucide remains the only icon set; status meaning is always present as text rather than color alone.

Interaction, accessibility, and safety

  • Keyboard-semantic controls, visible focus, modal focus/return, Escape/cancel behavior, reduced-motion handling, labelled native fields, and textual disabled/error states were exercised.
  • The one-time loopback session remains HttpOnly/SameSite Strict and CSRF-bound. The production bootstrap uses a generated CSP hash; no unsafe-inline allowance was added.
  • Snapshot/SSE reload continuity was verified without exposing absolute cache paths. Browser requests use opaque cache identities and sanitized deep links.
  • Job cancel/retry confirmation preserves exact target/scope/work identity and durable idempotent receipts. Maintenance and binding use plan → exact confirmation → apply, including stale-plan rejection.
  • Search comparison remains observation-only: it does not sync, configure providers, or start indexing. Provider smoke and bounded repair remain distinct explicit actions with a visible data boundary. Changing repair profile or cap invalidates the prior plan and receipt.

Dogfood defects found and fixed

  1. Svelte bootstrap was initially blocked by CSP; fixed with the generated bootstrap hash while retaining frame-ancestors none.
  2. Maintenance repository targets initially stayed empty after snapshot load; fixed by making the target derivation explicitly reactive.
  3. An early comparison capture started below the page origin; capture normalization now aligns both states before comparison.
  4. Cross-tab review found independent 8–10 px density choices outside Overview; replaced with shared typography, control-height, and icon-frame tokens.
  5. Search repair inputs could leave an obsolete rendered plan active; profile/cap changes now invalidate both plan and receipt.

Verification conclusion

Frontend typecheck, unit tests, dependency-license validation, Playwright critical flows, deterministic embedded asset rebuild, full Go tests, and git diff --check passed at delivery. Post-correction review found no remaining P0/P1/P2 visual, interaction, accessibility, or safety issue. The later v0.2.2 release regression suite also passed and published successfully to both release surfaces.

likedislike