YRDSTK — Graybox Flow
v4.3.8

Change Log

Next.js App (v4.x) release history

v4.3.9MINORCurrent
2026-02-23

Siding Calculator Enhancements & Vendor Pricing Overhaul

+Added

  • Calculator 10-Key Keyboard Support/sow
    • - Physical numpad and keyboard input for the siding calculator
    • - Print tape display (yellow receipt-style) that logs all calculator operations
    • - Clear Tape button to reset the tape history
    • - Calculator display is now focusable with Tab key
  • Chimney Siding Calculator Redesign/sow
    • - Sides formula now shows inline calculation: (Front H + Rear H) ÷ 2 × Width
    • - Chase/Shroud sub-section with Length × Width inputs and auto-calculated SF + trim LF
    • - Pipes section with diameter, count (1–4), collar checkbox, and opening SF calculation
    • - Schematic Preview with SVG chimney diagram
    • - Warm color scheme matching vanilla (cream background, orange borders)
  • Fractions-to-Decimal Reference Chart/sow
    • - Quick-reference chart for common fractions (⅛ through ⅞) with decimal equivalents
    • - Displayed below the existing inches-to-decimal chart
  • Soffit Cheek Length Warning/sow
    • - Amber warning when dormer soffit cheek length is less than wall cheek length
    • - Message: "Soffit should extend the full cheek length or longer."
  • Vendor Pricing Page Overhaul/vendor-pricing
    • - 9 material tabs: Shingles, Metal, Tile, Low Slope, Accessories, Siding, Lumber, Siding Labor, Labor & Fees
    • - Lumber separated into its own tab with independent vendor management
    • - Vendor management chips with remove (×) and "+ Add Vendor" dropdown per tab
    • - Two-line price cells showing price and calculated $/unit from coverage data
    • - Max Price column (green) showing highest vendor price per row
    • - Actions column with "Request Edit" link
    • - Vendor headers with "Updated: Never" subtext
    • - Category headers with bullet (•) prefix and "+ Add Item" button
    • - Save All button in toolbar
    • - Item ID column preserved for reference

~Changed

  • Calculator Apply buttons now replace grid values instead of accumulating
    • - Affects all Apply-to actions: soffit/fascia, wall area, dormer wall, dormer soffit/fascia, and chimney
    • - Users accumulate within the calculator rows, then Apply sets the final total
  • Dormer soffit/fascia hint now reads "Rake length from gable — based on dormer dimensions"
v4.3.8MINOR
2026-02-22

Custom/Miscellaneous Scope in SOW

+Added

  • Custom Scope Type in Scope of Work
    • - New "Custom" scope for miscellaneous estimates that don't fit predefined categories
    • - Search and add materials from the items database with auto-filled name, UOM, and best vendor price
    • - Add manual line items for anything not in the database
    • - Full estimate builder: materials + tax + delivery + labor (hrs x crew x rate) + additional costs + markup
    • - Transfer calculated total to proposal with one click
  • Custom Scope Proposal Builder
    • - Full proposal tab with inclusions, exclusions, options, and terms
    • - Generic quick-add chips for common items (Labor & Materials, Cleanup, Warranty, etc.)
    • - Live preview with zoom, front/back page toggle, and PDF export
    • - Template save/load for reusing proposal formats

Improved

  • Project Estimate Rollup now supports custom scopes with user-defined names
v4.3.7MINOR
2026-02-21

Doc Center Photo Grid, Email Sync & OAuth Improvements

