From 8136f267bcd3fd06c07e8fed2478c1e2500f6a6a Mon Sep 17 00:00:00 2001
From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com>
Date: Fri, 12 Dec 2025 23:40:24 -0800
Subject: [PATCH] fix: remove 3D Text component to prevent crash
---
docs/SESSION-SUMMARY.md | 8 ++++++++
frontend/src/pages/Facility3DViewerPage.tsx | 13 ++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/docs/SESSION-SUMMARY.md b/docs/SESSION-SUMMARY.md
index 0b16592..3299cf7 100644
--- a/docs/SESSION-SUMMARY.md
+++ b/docs/SESSION-SUMMARY.md
@@ -63,6 +63,14 @@
2. **Verify Walkthrough:** Confirm "Already Completed" status and that "Oops" error is resolved (via re-login).
3. **Simplify Layout Tools:** Based on feedback, potentially replace the Drag-and-Drop designer with a "Wizard" style form that populates the 3D view.
4. **METRC Integration:** Begin Phase 2 (Metrc) based on the audit findings.
+
+### Debug Session Update
+
+- **Fixed API Prefixes:** Removed double `/api/api` prefix from `messagingApi` and `uploadApi`. Verified `documentsApi` and `auditApi` are clean.
+- **Stabilized 3D Viewer:** Rewrote `Facility3DViewerPage` to be more robust, removing potentially crashing features (shadows) and fixing potential import issues.
+- **Fixed Build:** Updated `messagingApi` types to match usage in `ShiftNotesWidget`.
+- **Deployment:** Rebuilt and deployed frontend to `nexus-vector`.
+
sh auth middleware - your choice!
---
diff --git a/frontend/src/pages/Facility3DViewerPage.tsx b/frontend/src/pages/Facility3DViewerPage.tsx
index 32cef40..72c013a 100644
--- a/frontend/src/pages/Facility3DViewerPage.tsx
+++ b/frontend/src/pages/Facility3DViewerPage.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState, useRef, Suspense } from 'react';
import { Canvas, useThree } from '@react-three/fiber';
-import { OrbitControls, Text } from '@react-three/drei';
-import { Loader2, Grid, ChevronDown, Building, AlertTriangle } from 'lucide-react';
+import { OrbitControls } from '@react-three/drei';
+import { Loader2, Grid3X3, ChevronDown, Building, AlertTriangle } from 'lucide-react';
import { layoutApi, Floor3DData, Room3D, Section3D, Position3D } from '../lib/layoutApi';
import * as THREE from 'three';
@@ -72,12 +72,7 @@ function Room3DBox({ room, onClick, isSelected }: { room: Room3D; onClick: () =>