Live from GitHub · Refreshed hourly

Software Updates

Every change shipped to the Maverick Mechanical platform — features, fixes, and improvements. Pulled directly from our GitHub repository.

By the Numbers

Lines of Code

105,872

Web platform — TypeScript, React, Tailwind, SQL

Characters Written

3.83M

3,831,351 total characters

Updates Pushed

183

exact commit count on main

Current Version

v0.1.83

build 183 · 4137d79

API Endpoints

97

individually routed — Stripe's public API has ~400

Database Models

119

across 78 schema files — most SaaS platforms have 20–50

System Permutations

10^29

2^97 endpoint combinations — more than atoms in the observable universe (10^80)

Project Age

6mo 9d

since Dec 9, 2025

Pre-AI Dev Hours

3.5K hrs

105,872 lines ÷ 30 LOC/hr — equivalent to 1.7 years (senior engineer, no AI)

With-AI Dev Hours

0.9K hrs

4× AI productivity multiplier (2024–2026 studies) — equivalent to 110 days

Equivalent Firm Cost

$220,567

live ticker · Maverick rate: $250 USD/hr

Hours estimated from source line count at 30 LOC/hr (industry benchmark for production-quality TypeScript/React without AI assistance), with a 4× multiplier for AI-assisted development per published 2024–2026 enterprise studies. Equivalent Firm Cost uses a $250/hr loaded billable rate reflecting a premium engineering firm building enterprise-grade SaaS — and ticks up live, because the project is still being actively built.

183 updates shipped

