Skip to content

V2#15

Merged
ApexYash11 merged 5 commits into
mainfrom
v2
Jun 6, 2026
Merged

V2#15
ApexYash11 merged 5 commits into
mainfrom
v2

Conversation

@ApexYash11

@ApexYash11 ApexYash11 commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • New Features

    • Added circuit breaker pattern for service resilience and multi-provider LLM fallback logic
    • Implemented caching layers across dashboard, policies, and chat endpoints
    • Added React Query hooks for authenticated data fetching
    • Introduced Framer Motion animations for page transitions, streaming text display, and interactive components
    • Added command palette (⌘K) for dashboard navigation
    • Implemented E2E testing with Playwright (auth, landing page, visual regression)
  • Performance Improvements

    • Added database performance indexes for faster query execution
    • Optimized RAG embedding with bulk insert operations
    • Enhanced chat history and policy caching
  • User Interface Updates

    • Updated typography from Merriweather to Instrument Serif
    • Improved border radius and color scheme (slate variants)
    • Enhanced mobile menu with smooth animations
    • Replaced confirm/alert dialogs with custom dialog components
    • Improved loading states with animated skeleton components
  • Documentation

    • Added backend optimization roadmap and performance audit reports
    • Added comprehensive frontend audit with implementation strategy

- Integrated framer-motion for smooth animations in Profile and Upload pages.
- Wrapped main content in PageWrapper for consistent animation effects.
- Added CommandPalette component for quick navigation and actions.
- Improved mobile menu with animated transitions.
- Updated package dependencies, including framer-motion to version 12.40.0.
…ce UI with policy selector buttons; add visual regression tests
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
claim_wise Error Error Jun 6, 2026 11:13am
claimwise-9t6e Error Error Jun 6, 2026 11:13am
claimwise-fht9 Error Error Jun 6, 2026 11:13am
claimwise-gi96 Error Error Jun 6, 2026 11:13am

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: edf4fd68-1589-426e-acfc-df770e7162a3

📥 Commits

Reviewing files that changed from the base of the PR and between 960afd1 and 2f3ee30.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (37)
  • BACKEND-OPTIMIZATION-PLAN.md
  • BACKEND-PERFORMANCE-AUDIT.md
  • FRONTEND-AUDIT-REPORT.md
  • backend/sql/add_performance_indexes.sql
  • backend/src/circuit_breaker.py
  • backend/src/llm_groq.py
  • backend/src/rag.py
  • backend/src/routes/analysis.py
  • backend/src/routes/chat.py
  • backend/src/routes/dashboard.py
  • backend/src/routes/policies.py
  • frontend/app/analyze/page.tsx
  • frontend/app/chat/page.tsx
  • frontend/app/compare/page.tsx
  • frontend/app/dashboard/page.tsx
  • frontend/app/globals.css
  • frontend/app/layout.tsx
  • frontend/app/page.tsx
  • frontend/app/profile/page.tsx
  • frontend/app/upload/page.tsx
  • frontend/components/chat/message.tsx
  • frontend/components/dashboard/command-palette.tsx
  • frontend/components/dashboard/recent-activity.tsx
  • frontend/components/layout/header.tsx
  • frontend/components/motion/page-wrapper.tsx
  • frontend/components/motion/route-transitions.tsx
  • frontend/components/motion/stagger-children.tsx
  • frontend/components/query-provider.tsx
  • frontend/components/ui/skeleton.tsx
  • frontend/e2e/auth.spec.ts
  • frontend/e2e/landing.spec.ts
  • frontend/e2e/upload.spec.ts
  • frontend/e2e/visual.spec.ts
  • frontend/lib/use-queries.ts
  • frontend/package.json
  • frontend/playwright.config.ts
  • frontend/styles/globals.css

📝 Walkthrough

Walkthrough

This PR implements a comprehensive backend performance optimization and frontend modernization initiative. It adds strategic planning documentation, introduces backend resilience patterns (circuit breaker, database indexes), refactors LLM provider cascades with fallback logic, wires caching across backend endpoints, establishes React Query infrastructure on the frontend, migrates page-level data fetching to server-backed hooks, incorporates Framer Motion animations throughout the UI, and introduces E2E test coverage with Playwright.

Changes

Performance Optimization & Modernization

