- Add has_digital_twin flag to tenant API response
- Show cloud badge on tenant card for linked tenants
- Hide sync/import buttons for tenants without mapping
- Add .tenant-badge-dt CSS for the badge
- Add digital_twin_company_id column to tenants table
- Map spifox tenant to its digital-twin companyId
- Pass companyId filter when fetching from digital-twin API
- Return 404 with clear message for unmapped tenants
- Improve API error messages in frontend (show server detail)
- Group 304 equipment items into 8 groups by name prefix
- Add group-level select/deselect with indeterminate checkbox state
- Add collapsible groups with sticky headers during scroll
- Show imported count per group and total toolbar summary
- Sort groups by item count descending
The digital-twin API defaults to limit=10 per page. Now fetches with
limit=500 and iterates through all pages using hasNextPage pagination
metadata, ensuring every equipment item is available for import.
Add import, sync, and push capabilities between factoryOps and the
digital-twin (BaSyx AAS) backend. Includes:
- Equipment sync service with field mapping and LWW conflict resolution
- Import preview modal with already-imported detection
- Bidirectional sync (pull updates + push local changes)
- Sync history tracking via equipment_sync_history table
- Machine detail page shows sync status and change history
- Docker networking for container-to-container communication
- UI fixes: responsive layout (375px), touch targets, section spacing
- 30 test cases for sync service
- Replace semiconductor equipment with actual press forming equipment (14 machines)
- Add real equipment: cup presses, finish presses, dryer, washer, heat treatment,
vision inspectors, conveyor, AMR across 6 area groups
- Add real die parts: cut pin, cut die, forming die with count-based lifecycles
- Add press daily inspection + heat treatment inspection + case dimension inspection templates
- Fix seed.py to pass area/criticality when creating machines
- Add backfill migration to populate area/criticality for existing DB records
- Change spifox industry_type from semiconductor to press_forming
- Add area and criticality fields to Machine model with DB migration
- Add batch inspection endpoint (POST /inspections/batch) for area-wide inspection creation
- Rewrite MachineList with area grouping, criticality badges, and batch inspect button
- Update machine create/edit forms with area and criticality fields
- Update seed data with area/criticality values for all tenants
- GAP 2+4: auto_time/date counter auto-computation with manual update blocking
- GAP 3: auto-generate alarms on inspection completion for failed items
- GAP 1: machine spec fields (manufacturer, location, capacity, power, description)
- GAP 5: enhanced mobile responsive CSS (768px/480px breakpoints)
- Alembic migration for new columns, seed data enriched with specs and date-type parts
- Add Alarm model with tenant/part/machine relationships and 3 indexes
- Add alembic migration c5d6e7f8a9b0_add_alarms
- Add alarms API: list (filter by ack/severity), summary, acknowledge
- Auto-generate alarms on counter update (threshold warning, critical at 100%)
- Duplicate alarm prevention for same part+alarm_type
- Add alarms frontend page with active/acknowledged tabs, summary badges
- 9 new tests (67/67 total passing)
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Backend:
- InspectionSession + InspectionRecord models with alembic migration
- 6 API endpoints: create, list, get detail, save records, complete, delete
- Auto pass/fail judgment for numeric (spec range) and boolean items
- Completed inspections are immutable, required items enforced on complete
- 14 new tests (total 53/53 passed)
Frontend:
- Inspection list page with in_progress/completed tabs
- Template select modal for starting new inspections
- Inspection execution page with data-type-specific inputs
- Auto-save with 1.5s debounce, manual save button
- Completion modal with notes and required item validation
- Read-only view for completed inspections
- Pass/fail badges and color-coded item cards
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
- Add gap to card-body for consistent field spacing
- Wrap modal content in modal-body-form with proper gap
- Use modal-lg for item add modal to prevent field overflow
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
- Add InspectionTemplate and InspectionTemplateItem models
- Add 9 API endpoints for template CRUD and item management
- Add Alembic migration for inspection_templates tables
- Add 15 backend tests (39/39 total pass)
- Add TemplateEditor component with item management UI
- Add templates list, create, and edit pages
- Add tab bar, template grid, form row CSS classes
- Fix CORS middleware ordering in main.py
- Move CORS middleware before router registration
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
- Containerfile.backend/frontend for Docker builds
- docker-compose.prod.yml (PostgreSQL + API:8100 + Dashboard:4000)
- Gitea Actions workflow for auto-deploy on push to main
- Frontend dev port changed to 3100
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Multi-tenant factory inspection system (SpiFox, Enkid, Alpet):
- FastAPI backend with JWT auth, PostgreSQL (asyncpg)
- Next.js 16 frontend with App Router, SWR data fetching
- Machines CRUD with equipment parts management
- Part lifecycle tracking (hours/count/date) with counters
- Partial unique index for soft-delete support
- 24 pytest tests passing, E2E verified
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>