+Added

  • iCloud-style Photo Grid in Doc Center
    • - Edge-to-edge image tiles with no gaps, matching iCloud Photos layout
    • - Zoom slider to adjust photos per row (2–10 columns), persisted across sessions
    • - Click to select, Shift-click for range, Cmd/Ctrl-click for multi-select
    • - Double-click to open preview, Escape to clear selection
    • - Memoized tiles and lazy loading for fast selection response
  • Bulk Label Action in Doc Center
    • - Select multiple files and assign a category (Photos, Invoices, etc.) in one action
  • Email Sync & OAuth Overhaul
    • - Quick Sync, Full Sync, and top-bar Sync buttons now call the sync edge function
    • - New Google Cloud OAuth project in Production mode — tokens no longer expire after 7 days
    • - Gmail, Outlook, and Zoho connect buttons wired up with OAuth flow
    • - Reconnect button per email account for easy token refresh
    • - Reduced sync batch sizes to avoid Supabase compute limits
    • - Backfill script for syncing historical emails (2,400+ emails synced)

*Fixed

  • Email settings sidebar no longer blacks out the screen
  • Sync errors now display per-account details instead of silent failure
v4.3.6PATCH
2026-02-21

AI Mold Mitigation Report Generator

+Added

  • Mold Mitigation Report — AI Document Generator
    • - Full detailed report preset: initial conditions, scope of work, findings, photo documentation, conclusion, certification
    • - Simple one-page summary letter preset for quick remediation documentation
    • - Distinguishes between confirmed mold, surface mildew, and wood rot/decay
    • - Follows IICRC S520 standards for insurance claims, real estate, and compliance
  • Mold Mitigation Report — Static Template
    • - Added pre-formatted template in Doc Center for manual report writing
v4.3.5PATCH
2026-02-20

Customer Name Propagation & Allocation Fixes

+Added

  • Customer Name Changes Propagate to Invoices
    • - Renaming a customer in the CMS now automatically updates all invoice records that reference that customer
    • - Updates job_name_or_po and job allocation labels across all linked invoices and sub-jobs

*Fixed

  • Auto-detected job allocation now populates the invoice amount
    • - Cost allocation amount was blank when AI auto-detected a job — now correctly fills with the invoice total
    • - Also fixed for re-run OCR: amount populates immediately after OCR completes
v4.3.4PATCH
2026-02-20

Invoice Combine & Search Improvements

+Added

  • Combine Invoices into Single Multi-Page PDF/invoices
    • - Select two or more invoices and click Combine to merge them into a single multi-page PDF
    • - Server-side PDF merge using pdf-lib — supports PDF, PNG, and JPEG files
    • - Primary invoice keeps its amount; duplicate rows are removed
    • - Merged file audit trail shows which documents were combined
  • Unarchive / Restore Invoices/invoices
    • - Archived invoices now show a restore button to bring them back
    • - Restores to previous status (approved, verified, or pending) based on timestamps
  • Search by Amount and Notes/invoices
    • - Invoice search bar now matches dollar amounts (e.g. "600.39") and notes text

*Fixed

  • Tab badge counts now update reactively when invoice status changes
v4.3.3PATCH
2026-02-19

Auto-Extract Invoices from Email Attachments

+Added

  • Auto Invoice Extraction from Emails
    • - Email batch processing now automatically extracts invoices from PDF attachments
    • - Creates invoice records, links to source email, detects duplicates, and creates payment reminder tasks
    • - New "extract_all_invoices" action to scan all existing emails for unextracted invoice attachments
  • Email Extraction Badges/email
    • - Purple "Extracted" badge on emails that have invoices extracted from their attachments
    • - New "Extracted" filter to show only emails with extracted invoices
    • - Green extraction checkmarks persist across page reloads

*Fixed

  • Archived/merged customers no longer appear in invoice job allocation dropdown
  • Job numbers now display in allocation dropdown for easier identification
  • Manual email extraction now properly sets source linkage for badge tracking
v4.3.2PATCH
2026-02-19

Background OCR & Vendor Auto-Fill

+Added

  • Background OCR Processing/invoices
    • - Bulk OCR re-scanning now continues running when navigating between pages
    • - Floating progress bar visible globally across all dashboard pages
    • - Cancel button available during scan
  • Vendor Auto-Fill from OCR/invoices
    • - Adding a new vendor from invoice verification now extracts phone, email, and address from OCR text
    • - Confirmation shows extracted contact info before saving