Layer / File(s) Summary
Planning & Performance Audit Documentation
BACKEND-OPTIMIZATION-PLAN.md, BACKEND-PERFORMANCE-AUDIT.md, FRONTEND-AUDIT-REPORT.md
Strategic roadmap and audit findings outline 8 optimization sprints, database query risks, endpoint slow-paths, caching strategies, and phased frontend/backend modernization with completion metrics.
Backend Infrastructure & Resilience
backend/sql/add_performance_indexes.sql, backend/src/circuit_breaker.py, backend/src/rag.py
Database indexes on user_id + time columns for policies, chat_logs, comparisons, activities; circuit breaker module with CLOSED/OPEN/HALF_OPEN states for per-service failure isolation; embedding dimension standardized to 768 with bulk insert optimization.
LLM Provider Resilience & Fallback Logic
backend/src/llm_groq.py
Multi-provider Groq support (primary/secondary/tertiary) with circuit breaker wiring, rate-limit detection, rule-based fallback analysis; enhanced validation and data cleaning for policy numbers, expiration dates, monetary fields, and claim-readiness scoring.
Backend Analysis & Computed Metrics
backend/src/routes/analysis.py
Analysis endpoint now computes and stores computed_metrics (coverage amount, risk count, exclusions flag, readiness score) in metadata for downstream caching and dashboard consumption.
Backend Endpoint Caching Wiring
backend/src/routes/chat.py, backend/src/routes/dashboard.py, backend/src/routes/policies.py
Cache manager integration with per-user keys and TTLs across /chat, /history, /activities, /dashboard/stats, /dashboard/metrics, and /policies endpoints; cache invalidation on policy upload/delete and chat log writes.
Frontend Query Infrastructure & Data Hooks
frontend/components/query-provider.tsx, frontend/lib/use-queries.ts, frontend/package.json
React Query provider with configurable cache/retry defaults; five custom hooks (usePolicies, useDashboardStats, useDashboardMetrics, useActivities, useHistory) centralizing authenticated API fetching with built-in error handling and pagination support.
Frontend Page Data Binding Refactors
frontend/app/analyze/page.tsx, frontend/app/chat/page.tsx, frontend/app/dashboard/page.tsx, frontend/app/compare/page.tsx, frontend/components/dashboard/recent-activity.tsx
Pages migrate from manual Supabase fetching to React Query hooks; analyze/chat pages manage dialog-driven UI state (deletion, streaming text), dashboard/compare pages use query hooks for stats/metrics, recent-activity derives data from useActivities hook.
Frontend UI Animations & Motion Components
frontend/components/motion/page-wrapper.tsx, frontend/components/motion/route-transitions.tsx, frontend/components/motion/stagger-children.tsx, frontend/components/dashboard/command-palette.tsx, frontend/components/chat/message.tsx, frontend/components/layout/header.tsx, frontend/app/page.tsx, frontend/app/upload/page.tsx, frontend/app/dashboard/page.tsx, frontend/app/analyze/page.tsx
Framer Motion integration across landing page (features grid, CTA section), dashboard (staggered metrics cards, progress ring), upload (step animations), analyze (readiness score ring), chat (streaming text reveal), header (mobile menu), and command palette (⌘K keyboard shortcut).
Frontend Theme, Fonts & Skeleton Components
frontend/app/layout.tsx, frontend/app/globals.css, frontend/components/ui/skeleton.tsx
Font switched from Merriweather to Instrument Serif, border radius increased to 0.625rem, typing-dot animation added; skeleton placeholder components (CardSkeleton, MetricGridSkeleton, DashboardSkeleton, AnalyzeSkeleton) for consistent loading states.
Frontend E2E Testing Setup
frontend/playwright.config.ts, frontend/e2e/auth.spec.ts, frontend/e2e/landing.spec.ts, frontend/e2e/upload.spec.ts, frontend/e2e/visual.spec.ts
Playwright configuration with desktop/mobile projects; E2E test suites covering auth flows, landing page features, upload redirection, and visual regression with snapshot-based baseline matching.

🎯 4 (Complex) | ⏱️ ~60 minutes


🐰 A grand optimization quest unfolds,
Circuit breakers guard the treasure holds,
React Query makes data dance and flow,
Framer Motion puts on quite a show,
Tests ensure the path ahead is clear—
Performance blooms throughout the year!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ApexYash11
ApexYash11 merged commit eb4c848 into main Jun 6, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant