← Back to Pull requests

refactor(web): migrate JReviewsSection and ReviewFormV2 to Tailwind CSS v4 #2264

Open
unknown opened this pull request with 395 lines diff across 4 files
View on GitHub
unknown unknown commented on Dec 02, 2026 11:32 UTC
Author

Summary


  • Migrates JReviewsSection.tsx and ReviewFormV2.tsx from Bootstrap 5 utility/component classes (btn-group, btn-close, progress, progress-bar, col-, row, d-flex, alert-, form-control, form-select, form-label, form-check-input, rounded-pill, rounded-circle, spinner-border, stretched-link, spacing/typography helpers) to Tailwind CSS v4 utilities, --rate- semantic tokens, and shadcn/ui Button, Badge, Card, and Input primitives.

  • Adds @source entries for JReviewsSection.tsx and ReviewFormV2.tsx in apps/web/src/app/style/tailwind.css.

  • Preserves the 5-star UI rule, all data-testid attributes, ARIA semantics, mobile touch targets (>= 24px), and compact SSR HTML for /smartphones/[slug].

  • Updates the two progress-bar assertions in review-display.test.ts to match the migrated Tailwind bg-status--fg bars and adds apps/web/src/components/reviews/__tests__/reviews-tailwind.test.ts.
  • Verification


  • npx prettier --check on all 5 changed files: passed.

  • npm run typecheck -w @repo/web: passed.

  • npm run lint -w @repo/web: passed (--max-warnings 0).

  • npm test -w @repo/web: all 100 unit test files passed.
  • Closes #2260

    ---

    <!-- dos-pr-summary -->

    📌 TL;DR


    This PR refactors the JReviewsSection component to replace legacy Bootstrap utility classes with modern Tailwind CSS utilities and custom design tokens. It also updates the Tailwind configuration to ensure the new review components are correctly scanned for class generation.

    🎯 Type of Change


  • 🚀 New feature

  • 🐛 Bugfix

  • 🧹 Refactor

  • ⚡ Performance

  • 📚 Documentation

  • ⚙️ CI / Configuration
  • 🔍 Changes Walkthrough


    | File | Summary of Changes |
    | :--- | :--- |
    | apps/web/src/app/style/tailwind.css | Added @​source directives for JReviewsSection.tsx and ReviewFormV2.tsx to ensure Tailwind CSS correctly scans these files for utility classes. |
    | apps/web/src/components/reviews/JReviewsSection.tsx | Styling Migration: Replaced Bootstrap classes (e.g., d-flex, mb-3, alert-success) with Tailwind utilities (e.g., flex, mb-[12px], bg-status-good-bg).<​br>Component Updates: Swapped native HTML elements for design system components (e.g., <​button> to <​Button>, <​input> to <​Input>).<​br>Layout Improvements: Updated grid layouts for review cards and criteria sliders to use Tailwind's grid system (grid-cols-1 md:grid-cols-2).<​br>Accessibility: Replaced visually-hidden with sr-only and updated focus states to use focus-visible utilities. |

    📊 Architectural Flow


    flowchart TD
        A[User Interaction] --> B[JReviewsSection Component]
        B --> C{State Update}
        C -->|Render| D[UI Elements]
        D --> E[Review Cards]
        D --> F[Filter Controls]
        D --> G[Summary Section]
        
        subgraph "Styling Layer"
            H[Tailwind CSS]
            I[Design Tokens / CSS Vars]
            J[Bootstrap Legacy]
        end
        
        B -.->|Uses| H
        B -.->|Uses| I
        B -.->|Replaces| J
        
        K[tailwind.css Config] -->|Scans| B
        K -->|Generates| H
    

    <!-- /dos-pr-summary -->

    Claimant: antigravity:wave-h-2260

    Diff: 395 lines (+296 / -99) across 4 files Reviewer: claude[bot] Review duration: 7m
    All Vouch review confidence checks passed
    Residual risk 0.39 = Change Risk (0.66) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 395 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 76% · Reviewer familiarity: 35%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.358
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #2264"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 40.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 66.3% (HIGH) · Higher = larger blast radius
    66.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.8% · Lower = rushed or shallow review
    40.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 39.2% · Moderate risk
    39.2%
    Repository