# task-432.1: FastAPI 모드 누락 API 엔드포인트 동기화

## 문제
`/home/jay/workspace/dashboard/server.py`에서 FastAPI가 설치되어 있으면 FastAPI 모드로 실행됨 (line 1771).
그런데 `start_fastapi()` (line 1683~1767)에 최근 추가된 API 엔드포인트들이 누락되어 있음.
SimpleHTTP 핸들러(`do_GET`, line 1032~)에는 있지만 FastAPI 라우터에는 없음.

## 누락된 엔드포인트 (SimpleHTTP에는 있고 FastAPI에는 없는 것들)

1. **`/api/task-detail/{task_id}`** (line 1156) — `data_loader.get_task_detail(task_id)` 호출
2. **`/api/recent-tasks`** (line 1122) — `data_loader.get_recent_tasks(15)` 호출
3. **`/api/reload`** (line 1103) — `data_loader.reload_all()` 호출
4. **`/api/todo` GET** (line 1175) — `data_loader.todo_data["issues"]` 반환 (project 쿼리 파라미터 필터링)
5. **`/api/todo` POST** (do_POST) — 이슈 추가
6. **`/api/todo` PUT** (do_PUT) — 이슈 업데이트
7. **`/api/todo` DELETE** (do_DELETE) — 이슈 삭제
8. **`/api/system-status`** — 이미 FastAPI에 있는지 확인 필요

## 수정 파일
- `/home/jay/workspace/dashboard/server.py` — `start_fastapi()` 메서드 (line 1683~)

## 수정 방법
SimpleHTTP 핸들러의 각 엔드포인트를 FastAPI 라우터에 동일하게 추가:

```python
@app.get("/api/task-detail/{task_id}")
async def get_task_detail(task_id: str):
    self.data_loader.reload_all()
    return self.data_loader.get_task_detail(task_id)

@app.get("/api/recent-tasks")
async def get_recent_tasks():
    self.data_loader.load_tasks()
    recent = self.data_loader.get_recent_tasks(15)
    return {"tasks": recent, "count": len(recent)}

@app.get("/api/reload")
async def reload_data():
    self.data_loader.reload_all()
    return {"status": "reloaded", "org_loaded": len(self.data_loader.org_data) > 0, "tasks_loaded": len(self.data_loader.task_data) > 0}

# todo 엔드포인트는 GET/POST/PUT/DELETE 모두 구현
# SimpleHTTP의 do_GET/do_POST/do_PUT/do_DELETE에서 /api/todo 처리 로직 참고
```

## todo API 상세 (SimpleHTTP에서 복사)
- **GET /api/todo?project=xxx**: data_loader.load_todo() → issues 필터링 반환
- **POST /api/todo**: body에서 issue 데이터 받아 todo.json에 추가 → 저장
- **PUT /api/todo?id=xxx**: issue 업데이트 (sub_items 체크 등)
- **DELETE /api/todo?id=xxx**: issue 삭제

SimpleHTTP의 do_POST (line ~1200 이후), do_PUT, do_DELETE에서 /api/todo 처리 로직을 정확히 복사할 것.

## 정적 파일 서빙
FastAPI의 정적 파일 서빙도 확인:
- `/dashboard/` → index.html
- `/dashboard/manifest.json`, `/dashboard/sw.js`, `/dashboard/icon-*.png` 등 PWA 파일
- 현재 `FileResponse`로 index.html만 서빙 중 → StaticFiles 마운트 또는 개별 라우트 추가 필요

## 테스트
수정 후 서버 재시작 전에 문법 오류 확인:
```bash
python3 -c "import py_compile; py_compile.compile('/home/jay/workspace/dashboard/server.py', doraise=True)"
```

## 레벨: Lv.1
파일/라인이 특정되어 있고 수정 방법이 명확함.