Commit 51b6102
committed
Error reports: Add Flow B auto-send (opt-in, debounced)
- New `error_reporter::auto_dispatcher` module: 60s ± 10s debounce window per error
burst, captures the first error's metadata, increments a counter for the rest, then
ships a 1MB-tail bundle via the Phase 4 builder/uploader and emits
`error-report-auto-sent` with the server ID.
- New `log_error!` macro: drop-in replacement for `log::error!` at user-visible
failure sites. Fires the auto-dispatcher only when opted in (single atomic load).
- Migrated 7 user-visible error sites: copy/volume-copy failures, listing FE/BE index
desync, AI server spawn/start failures, MCP server crash/start failures, and the
indexing memory-watchdog forced stop.
- New setting `updates.errorReports` (boolean, default false) in the Updates section.
Wired through `settings-registry`, `settings-applier`, `loader.rs`, and a new
`set_error_reports_enabled` Tauri command. The dispatcher's opt-in flag is set in
`lib.rs::setup` *before* any user-visible error path can fire.
- New `AutoSendToastContent.svelte` + `auto-send-toast.svelte.ts` listener: shows
"Error report sent / Reference ID: ERR-XXXXX" with View and Change settings
actions, auto-dismiss after 10s. Mounted from `(main)/+layout.svelte`.
- Tests: 6 unit tests for the dispatcher (debounce, opt-in, first-call-wins,
jitter band, crash-loop note) + a11y/unit tests for the toast.
- Docs: updated `error_reporter/CLAUDE.md` (Flow B mechanics, jitter rationale,
crash-loop semantics, `log_error!` convention), `error-reporter/CLAUDE.md`
(Flow B toast), and `settings/CLAUDE.md` (new field).1 parent 6d904aa commit 51b6102
26 files changed
Lines changed: 973 additions & 24 deletions
File tree
- apps/desktop
- src-tauri/src
- ai
- commands
- error_reporter
- file_system
- listing
- write_operations
- indexing
- mcp
- settings
- src
- lib
- error-reporter
- settings
- sections
- tauri-commands
- routes/(main)
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
78 | 148 | | |
79 | 149 | | |
80 | 150 | | |
| |||
0 commit comments