Commit d532024
committed
Fix invisible window when navigating to a deleted route
The Electron window only showed via an IPC signal from the dashboard
layout. If localStorage had a stale URL pointing to a removed route,
the 404 page rendered outside the dashboard layout, the signal never
fired, and the window stayed hidden forever.
Two fixes:
- electron/main.ts: add a 5s fallback timeout to show the window even
if the renderer never signals ready
- src/app/not-found.tsx: global 404 handler that clears stale nav state
and redirects to /dashboard1 parent 63cc2bb commit d532024
3 files changed
Lines changed: 29 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
562 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
563 | 572 | | |
564 | 573 | | |
565 | 574 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments