Commit Graph
468 Commits
Author SHA1 Message Date
G30 c8a3e10e13 fix: let Enter through when the message box's suggestion list has nothing to show (#31506) 2026-09-28 06:15:56 +04:00
Classic298 7924ce7d79 fix: unhandled play() rejection wedges the Read Aloud button; auto-playback silent on iOS (#30373)
On iOS and iPadOS, auto-playback of a finished reply is never heard and the speaker button stays stuck in "speaking", so the first tap only stops a playback that never started. WebKit rejects play() started from a network event, and the audio queue ignored that rejection, so its state never reset. Call mode on the same devices was silent too.

A rejected play() now resets the queue, returns the button to idle and shows a toast (an aborted play from stop or a message switch is ignored). The first user tap or keypress plays a 10 ms silent clip on the shared audio element, which WebKit then allows to play later without a gesture; if that attempt fails it retries on the next gesture. Call mode plays unmuted: WebKit pauses an element that is unmuted after play() outside a gesture, even once unlocked.

The unlock and call mode change follow the reporter's on-device tests (iPhone iOS 27, iPad iPadOS 26.6.2). Verified in Chromium with autoplay restricted: the base queue wedges and drops later chunks; with the fix it reports the error, recovers, the unlock plays once and never interrupts audio already playing, and chunks queued during the unlock still play.

Fixes #30262
2026-09-23 23:52:09 -04:00
Classic298 869a5b1035 fix: stop voice mode listening after leaving the chat page (#30405) (#30417)
Leaving the chat with voice mode active (Admin Panel, Workspace, Notes) left a hidden recorder running in the tab. The voice mode flag stays on when the chat page unmounts, so the overlay's teardown restarted recording on the destroyed component, which kept transcribing speech and sending prompts from other pages. Returning to the chat also opened an extra microphone stream that was never closed.

The overlay now marks itself destroyed on teardown and never starts or restarts recording after that, so leaving the chat shuts the microphone down fully.

Resetting the voice mode flag in the chat page cleanup was considered, but it changes behaviour for the controls panel on return and still runs after the overlay's own teardown.

Verified in Chromium with a fake microphone (14s per phase, transcription requests / live mic tracks):

| Phase | before | after |
|---|---|---|
| Call on chat | 3 / 1 | 3 / 1 |
| After moving to Workspace | 3 / 1 | 0 / 0 |
| Voice mode reopened | 3 / 3 | 3 / 1 |

Fixes #30405
2026-09-23 23:30:30 -04:00
Classic298 24c01bd76d fix: stop voice call hanging in "speaking" when TTS fails (#30372)
When the configured TTS provider fails during a voice call, the text answer arrives but the overlay stays in "speaking" with no audio and no error until the user taps to interrupt. The sentence that failed never reaches the audio cache, so the playback loop re-queues it every 200 ms forever.

A failed sentence now marks its message as failed. The playback loop drops that message's unplayed sentences, the rest of the turn requests no more TTS, and the overlay returns to listening once the text finishes. The OpenAI-compatible path now shows the provider error once per turn, the same way Read Aloud and the Kokoro path already do. The next turn tries TTS again.

Failure is tracked per message so an outage (the report shows 16 parallel requests all failing) costs one toast and no further requests. The trade-off is that a one-off failure mutes the rest of that reply.

Verified with the real fetch/playback code in a harness: base loops forever with no toast; with the fix, one toast, the loop ends, later sentences are not requested, a new turn plays normally, and a late failure from a previous turn does not affect the next one.

Fixes #30052
2026-09-22 16:57:10 -04:00
G30 25948ea213 fix: block saving a prompt's input form when a required dropdown has no option chosen (#30078) 2026-09-19 15:42:39 -05:00
Classic298 9923c53c10 fix: treat SVG uploads as documents instead of vision images (#30102)
Uploading an .svg to a chat attached it as a vision image input, so the model received a data URI it could not decode. PIL-backed servers answered "cannot identify image file" and OpenAI answered "The image data you provided does not represent a valid image". No setting made it work.

SVG now takes the ordinary file upload path, so its XML source is extracted and indexed and the model can answer questions about it. Rasterizing was the alternative and it would have discarded the part of an SVG a model reads best, the source itself. Raster formats are untouched and still go up as image inputs.

A shared helper replaces the ad hoc image/ prefix checks at the points that decide image input versus document, on both ends. It normalises the content type first, because a stored "image/SVG+xml" or a trailing charset parameter slipped past a plain comparison.

One behaviour change worth knowing: an SVG now needs the model to have the file upload capability, where before it rode in as an image.

Fixes #30100
2026-09-17 17:40:07 -04:00
Classic298 556e48e058 fix: honor false defaults on checkbox prompt variables (#30037)
A prompt template with `{{flag | checkbox:default=false}}` opened the input variables form with the checkbox already ticked, and the same happened for `False`, `"false"`, `0` and `"0"`. Template defaults arrive as strings and the checkbox was bound straight to that value, so any non-empty string counted as checked and there was no way to define a checkbox that starts unchecked once a default was given.

The checkbox now reads its ticked state from the value explicitly: it is checked only for `true` (boolean or string) and stays unchecked for anything else, while clicking it still writes a boolean like before. The seeded value itself is left alone, so what gets substituted into the prompt for an untouched form is unchanged, and typing `true` or `false` into the text field next to the checkbox now moves the tick accordingly.

Fixes #30036
2026-09-16 15:44:29 -04:00
Timothy Jaeryang Baek 58078ab304 refac 2026-09-14 15:47:50 -04:00
Timothy Jaeryang Baek e69236bccb refac 2026-09-13 23:33:22 -04:00
Timothy Jaeryang Baek 858ab727d2 refac 2026-09-04 18:31:59 -04:00
Timothy Jaeryang Baek 7b6562e335 refac 2026-09-04 17:39:34 -04:00
G30 4f419627f8 fix: remove the stray background band from the Attach Webpage modal footer (#29664) 2026-09-04 17:16:47 -04:00
Timothy Jaeryang Baek f677fdbf50 refac 2026-09-03 20:22:32 -04:00
Timothy Jaeryang Baek 1457000ba6 refac 2026-08-31 10:27:01 -04:00
Timothy Jaeryang Baek 3374b21a7d refac 2026-08-25 14:39:25 -04:00
Timothy Jaeryang Baek a4738e0459 refac 2026-08-25 12:45:12 -04:00
Timothy Jaeryang Baek 7a533d0d5b refac 2026-08-24 18:14:30 -04:00
Timothy Jaeryang Baek c1c81f8127 refac 2026-08-23 03:40:40 -04:00
Timothy Jaeryang Baek d17f06a235 refac 2026-08-22 08:43:46 -04:00
Classic298 18c604baa9 fix: voice mode produces no audio when the task model returns empty content (#28724)
With "show emoji in call" enabled, voice mode stayed completely silent and no request ever reached the configured TTS server. Reasoning models served with a reasoning parser return `message.content` as null and put the text in `reasoning_content`, and the emoji helper called `.replace()` on that null value and threw.

The call overlay ran the emoji request first, inside the same `try` block as speech synthesis, so that error skipped the entire TTS section. The audio cache was never filled, and the playback loop kept re-queueing the same content every 200 ms without ever playing it. Read aloud was unaffected because it synthesizes speech directly, which is why the failure looked specific to voice mode.

Fixed on both sides: the optional chain in `generateEmoji` now covers `content`, and the emoji request in the call overlay gets its own catch, matching the speech synthesis call directly below it. An emoji failure now costs the emoji instead of the whole reply.
2026-08-20 13:03:55 -07:00
Timothy Jaeryang Baek 8a42aa53e8 refac 2026-08-19 22:48:32 -07:00
G30 dd7158b45f fix: clear the integrations search when leaving a section (#28812) 2026-08-19 16:14:53 -07:00
G30 bcb50fe7b0 fix: derive integrations toggle state from the selected ids (#28807) 2026-08-19 12:46:17 -05:00
Timothy Jaeryang Baek 954613944b refac 2026-08-16 23:51:38 -07:00
Timothy Jaeryang Baek a5ea732c1e refac 2026-08-14 23:47:00 -06:00
Timothy Jaeryang Baek 7d99b2716a refac 2026-08-13 19:59:11 -06:00
Classic298 5cb87e6630 fix: announce toggle state of integrations menu rows to screen readers (#27667)
Every toggle row in the chat integrations menu (filters, Web Search, Image, Code Interpreter, Tools, Skills) is a button whose on/off state was carried only by the decorative Switch inside it. Screen readers announced the row name and nothing else, so there was no way to tell whether a tool or feature was active without looking at it.

Each row button now carries aria-pressed, and the Switch wrapper is marked inert so the nested role=switch stops competing with the row for the announcement and stops adding a nameless tab stop. Hit testing skips inert content, so clicking the switch still toggles the row.

Tool rows that are not yet authenticated omit aria-pressed: activating those starts an OAuth redirect rather than toggling, so announcing them as an unpressed toggle would be wrong.

The Web Search, Image and Code Interpreter rows also had a state-flipping aria-label ("Disable Web Search") on top of aria-pressed, which announces as "Disable Web Search, pressed" and reads as the opposite of the truth. Removed: the visible row text already names each control.

Fixes #17150
2026-08-13 13:04:13 -06:00
Timothy Jaeryang Baek d4461bd6f3 refac 2026-08-10 18:52:18 -06:00
Timothy Jaeryang Baek 009999f363 refac 2026-08-08 15:47:10 -06:00
Timothy Jaeryang Baek 6c4d0ace16 refac 2026-08-05 07:44:06 -05:00
Timothy Jaeryang Baek 29eeda9f9a refac 2026-08-05 07:12:28 -05:00
Timothy Jaeryang Baek 810378c0b8 refac 2026-07-27 19:39:36 -04:00
Timothy Jaeryang Baek 89caa7c849 refac 2026-07-27 01:19:34 -04:00
G30 527b0d3b7f fix(ui): stop the chat input attach menus from fetching twice on open (#27461) 2026-07-26 18:14:06 -04:00
G30 ef197de0d7 fix: open settings deep links on client-side navigation and open Add Terminal settings directly (#27552) 2026-07-26 17:26:34 -04:00
Classic298 b6acd3cc45 fix: web speech STT repeating previous transcriptions and inserting text on cancel (#26793)
The VoiceRecording component stays mounted (hidden) between recordings, and the web speech engine accumulated every session's transcript into the never-reset transcription variable. Each new recording therefore confirmed all previous utterances again, so the inserted text repeated once per session and previously deleted text reappeared in the input.

Additionally, cancelling a recording (X button, Escape or a recognition error) called stopRecording(), which stops the SpeechRecognition instance and fires its onend handler, which unconditionally confirms the transcription. Cancelled recordings therefore still inserted the accumulated transcript.

Reset the transcription at the start of each web speech session and detach the onend handler on cancel so cancelled recordings no longer confirm.

Fixes #26784
2026-07-24 00:40:02 -05:00
Timothy Jaeryang Baek 239cb74007 refac 2026-07-24 00:56:25 -04:00
Timothy Jaeryang Baek 1e88367cc8 refac 2026-07-24 00:43:31 -04:00
Jiwon Lee 9d020edf0f fix: make native date/time picker icons visible in dark mode (#27275) 2026-07-23 22:23:46 -04:00
Timothy Jaeryang Baek 73421c5b42 refac 2026-07-23 02:55:06 -04:00
Timothy Jaeryang Baek 6e5efc1f75 refac 2026-07-20 01:21:15 -04:00
Timothy Jaeryang Baek 668f9fe390 refac 2026-07-16 21:25:35 -04:00
Timothy Jaeryang Baek 75894161e4 refac 2026-07-16 02:35:44 -04:00
Timothy Jaeryang Baek db934a3b4f refac 2026-07-15 16:51:08 -04:00
Timothy Jaeryang Baek 9499587c33 refac 2026-07-15 04:25:51 -04:00
Timothy Jaeryang Baek 63ada24706 refac 2026-07-15 00:14:01 -04:00
Timothy Jaeryang Baek 7a9928ef17 refac 2026-07-14 23:08:41 -04:00
Timothy Jaeryang Baek e8b4c7f9e2 refac 2026-07-14 17:16:20 -04:00
Timothy Jaeryang Baek 9588c97e64 refac 2026-07-14 17:10:11 -04:00
Timothy Jaeryang Baek eb11029eac refac 2026-07-14 17:07:39 -04:00