Skip to content

Kensidian v1.3.2

Choose a tag to compare

@github-actions github-actions released this 29 Nov 15:40

Added

  • Safe HTML Block Rendering in Live Preview (htmlBlockPreview.ts, livePreview.ts, image.ts): Added a StateField-based htmlBlockPreview CodeMirror extension to render HTMLBlock elements (such as <p align="center">, <p align="right">, <img>, <a>, <strong>) with DOMPurify sanitization, local relative image path resolution via resolveHtmlImageUrl(), alt pill fallback for external images blocked by CSP, internal/external link click handling via openTarget(), and white-space: normal styling so elements align horizontally in View Mode without interfering with editing in Edit Mode.
  • Sensitive File & API Key Scanner in Git Status (project.rs, models.rs, types.ts, GitStatusCard.vue, id.ts, en.ts): Added scanning over uncommitted_files (up to 50 text files ≤ 256 KiB) to detect sensitive files (.env, .env.* excluding templates, *.pem, *.key, *.p12, *.pfx, id_rsa, id_ed25519, *credentials*.json, *service-account*.json) and API key/token patterns (Private Key, Google API Key, OpenAI/Anthropic Key, GitHub Token, AWS Access Key, Stripe Live Key), displaying a red warning banner in the Git Status card without exposing secret contents.

Changed

  • Project Mode State Storage in app_data_dir (state.rs, vault.rs, models.rs, types.ts, image.ts, render.ts, htmlBlockPreview.ts, blockPreview.ts): Moved the Project Mode metadata directory (config.json, workspace.json, assets/) from .kensidian/ at the repository root to app_data_dir/projects/<sha256-hash> to prevent dirtying git status or accidentally committing/pushing it to remotes (while regular note Vaults continue using .kensidian/). Includes open_lock serialization in vault_open, one-time atomic migration from legacy .kensidian/ via a staging folder before moving the old .kensidian/ to Trash upon success, and VaultInfo.dataDir support for frontend image asset URL resolution.

Fixed

  • Windows Terminal Fallback Chain (project.rs): Replaced cmd /c start powershell with a sequential fallback chain: Windows Terminal (wt -d <root>), PowerShell 7 (pwsh -NoExit -Command Set-Location), PowerShell 5 (powershell -NoExit -Command Set-Location), Git Bash (C:\Program Files\Git\bin\bash.exe), and finally cmd as a last resort; all invoked with CREATE_NO_WINDOW (0x08000000) to prevent brief black console window flashes.