HERMES-GIELIE/static
Nathan Esquenazi 46fdf3513f fix: mic appends to existing textarea text instead of replacing it
Previously, tapping the mic button would reset the textarea each time,
clobbering anything the user had already typed or previously dictated.

Fix:
- Capture _prefix = ta.value when recording starts (btn.onclick)
- onresult writes _prefix + (final || interim) so live interim text
  appears after the existing content, not replacing it
- onend commits _prefix + _finalText with smart space insertion:
  if the prefix doesn't end with a space or newline, a space is added
  before the new transcript so words don't run together
- _prefix is reset to '' in _setRecording(false) so each new recording
  session starts with a fresh snapshot

Behaviour now: tap mic, speak, tap again (or wait for auto-stop) ->
transcript is appended to whatever was in the textarea. Tap mic again
-> continues appending further. Text stays fully editable before send.

tests/test_sprint20.py: 6 new tests covering prefix capture, onresult
prepend, onend commit, reset, and smart spacing (52 total, 382 overall).
2026-04-03 14:13:29 +00:00
..
boot.js fix: mic appends to existing textarea text instead of replacing it 2026-04-03 14:13:29 +00:00
commands.js feat: Sprint 17 -- workspace breadcrumbs, slash commands, send key setting 2026-04-03 04:13:38 -07:00
index.html feat: add voice input mic button via Web Speech API 2026-04-03 14:04:03 +00:00
messages.js feat: Sprint 17 -- workspace breadcrumbs, slash commands, send key setting 2026-04-03 04:13:38 -07:00
panels.js fix(auth): blank password field no longer clears auth; add Disable Auth button 2026-04-03 06:21:04 -07:00
sessions.js feat: safe HTML rendering in AI responses + active session gold style + Sprint 16 tests 2026-04-03 00:27:43 +00:00
style.css feat: add voice input mic button via Web Speech API 2026-04-03 14:04:03 +00:00
ui.js feat: Sprint 18 — file preview auto-close, thinking display, workspace tree 2026-04-03 04:33:24 -07:00
workspace.js fix: apply review fixes, update version to v0.20, add Sprint 18 changelog 2026-04-03 05:02:30 -07:00