hide account badge in google app window when only one account#552
Merged
hide account badge in google app window when only one account#552
Conversation
Use useConfig + skipToken to avoid invoking googleApp.getAccount when only one account exists, instead of gating in the main handler. https://claude.ai/code/session_016BG78TYNmhifvxirqH41WA
Replace the googleApp.getAccount IPC with an accountId query string parameter. The renderer reads it with useSearchParams from wouter and looks up the account in useConfig, rendering the badge only when more than one account exists. https://claude.ai/code/session_016BG78TYNmhifvxirqH41WA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AccountBadgein the Google App titlebar when only one account is configured.accountIdas a URL search param when loading the Google App renderer, and look the account up viauseConfigon the renderer side.googleApp.getAccountIPC handler and its type.Changes
packages/app/google-app.ts— setaccountIdon the renderer's search params increateBrowserWindow.packages/renderer-google-app/index.tsx— readaccountIdwithuseSearchParamsfromwouter, find the account inconfig.accounts, and render the badge only whenconfig.accounts.length > 1.packages/app/ipc.ts/packages/shared/types.ts— drop thegoogleApp.getAccountIPC.Test plan
bun types:ci).https://claude.ai/code/session_016BG78TYNmhifvxirqH41WA