Skip to content

feat: AI-native rebuild + production polish (closes #8 #9 #13 #15 #30 #31)#51

Merged
xt0n1-t3ch merged 19 commits into
mainfrom
feat/epic-41-ai-rebuild
Jun 16, 2026
Merged

feat: AI-native rebuild + production polish (closes #8 #9 #13 #15 #30 #31)#51
xt0n1-t3ch merged 19 commits into
mainfrom
feat/epic-41-ai-rebuild

Conversation

@xt0n1-t3ch

Copy link
Copy Markdown
Owner

Summary

Rebuilds Reva as an AI-native, fully-offline reinsurance bordereaux ingestion + reconciliation product and polishes it to production quality. The .NET domain (Core + Infrastructure) is kept and extended; the Blazor UI is replaced by a Next.js 16 + Vercel AI SDK 6 frontend; the AI engine is local and keyless (Ollama qwen3-vl for chat/vision, native PaddleOCR for OCR). One branch, 19 commits, merging the rebuild (epic #41) and the polish wave (epic #42).

Rebuild — epic #41

Polish wave — epic #42

  • Assistant: minimize/expand dock, image (vision) + document (ingest) attachments, new conversation; fixed agent num_ctx truncation that dropped attached images.
  • Review redesign (verdict-first): reconciliation with money deltas up top, grouped fields, plain-language confidence, line-items, Approve / Request-changes.
  • Schema-mappings page: per-sender learned mappings with confidence + Learned/Corrected badges.
  • Export template editor: create / edit / duplicate / delete + format-aware download.
  • Document preview (feat: real document preview — PDF/scanned-image viewer with extraction overlay + sample doc in demo seed #50-class): real page viewer with zoom / fit / page-nav + per-line citation overlay that scales with zoom; queue thumbnails; image OCR now emits a page + real-dimension spans; typed RotatedRect bbox capture; seeded scanned bordereau sample.
  • Settings depth: reconciliation tolerance + local-LLM-assist toggle (persisted, EF migration), default export template, data management (reseed / clear).
  • e2e + a11y: 10/10 Playwright specs green; zero serious/critical axe violations on /, /review, /export, /settings.

Proof

  • Backend: dotnet build Reva.slnx -warnaserror 0/0 · dotnet test Unit 37 + Integration 16 · Reva.E2E API-smoke 1 · dotnet format --verify-no-changes clean.
  • Web: tsc --noEmit 0 · eslint . 0 · next build 0 · Playwright 10/10 (incl. 4 axe routes + assistant/chat).
  • Live /browser: scanned-doc preview renders with citation overlay; hover-to-cite highlights the exact source line; zoom/page-nav; settings save round-trip + data management; verified light, dark, and mobile.

Acceptance mapping

Closes #8
Closes #9
Closes #13
Closes #15
Closes #30
Closes #31
Closes #41
Closes #42

…ts, new conversation; raise agent num_ctx so vision attachments are not truncated (Closes #43)
…ney deltas up top, grouped fields, plain language, line-items table, review actions (Closes #49, #45)
Render ingested raster images and rendered PDF pages as a real document
viewer in the review split-view: zoom, fit-to-width, page navigation,
loading state, and citation bounding-box overlays that scale with zoom.
Workspace queue rows show a page thumbnail for image and PDF documents,
falling back to the document icon for digital files.

Wire the image OCR path to emit a page (stored image plus real pixel
dimensions) and real-dimension source spans so image documents render
with overlays. Replace the reflection-based OpenCV region reader with the
typed RotatedRect API so per-line bounding boxes are captured instead of
a full-page fallback (also fixes citations on the scanned-PDF path). Seed
a scanned-bordereau image sample so the preview and overlays are
demonstrable end to end.

Closes #50
…agement, default template

Add two persisted app settings — money reconciliation tolerance and a local
LLM-assist toggle — and surface them on the Settings page alongside a default
export-template selector and demo data management (reseed and clear).

The reconciliation engine reads the configured tolerance instead of a fixed
threshold, and ingestion only invokes the LLM extractor when assist is enabled
so extraction stays fully deterministic by default. New POST /api/data/reseed
and /api/data/clear endpoints back the data-management actions, and the export
view pre-selects the configured default template.

Closes #44
Run the end-to-end suite against the live stack and bring it to green:
- a shared fixture suppresses the first-run tour so specs start unobstructed
- a new assistant spec covers opening the dock and sending a message
- the onboarding spec drives the tour to completion via the persisted flag,
  tolerating route changes and auto-skipped steps
- correct the review field-row selector after the verdict-first redesign

Accessibility: zero serious or critical axe violations on /, /review, /export,
and /settings. Wrap queue rows in listitem (aria-required-children), mark the
collapsed assistant dock inert so its controls leave the focus and a11y tree,
label the upload file input, underline in-text links, and raise the
subtle-foreground and success token contrast to meet WCAG AA.

Closes #48
@xt0n1-t3ch xt0n1-t3ch merged commit 09216e1 into main Jun 16, 2026
2 checks passed
@xt0n1-t3ch xt0n1-t3ch deleted the feat/epic-41-ai-rebuild branch June 16, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment