@@ -62,6 +62,14 @@ def _init_ui(self) -> None:
6262 )
6363 group_layout .addWidget (self .chk_telemetry )
6464
65+ # Error reporting (Sentry) – consent to send crash/error reports
66+ self .chk_error_reporting = QCheckBox ("Send error reports to help fix bugs" )
67+ self .chk_error_reporting .setToolTip (
68+ "When enabled, crash reports and error details are sent to the developers "
69+ "so we can fix issues. No personal data or file contents are included."
70+ )
71+ group_layout .addWidget (self .chk_error_reporting )
72+
6573 self .chk_clear_cache = QCheckBox ("Clear cache on exit" )
6674 self .chk_clear_logs = QCheckBox ("Clear logs on exit" )
6775
@@ -80,6 +88,7 @@ def _init_ui(self) -> None:
8088 layout .addWidget (group )
8189
8290 self .chk_telemetry .toggled .connect (self ._on_telemetry_changed )
91+ self .chk_error_reporting .toggled .connect (self ._on_error_reporting_changed )
8392 self .chk_clear_cache .toggled .connect (self ._on_changed )
8493 self .chk_clear_logs .toggled .connect (self ._on_changed )
8594 self .btn_manage .clicked .connect (self .open_privacy_dialog_requested .emit )
@@ -93,6 +102,15 @@ def _load(self) -> None:
93102 "telemetry.enabled" , False
94103 )
95104 self .chk_telemetry .setChecked (bool (enabled ))
105+ try :
106+ from cuepoint .utils .error_reporting_prefs import ErrorReportingPrefs
107+
108+ er_prefs = ErrorReportingPrefs ()
109+ self .chk_error_reporting .setChecked (
110+ er_prefs .is_enabled () and er_prefs .has_user_consented ()
111+ )
112+ except Exception :
113+ self .chk_error_reporting .setChecked (False )
96114
97115 def _on_telemetry_changed (self , checked : bool ) -> None :
98116 if self ._config_controller :
@@ -106,6 +124,16 @@ def _on_telemetry_changed(self, checked: bool) -> None:
106124 except Exception :
107125 pass
108126
127+ def _on_error_reporting_changed (self , checked : bool ) -> None :
128+ try :
129+ from cuepoint .utils .error_reporting_prefs import ErrorReportingPrefs
130+
131+ er_prefs = ErrorReportingPrefs ()
132+ er_prefs .set_enabled (bool (checked ))
133+ er_prefs .set_consented (bool (checked ))
134+ except Exception :
135+ pass
136+
109137 def _on_changed (self ) -> None :
110138 self ._privacy .set_clear_cache_on_exit (self .chk_clear_cache .isChecked ())
111139 self ._privacy .set_clear_logs_on_exit (self .chk_clear_logs .isChecked ())
@@ -114,6 +142,7 @@ def get_snapshot(self) -> tuple:
114142 """Return a comparable snapshot for change detection."""
115143 return (
116144 self .chk_telemetry .isChecked (),
145+ self .chk_error_reporting .isChecked (),
117146 self .chk_clear_cache .isChecked (),
118147 self .chk_clear_logs .isChecked (),
119148 )
0 commit comments