Skip to content

Commit 43b02d7

Browse files
committed
🤖 fix: clean up unused imports and callbacks after prop drilling removal
1 parent 8c213be commit 43b02d7

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

src/App.tsx

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ const THINKING_LEVELS: ThinkingLevel[] = ["off", "low", "medium", "high"];
3838
function AppInner() {
3939
// Get app-level state from context
4040
const { workspaceMetadata, setWorkspaceMetadata, removeWorkspace, renameWorkspace, selectedWorkspace, setSelectedWorkspace } = useApp();
41-
const { projects, addProject, removeProject } = useProjectContext();
42-
const [projectCreateModalOpen, setProjectCreateModalOpen] = useState(false);
41+
const { projects } = useProjectContext();
4342

4443
// Track when we're in "new workspace creation" mode (show FirstMessageInput)
4544
const [pendingNewWorkspaceProject, setPendingNewWorkspaceProject] = useState<string | null>(null);
@@ -174,33 +173,8 @@ function AppInner() {
174173

175174

176175
// Memoize callbacks to prevent LeftSidebar/ProjectSidebar re-renders
177-
const handleAddProjectCallback = useCallback(() => {
178-
setProjectCreateModalOpen(true);
179-
}, []);
180-
181176

182177

183-
const handleRemoveProjectCallback = useCallback(
184-
(path: string) => {
185-
void handleRemoveProject(path);
186-
},
187-
[handleRemoveProject]
188-
);
189-
190-
const handleGetSecrets = useCallback(async (projectPath: string) => {
191-
return await window.api.projects.secrets.get(projectPath);
192-
}, []);
193-
194-
const handleUpdateSecrets = useCallback(
195-
async (projectPath: string, secrets: Array<{ key: string; value: string }>) => {
196-
const result = await window.api.projects.secrets.update(projectPath, secrets);
197-
if (!result.success) {
198-
console.error("Failed to update secrets:", result.error);
199-
}
200-
},
201-
[]
202-
);
203-
204178
// NEW: Get workspace recency from store
205179
const workspaceRecency = useWorkspaceRecency();
206180

@@ -622,11 +596,7 @@ function AppInner() {
622596
workspaceId: selectedWorkspace?.workspaceId,
623597
})}
624598
/>
625-
<ProjectCreateModal
626-
isOpen={projectCreateModalOpen}
627-
onClose={() => setProjectCreateModalOpen(false)}
628-
onSuccess={addProject}
629-
/>
599+
<ProjectCreateModal />
630600
</div>
631601
</>
632602
);

0 commit comments

Comments
 (0)