feat(diagnostics): clearer paste-failure errors + one-click bug report - #5
Merged
Merged
Conversation
Paste/injection failures showed the truncated "paste failed: synthesize
Cmd+V" — the anyhow chain collapsed to its outermost context, hiding the
real cause (usually enigo's Accessibility check, since enigo 0.6 hard-errors
in new() when AXIsProcessTrusted is false). That made a real user report
undiagnosable.
- Log the full cause chain ({e:#}) instead of just the top context.
- Cause-aware overlay text via a read-only classify (Accessibility grant +
Secure Event Input state — no permission prompts): e.g. "grant
Accessibility to Murmur" or "Secure Input active (password field /
Terminal)".
- New diagnostics module + report_bug command: gathers version, macOS+arch,
Accessibility/mic status, Secure Input active, config summary, model
presence, and the last 120 log lines; copies the full report to the
clipboard and opens a prefilled GitHub issue. Wired to the existing
Settings > Support "Report a bug" button.
No dictated text is included (the log records counts/states/errors only).
Permission-free: no new prompts, no new dependencies.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhiLhbjf14q4Qc6Cq2Kzu3
There was a problem hiding this comment.
🟢 Approval recommended
The changes are cohesive and low-risk, and the remaining feedback is limited to minor robustness/performance improvements in the diagnostics helper.
Pull request overview
Improves end-user diagnosability of paste/injection failures by surfacing actionable overlay guidance and adding a one-click, on-device diagnostics report flow that pre-fills a GitHub issue and copies a richer report to the clipboard.
Changes:
- Log the full paste-failure cause chain (
{e:#}) and show cause-aware overlay text (Accessibility vs Secure Input vs other). - Add a Rust diagnostics module +
report_bugTauri command to gather environment/config status and a recent log tail, copy it to clipboard, and open a prefilled GitHub issue. - Wire the Settings ▸ Support “Report a bug” button to the new command and add the IPC constant.
File summaries
| File | Description |
|---|---|
| src-tauri/src/lib.rs | Uses full error-chain formatting and classifies paste failures to show actionable overlay text. |
| src-tauri/src/diagnostics.rs | New diagnostics/bug-report module (env/config snapshot, secure-input detection, log tail, URL builder). |
| src-tauri/src/commands.rs | Adds report_bug command to copy diagnostics to clipboard and open a prefilled GitHub issue. |
| frontend/settings.js | Calls report_bug and confirms to the user that diagnostics were copied and an issue was opened. |
| frontend/settings.html | Updates Support UI copy/button to “Report a bug” and explains what is collected. |
| frontend/constants.js | Adds CMD.REPORT_BUG IPC constant. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| c.refine_modifier.clone(), | ||
| ) | ||
| }) | ||
| .unwrap_or_default(); |
Comment on lines
+241
to
+248
| match std::fs::read_to_string(&path) { | ||
| Ok(s) => { | ||
| let lines: Vec<&str> = s.lines().collect(); | ||
| let start = lines.len().saturating_sub(max_lines); | ||
| lines[start..].join("\n") | ||
| } | ||
| Err(e) => format!("(could not read {}: {e})", path.display()), | ||
| } |
- gather(): fall back to explicit "unknown" on config lock poison instead of empty strings, so the report never shows a blank "STT model: " line (matches the documented behavior). - log_tail(): stream the log through a bounded ring buffer instead of reading the whole file + collecting every line, capping memory/time on a long-running session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhiLhbjf14q4Qc6Cq2Kzu3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A user hit a paste failure that surfaced only as
paste failed: synthesize Cmd+Vand gave up. Theanyhowchain was formatted with{e}, which collapses to the outermost context and hides the real cause (almost always enigo's Accessibility check — enigo 0.6 hard-errors innew()whenAXIsProcessTrustedis false). There was also no way for a user to send a useful report.What
{e:#}instead of{e}.report_bugcommand +diagnosticsmodule — gathers version, macOS + arch, Accessibility/mic status, Secure Input active, config summary, model presence, and the last 120 log lines; copies the full report to the clipboard and opens a prefilled GitHub issue. Wired to the existing Settings ▸ Support button.Notes
AXIsProcessTrusted,IsSecureEventInputEnabled) are read-only.Verified
./scripts/dev.sh.🤖 Generated with Claude Code