fix: loading active project was weird

This commit is contained in:
2026-02-14 16:39:27 +01:00
parent 0bdcb27410
commit 0d466b97fb
2 changed files with 6 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ const App: React.FC = () => {
togglePanel,
setActiveView,
setSelectedPost,
setActiveProject,
openTab,
restoreTabState,
} = useAppStore();
@@ -48,6 +49,9 @@ const App: React.FC = () => {
try {
// First, get active project to set the correct context in backend engines
const activeProject = await window.electronAPI?.projects.getActive();
if (activeProject) {
setActiveProject(activeProject as import('./store').ProjectData);
}
// Load posts (now with correct project context, limited to 500)
const postsResult = await window.electronAPI?.posts.getAll({ limit: 500, offset: 0 });