HERMES-GIELIE/static
fxd-jason 676d1f965e fix: prevent concurrent send() from losing messages or swallowing stream output
Problem: When two messages are sent in rapid succession, the second
send() can pass the S.busy check because setBusy(true) only runs after
the first await inside send(). This creates a window where two async
send() calls run concurrently, leading to:
- Streaming output from the first response getting swallowed when the
  second response's done event overwrites S.messages
- User messages disappearing when server returns 409 for the duplicate
  chat/start request

Root cause: send() is async and has awaits (uploadPendingFiles,
api('/api/chat/start')) before setBusy(true) at line 198. During those
await yields, S.busy is still false, allowing a second send() to enter.

Fix: Add a synchronous _sendInProgress guard at the very top of send()
(before any await). Concurrent calls re-queue the message instead of
silently dropping it. try/finally ensures the flag resets on all exit
paths.

Also widens the text-extraction window in
test_1062_busy_input_modes.py from 3000 to 5000 chars to accommodate
the new guard block at the top of send().
2026-05-13 19:21:50 +08:00
..
vendor chore: vendor streaming-markdown@0.2.15, remove CDN dependency 2026-04-24 01:05:20 +00:00
apple-touch-icon.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
boot.js feat(ux): collapse sidebar by clicking the active rail icon (fuses #1884 + #1924) 2026-05-11 04:49:18 +00:00
commands.js Fix manual compression proxy timeouts 2026-05-12 17:33:59 +08:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon-192.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.svg feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js Merge pull request #2156 into stage-346 2026-05-13 06:56:25 +00:00
icons.js fix(composer): distinct voice-mode icon, descriptive labels, opt-in pref (#1488) 2026-05-02 22:16:23 +00:00
index.html fix(ui): stabilize chat bottom scrolling on iPhone PWA 2026-05-12 07:47:21 -06:00
login.js Fix login health probe credentials 2026-05-12 20:09:54 +08:00
manifest.json feat: add browser offline recovery and PWA cache hardening 2026-05-08 21:16:17 +00:00
messages.js fix: prevent concurrent send() from losing messages or swallowing stream output 2026-05-13 19:21:50 +08:00
onboarding.js docs: clarify Anthropic auth choices in onboarding 2026-05-06 06:26:43 +00:00
panels.js fix: guard provider quota refresh fallback button state 2026-05-12 15:41:19 -07:00
sessions.js Merge pull request #2156 into stage-346 2026-05-13 06:56:25 +00:00
style.css feat: add provider quota refresh control 2026-05-12 13:17:27 -07:00
sw.js feat: add browser offline recovery and PWA cache hardening 2026-05-08 21:16:17 +00:00
terminal.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
ui.js Consolidate session post-render processing 2026-05-13 11:50:31 +08:00
workspace.js fix: keep workspace open from preview breadcrumb 2026-05-07 06:25:17 +00:00