fix: resolve merge conflicts and clean up expand project feature

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 <noreply@anthropic.com>
This commit is contained in:
Auto
2026-01-10 10:50:28 +02:00
parent 0e7f8c657a
commit 1998de7c50
5 changed files with 12 additions and 11 deletions

View File

@@ -238,7 +238,7 @@ async def expand_project_websocket(websocket: WebSocket, project_name: str):
except WebSocketDisconnect: except WebSocketDisconnect:
logger.info(f"Expand chat WebSocket disconnected for {project_name}") 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}") logger.exception(f"Expand chat WebSocket error for {project_name}")
try: try:
await websocket.send_json({ await websocket.send_json({

View File

@@ -168,7 +168,7 @@ class ExpandChatSession:
) )
await self.client.__aenter__() await self.client.__aenter__()
self._client_entered = True self._client_entered = True
except Exception as e: except Exception:
logger.exception("Failed to create Claude client") logger.exception("Failed to create Claude client")
yield { yield {
"type": "error", "type": "error",
@@ -182,7 +182,7 @@ class ExpandChatSession:
async for chunk in self._query_claude("Begin the project expansion process."): async for chunk in self._query_claude("Begin the project expansion process."):
yield chunk yield chunk
yield {"type": "response_done"} yield {"type": "response_done"}
except Exception as e: except Exception:
logger.exception("Failed to start expand chat") logger.exception("Failed to start expand chat")
yield { yield {
"type": "error", "type": "error",
@@ -229,7 +229,7 @@ class ExpandChatSession:
async for chunk in self._query_claude(user_message, attachments): async for chunk in self._query_claude(user_message, attachments):
yield chunk yield chunk
yield {"type": "response_done"} yield {"type": "response_done"}
except Exception as e: except Exception:
logger.exception("Error during Claude query") logger.exception("Error during Claude query")
yield { yield {
"type": "error", "type": "error",
@@ -332,7 +332,7 @@ class ExpandChatSession:
} }
logger.info(f"Created {len(created)} features for {self.project_name}") logger.info(f"Created {len(created)} features for {self.project_name}")
except Exception as e: except Exception:
logger.exception("Failed to create features") logger.exception("Failed to create features")
yield { yield {
"type": "error", "type": "error",

View File

@@ -116,7 +116,7 @@ function App() {
if (e.key === 'Escape') { if (e.key === 'Escape') {
if (showExpandProject) { if (showExpandProject) {
setShowExpandProject(false) setShowExpandProject(false)
if (showSettings) { } else if (showSettings) {
setShowSettings(false) setShowSettings(false)
} else if (assistantOpen) { } else if (assistantOpen) {
setAssistantOpen(false) setAssistantOpen(false)
@@ -174,10 +174,9 @@ function App() {
<button <button
onClick={() => setShowAddFeature(true)} onClick={() => setShowAddFeature(true)}
className="neo-btn neo-btn-primary text-sm" className="neo-btn neo-btn-primary text-sm"
title="Press N" title="Add new feature"
> >
<Plus size={18} /> <Plus size={18} />
Add Feature
<kbd className="ml-1.5 px-1.5 py-0.5 text-xs bg-black/20 rounded font-mono"> <kbd className="ml-1.5 px-1.5 py-0.5 text-xs bg-black/20 rounded font-mono">
N N
</kbd> </kbd>
@@ -188,10 +187,9 @@ function App() {
<button <button
onClick={() => setShowExpandProject(true)} onClick={() => setShowExpandProject(true)}
className="neo-btn bg-[var(--color-neo-progress)] text-black text-sm" className="neo-btn bg-[var(--color-neo-progress)] text-black text-sm"
title="Add multiple features via AI (Press E)" title="Expand project with AI"
> >
<Sparkles size={18} /> <Sparkles size={18} />
Expand
<kbd className="ml-1.5 px-1.5 py-0.5 text-xs bg-black/20 rounded font-mono"> <kbd className="ml-1.5 px-1.5 py-0.5 text-xs bg-black/20 rounded font-mono">
E E
</kbd> </kbd>

View File

@@ -329,6 +329,9 @@ export interface FeatureBulkCreate {
export interface FeatureBulkCreateResponse { export interface FeatureBulkCreateResponse {
created: number created: number
features: Feature[] features: Feature[]
}
// ============================================================================
// Settings Types // Settings Types
// ============================================================================ // ============================================================================

View File

@@ -1 +1 @@
{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/addfeatureform.tsx","./src/components/agentcontrol.tsx","./src/components/agentthought.tsx","./src/components/assistantchat.tsx","./src/components/assistantfab.tsx","./src/components/assistantpanel.tsx","./src/components/chatmessage.tsx","./src/components/debuglogviewer.tsx","./src/components/featurecard.tsx","./src/components/featuremodal.tsx","./src/components/folderbrowser.tsx","./src/components/kanbanboard.tsx","./src/components/kanbancolumn.tsx","./src/components/newprojectmodal.tsx","./src/components/progressdashboard.tsx","./src/components/projectselector.tsx","./src/components/questionoptions.tsx","./src/components/settingsmodal.tsx","./src/components/setupwizard.tsx","./src/components/speccreationchat.tsx","./src/components/typingindicator.tsx","./src/hooks/useassistantchat.ts","./src/hooks/usecelebration.ts","./src/hooks/usefeaturesound.ts","./src/hooks/useprojects.ts","./src/hooks/usespecchat.ts","./src/hooks/usewebsocket.ts","./src/lib/api.ts","./src/lib/types.ts"],"version":"5.6.3"} {"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/addfeatureform.tsx","./src/components/agentcontrol.tsx","./src/components/agentthought.tsx","./src/components/assistantchat.tsx","./src/components/assistantfab.tsx","./src/components/assistantpanel.tsx","./src/components/chatmessage.tsx","./src/components/debuglogviewer.tsx","./src/components/expandprojectchat.tsx","./src/components/expandprojectmodal.tsx","./src/components/featurecard.tsx","./src/components/featuremodal.tsx","./src/components/folderbrowser.tsx","./src/components/kanbanboard.tsx","./src/components/kanbancolumn.tsx","./src/components/newprojectmodal.tsx","./src/components/progressdashboard.tsx","./src/components/projectselector.tsx","./src/components/questionoptions.tsx","./src/components/settingsmodal.tsx","./src/components/setupwizard.tsx","./src/components/speccreationchat.tsx","./src/components/typingindicator.tsx","./src/hooks/useassistantchat.ts","./src/hooks/usecelebration.ts","./src/hooks/useexpandchat.ts","./src/hooks/usefeaturesound.ts","./src/hooks/useprojects.ts","./src/hooks/usespecchat.ts","./src/hooks/usewebsocket.ts","./src/lib/api.ts","./src/lib/types.ts"],"version":"5.6.3"}