feat: add "Create Spec" button and fix Windows asyncio subprocess

UI Changes:
- Add "Create Spec with AI" button in empty kanban when project has no spec
- Button opens SpecCreationChat to guide users through spec creation
- Shows in Pending column when has_spec=false and no features exist

Windows Fixes:
- Fix asyncio subprocess NotImplementedError on Windows
- Set WindowsProactorEventLoopPolicy in server/__init__.py
- Remove --reload from uvicorn (incompatible with Windows subprocess)
- Add process cleanup on startup in start_ui.bat

Spec Chat Improvements:
- Enable full tool access (remove allowed_tools restriction)
- Add "user" to setting_sources for global skills access
- Use bypassPermissions mode for auto-approval
- Add WebFetch/WebSearch auto-approve hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
mmereu
2026-01-19 21:53:09 +01:00
parent 5f786078fa
commit 245cc5b7ad
10 changed files with 116 additions and 19 deletions

View File

@@ -19,6 +19,7 @@ Options:
--dev Run in development mode with Vite hot reload
"""
import asyncio
import os
import shutil
import socket
@@ -28,6 +29,10 @@ import time
import webbrowser
from pathlib import Path
# Fix Windows asyncio subprocess support BEFORE anything else runs
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
ROOT = Path(__file__).parent.absolute()
VENV_DIR = ROOT / "venv"
UI_DIR = ROOT / "ui"
@@ -182,17 +187,24 @@ def start_dev_server(port: int) -> tuple:
def start_production_server(port: int):
"""Start FastAPI server in production mode."""
"""Start FastAPI server in production mode with hot reload."""
venv_python = get_venv_python()
print(f"\n Starting server at http://127.0.0.1:{port}")
print(f"\n Starting server at http://127.0.0.1:{port} (with hot reload)")
# Set PYTHONASYNCIODEBUG to help with Windows subprocess issues
env = os.environ.copy()
# NOTE: --reload is NOT used because on Windows it breaks asyncio subprocess
# support (uvicorn's reload worker doesn't inherit the ProactorEventLoop policy).
# This affects Claude SDK which uses asyncio.create_subprocess_exec.
# For development with hot reload, use: python start_ui.py --dev
return subprocess.Popen([
str(venv_python), "-m", "uvicorn",
"server.main:app",
"--host", "127.0.0.1",
"--port", str(port)
], cwd=str(ROOT))
"--port", str(port),
], cwd=str(ROOT), env=env)
def main() -> None: