Spaces:
Sleeping
Sleeping
Commit History
-
Add Audit Mode: evidence-backed checklist audit for finance documents
Aissugur Kurganbekov +1: Claude Opus 4.8New POST /audit runs a per-type checklist (invoice / contract / payment_note / general) over a document, reusing the /ask retrieval + abstention gate so it never invents a value. A check is SUPPORTED only when retrieval does not abstain AND the cited excerpt contains the field's discriminator keyword; otherwise the field is flagged unsupported (a missing field drives the risk level). Returns a summary, risk_level, per-field findings (claim + evidence + citation), and metrics (counts + citation coverage). Reuses _owned_document for per-user scoping + 404; /ask is unchanged. Frontend: new Audit tab — a B2B audit dashboard (document + type selectors, risk badge, metric cards, per-finding evidence with highlighted citations). Backend: app/audit.py, audit schemas, POST /audit, and tests/test_audit.py (7 tests: field detection, unsupported detection, citation coverage, false-positive guard, 404, cross-user scoping, default type). Hardened after an adversarial review: field discriminators …f22b512
-
Add user accounts: registration, login (JWT + bcrypt), per-user documents
Aissugur Kurganbekov +1: Claude Opus 4.8Backend: - User model + nullable owner_id on Document (NULL = shared demo/eval docs). - security.py (bcrypt via passlib, PyJWT HS256) and auth.py (/auth/register, /auth/login, /auth/me + get_current_user). Generic 401 with a dummy-hash compare on miss (no user enumeration), 409 on duplicate, EmailStr validation. - /documents*, /ask, /history now require a Bearer token and are scoped to the user's own docs + shared demo docs; cross-user access returns 404 (never leaking ids). /health, /evaluate, /demo/seed stay public. AUTH_SECRET_KEY is env-driven (prod hard-fail, dev default + warning). - conftest authed-by-default so the 12 existing API tests are unchanged; new test_auth.py (register/login/me/protected/per-user isolation). 38 tests pass, live end-to-end verified. Frontend: - Split-layout AuthScreen (sign in / sign up toggle, validation, show/hide password, "Continue with the demo" guest path) in the light theme. - api.js routes every request through a Bearer wrapper …165a274
-
Re-theme the frontend light (cointracker-style) and make Thinking mode honest
Aissugur Kurganbekov +1: Claude Opus 4.8- Drop the dark-purple theme for a light canvas: navy ink (#0d1b2a) + fintech blue (#2563eb) on near-white (#fbfbfd). Rework the :root tokens and convert every dark-assuming value (white-alpha surfaces and borders, the cinematic gradient-mesh, glows, clipped-text gradients, scrollbar, topbar glass) for a light background. All WCAG AA-verified. - Add a "works with" strip and a dark navy proof/testimonials band (placeholder reviews; the 100% / 0 / 25-tests stats are real). - Remove the floating connector line from the hero preview mock. - Make Thinking mode honest: disable the toggle when no API key is configured, show a note when a Thinking request falls back to Fast, and surface the real status in the sidebar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a38a802
-
UI/UX pass: accessibility, motion, design tokens, and an eval results chart
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)Applied a 6-dimension audit (ui-ux-pro-max skill, run via parallel AI agents): - a11y: visible :focus-visible rings, prefers-reduced-motion guard, lifted text contrast (--text-dim/--text-faint), nav aria-labels + aria-current, evidence aria-expanded, role=alert/status live regions, heading hierarchy - design tokens: type / spacing / z-index / motion scales, --shadow-accent, Space Grotesk display font, tabular-nums for figures - interaction: 40/44px touch targets, press states, cursor:not-allowed disabled - layout: 100dvh, max-width on main, mobile sidebar overflow fix, line-length caps - components: SVG IconCheck (no emoji), Field error slot, Evaluation empty state - NEW: dependency-free SVG donut + progress-bar chart on the Evaluation page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c412fbd
-
Redesign frontend into a premium dark-first AI workspace
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)- New design system: dark theme tokens, Inter type, soft accent gradient, glass panels, thin borders, smooth hover/press, shimmer + answer-reveal - App shell: left sidebar nav + main area + right evidence panel - Landing/Overview: hero pitch, trust badges, drag-and-drop upload, doc grid - Ask workspace: demo question chips, loading shimmer, animated answer card, collapsible evidence panel, history - Evaluation: metric cards + pass/fail table + "why it matters" - Reusable components: Button, Card, Badge, Field, Sidebar, DocumentCard, MetricCard, EvidencePanel, Upload, LoadingState/EmptyState/ErrorState - Responsive: desktop / laptop / mobile (sidebar collapses to a top bar) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>375d687