Page 1 of 4

  1. Tuesday, June 2, 2026

    17 updates

    Fix5:52 PM · ZRosserMcIntosh

    dynamic import next/headers in supabase-admin to prevent Turbopack build error

    Feature5:47 PM · ZRosserMcIntosh

    Phase 7 — API platform core + developer key management

    Feature5:28 PM · ZRosserMcIntosh

    Phase 6 — Super-Admin SaaS panel (10 pages)

    • Real Supabase queries replacing simulated data
    • Live KPIs: total orgs, active subs, trial count, MRR
    • Quick action cards linking to organizations/subscriptions/metrics
    • Quick links to MRR, feature flags, audit log
    • organizations/: tenant table with plan, status, MRR, storage, search + filters
    • subscriptions/: plan change modal (inline), suspend/reactivate actions
    • metrics/: per-tenant SMS/signature/API usage bars vs plan limits, month picker
    • features/: employee feature flag toggles + per-tenant plan override matrix
    • mrr/: MRR/ARR/ARPU KPIs, revenue by plan breakdown bars, account health
    • audit/: paginated usage_events log with event type filter
    • onboarding/, domains/, stripe/, invoices/ (Phase 9)
    • tickets/, announcements/, infra/ (Phase 10)
    • components/ComingSoon.tsx — reusable stub component with eta display
    Feature4:45 PM · ZRosserMcIntosh

    Phase 5 — plan feature gates + usage limit enforcement

    • src/lib/saas/features.ts: PLAN_DEFINITIONS (static mirror of DB seed), isFeatureEnabled (plan features + per-tenant overrides), checkUsageLimit (usage_events count vs quota), enforceUsageLimit (null = proceed; 402 = hard block; 403 = suspended), enforceFeatureGate, getMonthlyUsageSummary
    • src/app/api/saas/limits/route.ts: GET endpoint — returns plan + month-to-date SMS, signature, API call usage + storage summary for dashboard meters
    • src/app/api/saas/tenant/route.ts: GET endpoint — returns tenant info, plan definition, trial status + days remaining
    • src/app/api/invoices/send-sms/route.ts: enforceUsageLimit('sms_sent') before send; recordUsageEvent after success
    • src/lib/signatures/repo.ts: enforceUsageLimit('signature_created') before insert; recordUsageEvent after success; throws PLAN_LIMIT_EXCEEDED with status + details for API layers to surface
    • src/middleware.ts: /api/saas/* added to PROTECTED_ROUTES (employee auth)
    Refactor4:35 PM · Copilot

    type safety hardening — eliminate as any, add ApiResponse types, fix metering.ts plans[0] bug

    • Initial plan
    • Type safety hardening: add ApiResponse types, fix as any in API routes and lib
    Feature4:31 PM · Copilot

    automated review request cron — SMS/email 24h post job completion

    • Initial plan
    • feat: automated review request cron — SMS/email 24h post job completion
    Chore4:23 PM · ZRosserMcIntosh

    organize migrations into 12 folders + docs into 7 folders

    • Migrations (42 files → 12 categories + _disabled):
    • 01_core-schema, 02_security-rls, 03_chat, 04_customers-portal,
    • 05_jobs-attachments, 06_employees-metrics, 07_integrations,
    • 08_payroll-deposits, 09_notifications-webhooks, 10_saas-platform,
    • 11_signatures, 12_support-ops, _disabled
    • Docs (moved root .md files + loose docs/ files into subfolders):
    • planning/, setup/, status/, guides/, mobile/, summaries/, android/
    • README.md stays in repo root
    Feature4:09 PM · Copilot

    city landing pages for AI + local SEO — 14 cities

    • Initial plan
    • feat: city landing pages for AI + local SEO — 14 cities
    • fix: address review nits on city pages
    • fix: refine city FAQ phrasing
    • fix: adjust city hero paragraph spacing
    4:08 PM · Copilot

    Agent 1: AI search + SEO audit — robots.txt, llms.txt, structured data, meta

    • Initial plan
    • Agent 1: AI search + SEO audit — robots.txt, llms.txt, structured data, meta
    • fix: address code review comments — geo in config, llms.txt formatting, description city count
    3:44 PM · ZRosserMcIntosh

    Phase 4: /pay/[token] customer invoice payment page

    • SQL migration: pay_token + pay_viewed_at on invoices_v2
    • POST /api/pay/generate — create/retrieve pay token for invoice
    • POST /api/pay/[token]/checkout — create Square payment link
    • /pay/[token] server page — fetch invoice by token, mark viewed
    • pay-page-client.tsx — line items, totals, Pay Now CTA (Square redirect)
    • /api/invoices/send — auto-generate pay_token on send, return payUrl
    3:36 PM · ZRosserMcIntosh

    Phase 3: Subdomain routing for sign/pay/apps/api

    • Middleware detects subdomains: sign.*, pay.*, apps.*, api.*
    • Rewrites to /sign/*, /pay/*, /apps/*, /api/* internally
    • Added /sign, /pay, /api/signatures to public routes
    • Supports maverickmechanical.us, localhost, vercel.app
    • No redirect (URL stays clean on subdomain)
    3:35 PM · ZRosserMcIntosh

    Phase 2: /sign/[token] public signing page

    • SignaturePad component (canvas + typed modes, clear)
    • /sign/[token] page (server + client components)
    • API routes: view, sign, decline
    • Audit logging with IP/UA
    • Markdown body rendering
    • Status-based UI (expired, already signed, etc.)
    • react-signature-canvas dependency
    Featuresaas3:18 PM · ZRosserMcIntosh

    Phase 1.5 — tenants, plans, storage metering w/ margin-safe pricing

    • tenants, plans (free/starter/pro/enterprise), storage_usage_snapshots, storage_overages, usage_events
    • RLS + seed plans + default 'maverick-mechanical' tenant
    • pricing.ts: constants engineered for 70%+ margin after Stripe ($0.15/GB overage, MIN_INVOICE $10)
    • metering.ts: recordUsageEvent, snapshotTenantStorage, snapshotAllTenants, calculateMonthlyOverage, getTenantUsageSummary
    • Walks Supabase storage recursively; aggregates per-bucket + total
    • /api/cron/snapshot-storage (daily 02:00 UTC, CRON_SECRET-protected)
    • vercel.json updated
    Featuresignatures3:08 PM · ZRosserMcIntosh

    Phase 1 — core lib + SQL schema (adapted from Katura1999)

    • supabase/migrations/20260602_signature_documents.sql: documents, audit, templates + RLS + 3 seed templates
    • src/lib/signatures/: types, tokens, repo (Supabase-native), render-template, barrel
    • Foundation for sign.maverickmechanical.us subdomain (Phase 2)
    Feature2:45 PM · ZRosserMcIntosh

    Square payment-link API endpoint for mobile field collection

    Feature2:32 PM · ZRosserMcIntosh

    Wire push notification triggers into job scheduling, time approval, and inbound SMS

    Docsmobile1:06 AM · ZRosserMcIntosh

    refresh WHATS_LEFT after Sprint 2 iOS notes + Android JobDetail

    • Android JobDetailScreen + Start/Pause/Complete migration (f24bb44)
    • Android mark-clean ackers + periodic FetchVisitsWorker (5e84011)
    • iOS mark-clean + post-drain hook + VisitsSection in JobDetailView (1b960b4)
    • iOS Sprint 2 offline notes: NoteEntity + OfflineNoteRepository + NoteOutboxAcker + NoteViewModel.bind(_:) opt-in migration (c0724eb)
  2. Monday, June 1, 2026

    7 updates

    Docsmobile7:12 PM · ZRosserMcIntosh

    refreshed parity gap analysis post-Sprint 1

    • Web: 79 endpoints, 42 dashboard pages, 98,446 LOC
    • Android: 159 files, 37,352 LOC, 1,025 funcs — ~38% web coverage
    • iOS: 49 files, 9,915 LOC, 207 funcs — ~19% web coverage
    • P0/P1 tech-facing (23 items) — what techs actually need
    • P2 (19 items) — mostly web-only by design
    Docsios5:42 PM · ZRosserMcIntosh

    full parity audit — iOS at 17% of Android by function count

    • iOS: 42 files, 8,476 LOC, 171 functions
    • Android: 149 files, ~22,000 LOC, 1,007 functions
    • Web: 418 files, 98,446 LOC, 79 API endpoints
    • 22 feature areas vs web / 12 vs Android (P0: visits, dispatch, estimates, invoices, customers CRUD)
    • All offline infrastructure (no SwiftData, no outbox, no BGTask)
    • ~30 functions on the 5 repos that already exist
    • Realtime, push UI surfaces, conflict resolution, DI
    Docsmobile4:30 PM · ZRosserMcIntosh

    comprehensive parity audit + offline-first roadmap

    • Three-tier sync model (Hot/Warm/Cold caches)
    • Outbox pattern for writes (pending_operations table on both Android Room and iOS SwiftData)
    • Conflict resolution: server-wins for $, client-wins for notes
    • Snapshot fallbacks (encrypted daily snapshots, 7-day rotation) §5 12-week sprint plan, six 2-week sprints: 1. Offline foundation (outbox + cache for all entities) 2. Visits on mobile (matches new web feature) 3. Revenue features (payments, estimates) 4. Communication & dispatch 5. Inventory & truck DNA 6. Polish & store submission §6 Cross-platform shared resources (docs/android/ → docs/mobile/) §7 Quick wins shippable this week §8 Risk register §9 Success metrics
    Featurejobs4:28 PM · ZRosserMcIntosh

    wire VisitsPanel into job detail page + mobile optimize

    • All tap targets ≥ min-h-9 (36px) for action buttons, min-h-11 (44px) for inputs/selects/primary buttons — meets Apple HIG (44pt) and Material (48dp) minimums.
    • Form inputs use text-base on mobile to prevent iOS Safari auto-zoom on focus, then drop to text-sm on sm+ breakpoints.
    • Visit row header wraps with flex-wrap when status badge + date collide on narrow screens.
    • Quick-action button row stacks vertically on mobile via flex-col sm:flex-row.
    • Save/Cancel buttons fill width on mobile (flex-1) and snap to content width on sm+ (sm:flex-none).
    • Number input uses inputMode="numeric" to surface the numeric keypad on mobile.
    • Added active: states for visible tap feedback on touch devices.
    Featurevisits5:58 AM · ZRosserMcIntosh

    multi-visit jobs — schema, API, and UI panel

    • id, job_id (FK → jobs_v2, CASCADE), visit_number (unique per job)
    • Full scheduling: scheduled_start/end, actual_start/end, duration, window
    • Assignment: assigned_to (FK → employee_profiles), team (text[])
    • Status FSM: scheduled → dispatched → en_route → in_progress → completed (also: cancelled, skipped, rescheduled)
    • Details: title, instructions, notes, checklist (JSONB)
    • Completion: completed_at, completed_by, signature_path
    • Recurrence: recurrence_rule (iCal RRULE), is_recurring flag
    • Indexes: job_id, assigned_to, active status, scheduled_start
    • Trigger: auto-update updated_at on every write
    • RLS: authenticated users full CRUD (tenant scoping via jobs_v2 join)
    • Lists visits with status badges, assigned tech, schedule, duration
    • Quick status transitions (Dispatch → Start → Complete) per visit
    • Inline "+ Add Visit" form: title, schedule, tech, duration, instructions
    • Exported from components/index.ts for easy import
    Fixinvoices5:47 AM · ZRosserMcIntosh

    remove Date.now() race condition on invoice_number

    • Queries invoices_v2 for unpaid invoices past their due_date
    • Applies a 4-tier cadence: 3d, 7d, 14d, 30d past due
    • Sends branded HTML email via Brevo (soft → firm → final)
    • Sends SMS via Twilio for tier 7+ if phone is on file
    • Rate-limits to max one reminder per 48 hours per invoice
    • Updates reminder_count + last_reminder_at + status=overdue
    • Protected by CRON_SECRET header (Vercel injects automatically)
    Featuresoftware-updates5:41 AM · ZRosserMcIntosh

    Katura-parity "By the Numbers" stats section

    • totalLines, totalChars, totalFiles (broken down by web / sql / scripts)
    • apiEndpoints — every route.ts in the App Router
    • database.tables / sqlFiles — unique CREATE TABLE names across all SQL Output: src/app/software-updates/repo-metrics.json (gitignored)
    • prebuild → node scripts/compute-repo-metrics.mjs Vercel regenerates the snapshot on every deploy automatically.
    • metrics → same script, callable ad-hoc with `npm run metrics`
    • Parses User-Agent at submission time into structured columns (browser, browser_version, os, os_version, device_type).
    • Captures screen_size from multipart payload ("1440x900" format).
    • Resolves reporter_user_id from Bearer token if present, so admin can see which employee filed the ticket without requiring them to type their email.
    • Reads Supabase session token and passes it as Authorization: Bearer so the API can resolve reporter_user_id server-side.
    • Captures window.innerWidth × window.innerHeight as screen_size.
    • Added title + placeholder attrs on page-URL input (a11y / lint).
    • Diagnostics panel: shows browser, OS, device type, viewport, error reference, IP, and source for every ticket — helps spot patterns like "all reports are Safari 17 on iOS at 375x812".
    • Screenshot viewer: signed URL minted on ticket open, shown inline with a full-size link; signed URL note (expires ~1 hour).
    • Added title + aria-label on status/priority selects (a11y / lint).
    • flex-shrink-0 → shrink-0 (Tailwind v4 canonical class).
  3. Sunday, May 31, 2026

    7 updates

    Fix7:40 PM · ZRosserMcIntosh

    Cmd+/ fires through modals; software-updates GitHub token guidance

    Chore7:22 PM · ZRosserMcIntosh

    trigger deploy on reconnected org repo

    Chore7:19 PM · ZRosserMcIntosh

    trigger Vercel redeploy after removing branch protection

    Fix6:58 PM · ZRosserMcIntosh

    build errors — DispatchMessenger empty file + textarea label

    Feature6:39 PM · ZRosserMcIntosh

    SMS invoice texting, software updates page, fix Vercel build

    • Fix Vercel build: getServiceSupabase() now returns a lazy Proxy when env vars are missing (build-time), deferring the error to actual runtime
    • SMS Invoice: API route /api/invoices/send-sms + SendTextMessageModal component (mirrors Jobber's 'Send as text message' feature)
    • Software Updates page at /software-updates — pulls live commit history from GitHub, grouped by day with search + pagination
    • Footer: added Software Updates link
    • Schedule: view-aware nav + click-to-add + drag-to-reschedule
    Feature6:25 PM · ZRosserMcIntosh

    support tickets, feature flags, health dashboard, incidents, runbooks

    • Support tickets with Cmd+/ screenshot hotkey (html-to-image)
    • Feature flags with role-based gating + rollout %
    • Health dashboard aggregating all integrations
    • Incident tracking with timeline + ticket linking
    • Runbooks with auto-versioning revisions
    • 20260531000000_support_tickets.sql
    • 20260531000001_feature_flags.sql
    • 20260531000002_incidents.sql
    • 20260531000003_runbooks.sql
  4. Friday, February 27, 2026

    19 updates

    Perf8:18 PM · ZRosserMcIntosh

    optimize build for Vercel Turbo (30-CPU)

    • next.config.ts: add experimental parallelServerCompiles, parallelServerBuildTraces, optimizePackageImports, compress, AVIF/WebP images
    • tsconfig.json: narrow includes from **/*.ts to src/**/*.ts (skip 13 script files from TS check)
    • package.json: remove dead postgres dep, move supabase CLI to devDeps (-89MB from prod)
    • Remove empty tailwind.config.ts (Tailwind v4 uses CSS-based config)
    • workerThreads disabled (DataCloneError with Next.js 16 static gen workers)
    Refactor7:03 PM · ZRosserMcIntosh

    Phase 4 Priority 4 — extract components from maintenance, jobs, integrations pages and aiSummaryService

    • types.ts: 5 interfaces (MaintenancePlan, Subscription, Customer, Property, SubscriptionWithDetails)
    • icons.tsx: 7 icons (PlusIcon, UsersIcon, CurrencyIcon, CalendarIcon, DocumentIcon, EyeIcon, CheckCircleIcon)
    • components.tsx: StatCard, NewPlanModal, NewSubscriptionModal
    • types.ts: JobWithDetails, CustomerOption, PropertyOption interfaces
    • icons.tsx: 6 icons (PlusIcon, CalendarIcon, TruckIcon, PlayIcon, CheckIcon, ChevronIcon)
    • helpers.tsx: StatCard, StatusBadge, PriorityBadge, formatDateTime
    • NewJobModal.tsx: Full job creation modal with address resolution
    • types.ts: Integration, SyncRun interfaces
    • icons.tsx: 19 icons (utility + integration-specific brand icons)
    • components.tsx: IntegrationCard, StatusBadge, formatDateTime
    • Fixed Tailwind v4: bg-gradient-to-r → bg-linear-to-r, flex-shrink-0 → shrink-0
    • aiSummaryPdf.ts: PDF generation (generateSummaryPDF, buildPDFHTML, SummaryResult type)
    • aiTechHandoff.ts: Tech handoff (generateTechHandoffSummary, TechHandoffResponse type)
    • Re-exports maintained for backward compatibility
    Refactor6:38 PM · ZRosserMcIntosh

    extract estimates/[id] and hr-metrics page components

    • Extracted: types.ts (5 interfaces), icons.tsx (4 icons), components.tsx (AddItemModal + AddOptionModal)
    • Extracted: helpers.ts (HRTabType, getHRTabLabel, getInitials, getStatusColor, findMetric)
    • Extracted: components.tsx (MetricCard, MetricRow, InfoRow, StatusBadge)
    • Extracted: tabs.tsx (9 tab components: Overview, Employment, Time, Leave, Performance, Training, Safety, Assets, Audit)
    Refactor6:14 PM · ZRosserMcIntosh

    break up Square webhook (956 → 146 lines)

    • shared.ts: types, config, supabase client, signature verification, logging, notifications, status mappers
    • handlers/payment.ts: payment.completed/updated/failed (deposit + invoice matching)
    • handlers/refund.ts: refund.created/updated (payment + invoice reversal)
    • handlers/customer.ts: customer.created/updated (upsert to customers table)
    • handlers/invoice.ts: invoice.created/updated/payment_made/canceled
    • handlers/dispute.ts: dispute.created/state.updated (critical alerts, fund tracking)
    • handlers/index.ts: barrel re-exports
    • route.ts: thin dispatcher with signature verification + idempotency
    6:04 PM · ZRosserMcIntosh

    delete 1,736 lines of dead code

    • ChatWidget.tsx (656 lines) — superseded by ChatWidget/ directory, zero imports
    • types-servicetitan.ts (1,035 lines) — zero imports anywhere in codebase
    • portal-auth.ts (0 bytes) — empty file, .tsx version is the real one
    • contacts-redirect/page.tsx — duplicate of contacts/page.tsx redirect
    • contacts/page-redirect.tsx — triple duplicate of same redirect
    • invoices-redirect/page.tsx — duplicate of invoices/page.tsx redirect
    Refactor5:20 PM · ZRosserMcIntosh

    Round 2 god file breakups — 5 files decomposed

    • customers/[id]/page.tsx: 1,332 → 865 lines (6 tab components extracted)
    • customers/page.tsx: 1,075 → 532 lines (modal, contacts view, icons extracted)
    • chatService.ts: 1,244 → 44 lines (6 domain modules under lib/chat/)
    • ChatWidgetEnhanced.tsx: 1,121 → 10 lines (ChatWidget/ directory)
    • developer/page.tsx: 1,116 → 966 lines (types, icons, helpers extracted)
    Chore3:31 PM · ZRosserMcIntosh

    remove stale employees/page-new.tsx (959 lines dead code)

    Docs3:30 PM · ZRosserMcIntosh

    V1 tables deprecated — SQL migration complete (Feb 27, 2026)

    • Audit results: contacts=1 orphan (dup email, deleted), jobs/invoices/payments=0 orphans
    • Scripts 03-05 skipped (V1 tables empty)
    • Script 06 verification: all PASS
    • Script 07 executed: V1 tables renamed to _deprecated_*, contacts view created
    • Drop deadline: March 28, 2026
    Docs3:18 PM · ZRosserMcIntosh

    update V2_MIGRATION_LOG — Phase 3 God File Breakup complete (6/6)

    Refactorpayments3:17 PM · ZRosserMcIntosh

    decompose god file — 1,311→362 lines (72% reduction)

    • types.ts: 6 interfaces (Payment, Customer, Invoice, PaymentWithDetails, etc.)
    • helpers.tsx: formatCurrency, formatDate, getStatusBadgeClass, getMethodIcon
    • components/icons.tsx: 7 icon components
    • components/StatCard.tsx: reusable stat card with color variants
    • components/InvoicesView.tsx: invoice table with filter/actions
    • components/DepositsView.tsx: deposit management with record/cancel/resend
    • components/RecordPaymentModal.tsx: payment recording form with auto-balance
    • components/index.ts: barrel exports
    Refactorestimates3:01 PM · ZRosserMcIntosh

    decompose god file — 1,380→450 lines (67% reduction)

    • types.ts: Customer, Contact, EstimateWithRelations, EstimateLineItemWithTotal
    • helpers.ts: getStatusBadge, formatCurrency, formatDate, calculateTotal, generateEstimateNumber
    • components/icons.tsx: PlusIcon, ChevronIcon, XIcon, DollarIcon, CheckCircleIcon
    • components/CreateEstimateModal.tsx: estimate creation form with line items
    • components/EstimateCard.tsx: expandable estimate row with line items table + actions
    • components/CollectDepositModal.tsx: deposit collection with template support, fee preview, Square integration
    • components/index.ts: barrel export
    Refactorjobs/[id]2:48 PM · ZRosserMcIntosh

    decompose god file — 1,697→862 lines (49% reduction)

    • types.ts: Job, Customer, Employee, TimeEntry, Invoice, Attachment interfaces
    • helpers.ts: formatDate, formatDateTime, formatCurrency, badge class helpers
    • components/icons.tsx: 17 icon components (ArrowLeft, Clock, User, etc.)
    • components/EditJobModal.tsx: job editing form modal
    • components/ScheduleModal.tsx: schedule & assign with email confirmation
    • components/PhotoGallery.tsx: photo grid + PhotoDetailModal with notes
    • components/AttachmentsPanel.tsx: file upload w/ OCR progress + management
    • components/OcrSuccessModal.tsx: Maverick Vision OCR success feedback
    • components/index.ts: barrel export
    • flex-shrink-0 → shrink-0
    • bg-gradient-to-r → bg-linear-to-r
    Refactor2:33 PM · ZRosserMcIntosh

    break up employees/page.tsx god file (1845→582 lines, 68%)

    • types.ts: TabType, TimeEntryWithEmployee, EmployeePayConfig, PayPeriod, PayrollItem, PTOBalance, PTORequest interfaces
    • helpers.ts: formatDate, formatTime, formatHours, formatCurrency utilities
    • components/badges.tsx: RoleBadge, StatusBadge, PayPeriodStatusBadge, PayrollItemStatusBadge shared badge components
    • components/ElapsedTime.tsx: live elapsed timer + NoteIcon
    • components/EmployeesTab.tsx: team member listing with invite button
    • components/TimeTrackingTab.tsx: clock in/out, notes modal, entries table
    • components/TimeApprovalsTab.tsx: manager approval/rejection of time entries
    • components/PayrollTab.tsx: payroll overview, pay configs, run payroll (owner-only sub-tabs)
    • components/PTOTab.tsx: PTO balances, request management, manager actions
    • components/index.ts: barrel export
    • customers/[id]/page.tsx: 2144→1331 (38%)
    • DispatchMessenger.tsx: 1951→898 (54%)
    • employees/page.tsx: 1845→582 (68%) ← this commit
    Refactor2:20 PM · ZRosserMcIntosh

    break up DispatchMessenger.tsx god file (1951→898 lines)

    • types.ts: 8 interfaces (Conversation, Message, Customer, Employee, etc.)
    • icons.tsx: 19 icon components (Search, Send, Phone, Email, etc.)
    • helpers.tsx: 6 utility functions (formatTime, getChannelIcon, etc.)
    • CustomerInfoPanel.tsx: customer sidebar with job/invoice history
    • JobScheduleModal.tsx: job creation form from conversation
    • EditCustomerModal.tsx: customer info editor
    • index.ts: barrel export preserving import path
    • All state management and hooks
    • Supabase realtime subscriptions (3 channels)
    • Message sending with optimistic updates + race condition fix
    • Conversation list and message view JSX
    • Column resize handlers
    Refactor3:30 AM · ZRosserMcIntosh

    break up customers/[id]/page.tsx god file (2144→1331 lines)

    • types.ts: 9 shared interfaces (Customer, Property, Asset, Job, etc.)
    • components/icons.tsx: 12 icon components
    • components/QuickStat.tsx: stat card component
    • components/AddPropertyModal.tsx: property creation form
    • components/AddAssetModal.tsx: asset creation form
    • components/EditCustomerModal.tsx: customer edit form
    • components/NewJobModal.tsx: job creation form with job number generation
    • components/index.ts: barrel export
    • Data loading (loadCustomerData with 8 Supabase queries)
    • Utility functions (formatCurrency, formatDate, handleFileUpload, getAttachmentUrl)
    • Main layout JSX with tabs
    • Tab components (inline, tightly coupled to page state)
    • Attachment upload/viewer modals (tightly coupled to upload state)
    Feature2:34 AM · ZRosserMcIntosh

    SQL data migration pipeline for V1→V2 table consolidation

    • 01: Audit V1 vs V2 row counts, find orphaned records
    • 02: Migrate contacts → customers (name split, address mapping)
    • 03: Migrate jobs → jobs_v2 (status/type enum→text mapping)
    • 04: Migrate invoices → invoices_v2 (+ line items, FK validation)
    • 05: Migrate payments → payments_v2 (contact_id→customer_id)
    • 06: Verification (zero-orphan check, financial totals, verdict)
    • 07: Deprecate V1 tables (rename to _deprecated_*, create views)
    1:44 AM · ZRosserMcIntosh

    Update migration log with Steps 7-8 completion status

    1:43 AM · ZRosserMcIntosh

    Deduplicate conversation routes + delete archive dead code

    • Created /api/conversations/[id]/close/route.ts (canonical location)
    • Updated DispatchMessenger to call /api/conversations/*/close instead of /api/chat/conversations/*/close
    • Deleted /api/chat/conversations/* tree (5 files, ~635 lines of duplicated code)
    • Only /api/chat/start/route.ts remains (not a duplicate)
    • Deleted src/app/dashboard/_archive/ (4 dead files: contacts-page-old, contacts-page.backup, employees-page-old, invoices-page-old)
    • Clean build verified after .next cache clear
Page 1 of 4

Maverick Mechanical Heating & Air

View on GitHub

Maverick Mechanical

How can we help you?

Hi there! 👋 We're here to help with all your HVAC needs. Whether you need AC repair, heating service, or just have questions - we're ready to assist!