11 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
037c28d63e fix(socratiq): rename clear_chats_temp.js to clear_chats.js
Update the (commented) import in src_shadow/js/index.js to the new path.
2026-05-02 09:57:45 -04:00
Vijay Janapa Reddi
56476b5d3f chore: clean up socratiq markdown formatting
Apply repository whitespace and final-newline formatting to Socratiq shadow documentation.
2026-04-25 12:35:31 -04:00
Vijay Janapa Reddi
af45de439a chore(socratiq): remove orphan files and unused build configs
- Delete Finder-duplicate artifacts: "webpack.config copy 2.js",
  "testQuiz copy.html".
- Delete pre-rewrite orphan
  create_quiz_button_grp_original_with_good_reinialization.js.js
  (double .js.js extension, zero importers).
- Delete legacy webpack.config.js: not referenced by any npm script or
  tooling; the widget has fully migrated to Vite's single-file bundle.
- Delete vite.config.coop.mjs and vite.dev.config.mjs: not referenced
  by package.json scripts; COOP/COEP headers are already applied by
  the active dev and prod configs.

No functional change; all referenced sources and configs are untouched.
2026-04-24 13:42:14 -04:00
kai4avaya
362cf8787e fix: restore copy_download.js accidentally deleted in cleanup commit
bbe85444 deleted both 'copy_download copy.js' (orphan) and
'copy_download.js' (live import). index.js line 122 imports
initializeAllMessageButtons from this file — restore it.
2026-04-21 19:42:53 -04:00
kai4avaya
c2c47875a9 fix: address auto-reviewer CodeQL and code-quality warnings
- showQuizStats.js: add escapeHtml() and sanitize fileName/reason/details
  before injecting into verificationModal.innerHTML (XSS: DOM text reinterpreted as HTML)
- injectQuizBtn.js: replace quizTitle string interpolation in innerHTML with
  DOM construction (textContent) to prevent XSS (DOM text reinterpreted as HTML)
- highlight_menu.js: fix 'classList.contains === "hidden"' type error —
  was comparing function reference to string; now correctly called as
  classList.contains("hidden") (comparison between inconvertible types)
- index.html + indexHtml.js: rename malformed space-containing id attributes
  'Show answers' -> 'show-answers' and 'Show chain of thought' -> 'show-chain-of-thought'
- settings.js: update three matching string keys to kebab-case to stay in sync
  with renamed HTML ids (coordinated rename, no functionality change)
- demo_reference_rendering.html: add safeParseReferences() fallback wrapper,
  replace direct parseReferences() call which was undefined in this context
- test_reference_renderer.js: remove parseReferences import (not exported),
  rewrite testReferenceParsing() to use processReferences() with HTML output assertions
2026-04-21 19:40:51 -04:00
kai4avaya
bbe85444e8 clean: remove orphan editor swap files and duplicate copies 2026-04-21 19:32:09 -04:00
kai4avaya
10327653ad feat: redesign meditation pulse toggle button with label and icon 2026-04-21 19:32:00 -04:00
kai4avaya
b19b9306ee fix: address CodeQL security alerts and code quality warnings
- XSS: validate URL (same-origin, http/https only) before window.location.href
  in streamdown_markdown.js and reference_renderer.js
- XSS: replace tooltip.innerHTML with DOM construction in streamdown_markdown.js
- XSS: sanitize mermaid SVG with DOMPurify in renderMermaid() and at call site
- XSS: sanitize customContainerHtml, mathDiv, and preview.innerHTML with DOMPurify
- XSS: replace button.innerHTML with textContent for question buttons
- XSS: add escapeHtml() for mermaid error messages interpolated into innerHTML
- Add DOMPurify ^3.4.0 to dependencies
- Remove duplicate diagramId assignments in highlight.js and markdown.js
- Remove unused percentLineIndex variable in markdown.js and streamdown_markdown.js
- Remove useless targetElement assignment in streamdown_markdown.js
- chart.js: replace /auto import with tree-shaken named imports in spaced-repetition-stats.js
- Add _comments to package.json documenting bundle size analysis per dependency
2026-04-21 19:32:00 -04:00
kai4avaya
80c5f62708 feat: fix SocratiQ re-entry bug and add initialization loader 2026-04-21 19:32:00 -04:00
kai4avaya
c7fcc9d995 feat: sync SocratiQ source changes and remove legacy bundle 2026-04-21 19:32:00 -04:00
kai4avaya
81909553c3 feat: add socratiq directory (excluding node_modules and dist) 2026-04-21 18:39:28 -04:00