Problem
When a file is manually deleted from a project's save directory and the user then opens the project, the only visible indication is a warning icon next to the checksum in the bottom-right status bar. There is no clear message telling the user which files are missing or that the save may be corrupted.
Current behavior
copyFilesForLoad() in project-file-sync.ts correctly collects failed paths and logs them:
await fs.copyFile(src, dest).catch((error) => {
console.warn(`[pdv] load: could not copy ${src}`, error);
failedPaths.push(treePath);
});
The caller in ipc-register-project.ts logs a summary to console.warn:
if (failedPaths.length > 0) {
console.warn(
`[pdv] load: ${failedPaths.length} file(s) could not be copied from save directory:`,
failedPaths,
);
}
But this information is only visible in the dev console — not surfaced to the user. The failedPaths array is not passed to the kernel or renderer. The user sees only a mismatched checksum icon with no explanation.
Expected behavior
After project load, if any files were missing from the save directory, the user should see a clear message in the execution console, e.g.:
Project loaded (13 nodes). Warning: files for the following tree nodes were missing from save. Were they modified manually between sessions?
This should appear:
- In the renderer's console panel (the execution console the user sees)
- Optionally as a toast/notification
Implementation notes
failedPaths is already collected by copyFilesForLoad() — it just needs to be forwarded to the kernel's load response or emitted as a separate push notification
- The Python-side
handle_project_load could accept a missing_files field in the load payload and include it in the pdv.project.loaded push
- Alternatively, the main process could send a dedicated
pdv.project.load_warning push to the renderer
Affected components
electron/main/ipc-register-project.ts — load handler (line ~320)
electron/main/project-file-sync.ts — copyFilesForLoad() already returns failedPaths
electron/renderer/src/app/index.tsx or console component — display the warning
- Optionally:
pdv-python/pdv/handlers/project.py — handle_project_load() to accept/emit warnings
Problem
When a file is manually deleted from a project's save directory and the user then opens the project, the only visible indication is a warning icon next to the checksum in the bottom-right status bar. There is no clear message telling the user which files are missing or that the save may be corrupted.
Current behavior
copyFilesForLoad()inproject-file-sync.tscorrectly collects failed paths and logs them:The caller in
ipc-register-project.tslogs a summary toconsole.warn:But this information is only visible in the dev console — not surfaced to the user. The
failedPathsarray is not passed to the kernel or renderer. The user sees only a mismatched checksum icon with no explanation.Expected behavior
After project load, if any files were missing from the save directory, the user should see a clear message in the execution console, e.g.:
This should appear:
Implementation notes
failedPathsis already collected bycopyFilesForLoad()— it just needs to be forwarded to the kernel's load response or emitted as a separate push notificationhandle_project_loadcould accept amissing_filesfield in the load payload and include it in thepdv.project.loadedpushpdv.project.load_warningpush to the rendererAffected components
electron/main/ipc-register-project.ts— load handler (line ~320)electron/main/project-file-sync.ts—copyFilesForLoad()already returnsfailedPathselectron/renderer/src/app/index.tsxor console component — display the warningpdv-python/pdv/handlers/project.py—handle_project_load()to accept/emit warnings