*Fixed

  • OCR data (ship-to, sold-to, job/PO) now persists to database correctly — added missing columns
  • Bulk OCR no longer stops when changing pages
v4.3.1PATCH
2026-02-19

AI Provider Abstraction & Settings

+Added

  • Multi-Provider AI Support
    • - All AI operations (OCR, invoice extraction, email analysis, translation, content generation) now work with both OpenAI and Anthropic
    • - Unified aiTextCall/aiVisionCall helpers abstract provider differences
    • - OpenAI uses Responses API for PDF processing, Chat Completions for text
  • AI Provider Selector/settings
    • - New toggle in Settings > Integrations: OpenAI (GPT-4o) / Anthropic (Claude) / Auto-detect
    • - Preference saved to database — edge function reads it on each request
    • - Priority chain: app settings > environment variable > auto-detect
  • AI Status Diagnostic
    • - New ai_status endpoint shows active provider and key availability

~Changed

  • API key labels in Settings now show which provider is active
  • Error messages for quota exceeded now show the specific provider and billing URL

*Fixed

  • Add Vendor button in invoice verification now generates UUID and updates vendor list immediately
  • OpenAI PDF extraction fixed — uses Responses API with input_file format instead of unsupported Chat Completions file type
v4.3.0MINOR
2026-02-19

Smart Invoice Processing & Job Cost Allocation

+Added

  • Auto-Detect Job Allocation/invoices
    • - Automatically matches invoices to jobs using ship-to/sold-to addresses, customer PO#, and vendor history
    • - Weighted scoring across multiple signals (PO field, address, name, text)
    • - Re-detect button and "Auto-detected" badge in cost allocation section
    • - Vendor history fallback queries previous invoices from same vendor
  • Structured OCR Extraction
    • - OCR now outputs grouped sections (Vendor, Sold To, Ship To, Line Items, Totals)
    • - Dedicated structured fields: customerPo, shipTo, soldTo, jobName
    • - Re-run OCR updates all form fields (vendor, totals, dates) automatically
  • Invoice Type Classification
    • - Separates customer billing invoices from vendor expenses automatically
    • - Detection via email folder (sent = customer billing) and customer invoice number matching
    • - Customer billing invoices hidden from expenses page with count indicator
    • - Classify Types button for one-time reclassification of existing invoices
  • Bulk OCR Re-scan/invoices
    • - Select multiple invoices and re-scan OCR with updated extraction prompt
    • - Progress bar shows scan progress
  • Secondary Job Insurance Fields/customers
    • - All 9 insurance fields now available for secondary job locations
    • - Policy Number, Adjuster Name/Phone/Email, Mortgage Company, Loan Number, Reference Number

~Changed

  • Expenses page: Delete replaced with Archive (with reason: Duplicate, Not an invoice, Personal expense, etc.)
  • Expenses page: Removed premature Verify/Approve bulk and row actions
  • Job/PO column now persists after invoice approval (saves job_allocations and job_name_or_po)

*Fixed

  • Auto-detect reading stale extracted text after OCR re-run
  • Null job name crash in allocation matching (job.name.split error)
  • Customer PO# field not matching job addresses (e.g. "1407 PEARL")
  • Primary job insurance inputs were not wired up (7 fields had no value/onChange)
v4.2.0MINOR
2026-02-08

Item Database & Comprehensive Lumber Package

