New editor requests duplicate playback when attaching or recording audio
- Dominant language
- Rust
- Stars
- 30.5k
- Forks
- 3.2k
- PR merge metrics
- PR metrics pending
Description
Attaching or recording audio in the new editor sends two playback requests for the same file.
An isolated frontend probe against `9753998c5` on Apple Silicon macOS requested playback twice. Browser regressions cover attachment and recording on the fixed code; the steps below describe the affected UI paths.
### Reproduction
1. Open the new editor and focus an editable field.
2. Attach an audio file using the paperclip button, or record audio using the microphone button.
3. Observe calls to the `playFile` backend endpoint while the resulting sound marker is inserted.
### Actual behavior
Each attachment or recording sends two `playFile` requests for the same filename. `attachPath()` calls `filenameToLink()`, which already requests playback for audio, then calls `playFile()` again. This can restart playback immediately.
### Expected behavior
Insert the sound marker and start playback once for each attachment or completed recording.
The reproduction counts backend requests rather than relying on audible timing. Existing browser tests only waited for a playback request, so they did not detect the duplicate. The affected path is the new editor; the legacy Qt toolbar path is separate.
Contributor guide
Assessment
This issue has not been assessed yet.