In-App Report Issue (CAS-1030)
In-App Report Issue (CAS-1030)
Delivered in PRs #302–#307 (April 2026).
Overview
Regent-only feature that lets the regent file a GitHub bug report directly from within the running app, attaching a recent log snapshot and an optional screenshot.
How it works
- Floating button (
FloatingReportButton.tsx) — visible only when the active profile matches the regent’s user ID. Hidden on mobile (iOS/Android) via a platform check. - Report sheet (
ReportSheet.tsx) — a bottom-sheet modal that the regent fills in: title + description. On submit it:- Calls the
report_issueTauri command, which drains the in-memory log ring buffer (last ~200 log lines) and attaches it as a code block in the issue body. - Optionally captures a screenshot via Tauri’s window screenshot API.
- Opens a GitHub issue in
abernerus/casaconomy-appwith the log + screenshot attached.
- Calls the
- Log ring buffer — a
VecDeque<String>capped at 200 entries, populated by the Rustlogmacros throughout the backend. Drained (not cleared) on each report so subsequent reports capture fresh logs. - Submit timeout (CAS-1045) — a 30-second escape hatch: if the GitHub API call hangs, the sheet shows an error and unlocks the UI rather than spinning indefinitely.
Key files
| Layer | File |
|---|---|
| Frontend button | src/components/FloatingReportButton.tsx |
| Frontend sheet | src/components/ReportSheet.tsx |
| Frontend store | src/store/useReportIssueStore.ts |
| Frontend IPC | src/tauri/reportClient.ts |
| TS bindings | src/types/bindings/ReportIssueParams.ts |
| Rust command | src-tauri/src/commands/report_issue.rs |
Access control
The floating button is gated on useSettingsStore — specifically the isRegent flag derived from the active profile. Non-regent profiles never see the button or the sheet. The Tauri command performs a second check server-side (regent flag in the settings table) to prevent spoofed invocations.
Limitations / known gaps
- Screenshot capture is best-effort: if the webview is off-screen or throttled (WKWebView), the screenshot may be blank. The report still files without it.
- Log ring buffer is in-process only — Rust panics that kill the process before the buffer is drained are not captured.
- GitHub API call is unauthenticated at the app level; it relies on a PAT stored in the settings table (regent sets this up once in preferences).