fix(ui): restore tab bar state after popup rollback
- commit
- 697b5f38df601b6bf35918e5b5380e498e83b484
- author
- brice · · 2026-07-27 08:46 UTC
- parent
- b95b119
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +3 -2
M internal/ui/coordinator/content/popup_hosting.go +2 -2
| @@ -2,7 +2,7 @@ package content | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "context" | |
| 5 | - | "fmt" | |
| 5 | + | "errors" | |
| 6 | 6 | "sync" | |
| 7 | 7 | ||
| 8 | 8 | "github.com/bnema/dumber/internal/application/dto" | |
| @@ -99,7 +99,7 @@ func (pm *popupManager) adoptPopupInBrowserWindow( | |||
| 99 | 99 | }) | |
| 100 | 100 | if err != nil || result.WindowID == "" { | |
| 101 | 101 | if err == nil { | |
| 102 | - | err = fmt.Errorf("%s", emptyWindowError) | |
| 102 | + | err = errors.New(emptyWindowError) | |
| 103 | 103 | } | |
| 104 | 104 | logBrowsingContextFailure(*log, normalized, decision, failureCode, err) | |
| 105 | 105 | return false | |
| @@ -2,7 +2,7 @@ package content | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "context" | 4 | "context" | ||
| 5 | - | "fmt" | 5 | + | "errors" |
| 6 | "sync" | 6 | "sync" | ||
| 7 | 7 | ||||
| 8 | "github.com/bnema/dumber/internal/application/dto" | 8 | "github.com/bnema/dumber/internal/application/dto" | ||
| @@ -99,7 +99,7 @@ func (pm *popupManager) adoptPopupInBrowserWindow( | |||||
| 99 | }) | 99 | }) | ||
| 100 | if err != nil || result.WindowID == "" { | 100 | if err != nil || result.WindowID == "" { | ||
| 101 | if err == nil { | 101 | if err == nil { | ||
| 102 | - | err = fmt.Errorf("%s", emptyWindowError) | 102 | + | err = errors.New(emptyWindowError) |
| 103 | } | 103 | } | ||
| 104 | logBrowsingContextFailure(*log, normalized, decision, failureCode, err) | 104 | logBrowsingContextFailure(*log, normalized, decision, failureCode, err) | ||
| 105 | return false | 105 | return false | ||
M internal/ui/coordinator/tab.go +1 -0
| @@ -548,6 +548,7 @@ func (c *TabCoordinator) CreateWithPane( | |||
| 548 | 548 | if target.MainWindow != nil && target.MainWindow.TabBar() != nil { | |
| 549 | 549 | target.MainWindow.TabBar().RemoveTab(output.Tab.ID) | |
| 550 | 550 | } | |
| 551 | + | c.UpdateBarVisibility(ctx, target) | |
| 551 | 552 | if c.onTabClosed != nil { | |
| 552 | 553 | c.onTabClosed(ctx, target, output.Tab) | |
| 553 | 554 | } | |
| @@ -548,6 +548,7 @@ func (c *TabCoordinator) CreateWithPane( | |||||
| 548 | if target.MainWindow != nil && target.MainWindow.TabBar() != nil { | 548 | if target.MainWindow != nil && target.MainWindow.TabBar() != nil { | ||
| 549 | target.MainWindow.TabBar().RemoveTab(output.Tab.ID) | 549 | target.MainWindow.TabBar().RemoveTab(output.Tab.ID) | ||
| 550 | } | 550 | } | ||
| 551 | + | c.UpdateBarVisibility(ctx, target) | |||
| 551 | if c.onTabClosed != nil { | 552 | if c.onTabClosed != nil { | ||
| 552 | c.onTabClosed(ctx, target, output.Tab) | 553 | c.onTabClosed(ctx, target, output.Tab) | ||
| 553 | } | 554 | } | ||