-
Notifications
You must be signed in to change notification settings - Fork 912
Fix crash in authentication flow caused by storage IPC errors #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,9 +11,9 @@ declare global { | |
| App: typeof API; | ||
| ipcRenderer: typeof ipcRendererAPI; | ||
| electronStore: { | ||
| get: (key: string) => unknown; | ||
| set: (key: string, value: unknown) => void; | ||
| delete: (key: string) => void; | ||
| get: (key: string) => Promise<unknown>; | ||
| set: (key: string, value: unknown) => Promise<void>; | ||
| delete: (key: string) => Promise<void>; | ||
| }; | ||
|
Comment on lines
13
to
17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type declarations correctly updated to async, but underlying IPC should use tRPC. The change from synchronous to Promise-based return types is correct and aligns with the async IPC implementation. However, this entire electronStore API should be implemented using tRPC instead of raw IPC channels. Based on coding guidelines, all Electron IPC should use tRPC as defined in 🤖 Prompt for AI Agents |
||
| webUtils: { | ||
| getPathForFile: (file: File) => string; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 1230
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 669
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 3416
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 2413
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 137
Migrate storage operations to tRPC procedures instead of raw IPC handlers.
This implementation uses raw
ipcMain.handlefor storage operations, which violates the project's guideline requiring all Electron interprocess communication to use tRPC (defined insrc/lib/trpc). All other domain operations (config, settings, projects, etc.) are properly exposed through tRPC procedures.Storage should be implemented as a tRPC router with
get,set, anddeleteprocedures following the existing pattern in other routers (e.g.,apps/desktop/src/lib/trpc/routers/config/config.ts). The error handling improvements here are valuable but cannot substitute for proper architectural alignment with the established tRPC infrastructure.