Repository navigation
fix(security): CSP IPC para macOS + sanitización SVG del informe clínico - #27
Draft
AtelierMinuit wants to merge 4 commits into
Draft
AtelierMinuit wants to merge 4 commits into
AtelierMinuit wants to merge 4 commits into
Conversation
…MPurify - tauri.conf.json: add 'ipc: http://ipc.localhost' to connect-src; without it, macOS WKWebView blocks invoke() and the SQL plugin (open/save/DB broken). - ClinicalReportModal: sanitize projectionSvg (schematex does not escape user labels) before dangerouslySetInnerHTML to prevent XSS via imported .trama files. dompurify was already in the dependency tree (jspdf optional). - package.json/pnpm-lock: declare dompurify as a direct dependency. Co-authored-by: AtelierMinuit <AtelierMinuit@users.noreply.github.com>
…me theme variables - Editor zoom pill: use the real .zoom-pill-value class (zoom-pill-label was unstyled) and show the actual zoom level via onViewportChange instead of a static '100%'. - App.css: restore .theme-monochrome / .theme-dark.theme-monochrome variables; they only existed in App_old.css, which is no longer imported, so the 'Monochrome' option in Settings had no visual effect. Co-authored-by: AtelierMinuit <AtelierMinuit@users.noreply.github.com>
- Delete one-shot patch_*.cjs scripts (already applied; re-running them would corrupt current sources) and src/App_old.css (35 KB, no longer imported anywhere). - Delete unreferenced docs/assets/screenshots/dummy_state.json. - CI: install with --frozen-lockfile and run 'pnpm test' before the build; the 9 existing tests were never validated on PRs. Co-authored-by: AtelierMinuit <AtelierMinuit@users.noreply.github.com>
macOS HIG recommends >= 11px for UI text; several labels, small captions and report fields were at 9-10.5px. Raised to 11px: cmdk-badge (9px), cmdk-kbd, system-list-item small, stat-pill small, metric-sub, tie-badge, report-label, modal-template-list small, sidebar legal footer, sidebar kbd, sidebar-recent-time, diagnosis-stat small, context-menu labels. Numeric counters in 16px circular badges stay at 10px. Also dropped a stale duplicate class on the zoom pill label. Co-authored-by: AtelierMinuit <AtelierMinuit@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tauri.conf.jsonCSP now includesipc: http://ipc.localhostinconnect-src. Without it, macOS WKWebView blocksinvoke()and the SQL plugin, breaking open/save.tramaand the local database.ClinicalReportModalsanitizes the ecomap SVG with DOMPurify beforedangerouslySetInnerHTML.schematexdoes not escape user-controlled labels, so an imported.tramafile could inject arbitrary markup (XSS) into the clinical report view.dompurifyas a direct dependency (it was already in the tree via jspdf's optional deps, so no new packages added).Verification
npx tsc --noEmit✅pnpm build✅pnpm test— 4 files / 9 tests passed ✅cargo checkfails only in this Linux sandbox due to missing system glib/pkg-config; the macOS build workflow (tauri-build.yml) is unaffected.UX / Dark mode audit (2nd pass)
zoom-pill-label) so it rendered unstyled, and always showed a static "100%". Now it uses the real.zoom-pill-valueclass and displays the live zoom level viaonViewportChange(clicking it still fits to screen).App_old.css, which is no longer imported. Restored.theme-monochrome/.theme-dark.theme-monochromevariables inApp.css.theme-dark; connection lines and node colors have adequate contrast in both themes. The clinical report intentionally stays light (A4 printing).tsc --noEmit✅,pnpm build✅,pnpm test9/9 ✅Technical debt audit (3rd pass)
patch_*.cjsscripts from past redesigns (already applied; re-running them would corrupt current sources),src/App_old.css(35 KB, no longer imported), and unreferenceddocs/assets/screenshots/dummy_state.json.ci.ymlpreviously only built — the 9 existing tests were never validated on PRs. Addedpnpm teststep and--frozen-lockfileinstall.tsc --noEmit✅,pnpm build✅,pnpm test9/9 ✅, YAML valid ✅