Skip to content

fix gui input clamping, dropdown selector, pip dedup and other bugs#108

Open
nghiphaam wants to merge 2 commits into
Psyyke:mainfrom
nghiphaam:fix/gui-bugs
Open

fix gui input clamping, dropdown selector, pip dedup and other bugs#108
nghiphaam wants to merge 2 commits into
Psyyke:mainfrom
nghiphaam:fix/gui-bugs

Conversation

@nghiphaam
Copy link
Copy Markdown
Contributor

A batch of GUI fixes found while reviewing the web app:

  • domDropdown.js: the doesDropdownItemExist selector was missing its closing ], so querySelector threw a SyntaxError when saving/reading any dropdown setting (engine, weight, etc.).
  • domInputs.js: range clamping used ... || min, which coerced a legitimately-clamped 0 to min, and if(min && max) skipped clamping when min === 0. Now clamps with a null check and only falls back to min on NaN.
  • gui.js: GET_TTS_VOICES() returns false when unsupported, which fell through to .forEach and threw every 100ms; now guarded with !ttsVoices?.length. Also added a null check before closeBtn.onclick.
  • externalEngine.js: the "previously selected engine not available" branch (else if(!foundSelectedEngineID ...)) was unreachable; restructured so it actually warns. Engine-id comparisons now use String() consistently.
  • pip.js: renderPipBoards() was called without from/to, so the new-suggestion dedup never matched; now passes them and uses ||. Eval fallback now treats a real 0 as valid and falls back to the last eval instead of leaving it undefined (which produced NaN).
  • settings.js: in the no-instance + profile branch, base was read before config[type] was initialized, so INIT_NESTED_OBJECT could throw; it's now initialized first.
  • dynamicEngineOptions.js: the timeout cleanup filtered by w.resolve !== resolve, which never matched the stored wrapper, leaking timed-out waiters; now filters by waiter identity.
  • instances.js: guarded .highlight-indicator handlers against a missing element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant