fix(renderer): load UI state before Keychain authentication#2104
fix(renderer): load UI state before Keychain authentication#2104fbricon wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughMain process registers configuration and color IPC handlers immediately after their registries initialize and defers SafeStorageRegistry init. Renderer stores trigger immediate initial fetches for colors, configuration properties, and navigation (with error logging). ColorsStyle guards against falsy color infos before generating styles. ChangesEarly data initialization for renderer startup
🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
gastoner
left a comment
There was a problem hiding this comment.
Personally I would move the registration of IPC handles to init methods of colorRegistry and configurationRegistry
LGTM otherwise
This indirection idea is sometimes interesting, but here, I'd rather not introduce new couplings to these registries. At least we have a mostly consistent way of registering IPC handles here. |
dfd2880 to
ab61b96
Compare
Fixes openkaiden#2091 On macOS initial startup from DMG, UI was not properly initialized until after Keychain authentication completed. Window showed with black background and missing navigation labels while waiting for user to authenticate. Root cause: SafeStorageRegistry.init() was called before ColorRegistry, ConfigurationRegistry, and their IPC handlers were registered. When the renderer loaded, critical IPC handlers were unavailable, preventing colors, configuration properties, and navigation from loading until the entire initialization sequence completed (including Keychain auth). Changes: - Reordered initialization: ConfigurationRegistry and ColorRegistry now initialize before SafeStorageRegistry - Registered configuration and color IPC handlers immediately after their respective registries initialize - Added immediate fetch in EventStores for colors, configuration properties, and navigation registry instead of waiting for events - Added undefined guard in ColorsStyle for test environments Result: Colors, configuration, and navigation labels all load immediately when the renderer starts, before SafeStorageRegistry initialization. The UI is fully styled and functional even when the Keychain authentication prompt appears during extension activation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Fred Bricon <fbricon@gmail.com>
ab61b96 to
6d5a7bf
Compare
benoitf
left a comment
There was a problem hiding this comment.
this is something we inherit from rebasing from Podman Desktop, we should not change any logic only for kaiden
Fixes #2091
On macOS initial startup from DMG, UI was not properly initialized until
after Keychain authentication completed. Window showed with black background
and missing navigation labels while waiting for user to authenticate.
Root cause: SafeStorageRegistry.init() was called before ColorRegistry,
ConfigurationRegistry, and their IPC handlers were registered. When the
renderer loaded, critical IPC handlers were unavailable, preventing colors,
configuration properties, and navigation from loading until the entire
initialization sequence completed (including Keychain auth).
Changes:
initialize before SafeStorageRegistry
respective registries initialize
and navigation registry instead of waiting for events
Result: Colors, configuration, and navigation labels all load immediately
when the renderer starts, before SafeStorageRegistry initialization. The UI
is fully styled and functional even when the Keychain authentication prompt
appears during extension activation.