Skip to content

Bug 2019055, 2019267 - Customize CrashReporter UI for policy autosubmits and Enterprise restart behavior#494

Open
jonathanmendez wants to merge 1 commit intomozilla:enterprise-mainfrom
jonathanmendez:crash-autosubmit-dialog
Open

Bug 2019055, 2019267 - Customize CrashReporter UI for policy autosubmits and Enterprise restart behavior#494
jonathanmendez wants to merge 1 commit intomozilla:enterprise-mainfrom
jonathanmendez:crash-autosubmit-dialog

Conversation

@jonathanmendez
Copy link
Contributor

Note: This does not add the behavior of auto-submitting yet, so even with the env variable for policy auto-submit, the crash report will be submitted on pressing the button in the crash reporter app rather than any earlier.

Enterprise crash reporter when policy is not on:
image

Enterprise crash reporter when policy is on:
image

Note: The text at the bottom "Your crash report will automatically be submitted." should not end up being visible once the policy autosubmit behavior is implemented; that label is tied to the submit status, and the submit will be kicked off as the UI becomes visible, so users will instead see a progress bar/completion message.

@jonathanmendez jonathanmendez requested a review from a team March 3, 2026 04:28
@lissyx
Copy link
Contributor

lissyx commented Mar 3, 2026

You will want a review from @afranchuk I guess ?

@@ -7,6 +7,7 @@ crashreporter-branded-title = { -brand-short-name } Crash Reporter
crashreporter-apology = We’re Sorry
crashreporter-crashed-and-restore = { -brand-short-name } had a problem and crashed. We’ll try to restore your tabs and windows when it restarts.
crashreporter-plea = To help us diagnose and fix the problem, you can send us a crash report.
crashreporter-policy-explanation = Per configured policy, a report is automatically sent to your admin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those strings are enterprise specific? We need to introduce a new crashreporter-enterprise.ftl for example and isolate all enterprise-specific string there.

Comment on lines +221 to +225
let input_enabled = if config.policy_auto_submit {
data::Synchronized::new(false)
} else {
submit_state.mapped(|s| s == &SubmitState::Initial)
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If config.policy_auto_submit is true, maybe it would make more sense to set the submit state to InProgress (which would have the side-effect of disabling the inputs). InProgress (and the follow-on states) is sort of defined as not allowing any more input (and we could more rigorously document that in comments to be sure that remains true).

Comment on lines 315 to 319
Button["quit"] on_click(cc! { (logic) move || logic.push(|s| s.quit()) })
enabled(&input_enabled) hsize(160)
enabled(&quit_enabled) hsize(160)
{
Label text(config.string("crashreporter-button-quit"))
Label text(config.string(if cfg!(feature = "enterprise") {"crashreporter-button-ok"} else {"crashreporter-button-quit"}))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the behavior of the "Ok" button is different from the "Quit" button (quit potentially triggers submission, whereas ok will just dismiss the window), I'd prefer it be defined as a separate button entirely.

We could add support for attributes in the ui! macro, which would allow us to more easily add/remove the buttons with #![cfg(...)]. Or just add support for "switching back" to imperative code. I'll take a look at that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there's a pretty simple change we can make to the ui! macro to allow you to insert regular imperative code (the macro is already pretty simple, so it made it easy). I can make a bug to get that into f-m.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Yeah I tried the cfg attribute first and ran into the macro issues and guessed it would be hard to deal with that; glad it sounds like it was easy!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created https://bugzilla.mozilla.org/show_bug.cgi?id=2021010. I'll have a patch in soon.

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.

3 participants