App: crash reports and a log file; Help › Report a Bug (#107)

The desktop app installs the crash reporter and a log file at start
(both in a temporary folder in --control and CI runs, #266), journals
the window's commands (background jobs included) and every control
request's method, and ends the journal on a clean exit. A start after a
crash asks: "FieldCraft closed unexpectedly", Report It… or Not Now.

Help › Report a Bug (also Tools › Help and ui.start
diagnostics.bug_report) shows exactly what the GitHub bug form will be
filled with: the version, the OS, the last error, and for a crash where
it happened. Share my session adds the replayable commands, Include the
model file the model. Open GitHub Issue opens the form in the browser
through the system's opener; files to attach are saved to
bug-reports/<time>/ and a long session goes on the clipboard. Nothing is
sent without that click and the user's submit on GitHub.

The control channel answers the new prompts (crashed: report, close;
report_bug: set, close) and ui.inspect shows the draft; it never opens
the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 00:36:18 -04:00
1 parent cb7e3a2711
commit e06c85eb9e
9 files changed
+503 -8

No files matched your search

+9
View File
@@ -40,6 +40,7 @@ pub mod menu;
pub mod navigation;
pub mod palette;
pub mod reply;
pub mod report;
pub mod results;
pub mod results_panel;
pub mod samples;
@@ -390,6 +391,10 @@ pub struct ModelApp {
pub queued: std::collections::VecDeque<String>,
/// The question the window is asking (unsaved changes, recover).
pub prompt: Option<files::Prompt>,
/// Help › Report a Bug's form, while open ([`files::Prompt::ReportBug`]).
pub report: Option<report::ReportForm>,
/// The last error the status bar showed (what Report a Bug starts from).
pub last_error: Option<String>,
/// A design opened over a model of another part, waiting for [`files::Prompt::Design`]'s answer.
pub held: Option<files::Opened>,
/// The window draws its own title bar and caption buttons (Windows, Linux).
@@ -468,6 +473,8 @@ impl ModelApp {
loading: None,
queued: std::collections::VecDeque::new(),
prompt: None,
report: None,
last_error: None,
held: None,
custom_titlebar: false,
integrated_titlebar: false,
@@ -783,6 +790,7 @@ impl ModelApp {
let text = text.into();
if error {
log::warn!("{text}");
self.last_error = Some(text.clone());
}
self.status = Some(Status { text, error });
}
@@ -1442,6 +1450,7 @@ impl ModelApp {
egui::CentralPanel::default().frame(egui::Frame::NONE).show(ui, |ui| viewport::show(self, ui));
palette::popup(self, ui.ctx());
files::show(self, ui.ctx());
report::show(self, ui.ctx());
if self.custom_titlebar {
titlebar::resize_zones(ui);
}