Skip to content

Add error logs viewer#21

Merged
symonbaikov merged 1 commit into
mainfrom
codex/error-logs-viewer
Jun 25, 2026
Merged

Add error logs viewer#21
symonbaikov merged 1 commit into
mainfrom
codex/error-logs-viewer

Conversation

@symonbaikov

Copy link
Copy Markdown
Collaborator

Summary

  • add a Settings -> Error Logs dialog for local error history by day
  • store error-only daily logs under the app log directory with 14-day retention
  • capture backend Rust/plugin error logs plus frontend console.error, window.error, and unhandledrejection
  • update log capture docs with the new in-app viewer flow

Details

  • Added Tauri IPC commands for listing log days, reading a selected day, and recording frontend errors.
  • Added an error-only tauri-plugin-log dispatch target that writes backend/plugin errors to daily files.
  • Added a frontend installer that preserves existing console logging while forwarding error events to the backend without recursive failures.
  • Added focused tests for backend retention/date validation, the dialog, Settings entry point, and frontend error forwarding.

Screenshots

Captured locally before creating the PR:

  • Before: /tmp/openusage-error-logs-pr/screenshots/error-logs-settings-before.png
  • After: /tmp/openusage-error-logs-pr/screenshots/error-logs-settings-after.png

Validation

  • BINDGEN_EXTRA_CLANG_ARGS=-isystem/usr/lib/clang/21/include cargo test --manifest-path src-tauri/Cargo.toml error_logs --lib
  • bun run test -- src/components/error-logs-dialog.test.tsx src/pages/settings.test.tsx src/lib/frontend-error-logging.test.ts
  • bun run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • git diff --check

Notes

  • No README provider-list update needed; this is not a plugin change.
  • Visual screenshots were taken from Vite previews for Settings before/after. The full Tauri dev app was also launched successfully during manual validation on a temporary port because 1420 was already in use by another project.

@symonbaikov symonbaikov marked this pull request as ready for review June 25, 2026 11:59
@symonbaikov symonbaikov merged commit 24772c7 into main Jun 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant