Skip to content

hide account badge in google app window when only one account#552

Merged
timche merged 3 commits intomainfrom
claude/hide-single-account-badge-zUNc9
Apr 24, 2026
Merged

hide account badge in google app window when only one account#552
timche merged 3 commits intomainfrom
claude/hide-single-account-badge-zUNc9

Conversation

@timche
Copy link
Copy Markdown
Collaborator

@timche timche commented Apr 24, 2026

Summary

  • Hide the AccountBadge in the Google App titlebar when only one account is configured.
  • Pass the owning accountId as a URL search param when loading the Google App renderer, and look the account up via useConfig on the renderer side.
  • Remove the now-unused googleApp.getAccount IPC handler and its type.

Changes

  • packages/app/google-app.ts — set accountId on the renderer's search params in createBrowserWindow.
  • packages/renderer-google-app/index.tsx — read accountId with useSearchParams from wouter, find the account in config.accounts, and render the badge only when config.accounts.length > 1.
  • packages/app/ipc.ts / packages/shared/types.ts — drop the googleApp.getAccount IPC.

Test plan

  • With a single account configured, open a Google App window — no account badge shown in the titlebar.
  • With 2+ accounts configured, open a Google App window — badge shows the correct label and color for the owning account.
  • Verify no TypeScript errors (bun types:ci).

https://claude.ai/code/session_016BG78TYNmhifvxirqH41WA

claude added 3 commits April 24, 2026 16:55
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
@timche timche changed the title Return null from getAccount when single account exists hide account badge in google app window when only one account Apr 24, 2026
@timche timche merged commit d80d44a into main Apr 24, 2026
7 checks passed
@timche timche deleted the claude/hide-single-account-badge-zUNc9 branch April 24, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants