Skip to content

fix(issue 522): surface paste errors as UI toast notification#1198

Open
odedindi wants to merge 2 commits intocjpais:mainfrom
odedindi:fix/issue-522-paste-error
Open

fix(issue 522): surface paste errors as UI toast notification#1198
odedindi wants to merge 2 commits intocjpais:mainfrom
odedindi:fix/issue-522-paste-error

Conversation

@odedindi
Copy link
Copy Markdown

Human Written Description

I was looking for a good first issue to start with in this repo, and from several issues I had Claude filter for me this issue seemed straight forward.
I basically extended the existing 'RecordingErrorEvent' error handling pattern.

This MR does not actually resolve or fixes the original issue described but at least now users will be notified on such errors

Related Issues/Discussions

Fixes #522
Discussion:

Testing

Verified with:

  • bun run build — TypeScript clean
  • cargo check — clean
  • bun run lint — ESLint clean
  • cargo fmt + prettier — formatting applied
    Live paste-failure testing requires Linux with a broken paste tool (wtype/xdotool/dotool). I don't have a Linux environment available and it would be great to have a Linux contributor verify the toast appears end-to-end.

AI Assistance

  • AI was used (please describe below)
  • Tools used: OpenCode with Claude
  • How extensively: AI helped implement the fix, apply formatting, and draft the PR description. The human description above is my own words. I reviewed and directed all changes.

When pasting the transcription fails (e.g. wtype/xdotool/dotool not
available or returns an error on Linux), the error was silently logged
to the backend console only.  Users had no idea why their text was not
pasted.

Emit a new 'paste-error' Tauri event from the Rust side and listen for
it in the frontend App component, showing a sonner toast with the error
detail — mirroring the existing 'recording-error' pattern exactly.

Files changed:
- src-tauri/src/actions.rs: add PasteErrorEvent struct, emit event on paste failure
- src/App.tsx: add useEffect listener that shows toast.error on paste-error
- src/lib/types/events.ts: add PasteErrorEvent interface
- src/i18n/locales/en/translation.json: add pasteFailedTitle/pasteFailed keys
@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Apr 1, 2026

ill take a look when I get a chance, probably a good thing to have

@VirenMohindra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] wtype failures seem silently ignored

2 participants