diff --git a/server/services/spec_chat_session.py b/server/services/spec_chat_session.py index 5b8f952..d762ac0 100644 --- a/server/services/spec_chat_session.py +++ b/server/services/spec_chat_session.py @@ -110,7 +110,7 @@ class SpecChatSession: ], permission_mode="acceptEdits", # Auto-approve file writes for spec creation max_turns=100, - cwd=str(ROOT_DIR.resolve()), + cwd=str(self.project_dir.resolve()), ) ) # Enter the async context and track it @@ -282,7 +282,7 @@ class SpecChatSession: # Check app_spec.txt if pending_writes["app_spec"] and tool_use_id == pending_writes["app_spec"].get("tool_id"): file_path = pending_writes["app_spec"]["path"] - full_path = ROOT_DIR / file_path + full_path = Path(file_path) if Path(file_path).is_absolute() else self.project_dir / file_path if full_path.exists(): logger.info(f"app_spec.txt verified at: {full_path}") files_written["app_spec"] = True @@ -300,7 +300,7 @@ class SpecChatSession: # Check initializer_prompt.md if pending_writes["initializer"] and tool_use_id == pending_writes["initializer"].get("tool_id"): file_path = pending_writes["initializer"]["path"] - full_path = ROOT_DIR / file_path + full_path = Path(file_path) if Path(file_path).is_absolute() else self.project_dir / file_path if full_path.exists(): logger.info(f"initializer_prompt.md verified at: {full_path}") files_written["initializer"] = True diff --git a/start_ui.py b/start_ui.py index 4edf1c9..0eb0824 100644 --- a/start_ui.py +++ b/start_ui.py @@ -28,8 +28,14 @@ import time import webbrowser from pathlib import Path +from dotenv import load_dotenv + ROOT = Path(__file__).parent.absolute() + +# Load environment variables from .env file +# This ensures env vars like PROGRESS_N8N_WEBHOOK_URL are available to subprocesses +load_dotenv(ROOT / ".env") VENV_DIR = ROOT / "venv" UI_DIR = ROOT / "ui" diff --git a/ui/src/components/AddFeatureForm.tsx b/ui/src/components/AddFeatureForm.tsx index be0c3cd..16e7b7e 100644 --- a/ui/src/components/AddFeatureForm.tsx +++ b/ui/src/components/AddFeatureForm.tsx @@ -17,6 +17,7 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) { const [category, setCategory] = useState('') const [name, setName] = useState('') const [description, setDescription] = useState('') + const [priority, setPriority] = useState('') const [steps, setSteps] = useState([{ id: `${formId}-step-0`, value: '' }]) const [error, setError] = useState(null) const [stepCounter, setStepCounter] = useState(1) @@ -53,6 +54,7 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) { name: name.trim(), description: description.trim(), steps: filteredSteps, + priority: priority ? parseInt(priority, 10) : undefined, }) onClose() } catch (err) { @@ -98,19 +100,34 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) { )} - {/* Category */} -
- - setCategory(e.target.value)} - placeholder="e.g., Authentication, UI, API" - className="neo-input" - required - /> + {/* Category & Priority Row */} +
+
+ + setCategory(e.target.value)} + placeholder="e.g., Authentication, UI, API" + className="neo-input" + required + /> +
+
+ + setPriority(e.target.value)} + placeholder="Auto" + min="1" + className="neo-input" + /> +
{/* Name */}