[LUM-753] Improve client-side dictation resilience#24042
Conversation
…evel logs, add timing - Reduce dictation HTTP timeout from 10s to 5s so the client falls back to raw transcription faster when the daemon is unreachable - Downgrade failure logs from error to warning since these are expected failures with graceful recovery (not actionable errors) - Add elapsed time to all failure log messages for debugging latency - Improve fallback log to include transcription length for diagnostics Co-Authored-By: tkheyfets <timur@vellum.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
4 similar comments
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
@codex review |
| /// Timeout for the dictation HTTP request. Kept short so the client falls | ||
| /// back to raw transcription quickly when the daemon is unreachable rather | ||
| /// than leaving the user staring at a "Processing…" spinner. | ||
| static let requestTimeout: TimeInterval = 5 |
There was a problem hiding this comment.
🚩 Timeout reduction from 10s to 5s may cause more fallback usage under normal latency
The timeout was halved from 10s to 5s. The comment explains the rationale (faster fallback when the assistant is unreachable). However, if the dictation endpoint legitimately takes >5s under load or with longer transcriptions, users will silently get raw transcription instead of the cleaned-up assistant response. The new timing instrumentation will help diagnose this — the elapsed value in warning logs will show whether timeouts cluster near 5s (suggesting the timeout is too tight) vs near 0s (network unreachable). Worth monitoring after deployment.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c46f894c45
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ] | ||
|
|
||
| /// Timeout for the dictation HTTP request. Kept short so the client falls | ||
| /// back to raw transcription quickly when the daemon is unreachable rather |
There was a problem hiding this comment.
Replace daemon terminology in client code comments
This comment reintroduces the term daemon in client code, which violates the explicit rule in clients/AGENTS.md (“Terminology: Avoid "Daemon" in Client Code”). The clients guidance requires using “assistant” in client-facing naming/comments to keep terminology consistent and avoid leaking backend implementation detail into client surfaces; please update this wording accordingly.
Useful? React with 👍 / 👎.
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* [LUM-753] Improve dictation resilience: reduce timeout, use warning-level logs, add timing - Reduce dictation HTTP timeout from 10s to 5s so the client falls back to raw transcription faster when the daemon is unreachable - Downgrade failure logs from error to warning since these are expected failures with graceful recovery (not actionable errors) - Add elapsed time to all failure log messages for debugging latency - Improve fallback log to include transcription length for diagnostics Co-Authored-By: tkheyfets <timur@vellum.ai> * Apply suggestions from code review Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: tkheyfets <timur@vellum.ai> Co-authored-by: Noa Flaherty <noa@vellum.ai>
* fix: use borderElement for unchecked checkbox visibility (LUM-751) (#23992) The ToS checkbox border used VColor.borderBase (#24292E dark) which is identical to VCard's VColor.surfaceLift background (#24292E dark), making the unchecked checkbox completely invisible in dark mode. Switch to VColor.borderElement (#5A6672 dark / #CFCCC9 light) which is the semantic token for interactive element borders and provides clear contrast against the card background in both color schemes. Closes LUM-751 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> * fix: enable link click handling in VSelectableTextView (#23986) Add NSTextViewDelegate to Coordinator with textView(_:clickedOnLink:at:) to open clicked links in the default browser via NSWorkspace. The NSTextView was already styling links (tint color, underline, pointer cursor) but had no delegate to handle click events, making links visually styled but inert. Closes LUM-748 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> * fix: prevent onboarding from repeating name confirmation after tool calls (#23989) The agentic loop calls the LLM again after tool results return. Combined with "talk before you work" (SOUL.md) and "save immediately" (BOOTSTRAP.md), the model would confirm the user's name, call file_edit, then re-confirm the name in the continuation response. Add explicit guidance in both BOOTSTRAP.md and SOUL.md to not repeat text that was already shown before tool calls. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update Vellum Cloud onboarding copy to emphasize always-on availability (#24022) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [LUM-753] Improve client-side dictation resilience (#24042) * [LUM-753] Improve dictation resilience: reduce timeout, use warning-level logs, add timing - Reduce dictation HTTP timeout from 10s to 5s so the client falls back to raw transcription faster when the daemon is unreachable - Downgrade failure logs from error to warning since these are expected failures with graceful recovery (not actionable errors) - Add elapsed time to all failure log messages for debugging latency - Improve fallback log to include transcription length for diagnostics Co-Authored-By: tkheyfets <timur@vellum.ai> * Apply suggestions from code review Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: tkheyfets <timur@vellum.ai> Co-authored-by: Noa Flaherty <noa@vellum.ai> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> Co-authored-by: asharma53 <64060709+asharma53@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: tkheyfets <timur@vellum.ai>
* Release v0.6.2 * Cherry-pick fixes into release/v0.6.2 (#24074) * fix: use borderElement for unchecked checkbox visibility (LUM-751) (#23992) The ToS checkbox border used VColor.borderBase (#24292E dark) which is identical to VCard's VColor.surfaceLift background (#24292E dark), making the unchecked checkbox completely invisible in dark mode. Switch to VColor.borderElement (#5A6672 dark / #CFCCC9 light) which is the semantic token for interactive element borders and provides clear contrast against the card background in both color schemes. Closes LUM-751 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> * fix: enable link click handling in VSelectableTextView (#23986) Add NSTextViewDelegate to Coordinator with textView(_:clickedOnLink:at:) to open clicked links in the default browser via NSWorkspace. The NSTextView was already styling links (tint color, underline, pointer cursor) but had no delegate to handle click events, making links visually styled but inert. Closes LUM-748 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> * fix: prevent onboarding from repeating name confirmation after tool calls (#23989) The agentic loop calls the LLM again after tool results return. Combined with "talk before you work" (SOUL.md) and "save immediately" (BOOTSTRAP.md), the model would confirm the user's name, call file_edit, then re-confirm the name in the continuation response. Add explicit guidance in both BOOTSTRAP.md and SOUL.md to not repeat text that was already shown before tool calls. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update Vellum Cloud onboarding copy to emphasize always-on availability (#24022) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [LUM-753] Improve client-side dictation resilience (#24042) * [LUM-753] Improve dictation resilience: reduce timeout, use warning-level logs, add timing - Reduce dictation HTTP timeout from 10s to 5s so the client falls back to raw transcription faster when the daemon is unreachable - Downgrade failure logs from error to warning since these are expected failures with graceful recovery (not actionable errors) - Add elapsed time to all failure log messages for debugging latency - Improve fallback log to include transcription length for diagnostics Co-Authored-By: tkheyfets <timur@vellum.ai> * Apply suggestions from code review Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: tkheyfets <timur@vellum.ai> Co-authored-by: Noa Flaherty <noa@vellum.ai> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> Co-authored-by: asharma53 <64060709+asharma53@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: tkheyfets <timur@vellum.ai> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Noa Flaherty <noa@vellum.ai> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ashlee@vellum.ai <ashlee@vellum.ai> Co-authored-by: asharma53 <64060709+asharma53@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: tkheyfets <timur@vellum.ai>
Summary
Tunes the existing client-side dictation fallback to be less blocking when the daemon is unreachable (cloud-hosted assistants). The client already falls back to raw Apple Speech Recognition transcription on HTTP failure — this PR makes that happen faster and with better diagnostics.
Changes:
error→warningsince these are expected failures with graceful recovery, not actionable errorsNo new fallback logic — the
fallbackResponse/fallbackModemechanism was already in place.Review & Testing Checklist for Human
error→warningcould affect any dashboards or alerts keyed on DictationClient error-level logs.Notes
Link to Devin session: https://app.devin.ai/sessions/4d99242121f94fed84c1d80e873c569a
Requested by: @tkheyfets