@@ -122,7 +122,7 @@ impl Default for DashboardConfig {
122122 SlotConfig :: with_widget( "recent_commands" , 1 , 0 ) ,
123123 SlotConfig :: with_widget( "frequent_commands" , 1 , 1 ) ,
124124 SlotConfig :: with_widget( "recent_notes" , 1 , 2 ) ,
125- SlotConfig :: with_widget( "active_timers " , 2 , 0 ) ,
125+ SlotConfig :: with_widget( "timers " , 2 , 0 ) ,
126126 SlotConfig :: with_widget( "clipboard_snippets" , 2 , 1 ) ,
127127 ] ,
128128 }
@@ -156,6 +156,7 @@ impl DashboardConfig {
156156 /// Remove unsupported widgets and normalize empty settings.
157157 pub fn sanitize ( & mut self , registry : & WidgetRegistry ) -> Vec < String > {
158158 let mut warnings = Vec :: new ( ) ;
159+ self . migrate_active_timers_widgets ( registry, & mut warnings) ;
159160 self . migrate_todo_widgets ( registry, & mut warnings) ;
160161 self . slots . retain ( |slot| {
161162 if slot. widget . is_empty ( ) {
@@ -207,4 +208,21 @@ impl DashboardConfig {
207208 }
208209 }
209210 }
211+
212+ fn migrate_active_timers_widgets (
213+ & mut self ,
214+ registry : & WidgetRegistry ,
215+ warnings : & mut Vec < String > ,
216+ ) {
217+ for slot in & mut self . slots {
218+ let Some ( default_settings) = registry. default_settings ( "timers" ) else {
219+ continue ;
220+ } ;
221+ if slot. widget == "active_timers" {
222+ slot. widget = "timers" . into ( ) ;
223+ slot. settings = merge_json ( & default_settings, & slot. settings ) ;
224+ warnings. push ( "dashboard widget 'active_timers' migrated to 'timers'" . to_string ( ) ) ;
225+ }
226+ }
227+ }
210228}
0 commit comments