From 6b5d01c4358215049500e9e711f5aa12e4e00709 Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 10:46:08 -0500 Subject: [PATCH 01/11] build: pin Python 3.11.9 (runtime.txt) and fix UI TS build (hoveredPoint null, remove unused React import, stop destructuring queryId) --- navigator/runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 navigator/runtime.txt diff --git a/navigator/runtime.txt b/navigator/runtime.txt new file mode 100644 index 0000000..530fe91 --- /dev/null +++ b/navigator/runtime.txt @@ -0,0 +1 @@ +3.11.9 \ No newline at end of file From 43f9cdac1165380628221aa759669787a4f96f6f Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 16:22:35 -0500 Subject: [PATCH 02/11] update render --- render.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/render.yaml b/render.yaml index 8c82094..d79ab7f 100644 --- a/render.yaml +++ b/render.yaml @@ -1,7 +1,7 @@ services: - type: web name: arch-circare-api - runtime: python + env: python rootDir: navigator buildCommand: pip install -r requirements.txt startCommand: uvicorn app.main:app --host 0.0.0.0 --port $PORT @@ -17,6 +17,8 @@ services: value: "https://arch-circare-ui.onrender.com,http://localhost:5173" - key: UPLOAD_TMP_DIR value: /tmp + - key: PYTHON_VERSION + value: "3.11.9" - type: web name: arch-circare-ui From 02fad4d27b6de9611bd25f579d9ca5e124e560cf Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 16:33:20 -0500 Subject: [PATCH 03/11] update render --- render.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.yaml b/render.yaml index d79ab7f..146e750 100644 --- a/render.yaml +++ b/render.yaml @@ -22,7 +22,7 @@ services: - type: web name: arch-circare-ui - runtime: static + env: static rootDir: ui buildCommand: npm ci --no-audit --no-fund && npm run build staticPublishPath: dist From 0c2ca31a4e4ad1336f0021b1ca005c788a7926ce Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 16:36:43 -0500 Subject: [PATCH 04/11] fix(ui): TS errors - remove React import; hoveredPoint nullable; drop unused queryId --- ui/src/components/FeedbackButtons.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/src/components/FeedbackButtons.tsx b/ui/src/components/FeedbackButtons.tsx index 113b208..702a856 100644 --- a/ui/src/components/FeedbackButtons.tsx +++ b/ui/src/components/FeedbackButtons.tsx @@ -1,5 +1,4 @@ -import React from 'react'; - +// Feedback controls for each result card interface FeedbackButtonsProps { imageId: string; isLiked?: boolean; From b8fa5db1e77177a4f4095815cbbdde47849247ef Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 17:08:30 -0500 Subject: [PATCH 05/11] fix(api): migrate to pydantic-settings (BaseSettings) and add dependency --- navigator/app/config.py | 3 ++- navigator/requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/navigator/app/config.py b/navigator/app/config.py index f06c6f9..11a162e 100644 --- a/navigator/app/config.py +++ b/navigator/app/config.py @@ -1,4 +1,5 @@ -from pydantic import BaseSettings, Field +from pydantic import Field +from pydantic_settings import BaseSettings from pathlib import Path from typing import Optional diff --git a/navigator/requirements.txt b/navigator/requirements.txt index 139fc76..7a3a3c7 100644 --- a/navigator/requirements.txt +++ b/navigator/requirements.txt @@ -2,6 +2,7 @@ fastapi==0.111.0 uvicorn[standard]==0.30.1 pydantic==2.7.4 +pydantic-settings>=2.2 numpy>=1.24 pillow>=10.0 faiss-cpu>=1.8.0 From 3c65f99a3b77717412450990b8385ec49ecf2306 Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 17:22:27 -0500 Subject: [PATCH 06/11] fix(api): set DATA_DIR=data (inside service root) for static mounts --- render.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.yaml b/render.yaml index 146e750..b34924c 100644 --- a/render.yaml +++ b/render.yaml @@ -8,7 +8,7 @@ services: plan: starter envVars: - key: DATA_DIR - value: ../data + value: data - key: MAX_UPLOAD_MB value: "10" - key: ALLOW_PDF From 1239499c814f6d7e5008287accd0e872cf72a062 Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 17:42:14 -0500 Subject: [PATCH 07/11] fix(api): guard static mounts and include empty data/plans/.keep --- navigator/app/main.py | 10 +++++++--- navigator/data/plans/.keep | 0 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 navigator/data/plans/.keep diff --git a/navigator/app/main.py b/navigator/app/main.py index e474bc2..e720f79 100644 --- a/navigator/app/main.py +++ b/navigator/app/main.py @@ -40,9 +40,13 @@ allow_headers=["*"] ) -# Serve static assets -app.mount("/images", StaticFiles(directory=os.path.join(DATA_DIR, "images")), name="images") -app.mount("/plans", StaticFiles(directory=os.path.join(DATA_DIR, "plans")), name="plans") +# Serve static assets (only mount if directories exist) +images_dir = os.path.join(DATA_DIR, "images") +plans_dir = os.path.join(DATA_DIR, "plans") +if os.path.isdir(images_dir): + app.mount("/images", StaticFiles(directory=images_dir), name="images") +if os.path.isdir(plans_dir): + app.mount("/plans", StaticFiles(directory=plans_dir), name="plans") # ---- Lazy singletons ---- _store: FaissStore | None = None diff --git a/navigator/data/plans/.keep b/navigator/data/plans/.keep new file mode 100644 index 0000000..e69de29 From b7d035ada592c2ac1eb6bb0cdcc3e5153824374b Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 18:03:46 -0500 Subject: [PATCH 08/11] perf(api): allow disabling model warmup via DISABLE_MODEL_WARMUP and set true on Render --- navigator/app/main.py | 5 ++++- render.yaml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/navigator/app/main.py b/navigator/app/main.py index e720f79..3c0ea42 100644 --- a/navigator/app/main.py +++ b/navigator/app/main.py @@ -163,7 +163,10 @@ async def _startup_warm(): def _warm(): try: get_store() - get_model_and_transform() + # Optionally warm model depending on env + disable_warm = os.getenv("DISABLE_MODEL_WARMUP", "false").lower() == "true" + if not disable_warm: + get_model_and_transform() get_session_store() except Exception: # Avoid crashing startup on warm errors diff --git a/render.yaml b/render.yaml index b34924c..0cbcff6 100644 --- a/render.yaml +++ b/render.yaml @@ -19,6 +19,8 @@ services: value: /tmp - key: PYTHON_VERSION value: "3.11.9" + - key: DISABLE_MODEL_WARMUP + value: "true" - type: web name: arch-circare-ui From 1a4591d6af4af337e888220d9bd9a26c87506b7a Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 18:40:03 -0500 Subject: [PATCH 09/11] chore(ui): touch files to invalidate cache --- ui/src/components/LatentMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/LatentMap.tsx b/ui/src/components/LatentMap.tsx index eb180b8..c53f01e 100644 --- a/ui/src/components/LatentMap.tsx +++ b/ui/src/components/LatentMap.tsx @@ -188,7 +188,7 @@ export default function LatentMap({ onLensChange, selectedProjectId, lensImageId // Update hover tooltip const point = findPointAt(x, y, canvas); - setHoveredPoint(point); + setHoveredPoint(point ?? null); if (point) { setHoveredPosition({ x, y }); } else { From 6ed3348d87908f5eae13f1784285aff2f3611d0b Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 21:25:46 -0500 Subject: [PATCH 10/11] fix(ui): remove unused queryId by adjusting ResultsGrid signature (TS6133) --- ui/src/components/ResultsGrid.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/components/ResultsGrid.tsx b/ui/src/components/ResultsGrid.tsx index 544af6f..f80d4bf 100644 --- a/ui/src/components/ResultsGrid.tsx +++ b/ui/src/components/ResultsGrid.tsx @@ -1,4 +1,5 @@ import { API_BASE } from '../lib/api'; +// Note: queryId is intentionally not destructured from props to satisfy TS6133 import FeedbackButtons from './FeedbackButtons'; interface SearchResult { @@ -117,7 +118,7 @@ function SpatialMetricsTooltip({ projectId, spatialDebug }: { ); } -export default function ResultsGrid({ results, isLoading, latency, debug, onOpenGallery, onFeedback, feedbackState, queryId }: ResultsGridProps) { +export default function ResultsGrid({ results, isLoading, latency, debug, onOpenGallery, onFeedback, feedbackState }: ResultsGridProps) { if (isLoading) { return (
From a6fc53e967a7a761f5518a6be4e7bbadc2e87170 Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 23 Oct 2025 21:55:42 -0500 Subject: [PATCH 11/11] eliminated internal documentation --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 97fd3d1..5bc5244 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,8 @@ Thumbs.db ui/node_modules navigator/.venv +# Context Engineering +BETA_README.md +DAY8_COMPLETE_SUMMARY.md +SPRINT_B_SUMMARY.md +