Fix: comprehensive bug review — restore refactor regressions & fix bugs #24

Merged
Pakobbix merged 1 commits from fix-comprehensive-bug-review into main 2026-08-16 19:52:34 +00:00
Collaborator

Full code-review fix: restores c14c141 refactor regressions + fixes critical/major/minor bugs.

Critical:

  • responseExtractor.js import depth 7x->6x (broke module graph)
  • settingsListeners.js: restore ~25 fns, ~40 bindings, "Initialize UI state" block; add initializeSettingsUIState()
  • Restore all External API handlers + init
  • validator.js: CJS->ESM, glob.sync->globSync, fix '!key in obj' precedence

Major:

  • sillytavern.js missing updateMessageBlock import
  • infoBox.js missing saveSettings import
  • userStats.js double-escaped quantity regex

Minor: config.js version 6->7 + showLockIcons; events.js off() tracking + unregister/re-register on disable/enable; escapeHtml quote escaping (XSS); template.html data-prompt kebab->camel; trackerEditor.js externalApiOnly->sendAllEnabledOnRefresh; suppression.js [object Object]; persistence.js await migrateToV3JSON; weatherEffects JSON.parse->repairJSON; mobile.js corrupted comment; add debugMode; settings.html v3.7.2->v3.7.4

Dead code removed: unused imports/vars, withChangeDetection, trackJQueryHandler/cleanupJQueryEvents, renderThoughtsSidebarOnly, updateCheckpointButtonInMenu, addDiceQuickReply, setupRefreshButtonDrag/setupDebugButtonDrag (~430 lines)

Verified: 78/78 tests pass, style.css in sync, validator clean.

Note: validator fix uncovered 837 missing translation keys (fr/ru/zh-cn/zh-tw) — deferred to follow-up PR.

Full code-review fix: restores c14c141 refactor regressions + fixes critical/major/minor bugs. Critical: - responseExtractor.js import depth 7x->6x (broke module graph) - settingsListeners.js: restore ~25 fns, ~40 bindings, "Initialize UI state" block; add initializeSettingsUIState() - Restore all External API handlers + init - validator.js: CJS->ESM, glob.sync->globSync, fix '!key in obj' precedence Major: - sillytavern.js missing updateMessageBlock import - infoBox.js missing saveSettings import - userStats.js double-escaped quantity regex Minor: config.js version 6->7 + showLockIcons; events.js off() tracking + unregister/re-register on disable/enable; escapeHtml quote escaping (XSS); template.html data-prompt kebab->camel; trackerEditor.js externalApiOnly->sendAllEnabledOnRefresh; suppression.js [object Object]; persistence.js await migrateToV3JSON; weatherEffects JSON.parse->repairJSON; mobile.js corrupted comment; add debugMode; settings.html v3.7.2->v3.7.4 Dead code removed: unused imports/vars, withChangeDetection, trackJQueryHandler/cleanupJQueryEvents, renderThoughtsSidebarOnly, updateCheckpointButtonInMenu, addDiceQuickReply, setupRefreshButtonDrag/setupDebugButtonDrag (~430 lines) Verified: 78/78 tests pass, style.css in sync, validator clean. Note: validator fix uncovered 837 missing translation keys (fr/ru/zh-cn/zh-tw) — deferred to follow-up PR.
ARIA added 1 commit 2026-08-16 19:48:16 +00:00
Critical:
- responseExtractor.js: fix import depth (7x ../ -> 6x) that broke the module
  graph for encounters, separate/external generation, and auto-avatars
- settingsListeners.js: restore ~25 undefined functions, ~40 lost event
  bindings, and the entire 'Initialize UI state' block dropped by the c14c141
  refactor; add initializeSettingsUIState()
- Restore all External API mode handlers (base-url, api-key, model,
  max-tokens, temperature, key-visibility, test-connection) + value init
- validator.js: convert CJS->ESM (crashed under type:module), fix
  glob.sync->globSync (v13 API), fix '!key in obj' precedence bugs

Major:
- sillytavern.js: add missing updateMessageBlock import
- infoBox.js: add missing saveSettings import
- userStats.js: fix double-escaped quantity regex

Minor:
- config.js: settingsVersion 6->7, restore showLockIcons, fix apiKey comment
- events.js: off() tracking + unregister/re-register on disable/enable
- escapeHtml: escape quotes (XSS) in all 3 copies
- template.html: data-prompt dialogue-coloring -> dialogueColoring
- trackerEditor.js: stale externalApiOnly -> sendAllEnabledOnRefresh
- suppression.js: fix '[object Object]' on empty instruct value
- persistence.js: await migrateToV3JSON (loadSettings now async)
- weatherEffects.js: JSON.parse -> repairJSON
- mobile.js: fix corrupted comment line
- Add missing debugMode setting; settings.html v3.7.2 -> v3.7.4

Dead code removed:
- Unused imports/vars (promptBuilder, jsonPromptHelpers, encounterPrompts,
  injector), withChangeDetection, trackJQueryHandler/cleanupJQueryEvents,
  renderThoughtsSidebarOnly, updateCheckpointButtonInMenu, addDiceQuickReply,
  setupRefreshButtonDrag/setupDebugButtonDrag (~430 lines)

Verified: 78/78 tests pass, style.css in sync, validator runs clean.
Collaborator

No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
Pakobbix merged commit 03400ad5d5 into main 2026-08-16 19:52:34 +00:00
Pakobbix deleted branch fix-comprehensive-bug-review 2026-08-16 19:52:35 +00:00
Sign in to join this conversation.