@@ -209,8 +209,13 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
209209 })
210210 // Permissions
211211 case pubsub.Event[permission.PermissionNotification]:
212+ item, ok := a.pages[a.currentPage]
213+ if !ok {
214+ return a, nil
215+ }
216+
212217 // forward to page
213− updated, cmd := a.pages[a.currentPage].Update(msg)
218+ updated, cmd := item.Update(msg)
214219 a.pages[a.currentPage] = updated.(util.Model)
215220 return a, cmd
216221 case pubsub.Event[permission.PermissionRequest]:
@@ -258,8 +263,13 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
258263
259264 return a, tea.Batch(cmds...)
260265 case splash.OnboardingCompleteMsg:
266+ item, ok := a.pages[a.currentPage]
267+ if !ok {
268+ return a, nil
269+ }
270+
261271 a.isConfigured = config.HasInitialDataConfig()
262− updated, pageCmd := a.pages[a.currentPage].Update(msg)
272+ updated, pageCmd := item.Update(msg)
263273 a.pages[a.currentPage] = updated.(util.Model)
264274 cmds = append(cmds, pageCmd)
265275 return a, tea.Batch(cmds...)
@@ -273,7 +283,12 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
273283 a.dialog = u.(dialogs.DialogCmp)
274284 cmds = append(cmds, dialogCmd)
275285 } else {
276− updated, pageCmd := a.pages[a.currentPage].Update(msg)
286+ item, ok := a.pages[a.currentPage]
287+ if !ok {
288+ return a, nil
289+ }
290+
291+ updated, pageCmd := item.Update(msg)
277292 a.pages[a.currentPage] = updated.(util.Model)
278293 cmds = append(cmds, pageCmd)
279294 }
@@ -284,7 +299,12 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
284299 a.dialog = u.(dialogs.DialogCmp)
285300 cmds = append(cmds, dialogCmd)
286301 } else {
287− updated, pageCmd := a.pages[a.currentPage].Update(msg)
302+ item, ok := a.pages[a.currentPage]
303+ if !ok {
304+ return a, nil
305+ }
306+
307+ updated, pageCmd := item.Update(msg)
288308 a.pages[a.currentPage] = updated.(util.Model)
289309 cmds = append(cmds, pageCmd)
290310 }
@@ -292,8 +312,14 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
292312 }
293313 s, _ := a.status.Update(msg)
294314 a.status = s.(status.StatusCmp)
295− updated, cmd := a.pages[a.currentPage].Update(msg)
315+
316+ item, ok := a.pages[a.currentPage]
317+ if !ok {
318+ return a, nil
319+ }
320+ updated, cmd := item.Update(msg)
296321 a.pages[a.currentPage] = updated.(util.Model)
322+
297323 if a.dialog.HasDialogs() {
298324 u, dialogCmd := a.dialog.Update(msg)
299325 a.dialog = u.(dialogs.DialogCmp)
@@ -411,7 +437,12 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
411437 a.dialog = u.(dialogs.DialogCmp)
412438 return dialogCmd
413439 } else {
414− updated, cmd := a.pages[a.currentPage].Update(msg)
440+ item, ok := a.pages[a.currentPage]
441+ if !ok {
442+ return nil
443+ }
444+
445+ updated, cmd := item.Update(msg)
415446 a.pages[a.currentPage] = updated.(util.Model)
416447 return cmd
417448 }