From 1998de7c50f4be5398d8f5fbc8a81a1482ef03c3 Mon Sep 17 00:00:00 2001 From: Auto Date: Sat, 10 Jan 2026 10:50:28 +0200 Subject: [PATCH] fix: resolve merge conflicts and clean up expand project feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Post-merge fixes for PR #36 (expand-project-with-ai): - Fix syntax error in App.tsx Escape handler (missing `} else`) - Fix missing closing brace in types.ts FeatureBulkCreateResponse - Remove unused exception variables flagged by ruff (F841) - Make nav buttons minimalist: remove text labels, keep icons + shortcuts - "Add Feature" → icon + N shortcut, tooltip "Add new feature" - "Expand" → icon + E shortcut, tooltip "Expand project with AI" All checks pass: ruff, security tests, ESLint, TypeScript build. Co-Authored-By: Claude Opus 4.5 --- server/routers/expand_project.py | 2 +- server/services/expand_chat_session.py | 8 ++++---- ui/src/App.tsx | 8 +++----- ui/src/lib/types.ts | 3 +++ ui/tsconfig.tsbuildinfo | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/server/routers/expand_project.py b/server/routers/expand_project.py index d894719..50bf196 100644 --- a/server/routers/expand_project.py +++ b/server/routers/expand_project.py @@ -238,7 +238,7 @@ async def expand_project_websocket(websocket: WebSocket, project_name: str): except WebSocketDisconnect: logger.info(f"Expand chat WebSocket disconnected for {project_name}") - except Exception as e: + except Exception: logger.exception(f"Expand chat WebSocket error for {project_name}") try: await websocket.send_json({ diff --git a/server/services/expand_chat_session.py b/server/services/expand_chat_session.py index a6825f6..6c6b430 100644 --- a/server/services/expand_chat_session.py +++ b/server/services/expand_chat_session.py @@ -168,7 +168,7 @@ class ExpandChatSession: ) await self.client.__aenter__() self._client_entered = True - except Exception as e: + except Exception: logger.exception("Failed to create Claude client") yield { "type": "error", @@ -182,7 +182,7 @@ class ExpandChatSession: async for chunk in self._query_claude("Begin the project expansion process."): yield chunk yield {"type": "response_done"} - except Exception as e: + except Exception: logger.exception("Failed to start expand chat") yield { "type": "error", @@ -229,7 +229,7 @@ class ExpandChatSession: async for chunk in self._query_claude(user_message, attachments): yield chunk yield {"type": "response_done"} - except Exception as e: + except Exception: logger.exception("Error during Claude query") yield { "type": "error", @@ -332,7 +332,7 @@ class ExpandChatSession: } logger.info(f"Created {len(created)} features for {self.project_name}") - except Exception as e: + except Exception: logger.exception("Failed to create features") yield { "type": "error", diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 428a171..7aff901 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -116,7 +116,7 @@ function App() { if (e.key === 'Escape') { if (showExpandProject) { setShowExpandProject(false) - if (showSettings) { + } else if (showSettings) { setShowSettings(false) } else if (assistantOpen) { setAssistantOpen(false) @@ -174,10 +174,9 @@ function App() {