feat: draft-in-db, publishd-in-file workflow

This commit is contained in:
2026-02-10 16:05:36 +01:00
parent 0a6710b684
commit 8c118b8b38
9 changed files with 528 additions and 311 deletions

View File

@@ -37,8 +37,18 @@ export function registerIpcHandlers(): void {
});
ipcMain.handle('projects:getActive', async () => {
const engine = getProjectEngine();
return engine.getActiveProject();
const projectEngine = getProjectEngine();
const project = await projectEngine.getActiveProject();
// Ensure post and media engines have the correct project context
if (project) {
const postEngine = getPostEngine();
const mediaEngine = getMediaEngine();
postEngine.setProjectContext(project.id);
mediaEngine.setProjectContext(project.id);
}
return project;
});
ipcMain.handle('projects:setActive', async (_, id: string) => {