Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,8 @@ Thumbs.db
ui/node_modules
navigator/.venv

# Context Engineering
BETA_README.md
DAY8_COMPLETE_SUMMARY.md
SPRINT_B_SUMMARY.md

3 changes: 2 additions & 1 deletion navigator/app/config.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 11 additions & 4 deletions navigator/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -159,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
Expand Down
Empty file added navigator/data/plans/.keep
Empty file.
1 change: 1 addition & 0 deletions navigator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions navigator/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.9
10 changes: 7 additions & 3 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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
plan: starter
envVars:
- key: DATA_DIR
value: ../data
value: data
- key: MAX_UPLOAD_MB
value: "10"
- key: ALLOW_PDF
Expand All @@ -17,10 +17,14 @@ services:
value: "https://arch-circare-ui.onrender.com,http://localhost:5173"
- key: UPLOAD_TMP_DIR
value: /tmp
- key: PYTHON_VERSION
value: "3.11.9"
- key: DISABLE_MODEL_WARMUP
value: "true"

- type: web
name: arch-circare-ui
runtime: static
env: static
rootDir: ui
buildCommand: npm ci --no-audit --no-fund && npm run build
staticPublishPath: dist
Expand Down
3 changes: 1 addition & 2 deletions ui/src/components/FeedbackButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

// Feedback controls for each result card
interface FeedbackButtonsProps {
imageId: string;
isLiked?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/LatentMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion ui/src/components/ResultsGrid.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 (
<div style={{ marginTop: 24 }}>
Expand Down