fix: wire orphaned IPC channels, fix data-loss bug, print preview events, sidebar navigation

- Fix file.clearRecent sending IPC to main process instead of clearing openTabs
- Wire show-batch-converter, show-document-compare, open-header-footer-dialog IPC channels
- Add print preview event listeners (mc:print-preview, mc:print-preview-styled) in App.tsx
- Fix sidebar hidden bridge buttons toggling sidebar closed after scroll
- Update sidebar menu labels to match actual sections (Files, Outline, Git)
- Fix ipc.print to be an object with show/doPrint methods (was bare function)
- Update callers: ExportPdfDialog, pdf-export, PrintPreview
- Add 7 regression tests for all fixes
- Clean 2 obsolete snapshots
- Build Linux packages (deb, AppImage, snap) — 549 tests passing
This commit is contained in:
2026-06-11 07:15:33 +05:30
parent e25a5e1d75
commit cf6b6817b9
11 changed files with 179 additions and 24 deletions
@@ -51,7 +51,7 @@ export function ExportPdfDialog({ sourcePath }: { sourcePath: string }) {
const m = MARGIN_MAP[margins];
const pageCss = `@page { size: ${fmt.width} ${fmt.height}; margin: ${m.top}mm ${m.right}mm ${m.bottom}mm ${m.left}mm; }`;
const finalHtml = html.replace('</style>', `${pageCss}</style>`);
const result = await ipc.print({ html: finalHtml, withStyles: embed });
const result = await ipc.print.show({ html: finalHtml, withStyles: embed });
if (!result.ok) {
const msg = result.error?.message ?? 'PDF export failed';
toast.error(`Export failed: ${msg}`);