documentation-hub 5.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +43 -0
- package/.github/workflows/build.yml +64 -0
- package/.github/workflows/ci.yml +39 -0
- package/.vscode/extensions.json +3 -0
- package/Current.md +97 -0
- package/DocHub_Image.png +0 -0
- package/README.md +666 -0
- package/USER_GUIDE.md +1173 -0
- package/Updater.md +311 -0
- package/build/256x256.png +0 -0
- package/build/512x512.png +0 -0
- package/build/app-update.yml +4 -0
- package/build/create-icon.js +208 -0
- package/build/icon.ico +0 -0
- package/build/icon.png +0 -0
- package/build/icon_1024x1024.png +0 -0
- package/dist/assets/Analytics-BpsG9895.js +1 -0
- package/dist/assets/Card-IAZin8kp.js +1 -0
- package/dist/assets/CurrentSession-B-rFkHvf.js +12 -0
- package/dist/assets/Dashboard-C_5gMb0q.js +1 -0
- package/dist/assets/Documents-CqZ25axS.js +1 -0
- package/dist/assets/Input-l89xwXBi.js +1 -0
- package/dist/assets/Reporting-DqdHJY_a.js +1 -0
- package/dist/assets/Search-XNbu5z_3.js +1 -0
- package/dist/assets/SessionManager-lH9hZfzH.js +1 -0
- package/dist/assets/Sessions-ClZOPYNc.js +1 -0
- package/dist/assets/Settings-DUEHGURa.js +11 -0
- package/dist/assets/index-8xUe8ptc.js +24 -0
- package/dist/assets/index-RYyJqF7O.css +1 -0
- package/dist/assets/path-BkOl0AGO.js +1 -0
- package/dist/assets/promises-ID_B9S-h.js +1 -0
- package/dist/assets/urlHelpers-TvgahX0r.js +1 -0
- package/dist/assets/useToast-yRSO1dkm.js +1 -0
- package/dist/assets/vendor-charts-RkGK5ROP.js +36 -0
- package/dist/assets/vendor-db-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-react-BVZ_anCF.js +4 -0
- package/dist/assets/vendor-search-Dw8P0qyA.js +1 -0
- package/dist/assets/vendor-ui-BU7NfluV.js +53 -0
- package/dist/electron/PowerAutomateApiService-LfW09ZGr.js +147 -0
- package/dist/electron/main-CXkNtyv-.js +19789 -0
- package/dist/electron/main.js +5 -0
- package/dist/electron/preload.js +1 -0
- package/dist/icon.png +0 -0
- package/dist/index.html +27 -0
- package/docs/CODEBASE_ANALYSIS_REPORT.md +309 -0
- package/docs/DEBUG_LOGGING_GUIDE.md +244 -0
- package/docs/README.md +115 -0
- package/docs/TOC_WIRING_GUIDE.md +344 -0
- package/docs/analysis/Bullet_Symbol_Bug_Analysis.md +136 -0
- package/docs/analysis/DOCXMLATER_ANALYSIS_SUMMARY.txt +169 -0
- package/docs/analysis/Document_Processing_Issues_Analysis.md +704 -0
- package/docs/analysis/FIELD_PRESERVATION_ANALYSIS.md +1200 -0
- package/docs/analysis/INDENTATION_PRESERVE_ANALYSIS.md +181 -0
- package/docs/analysis/INDENTATION_PRESERVE_IMPLEMENTATION.md +207 -0
- package/docs/analysis/List_Implementation.md +206 -0
- package/docs/analysis/List_Implementation_Accuracy_Report.md +366 -0
- package/docs/analysis/PROCESSING_OPTIONS_UI_UPDATES.md +220 -0
- package/docs/analysis/RefactorStyles.md +852 -0
- package/docs/analysis/STYLE_PARAMETER_ENHANCEMENT.md +143 -0
- package/docs/analysis/docxmlater-comparison-todo-2025-11-13.md +636 -0
- package/docs/analysis/docxmlater-implementation-analysis-2025-11-13.md +340 -0
- package/docs/analysis/docxmlater-template_ui-integration-analysis.md +263 -0
- package/docs/analysis/github-issues-to-create.md +237 -0
- package/docs/api/API_README.md +538 -0
- package/docs/api/API_REFERENCE.md +751 -0
- package/docs/api/TYPE_DEFINITIONS.md +869 -0
- package/docs/architecture/FONT_EMBEDDING_GUIDE.md +318 -0
- package/docs/architecture/docxmlater-functions-and-structure.md +726 -0
- package/docs/docxmlater-readme.md +1341 -0
- package/docs/fixes/EXECUTION_LOG_TEST_BASE.md +573 -0
- package/docs/fixes/HYPERLINK_TEXT_SANITIZATION.md +253 -0
- package/docs/fixes/README.md +37 -0
- package/docs/github-issues/issue-1-body.md +125 -0
- package/docs/github-issues/issue-10-body.md +850 -0
- package/docs/github-issues/issue-2-body.md +200 -0
- package/docs/github-issues/issue-3-body.md +270 -0
- package/docs/github-issues/issue-4-body.md +169 -0
- package/docs/github-issues/issue-5-body.md +173 -0
- package/docs/github-issues/issue-6-body.md +158 -0
- package/docs/github-issues/issue-7-body.md +171 -0
- package/docs/github-issues/issue-8-body.md +407 -0
- package/docs/github-issues/issue-9-body.md +515 -0
- package/docs/github-issues/issue-tracker.md +274 -0
- package/docs/github-issues/predictive-analysis-2025-10-18.md +2131 -0
- package/docs/implementation/List_Framework_Refactor_Plan.md +336 -0
- package/docs/implementation/PRIMARY_TEXT_COLOR_FEATURE.md +217 -0
- package/docs/implementation/RELEASE_PLAN_v2.1.0.md +362 -0
- package/docs/implementation/RefactorStyles.md +588 -0
- package/docs/implementation/implement-plan.md +489 -0
- package/docs/implementation/missing-helpers-implementation.md +391 -0
- package/docs/implementation/refactor-plan.md +520 -0
- package/docs/implementation/session-implementation-complete.md +233 -0
- package/docs/implementation/session-management-plan.md +250 -0
- package/docs/setup-checklist.md +77 -0
- package/docs/versions/changelog.md +345 -0
- package/electron/customUpdater.ts +656 -0
- package/electron/main.ts +2441 -0
- package/electron/memoryConfig.ts +187 -0
- package/electron/preload.ts +394 -0
- package/electron/proxyConfig.ts +340 -0
- package/electron/services/BackupService.ts +452 -0
- package/electron/services/DictionaryService.ts +402 -0
- package/electron/services/LocalDictionaryLookupService.ts +147 -0
- package/electron/services/PowerAutomateApiService.ts +231 -0
- package/electron/services/SharePointSyncService.ts +474 -0
- package/electron/windowsCertStore.ts +427 -0
- package/electron/zscalerConfig.ts +381 -0
- package/eslint.config.js +92 -0
- package/jest.config.js +52 -0
- package/package.json +214 -0
- package/postcss.config.mjs +6 -0
- package/public/icon.png +0 -0
- package/publish-release.ps1 +5 -0
- package/renovate.json +30 -0
- package/src/App.tsx +216 -0
- package/src/__mocks__/p-limit.js +12 -0
- package/src/__mocks__/styleMock.js +1 -0
- package/src/components/common/BugReportButton.tsx +44 -0
- package/src/components/common/BugReportDialog.tsx +193 -0
- package/src/components/common/Button.tsx +153 -0
- package/src/components/common/Card.tsx +86 -0
- package/src/components/common/ColorPickerDialog.tsx +177 -0
- package/src/components/common/ConfirmDialog.tsx +96 -0
- package/src/components/common/DebugConsole.tsx +275 -0
- package/src/components/common/EmptyState.tsx +183 -0
- package/src/components/common/ErrorBoundary.tsx +98 -0
- package/src/components/common/ErrorDetailsDialog.tsx +153 -0
- package/src/components/common/ErrorFallback.tsx +218 -0
- package/src/components/common/Input.tsx +109 -0
- package/src/components/common/Skeleton.tsx +184 -0
- package/src/components/common/SplashScreen.tsx +81 -0
- package/src/components/common/Toast.tsx +155 -0
- package/src/components/common/Tooltip.tsx +79 -0
- package/src/components/common/UpdateNotification.tsx +320 -0
- package/src/components/comparison/ComparisonWindow.tsx +374 -0
- package/src/components/comparison/SideBySideDiff.tsx +486 -0
- package/src/components/comparison/index.ts +8 -0
- package/src/components/document/DocumentUploader.tsx +288 -0
- package/src/components/document/HyperlinkPreview.tsx +430 -0
- package/src/components/document/HyperlinkService.md +1484 -0
- package/src/components/document/Hyperlink_Technical_Documentation.md +496 -0
- package/src/components/document/InlineChangesView.tsx +707 -0
- package/src/components/document/ProcessingProgress.tsx +303 -0
- package/src/components/document/ProcessingResults.tsx +256 -0
- package/src/components/document/TrackedChangesDetail.tsx +530 -0
- package/src/components/document/TrackedChangesPanel.tsx +546 -0
- package/src/components/document/VirtualDocumentList.tsx +240 -0
- package/src/components/editor/DocumentEditor.tsx +723 -0
- package/src/components/editor/DocumentEditorModal.tsx +640 -0
- package/src/components/editor/EditorQuickActions.tsx +502 -0
- package/src/components/editor/EditorToolbar.tsx +312 -0
- package/src/components/editor/TableEditor.tsx +926 -0
- package/src/components/editor/index.ts +18 -0
- package/src/components/layout/Header.tsx +190 -0
- package/src/components/layout/Sidebar.tsx +313 -0
- package/src/components/layout/TitleBar.tsx +190 -0
- package/src/components/navigation/CommandPalette.tsx +233 -0
- package/src/components/navigation/KeyboardShortcutsModal.tsx +173 -0
- package/src/components/sessions/ChangeItem.tsx +408 -0
- package/src/components/sessions/ChangeViewer.tsx +1155 -0
- package/src/components/sessions/DocumentComparisonModal.tsx +314 -0
- package/src/components/sessions/ProcessingOptions.tsx +297 -0
- package/src/components/sessions/ReplacementsTab.tsx +438 -0
- package/src/components/sessions/RevisionHandlingOptions.tsx +87 -0
- package/src/components/sessions/SessionManager.tsx +188 -0
- package/src/components/sessions/StylesEditor.tsx +1335 -0
- package/src/components/sessions/TabContainer.tsx +151 -0
- package/src/components/sessions/VirtualSessionList.tsx +157 -0
- package/src/components/sessions/sessionToProcessorManager.tsx +420 -0
- package/src/components/settings/CertificateManager.tsx +410 -0
- package/src/components/settings/SegmentedControl.tsx +88 -0
- package/src/components/settings/SettingRow.tsx +52 -0
- package/src/contexts/GlobalStatsContext.tsx +396 -0
- package/src/contexts/SessionContext.tsx +2129 -0
- package/src/contexts/ThemeContext.tsx +428 -0
- package/src/contexts/UserSettingsContext.tsx +290 -0
- package/src/contexts/__tests__/GlobalStatsContext.test.tsx +390 -0
- package/src/global.d.ts +273 -0
- package/src/hooks/useDocumentQueue.tsx +210 -0
- package/src/hooks/useToast.tsx +55 -0
- package/src/main.tsx +10 -0
- package/src/pages/Analytics.tsx +386 -0
- package/src/pages/CurrentSession.tsx +1174 -0
- package/src/pages/Dashboard.tsx +319 -0
- package/src/pages/Documents.tsx +317 -0
- package/src/pages/Projects.tsx +250 -0
- package/src/pages/Reporting.tsx +386 -0
- package/src/pages/Search.tsx +349 -0
- package/src/pages/Sessions.tsx +285 -0
- package/src/pages/Settings.tsx +2662 -0
- package/src/services/HyperlinkService.ts +1085 -0
- package/src/services/document/DocXMLaterProcessor.ts +617 -0
- package/src/services/document/DocumentProcessingComparison.ts +856 -0
- package/src/services/document/DocumentSnapshotService.ts +575 -0
- package/src/services/document/WordDocumentProcessor.ts +10509 -0
- package/src/services/document/__tests__/DocXMLaterProcessor.hyperlinks.test.md +311 -0
- package/src/services/document/__tests__/WordDocumentProcessor.integration.test.ts +515 -0
- package/src/services/document/__tests__/WordDocumentProcessor.test.ts +812 -0
- package/src/services/document/blanklines/BlankLineManager.ts +658 -0
- package/src/services/document/blanklines/__tests__/paragraphChecks.test.ts +281 -0
- package/src/services/document/blanklines/helpers/blankLineInsertion.ts +87 -0
- package/src/services/document/blanklines/helpers/blankLineSnapshot.ts +251 -0
- package/src/services/document/blanklines/helpers/clearCustom.ts +121 -0
- package/src/services/document/blanklines/helpers/contextChecks.ts +117 -0
- package/src/services/document/blanklines/helpers/imageChecks.ts +51 -0
- package/src/services/document/blanklines/helpers/paragraphChecks.ts +236 -0
- package/src/services/document/blanklines/helpers/removeBlanksBetweenListItems.ts +91 -0
- package/src/services/document/blanklines/helpers/removeTrailingBlanks.ts +35 -0
- package/src/services/document/blanklines/helpers/tableGuards.ts +21 -0
- package/src/services/document/blanklines/index.ts +67 -0
- package/src/services/document/blanklines/rules/additionRules.ts +337 -0
- package/src/services/document/blanklines/rules/indentationRules.ts +317 -0
- package/src/services/document/blanklines/rules/removalRules.ts +362 -0
- package/src/services/document/blanklines/rules/ruleTypes.ts +92 -0
- package/src/services/document/blanklines/types.ts +29 -0
- package/src/services/document/helpers/ImageBorderCropper.ts +377 -0
- package/src/services/document/helpers/__tests__/whitespace.test.ts +272 -0
- package/src/services/document/helpers/whitespace.ts +117 -0
- package/src/services/document/list/ListNormalizer.ts +947 -0
- package/src/services/document/list/index.ts +45 -0
- package/src/services/document/list/list-detection.ts +275 -0
- package/src/services/document/list/list-types.ts +162 -0
- package/src/services/document/processors/HyperlinkProcessor.ts +370 -0
- package/src/services/document/processors/ListProcessor.ts +257 -0
- package/src/services/document/processors/StructureProcessor.ts +176 -0
- package/src/services/document/processors/StyleProcessor.ts +389 -0
- package/src/services/document/processors/TableProcessor.ts +2238 -0
- package/src/services/document/processors/__tests__/HyperlinkProcessor.test.ts +314 -0
- package/src/services/document/processors/__tests__/ListProcessor.test.ts +291 -0
- package/src/services/document/processors/__tests__/StructureProcessor.test.ts +257 -0
- package/src/services/document/processors/__tests__/TableProcessor.hlp-tips-bullets.test.ts +459 -0
- package/src/services/document/processors/__tests__/TableProcessor.test.ts +1604 -0
- package/src/services/document/processors/index.ts +28 -0
- package/src/services/document/types/docx-processing.ts +310 -0
- package/src/services/editor/EditorActionHandlers.ts +901 -0
- package/src/services/editor/index.ts +13 -0
- package/src/setupTests.ts +47 -0
- package/src/styles/global.css +782 -0
- package/src/types/backup.ts +132 -0
- package/src/types/dictionary.ts +125 -0
- package/src/types/document-processing.ts +331 -0
- package/src/types/docxmlater-augments.d.ts +142 -0
- package/src/types/editor.ts +280 -0
- package/src/types/electron.ts +340 -0
- package/src/types/globalStats.ts +155 -0
- package/src/types/hyperlink.ts +471 -0
- package/src/types/operations.ts +354 -0
- package/src/types/session.ts +427 -0
- package/src/types/settings.ts +112 -0
- package/src/utils/MemoryMonitor.ts +248 -0
- package/src/utils/cn.ts +6 -0
- package/src/utils/colorConvert.ts +306 -0
- package/src/utils/diffUtils.ts +347 -0
- package/src/utils/documentUtils.ts +202 -0
- package/src/utils/electronGuard.ts +62 -0
- package/src/utils/indexedDB.ts +915 -0
- package/src/utils/logger.ts +717 -0
- package/src/utils/pathSecurity.ts +232 -0
- package/src/utils/pathValidator.ts +236 -0
- package/src/utils/processingTimeEstimator.ts +153 -0
- package/src/utils/safeJsonParse.ts +62 -0
- package/src/utils/textSanitizer.ts +162 -0
- package/src/utils/urlHelpers.ts +304 -0
- package/src/utils/urlPatterns.ts +198 -0
- package/src/utils/urlSanitizer.ts +152 -0
- package/src/vite-env.d.ts +11 -0
- package/tsconfig.electron.json +19 -0
- package/tsconfig.json +36 -0
- package/tsconfig.node.json +12 -0
- package/typedoc.json +45 -0
- package/vite.config.ts +152 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("electron"),c={minimizeWindow:()=>r.ipcRenderer.invoke("window-minimize"),maximizeWindow:()=>r.ipcRenderer.invoke("window-maximize"),closeWindow:()=>r.ipcRenderer.invoke("window-close"),isMaximized:()=>r.ipcRenderer.invoke("window-is-maximized"),isFullscreen:()=>r.ipcRenderer.invoke("window-is-fullscreen"),getAppVersion:()=>r.ipcRenderer.invoke("app-version"),getPlatform:()=>r.ipcRenderer.invoke("platform"),openDevTools:()=>r.ipcRenderer.invoke("open-dev-tools"),setAlwaysOnTop:e=>r.ipcRenderer.invoke("window-set-always-on-top",e),isAlwaysOnTop:()=>r.ipcRenderer.invoke("window-is-always-on-top"),onAlwaysOnTopChanged:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("window-always-on-top-changed",n),()=>r.ipcRenderer.removeListener("window-always-on-top-changed",n)},selectDocuments:()=>r.ipcRenderer.invoke("select-documents"),processDocument:e=>r.ipcRenderer.invoke("process-document",e),showInFolder:e=>r.ipcRenderer.invoke("show-in-folder",e),openDocument:e=>r.ipcRenderer.invoke("open-document",e),getFileStats:e=>r.ipcRenderer.invoke("get-file-stats",e),restoreFromBackup:(e,n)=>r.ipcRenderer.invoke("restore-from-backup",{backupPath:e,targetPath:n}),getPathsForFiles:e=>e.map(n=>r.webUtils.getPathForFile(n)),selectFolder:()=>r.ipcRenderer.invoke("select-folder"),copyFilesToFolder:(e,n)=>r.ipcRenderer.invoke("copy-files-to-folder",{filePaths:e,destinationFolder:n}),getDownloadsPath:()=>r.ipcRenderer.invoke("get-downloads-path"),createFolder:e=>r.ipcRenderer.invoke("create-folder",e),copyFileToFolder:(e,n)=>r.ipcRenderer.invoke("copy-file-to-folder",{sourcePath:e,destFolder:n}),createReportZip:(e,n)=>r.ipcRenderer.invoke("create-report-zip",{folderPath:e,zipName:n}),openOutlookEmail:(e,n)=>r.ipcRenderer.invoke("open-outlook-email",{subject:e,attachmentPath:n}),extractDocumentText:e=>r.ipcRenderer.invoke("document:extract-text",e),readFileAsBuffer:e=>r.ipcRenderer.invoke("file:read-buffer",e),selectFiles:()=>r.ipcRenderer.invoke("hyperlink:select-files"),processHyperlinkDocument:(e,n)=>r.ipcRenderer.invoke("hyperlink:process-document",{filePath:e,options:n}),batchProcessDocuments:(e,n)=>r.ipcRenderer.invoke("hyperlink:batch-process",{filePaths:e,options:n}),validateApi:e=>r.ipcRenderer.invoke("hyperlink:validate-api",{apiUrl:e}),callPowerAutomateApi:(e,n,o)=>r.ipcRenderer.invoke("hyperlink:call-api",{apiUrl:e,payload:n,timeout:o}),cancelOperation:e=>r.ipcRenderer.invoke("hyperlink:cancel-operation",{operationId:e}),onBatchProgress:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("hyperlink:batch-progress",n),()=>r.ipcRenderer.removeListener("hyperlink:batch-progress",n)},onWindowMaximized:e=>{const n=o=>e();return r.ipcRenderer.on("window-maximized",n),()=>r.ipcRenderer.removeListener("window-maximized",n)},onWindowUnmaximized:e=>{const n=o=>e();return r.ipcRenderer.on("window-unmaximized",n),()=>r.ipcRenderer.removeListener("window-unmaximized",n)},onWindowFullscreen:e=>{const n=o=>e();return r.ipcRenderer.on("window-fullscreen",n),()=>r.ipcRenderer.removeListener("window-fullscreen",n)},onWindowUnfullscreen:e=>{const n=o=>e();return r.ipcRenderer.on("window-unfullscreen",n),()=>r.ipcRenderer.removeListener("window-unfullscreen",n)},exportSettings:()=>r.ipcRenderer.invoke("export-settings"),importSettings:()=>r.ipcRenderer.invoke("import-settings"),saveExportData:(e,n)=>r.ipcRenderer.invoke("save-export-data",{filePath:e,data:n}),backup:{create:e=>r.ipcRenderer.invoke("backup:create",e),restore:(e,n)=>r.ipcRenderer.invoke("backup:restore",{backupPath:e,targetPath:n}),list:e=>r.ipcRenderer.invoke("backup:list",e),delete:e=>r.ipcRenderer.invoke("backup:delete",e),cleanup:e=>r.ipcRenderer.invoke("backup:cleanup",e),cleanupAll:()=>r.ipcRenderer.invoke("backup:cleanup-all"),verify:e=>r.ipcRenderer.invoke("backup:verify",e),getStorageInfo:()=>r.ipcRenderer.invoke("backup:storage-info"),setConfig:e=>r.ipcRenderer.invoke("backup:set-config",e)},dictionary:{initialize:()=>r.ipcRenderer.invoke("dictionary:initialize"),configureSync:e=>r.ipcRenderer.invoke("dictionary:configure-sync",e),setCredentials:e=>r.ipcRenderer.invoke("dictionary:set-credentials",e),sync:()=>r.ipcRenderer.invoke("dictionary:sync"),startScheduler:e=>r.ipcRenderer.invoke("dictionary:start-scheduler",e),stopScheduler:()=>r.ipcRenderer.invoke("dictionary:stop-scheduler"),lookup:e=>r.ipcRenderer.invoke("dictionary:lookup",e),batchLookup:e=>r.ipcRenderer.invoke("dictionary:batch-lookup",e),getStatus:()=>r.ipcRenderer.invoke("dictionary:get-status"),retrieveFromSharePoint:e=>r.ipcRenderer.invoke("dictionary:retrieve-from-sharepoint",{fileUrl:e}),sharePointLogin:()=>r.ipcRenderer.invoke("dictionary:sharepoint-login"),isSharePointAuthenticated:()=>r.ipcRenderer.invoke("dictionary:is-sharepoint-authenticated"),onSyncProgress:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("dictionary:sync-progress",n),()=>r.ipcRenderer.removeListener("dictionary:sync-progress",n)},onSyncComplete:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("dictionary:sync-complete",n),()=>r.ipcRenderer.removeListener("dictionary:sync-complete",n)}},display:{getAllDisplays:()=>r.ipcRenderer.invoke("display:get-all-displays"),identifyMonitors:()=>r.ipcRenderer.invoke("display:identify-monitors"),openComparison:(e,n,o)=>r.ipcRenderer.invoke("display:open-comparison",{backupPath:e,processedPath:n,monitorIndex:o})},checkForUpdates:()=>r.ipcRenderer.invoke("check-for-updates"),downloadUpdate:()=>r.ipcRenderer.invoke("download-update"),installUpdate:()=>r.ipcRenderer.invoke("install-update"),getCurrentVersion:()=>r.ipcRenderer.invoke("get-app-version"),setUpdateProvider:e=>r.ipcRenderer.invoke("update:set-provider",e),testSharePointConnection:e=>r.ipcRenderer.invoke("update:test-sharepoint-connection",e),sharePointLogin:()=>r.ipcRenderer.invoke("update:sharepoint-login"),sharePointLogout:()=>r.ipcRenderer.invoke("update:sharepoint-logout"),onUpdateChecking:e=>{const n=o=>e();return r.ipcRenderer.on("update-checking",n),()=>r.ipcRenderer.removeListener("update-checking",n)},onUpdateAvailable:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-available",n),()=>r.ipcRenderer.removeListener("update-available",n)},onUpdateNotAvailable:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-not-available",n),()=>r.ipcRenderer.removeListener("update-not-available",n)},onUpdateError:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-error",n),()=>r.ipcRenderer.removeListener("update-error",n)},onUpdateDownloadProgress:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-download-progress",n),()=>r.ipcRenderer.removeListener("update-download-progress",n)},onUpdateDownloaded:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-downloaded",n),()=>r.ipcRenderer.removeListener("update-downloaded",n)},onUpdateFallbackMode:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-fallback-mode",n),()=>r.ipcRenderer.removeListener("update-fallback-mode",n)},onUpdateExtracting:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-extracting",n),()=>r.ipcRenderer.removeListener("update-extracting",n)},onUpdateStatus:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-status",n),()=>r.ipcRenderer.removeListener("update-status",n)},openUpdateInBrowser:()=>r.ipcRenderer.invoke("open-update-in-browser"),checkZscalerStatus:()=>r.ipcRenderer.invoke("check-zscaler-status"),getCertificatePath:()=>r.ipcRenderer.invoke("get-certificate-path"),getInstalledCertificates:()=>r.ipcRenderer.invoke("get-installed-certificates"),importCertificate:()=>r.ipcRenderer.invoke("import-certificate"),autoDetectCertificates:()=>r.ipcRenderer.invoke("auto-detect-certificates"),removeCertificate:e=>r.ipcRenderer.invoke("remove-certificate",e),testGitHubConnection:()=>r.ipcRenderer.invoke("test-github-connection"),openExternal:e=>r.ipcRenderer.invoke("open-external",e),on:(e,n)=>{if(!["window-maximized","window-unmaximized","window-fullscreen","window-unfullscreen","window-always-on-top-changed","hyperlink:batch-progress","dictionary:sync-progress","dictionary:sync-complete","update-checking","update-available","update-not-available","update-error","update-download-progress","update-downloaded","update-fallback-mode","update-extracting","update-status","update-manual-download","debug-network-request","debug-cert-error","debug-network-error","debug-tls-error","certificate-check-complete","certificate-configured"].includes(e))return console.error(`[Preload] Blocked IPC listener on disallowed channel: ${e}`),()=>{};const i=(d,...t)=>n(...t);return r.ipcRenderer.on(e,i),()=>r.ipcRenderer.removeListener(e,i)},removeListener:(e,n)=>{["window-maximized","window-unmaximized","window-fullscreen","window-unfullscreen","window-always-on-top-changed","hyperlink:batch-progress","dictionary:sync-progress","dictionary:sync-complete","update-checking","update-available","update-not-available","update-error","update-download-progress","update-downloaded","update-fallback-mode","update-extracting","update-status","update-manual-download","debug-network-request","debug-cert-error","debug-network-error","debug-tls-error","certificate-check-complete","certificate-configured"].includes(e)&&r.ipcRenderer.removeListener(e,n)},onDebugNetworkRequest:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("debug-network-request",n),()=>r.ipcRenderer.removeListener("debug-network-request",n)},onDebugCertError:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("debug-cert-error",n),()=>r.ipcRenderer.removeListener("debug-cert-error",n)},onDebugNetworkError:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("debug-network-error",n),()=>r.ipcRenderer.removeListener("debug-network-error",n)},onDebugTLSError:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("debug-tls-error",n),()=>r.ipcRenderer.removeListener("debug-tls-error",n)},onUpdateManualDownload:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("update-manual-download",n),()=>r.ipcRenderer.removeListener("update-manual-download",n)},onCertificateCheckComplete:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("certificate-check-complete",n),()=>r.ipcRenderer.removeListener("certificate-check-complete",n)},onCertificateConfigured:e=>{const n=(o,i)=>e(i);return r.ipcRenderer.on("certificate-configured",n),()=>r.ipcRenderer.removeListener("certificate-configured",n)}};r.contextBridge.exposeInMainWorld("electronAPI",c);
|
package/dist/icon.png
ADDED
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/png" href="./icon.png" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<meta
|
|
8
|
+
http-equiv="Content-Security-Policy"
|
|
9
|
+
content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:*; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' ws://localhost:* http://localhost:*"
|
|
10
|
+
/>
|
|
11
|
+
<title>Documentation Hub</title>
|
|
12
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
13
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
14
|
+
<link
|
|
15
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
|
|
16
|
+
rel="stylesheet"
|
|
17
|
+
/>
|
|
18
|
+
<script type="module" crossorigin src="./assets/index-8xUe8ptc.js"></script>
|
|
19
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-react-BVZ_anCF.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-ui-BU7NfluV.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-charts-RkGK5ROP.js">
|
|
22
|
+
<link rel="stylesheet" crossorigin href="./assets/index-RYyJqF7O.css">
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<div id="root"></div>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Documentation Hub - Codebase Architecture Review
|
|
2
|
+
|
|
3
|
+
**Version:** 3.3.0
|
|
4
|
+
**Analysis Date:** 2025-11-28
|
|
5
|
+
**Analyst:** DiaTech
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Executive Summary
|
|
10
|
+
|
|
11
|
+
Documentation Hub is a professional-grade Electron desktop application for document processing workflows, built with React 19, TypeScript 5.9, and Vite 7. The application features session-based document management, hyperlink processing with PowerAutomate API integration, comprehensive styling controls, and robust backup/recovery mechanisms.
|
|
12
|
+
|
|
13
|
+
**Key Strengths:**
|
|
14
|
+
- Solid security fundamentals (context isolation, secure IPC, path validation)
|
|
15
|
+
- Comprehensive error handling with recovery mechanisms
|
|
16
|
+
- Well-organized component architecture with proper state management
|
|
17
|
+
- Sophisticated corporate network support (Zscaler, proxy, certificate handling)
|
|
18
|
+
|
|
19
|
+
**Areas for Improvement:**
|
|
20
|
+
- Test infrastructure needs configuration (addressed in this review)
|
|
21
|
+
- Some type safety gaps in IndexedDB and Electron API layers
|
|
22
|
+
- Minor security enhancements needed (URL protocol validation, credential masking)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Architecture Diagram
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
graph TB
|
|
30
|
+
subgraph Electron Main Process
|
|
31
|
+
MAIN[main.ts<br/>IPC Handlers: 47 channels]
|
|
32
|
+
PRELOAD[preload.ts<br/>Context Bridge]
|
|
33
|
+
UPDATER[customUpdater.ts<br/>Auto-update + Fallbacks]
|
|
34
|
+
BACKUP[BackupService.ts<br/>SHA-256 Checksums]
|
|
35
|
+
PROXY[proxyConfig.ts<br/>Corporate Network]
|
|
36
|
+
ZSCALER[zscalerConfig.ts<br/>Certificate Detection]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
subgraph React Frontend
|
|
40
|
+
APP[App.tsx<br/>Router + Providers]
|
|
41
|
+
|
|
42
|
+
subgraph Contexts
|
|
43
|
+
THEME[ThemeContext<br/>UI Customization]
|
|
44
|
+
SESSION[SessionContext<br/>1930 lines - Core State]
|
|
45
|
+
STATS[GlobalStatsContext<br/>Analytics + History]
|
|
46
|
+
SETTINGS[UserSettingsContext<br/>Preferences]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
subgraph Pages
|
|
50
|
+
DASH[Dashboard]
|
|
51
|
+
CURR[CurrentSession]
|
|
52
|
+
DOCS[Documents]
|
|
53
|
+
SET[Settings]
|
|
54
|
+
ANALYTICS[Analytics]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
subgraph Services
|
|
58
|
+
WORD[WordDocumentProcessor<br/>Main Orchestrator]
|
|
59
|
+
DOCX[DocXMLaterProcessor<br/>DOCX Abstraction]
|
|
60
|
+
HYPER[HyperlinkService<br/>API Integration]
|
|
61
|
+
SNAP[DocumentSnapshotService<br/>IndexedDB Snapshots]
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
subgraph Storage
|
|
66
|
+
IDB[(IndexedDB<br/>Sessions + Stats)]
|
|
67
|
+
LS[(localStorage<br/>Settings + Theme)]
|
|
68
|
+
FS[(File System<br/>Backups)]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
MAIN --> PRELOAD
|
|
72
|
+
PRELOAD --> APP
|
|
73
|
+
MAIN --> UPDATER
|
|
74
|
+
MAIN --> BACKUP
|
|
75
|
+
MAIN --> PROXY
|
|
76
|
+
MAIN --> ZSCALER
|
|
77
|
+
|
|
78
|
+
APP --> THEME
|
|
79
|
+
APP --> SESSION
|
|
80
|
+
APP --> STATS
|
|
81
|
+
APP --> SETTINGS
|
|
82
|
+
|
|
83
|
+
SESSION --> WORD
|
|
84
|
+
WORD --> DOCX
|
|
85
|
+
WORD --> HYPER
|
|
86
|
+
WORD --> SNAP
|
|
87
|
+
|
|
88
|
+
SESSION --> IDB
|
|
89
|
+
STATS --> IDB
|
|
90
|
+
THEME --> LS
|
|
91
|
+
SETTINGS --> LS
|
|
92
|
+
BACKUP --> FS
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 3. Code Quality Assessment
|
|
98
|
+
|
|
99
|
+
| Area | Score | Details |
|
|
100
|
+
|------|-------|---------|
|
|
101
|
+
| **Type Safety** | 4/5 | Strong TypeScript usage with strict mode. Some `any` returns in IndexedDB (line 442) and Electron API (line 111). |
|
|
102
|
+
| **Error Handling** | 4.5/5 | Comprehensive try-catch, backup recovery, graceful degradation. Minor gaps in storage cleanup. |
|
|
103
|
+
| **Testing** | 2/5 | Test infrastructure exists but was misconfigured. Fixtures missing. Coverage needs improvement. |
|
|
104
|
+
| **Performance** | 4/5 | O(1) lookups, connection pooling, debounced persistence, virtual lists. Some unnecessary re-renders possible. |
|
|
105
|
+
| **Maintainability** | 4/5 | Well-organized, good separation of concerns. SessionContext too large (1930 lines). |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 4. Findings Table
|
|
110
|
+
|
|
111
|
+
| ID | Issue | Severity | Location | Recommendation |
|
|
112
|
+
|----|-------|----------|----------|----------------|
|
|
113
|
+
| **CRITICAL** |||||
|
|
114
|
+
| C-1 | Missing Jest configuration | Critical | Root | Fixed: Added jest.config.js |
|
|
115
|
+
| C-2 | Hyperlink index tracking bug | High | WordDocumentProcessor.ts:568 | Fix `i % 10` to use actual hyperlink index |
|
|
116
|
+
| C-3 | Incomplete storage cleanup | High | DocumentSnapshotService.ts:446 | Implement oldest-first deletion algorithm |
|
|
117
|
+
| **SECURITY** |||||
|
|
118
|
+
| S-1 | URL protocol validation missing | Medium | preload.ts:194 | Add protocol whitelist for openExternal() |
|
|
119
|
+
| S-2 | Weak certificate validation | Medium | main.ts:1561 | Validate X.509 structure, not just string check |
|
|
120
|
+
| S-3 | Credentials not masked in logs | Medium | proxyConfig.ts:118 | Mask password in log output |
|
|
121
|
+
| S-4 | GitHub certs trusted without pinning | Medium | main.ts:576 | Consider certificate pinning |
|
|
122
|
+
| **TYPE SAFETY** |||||
|
|
123
|
+
| T-1 | IndexedDB returns `any` type | Medium | indexedDB.ts:442 | Return `SerializedSession \| null` |
|
|
124
|
+
| T-2 | processDocument returns `unknown` | Medium | electron.ts:111 | Type as `ProcessingResult` |
|
|
125
|
+
| T-3 | Missing null check in truncate | Medium | indexedDB.ts:721 | Add `doc?.processingResult?.changes` guard |
|
|
126
|
+
| **ARCHITECTURE** |||||
|
|
127
|
+
| A-1 | SessionContext too large | Medium | SessionContext.tsx | Split into SessionListContext + SessionProcessingContext |
|
|
128
|
+
| A-2 | 16 useState calls in ThemeContext | Low | ThemeContext.tsx:51-146 | Consider useReducer |
|
|
129
|
+
| A-3 | Toast timeout not cleaned up | Low | useToast.tsx:22 | Add cleanup on unmount |
|
|
130
|
+
| A-4 | Global state for installer path | Low | customUpdater.ts:302 | Use class property instead |
|
|
131
|
+
| **PERFORMANCE** |||||
|
|
132
|
+
| P-1 | getTodayStats returns new object | Low | GlobalStatsContext:246 | Memoize return value |
|
|
133
|
+
| P-2 | Multiple theme useEffect hooks | Low | ThemeContext:150-342 | Consolidate into fewer effects |
|
|
134
|
+
| **DEPRECATED** |||||
|
|
135
|
+
| D-1 | Deprecated session fields | Low | session.ts:202-216 | Remove `appendContentId`, `contentIdToAppend` |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 5. Priority Actions (Impact/Effort Ranked)
|
|
140
|
+
|
|
141
|
+
### 1. Fix Jest Configuration ✅ DONE
|
|
142
|
+
- **Impact:** High - Enables test development and CI/CD
|
|
143
|
+
- **Effort:** Low
|
|
144
|
+
- **Status:** Completed in this review
|
|
145
|
+
|
|
146
|
+
### 2. Fix Hyperlink Index Tracking Bug
|
|
147
|
+
- **Impact:** High - Incorrect change reports affect user trust
|
|
148
|
+
- **Effort:** Low
|
|
149
|
+
- **Location:** `src/services/document/WordDocumentProcessor.ts:568, 613, 686`
|
|
150
|
+
- **Fix:** Store hyperlink index during extraction, pass through to change tracking
|
|
151
|
+
|
|
152
|
+
### 3. Add URL Protocol Validation
|
|
153
|
+
- **Impact:** High - Security vulnerability
|
|
154
|
+
- **Effort:** Low
|
|
155
|
+
- **Location:** `electron/preload.ts:194`
|
|
156
|
+
- **Fix:**
|
|
157
|
+
```typescript
|
|
158
|
+
openExternal: (url: string) => {
|
|
159
|
+
const parsed = new URL(url);
|
|
160
|
+
if (!['http:', 'https:', 'mailto:'].includes(parsed.protocol)) {
|
|
161
|
+
throw new Error('Only http/https/mailto URLs allowed');
|
|
162
|
+
}
|
|
163
|
+
return shell.openExternal(url);
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### 4. Implement Storage Cleanup
|
|
168
|
+
- **Impact:** Medium - Prevents storage exhaustion
|
|
169
|
+
- **Effort:** Medium
|
|
170
|
+
- **Location:** `src/services/document/DocumentSnapshotService.ts:446-466`
|
|
171
|
+
- **Fix:** Implement oldest-first deletion when exceeding 100MB limit
|
|
172
|
+
|
|
173
|
+
### 5. Improve Type Safety in IndexedDB
|
|
174
|
+
- **Impact:** Medium - Better developer experience
|
|
175
|
+
- **Effort:** Low
|
|
176
|
+
- **Location:** `src/utils/indexedDB.ts:442`
|
|
177
|
+
- **Fix:** Change return type from `any` to `SerializedSession | null`
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 6. Technical Debt Inventory
|
|
182
|
+
|
|
183
|
+
### Immediate (Next Sprint)
|
|
184
|
+
- [ ] Fix hyperlink index tracking (C-2)
|
|
185
|
+
- [ ] Add URL protocol validation (S-1)
|
|
186
|
+
- [ ] Mask credentials in logs (S-3)
|
|
187
|
+
- [ ] Fix IndexedDB type safety (T-1, T-2, T-3)
|
|
188
|
+
|
|
189
|
+
### Short-term (Next Release)
|
|
190
|
+
- [ ] Implement storage cleanup (C-3)
|
|
191
|
+
- [ ] Validate X.509 certificates (S-2)
|
|
192
|
+
- [ ] Split SessionContext (A-1)
|
|
193
|
+
- [ ] Add toast cleanup (A-3)
|
|
194
|
+
|
|
195
|
+
### Medium-term (Backlog)
|
|
196
|
+
- [ ] Refactor ThemeContext with useReducer (A-2)
|
|
197
|
+
- [ ] Add certificate pinning (S-4)
|
|
198
|
+
- [ ] Memoize GlobalStats selectors (P-1)
|
|
199
|
+
- [ ] Remove deprecated session fields (D-1)
|
|
200
|
+
- [ ] Consolidate theme effects (P-2)
|
|
201
|
+
|
|
202
|
+
### Long-term (Future Consideration)
|
|
203
|
+
- [ ] Add comprehensive test coverage (target 80%)
|
|
204
|
+
- [ ] Implement memory leak detection
|
|
205
|
+
- [ ] Add performance monitoring
|
|
206
|
+
- [ ] Consider Web Workers for large document processing
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 7. Module Summary
|
|
211
|
+
|
|
212
|
+
### Electron Layer (8 files, ~4,500 lines)
|
|
213
|
+
| Module | Responsibility | Key Concerns |
|
|
214
|
+
|--------|---------------|--------------|
|
|
215
|
+
| main.ts | IPC handlers, window management | 47 IPC channels, security settings |
|
|
216
|
+
| preload.ts | Context bridge API | URL validation needed |
|
|
217
|
+
| customUpdater.ts | Auto-update with 4 fallback strategies | Global state usage |
|
|
218
|
+
| BackupService.ts | SHA-256 checksums, 7-day retention | Clean implementation |
|
|
219
|
+
| proxyConfig.ts | Corporate proxy detection | Credential logging concern |
|
|
220
|
+
| zscalerConfig.ts | Certificate discovery (12 locations) | Complex but comprehensive |
|
|
221
|
+
|
|
222
|
+
### React Layer (45+ components, ~10,000 lines)
|
|
223
|
+
| Module | Responsibility | Key Concerns |
|
|
224
|
+
|--------|---------------|--------------|
|
|
225
|
+
| SessionContext | Core state management (1930 lines) | Too large, should split |
|
|
226
|
+
| ThemeContext | UI customization | Many useState calls |
|
|
227
|
+
| GlobalStatsContext | Analytics + history | Good connection pooling |
|
|
228
|
+
| WordDocumentProcessor | Document pipeline orchestrator | Index tracking bug |
|
|
229
|
+
| HyperlinkService | PowerAutomate API integration | Good retry logic |
|
|
230
|
+
| DocumentSnapshotService | IndexedDB snapshots | Storage cleanup incomplete |
|
|
231
|
+
|
|
232
|
+
### Utilities (13 files, ~2,500 lines)
|
|
233
|
+
| Module | Responsibility | Key Concerns |
|
|
234
|
+
|--------|---------------|--------------|
|
|
235
|
+
| indexedDB.ts | Connection pool + persistence | Type safety gaps |
|
|
236
|
+
| logger.ts | Structured logging + sanitization | Unix path pattern incomplete |
|
|
237
|
+
| pathSecurity.ts | Path traversal prevention | Excellent defense-in-depth |
|
|
238
|
+
| urlSanitizer.ts | XSS prevention | Good protocol whitelist |
|
|
239
|
+
| MemoryMonitor.ts | Heap tracking + checkpoints | Duplicate field |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 8. Recommendations Summary
|
|
244
|
+
|
|
245
|
+
### Security
|
|
246
|
+
1. Validate URL protocols before opening external links
|
|
247
|
+
2. Validate X.509 certificate structure on import
|
|
248
|
+
3. Mask proxy credentials in log output
|
|
249
|
+
4. Consider certificate pinning for GitHub updates
|
|
250
|
+
|
|
251
|
+
### Code Quality
|
|
252
|
+
1. Fix Jest configuration for test development
|
|
253
|
+
2. Fix hyperlink index tracking in change reports
|
|
254
|
+
3. Improve IndexedDB return types
|
|
255
|
+
4. Add null checks in session truncation
|
|
256
|
+
|
|
257
|
+
### Architecture
|
|
258
|
+
1. Split SessionContext into smaller focused contexts
|
|
259
|
+
2. Refactor ThemeContext to use useReducer
|
|
260
|
+
3. Consolidate theme-related useEffect hooks
|
|
261
|
+
4. Clean up toast timeouts on unmount
|
|
262
|
+
|
|
263
|
+
### Performance
|
|
264
|
+
1. Memoize GlobalStats selector returns
|
|
265
|
+
2. Implement storage cleanup to prevent exhaustion
|
|
266
|
+
3. Consider lazy loading for heavy components
|
|
267
|
+
4. Add memory leak detection
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## 9. Appendix: IPC Channel Reference
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary>Click to expand IPC channel list (47 total)</summary>
|
|
275
|
+
|
|
276
|
+
### Window Management (6)
|
|
277
|
+
- `window-minimize`, `window-maximize`, `window-close`
|
|
278
|
+
- `window-is-maximized`, `window-is-fullscreen`, `app-version`
|
|
279
|
+
|
|
280
|
+
### File Operations (9)
|
|
281
|
+
- `select-documents`, `process-document`, `show-in-folder`
|
|
282
|
+
- `open-document`, `get-file-stats`, `restore-from-backup`
|
|
283
|
+
- `file:read-buffer`, `document:extract-text`, `open-comparison-window`
|
|
284
|
+
|
|
285
|
+
### Hyperlink Processing (5)
|
|
286
|
+
- `hyperlink:select-files`, `hyperlink:process-document`
|
|
287
|
+
- `hyperlink:batch-process`, `hyperlink:validate-api`, `hyperlink:cancel-operation`
|
|
288
|
+
|
|
289
|
+
### Backup Management (8)
|
|
290
|
+
- `backup:create`, `backup:restore`, `backup:list`, `backup:delete`
|
|
291
|
+
- `backup:cleanup`, `backup:cleanup-all`, `backup:verify`, `backup:storage-info`
|
|
292
|
+
|
|
293
|
+
### Certificate Management (7)
|
|
294
|
+
- `check-zscaler-status`, `get-certificate-path`, `get-installed-certificates`
|
|
295
|
+
- `import-certificate`, `auto-detect-certificates`, `remove-certificate`, `test-github-connection`
|
|
296
|
+
|
|
297
|
+
### Auto-Updater (4)
|
|
298
|
+
- `check-for-updates`, `download-update`, `install-update`, `open-update-in-browser`
|
|
299
|
+
|
|
300
|
+
### Settings & Misc (8)
|
|
301
|
+
- `export-settings`, `import-settings`, `save-export-data`
|
|
302
|
+
- `platform`, `open-dev-tools`, window events
|
|
303
|
+
|
|
304
|
+
</details>
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
**Report Generated By:** DiaTech
|
|
309
|
+
**Commit:** See git history for fixes applied during review
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Debug Logging Guide - Document Processing Issues
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Added diagnostic logging to trace three issues:
|
|
6
|
+
|
|
7
|
+
1. Blank lines missing after 1x1 tables
|
|
8
|
+
2. TOC showing placeholder instead of generated entries
|
|
9
|
+
3. Wrong bullet symbols (squares instead of user-selected)
|
|
10
|
+
|
|
11
|
+
## What Was Added
|
|
12
|
+
|
|
13
|
+
### 1. Blank Lines After 1x1 Tables (Lines 705-730)
|
|
14
|
+
|
|
15
|
+
**Logs to Watch:**
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
=== DEBUG: BLANK LINES AFTER 1x1 TABLES CHECK ===
|
|
19
|
+
preserveBlankLinesAfterHeader2Tables option: [true/false]
|
|
20
|
+
removeParagraphLines option: [true/false]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Key Diagnostics:**
|
|
24
|
+
|
|
25
|
+
- If `preserveBlankLinesAfterHeader2Tables: false` → Issue is in UI option propagation
|
|
26
|
+
- If `preserveBlankLinesAfterHeader2Tables: true` → Check the result object:
|
|
27
|
+
```
|
|
28
|
+
✓ Processed X 1x1 tables: Added Y blank lines, Marked Z existing blank lines as preserved
|
|
29
|
+
```
|
|
30
|
+
- If `tablesProcessed = 0` → No 1x1 tables detected (possible detection bug in docxmlater)
|
|
31
|
+
- If `blankLinesAdded > 0` but lines still missing → Check preserved paragraph removal
|
|
32
|
+
|
|
33
|
+
### 2. Preserved Paragraph Removal Check (Line 1698)
|
|
34
|
+
|
|
35
|
+
**Logs to Watch:**
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
⚠️ Paragraph X or Y is PRESERVED - skipping deletion
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Key Diagnostics:**
|
|
42
|
+
|
|
43
|
+
- If you see this log for paragraphs after 1x1 tables → Good, preservation is working
|
|
44
|
+
- If you DON'T see this log → Preserved flag is not being set by `ensureBlankLinesAfter1x1Tables()`
|
|
45
|
+
- This indicates a bug in docxmlater's markAsPreserved functionality
|
|
46
|
+
|
|
47
|
+
### 3. TOC Option Propagation (Lines 955-973)
|
|
48
|
+
|
|
49
|
+
**Logs to Watch:**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
=== DEBUG: TOC OPTION CHECK ===
|
|
53
|
+
operations object defined: [true/false]
|
|
54
|
+
updateTocHyperlinks value: [true/false/undefined]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Key Diagnostics:**
|
|
58
|
+
|
|
59
|
+
- If `operations object defined: false` → UI is not passing operations object
|
|
60
|
+
- If `updateTocHyperlinks value: false` → Option is not being set by UI checkbox
|
|
61
|
+
- If `updateTocHyperlinks value: true`:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
✓ Replaced X Table of Contents element(s) with generated entries
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- If X = 0 → No TOC field exists in document
|
|
68
|
+
- If X > 0 → TOC was replaced successfully, but placeholder may be from a different source
|
|
69
|
+
|
|
70
|
+
### 4. Bullet Uniformity Execution (Lines 818-848, 2830-2835)
|
|
71
|
+
|
|
72
|
+
**Logs to Watch:**
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
=== DEBUG: BULLET UNIFORMITY CHECK ===
|
|
76
|
+
bulletUniformity option: [true/false]
|
|
77
|
+
listBulletSettings defined: [true/false]
|
|
78
|
+
Indentation levels: X
|
|
79
|
+
Level 0: bulletChar="•" (or default), symbolIndent=0.25, textIndent=0.5
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Then during execution:**
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
=== DEBUG: BULLET UNIFORMITY EXECUTION ===
|
|
86
|
+
Creating X bullet list levels
|
|
87
|
+
Bullet characters: "•" (U+2022), "○" (U+25CB), etc.
|
|
88
|
+
Level 0: bulletChar="•", symbolIndent=0.25", textIndent=0.5"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Key Diagnostics:**
|
|
92
|
+
|
|
93
|
+
- If `bulletUniformity: false` → Option not enabled in UI
|
|
94
|
+
- If `listBulletSettings defined: false` → Settings not being passed from UI
|
|
95
|
+
- Check bullet character values:
|
|
96
|
+
- Square (■) = U+25A0 or U+F0A0 (wrong)
|
|
97
|
+
- Correct bullet (•) = U+2022
|
|
98
|
+
- Default Symbol font bullet = U+F0B7
|
|
99
|
+
- If creating levels but bullets still wrong → Check if NumberingLevel is using correct font
|
|
100
|
+
|
|
101
|
+
## How to Use This Logging
|
|
102
|
+
|
|
103
|
+
### Step 1: Process a Document
|
|
104
|
+
|
|
105
|
+
1. Enable the problematic options:
|
|
106
|
+
- ✓ Preserve blank lines after Header 2 tables
|
|
107
|
+
- ✓ Update TOC hyperlinks
|
|
108
|
+
- ✓ Bullet uniformity
|
|
109
|
+
2. Process a test document
|
|
110
|
+
3. Open the console/log viewer
|
|
111
|
+
|
|
112
|
+
### Step 2: Analyze Each Issue
|
|
113
|
+
|
|
114
|
+
#### Issue 1: Blank Lines After 1x1 Tables
|
|
115
|
+
|
|
116
|
+
**Look for this sequence:**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
=== DEBUG: BLANK LINES AFTER 1x1 TABLES CHECK ===
|
|
120
|
+
preserveBlankLinesAfterHeader2Tables option: true ← Should be true
|
|
121
|
+
removeParagraphLines option: true
|
|
122
|
+
|
|
123
|
+
=== ENSURING BLANK LINES AFTER 1x1 TABLES ===
|
|
124
|
+
Calling doc.ensureBlankLinesAfter1x1Tables() with markAsPreserved=true
|
|
125
|
+
✓ Processed 5 1x1 tables: Added 3 blank lines, Marked 2 existing blank lines as preserved
|
|
126
|
+
DEBUG: Result details - {"tablesProcessed":5,"blankLinesAdded":3,"existingLinesMarked":2}
|
|
127
|
+
|
|
128
|
+
=== REMOVING EXTRA PARAGRAPH LINES ===
|
|
129
|
+
DEBUG: Before removal - total paragraphs: 150
|
|
130
|
+
⚠️ Paragraph 45 or 46 is PRESERVED - skipping deletion ← Should see this for each preserved line
|
|
131
|
+
DEBUG: After removal - total paragraphs: 140
|
|
132
|
+
Removed 10 extra paragraph lines
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Possible Root Causes:**
|
|
136
|
+
|
|
137
|
+
1. **Option is false** → UI not passing option correctly
|
|
138
|
+
2. **No tables processed** → docxmlater not detecting 1x1 tables (check table detection logic)
|
|
139
|
+
3. **Blank lines added but then removed** → Preserved flag not working (check preservation in paragraph removal)
|
|
140
|
+
4. **No "PRESERVED" warnings** → markAsPreserved not setting flag correctly
|
|
141
|
+
|
|
142
|
+
#### Issue 2: TOC Placeholder
|
|
143
|
+
|
|
144
|
+
**Look for this sequence:**
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
=== DEBUG: TOC OPTION CHECK ===
|
|
148
|
+
operations object defined: true ← Should be true
|
|
149
|
+
updateTocHyperlinks value: true ← Should be true
|
|
150
|
+
|
|
151
|
+
=== GENERATING/UPDATING TABLE OF CONTENTS ===
|
|
152
|
+
Calling doc.replaceTableOfContents() on file: C:\...\document.docx
|
|
153
|
+
✓ Replaced 1 Table of Contents element(s) with generated entries
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Possible Root Causes:**
|
|
157
|
+
|
|
158
|
+
1. **Option value is false/undefined** → UI checkbox not setting operations.updateTocHyperlinks
|
|
159
|
+
2. **Replaced 0 elements** → No TOC field in document (need to insert TOC field in Word first)
|
|
160
|
+
3. **Replaced > 0 but still shows placeholder** → May be a different TOC field or cached view in Word
|
|
161
|
+
|
|
162
|
+
#### Issue 3: Wrong Bullet Symbols
|
|
163
|
+
|
|
164
|
+
**Look for this sequence:**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
=== DEBUG: BULLET UNIFORMITY CHECK ===
|
|
168
|
+
bulletUniformity option: true ← Should be true
|
|
169
|
+
listBulletSettings defined: true ← Should be true
|
|
170
|
+
Indentation levels: 3
|
|
171
|
+
Level 0: bulletChar="•", symbolIndent=0.25, textIndent=0.5 ← Check character
|
|
172
|
+
|
|
173
|
+
=== APPLYING BULLET AND NUMBERED LIST UNIFORMITY ===
|
|
174
|
+
=== DEBUG: BULLET UNIFORMITY EXECUTION ===
|
|
175
|
+
Creating 3 bullet list levels
|
|
176
|
+
Bullet characters: "•" (U+2022), "○" (U+25CB), "▪" (U+25AA) ← Check Unicode values
|
|
177
|
+
Level 0: bulletChar="•", symbolIndent=0.25", textIndent=0.5"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Possible Root Causes:**
|
|
181
|
+
|
|
182
|
+
1. **Square symbol (■) appearing:**
|
|
183
|
+
- Check if UI is passing wrong character (U+25A0 instead of U+2022)
|
|
184
|
+
- Check if font is Symbol (uses different code points)
|
|
185
|
+
- Check if NumberingLevel is overriding bulletChar with default
|
|
186
|
+
2. **Correct character logged but wrong in document:**
|
|
187
|
+
- Font issue (Calibri vs Symbol vs Verdana)
|
|
188
|
+
- NumberingLevel not respecting bulletChar parameter
|
|
189
|
+
- XML corruption in numbering.xml
|
|
190
|
+
|
|
191
|
+
### Step 3: Report Findings
|
|
192
|
+
|
|
193
|
+
For each issue, report:
|
|
194
|
+
|
|
195
|
+
1. What the logs showed
|
|
196
|
+
2. Which diagnostic condition matched
|
|
197
|
+
3. The suspected root cause
|
|
198
|
+
4. Where in the code the fix is needed
|
|
199
|
+
|
|
200
|
+
## Expected Next Steps
|
|
201
|
+
|
|
202
|
+
Based on log output, we may need to:
|
|
203
|
+
|
|
204
|
+
1. **For blank lines issue:**
|
|
205
|
+
- Fix UI option passing if preserveBlankLinesAfterHeader2Tables is false
|
|
206
|
+
- Debug docxmlater's ensureBlankLinesAfter1x1Tables() if no tables detected
|
|
207
|
+
- Fix preserved paragraph detection in removeExtraParagraphLines()
|
|
208
|
+
|
|
209
|
+
2. **For TOC issue:**
|
|
210
|
+
- Fix UI operations.updateTocHyperlinks checkbox binding
|
|
211
|
+
- Verify TOC field exists in Word document
|
|
212
|
+
- Check Word's field cache/update mechanism
|
|
213
|
+
|
|
214
|
+
3. **For bullet symbols:**
|
|
215
|
+
- Correct bulletChar value in UI settings
|
|
216
|
+
- Fix font handling in NumberingLevel creation
|
|
217
|
+
- Verify XML injection in numbering.xml
|
|
218
|
+
|
|
219
|
+
## Quick Reference: Log Patterns
|
|
220
|
+
|
|
221
|
+
### ✓ Success Patterns
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
✓ Processed 5 1x1 tables: Added 3 blank lines
|
|
225
|
+
⚠️ Paragraph X is PRESERVED - skipping deletion
|
|
226
|
+
✓ Replaced 1 Table of Contents element(s)
|
|
227
|
+
Bullet characters: "•" (U+2022)
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### ⚠️ Warning Patterns
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
⚠️ preserveBlankLinesAfterHeader2Tables is FALSE
|
|
234
|
+
⚠️ No TOC elements found in document
|
|
235
|
+
bulletUniformity option: false
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### ❌ Error Patterns
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
Processed 0 1x1 tables (should have found some)
|
|
242
|
+
operations object defined: false (should be true)
|
|
243
|
+
listBulletSettings defined: false (should be true)
|
|
244
|
+
```
|