+Added

  • Comprehensive Lumber Package/item-database
    • - Dimensional lumber: SYP #2, SYP #2 PT, SPF (2x4 through 2x12, 8'-16')
    • - LVL & engineered lumber, OSB, Glue Lam beams
    • - Posts (4x4, 6x6 PT), 1x boards
    • - Decking: 5/4" PT, 2x6 radius edge, composite (Trex, TimberTech)
    • - Connectors: tie downs, post bases, straps, hurricane ties, joist hangers
    • - Dry-in materials: Tyvek roof protector & house wrap
  • Siding & Masonry Items
    • - 67 Siding & Cladding items (James Hardie, Nichiha, LP SmartSide, etc.)
    • - Masonry & Stucco: brick, stone veneer, stucco products
    • - Siding Accessories, Permits, Recording Fees, Services
  • Customer Search Improvements
    • - Search now handles apostrophes (O'Connor matches "oconnor")
  • Deck Repair Estimating Tab/sow
    • - Select decking boards from Item Database (5/4" PT, 2x6, composite)
    • - Structural repair materials: scab, sister, or replace joists
    • - Hardware and fasteners selection
    • - Materials summary with quantities and linear feet
    • - Labor hours and crew size inputs

~Changed

  • Simplified lumber items - same product no longer duplicated for each use case (header, rafter, beam)
  • Item Database edit changed from modal to right sidebar (matches vanilla app)
  • Delete button replaced with Archive (soft delete)
  • Categories now match vanilla app exactly
v4.1.0MINOR
2026-02-03

Customer Invoicing & CMS Improvements

+Added

  • Invoice Letterhead Customization/settings
    • - Live preview of invoice in Settings → Company Info
    • - Adjustable logo size, position, and horizontal gap
    • - Address line height/spacing control
    • - Invoice header color picker
    • - DBA field with "Make checks payable to" selector
    • - Phone number auto-formatting as (###) ###-####
  • Paid Stamp Styles
    • - Rubber stamp (classic red tilted look)
    • - Angled (green tilted with date)
    • - Bordered (green rectangular)
    • - Circular (green round stamp)
    • - Simple (text only)
    • - All styles show payment date and reference number

*Fixed

  • Business name now displays prominently in customers table (contact name shown below)
  • Payment recording now works (fixed RLS policy and foreign key constraints)
v4.0.40MINOR
2026-02-01

Document Center & Deck Designer

+Added

  • Document Center/doc-center
    • - Full document management with editor
    • - Customer linking and CMS integration
    • - Document upload and organization
  • Sketch Pad Tools
    • - Spray paint tool
    • - Fill tool
    • - Bezier curve tool
    • - Dimension measurement tool
    • - Full undo/redo support
  • Deck Construction Designer/sow
    • - Interactive drag-to-resize deck diagram
    • - Hardware, footings, and component details
    • - Side view perspective toggle
    • - Joist end-grain views
    • - Colorblind-friendly palette
    • - Stair options with toe kick configuration
    • - S-curve cutaway controls in plan view
v4.0.39PATCH
2026-01-30

Invoice Extraction Improvements

+Added

  • Search bar in Invoice Extraction module
  • AI API key settings in Integrations tab
v4.0.38MINOR
2026-01-28

Mobile Receipt Capture & Financial Modules

+Added

  • Mobile Receipt Capture PWA
    • - Field manager receipt capture on mobile
    • - Camera integration for quick uploads
  • Bank Statement Reconciliation/statements
    • - Statement import and parsing
    • - Transaction matching
    • - Reconciliation workflow
  • Financial Operations Modules
    • - Checks module
    • - Expenses tracking
    • - Financial reporting
v4.0.35MINOR
2026-01-25

Schedule & Task Management

+Added

  • Global Schedule Module/global-schedule
    • - Calendar view for all jobs
    • - Drag and drop scheduling
    • - Resource allocation
  • Tasks & Reminders Module
    • - Task creation and assignment
    • - Due date tracking
    • - Custom delete confirmation modal
v4.0.32MINOR
2026-01-22

SOW Module Completion

+Added

  • SOW PDF Export/sow
    • - Full PDF generation with company letterhead
    • - Supabase persistence for estimates
    • - Siding proposal with inclusion/exclusion language
    • - Match vanilla app scope order and icons
  • Customer CMS Enhancements/customers
    • - SOW button navigation
    • - Add customer flow improvements
    • - Complete Phase 1 features
v4.0.30MINOR
2026-01-18

Email Module Enhancements

+Added

  • Email Accounts Management
    • - Email accounts visible in sidebar with provider icons
    • - Account filtering by inbox
    • - Inbox and unread count badges per account
  • Resizable Sidebar
    • - Draggable sidebar width with mouse
    • - Persisted width during session
  • Email Settings Drawer
    • - Connected accounts management
    • - Add new account flow
    • - Sync settings configuration
    • - AI processing options
    • - Email rules management
    • - Storage management display
  • Email Detail Features
    • - KB dropdown for knowledge base categorization
    • - Quick actions bar (Archive, Delete, Label, Flag, KB Rule, Rules)
    • - Job link bar with view/unlink options
    • - Mark Unread, Spam, Translate buttons
  • Attachment Preview
    • - Inline preview panel for images and PDFs
    • - Pop Out, Download, Doc Center buttons
    • - Full-width preview below email body
    • - Improved PDF scroll behavior with FitH view

~Changed

  • Button styling updated to match vanilla app (light borders, colored hovers)
  • PDF iframe height set to 1200px for better viewing
  • Added overscrollBehavior for proper scroll chaining
v4.0.18MINOR
2026-01-18

Core Modules Implementation

+Added

  • Vendors Module/vendors
    • - Full CRUD operations with Supabase integration
    • - Color-coded category sections (Supplier=blue, Subcontractor=orange, Service=purple, Office=green)
    • - Grouping by vendor type, then by material type/trade/service type
    • - Expand/collapse functionality for all sections
    • - Vendor info sidebar for quick viewing
    • - Add/Edit drawer with all fields: basic info, trade/specialty, material types, service types, contact info, address, account & payment terms, rebate program, documentation, contacts, notes
    • - Search and status filtering (Active/Archived/All)
    • - Document badges (W9, GL, WC, Auto)
  • Email Module/email
    • - Three-panel layout: folders sidebar, email list, detail/compose view
    • - Folders: Inbox, Action Required, Sent, Drafts, Flagged, Archive, Trash
    • - Filters: All, Unread, Flagged, Linked, Attachments
    • - Compose view with To, Subject, Body fields
    • - Email detail with attachments display
    • - Collapsible sidebar
    • - Folder badge counts
  • Invoices Module/invoices
    • - 9 tabs: Pending, Needs Review, Unprocessed, Duplicates, Verified, Approved, Not Invoice, Rejected, All
    • - Upload modal with drag-and-drop file support
    • - Bulk selection and actions (mark not invoice, reject, delete)
    • - Sortable table columns
    • - Invoice detail modal with document preview placeholder
    • - Verification and approval workflow
  • Scope of Work Module/sow
    • - 19 scopes with emojis (roofing, siding, gutters, windows, etc.)
    • - Scope selection grid with whole-house toggle
    • - Collapsible scope sections with expand/collapse all
    • - 4 tabs per scope: Project Info, Footages, Specs, Estimate
    • - Auto-save to localStorage
    • - Customer lookup via URL params (?customer=id or ?job=number)
  • Sidebar Navigation
    • - Added SOW link to navigation

~Changed

  • Settings Page
    • - Fixed border styling to match vanilla version (light gray borders)
  • Database Types
    • - Extended Vendor interface with full fields including rebates, documentation, contacts
    • - Added VendorContact and RebateTier interfaces
    • - Added Email and EmailAttachment interfaces
v4.0.17PATCH
2026-01-18

Color-coded sections & TypeScript fixes

~Changed

  • Color-coded sections for better visual organization
  • TypeScript type fixes throughout the app
v4.0.16PATCH
2026-01-17

Settings Page Styling

~Changed

  • Updated Settings page to match vanilla app styling
v4.0.0MAJOR
2026-01-15

Next.js App Foundation

+Added

  • Next.js 16 with App Router
  • React 19
  • Tailwind CSS 4
  • Supabase integration for authentication and database
  • Dashboard layout with sidebar navigation
  • Customers module with drawer editing
  • Settings page with dropdown management
For vanilla app changelog (v3.x), see CHANGELOG.md in the project root.